2 from juju
.client
.facade
import Type
, ReturnMapping
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):
10 parameters : typing.Mapping[str, typing.Any]
15 self
.parameters
= parameters
16 self
.receiver
= receiver
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):
30 output : typing.Mapping[str, typing.Any]
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
40 self
.started
= started
44 class ActionResults(Type
):
45 _toSchema
= {'results': 'results'}
46 _toPy
= {'results': 'results'}
47 def __init__(self
, results
=None):
49 results : typing.Sequence[~ActionResult]
51 self
.results
= [ActionResult
.from_json(o
) for o
in results
or []]
54 class ActionSpec(Type
):
55 _toSchema
= {'params': 'Params', 'description': 'Description'}
56 _toPy
= {'Params': 'params', 'Description': 'description'}
57 def __init__(self
, description
=None, params
=None):
60 params : typing.Mapping[str, typing.Any]
62 self
.description
= description
67 _toSchema
= {'actionspecs': 'ActionSpecs'}
68 _toPy
= {'ActionSpecs': 'actionspecs'}
69 def __init__(self
, actionspecs
=None):
71 actionspecs : typing.Mapping[str, ~ActionSpec]
73 self
.actionspecs
= {k
: ActionSpec
.from_json(v
) for k
, v
in (actionspecs
or dict()).items()}
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):
81 actions : typing.Sequence[~ActionResult]
85 self
.actions
= [ActionResult
.from_json(o
) for o
in actions
or []]
86 self
.error
= Error
.from_json(error
) if error
else None
90 class ActionsByNames(Type
):
91 _toSchema
= {'actions': 'actions'}
92 _toPy
= {'actions': 'actions'}
93 def __init__(self
, actions
=None):
95 actions : typing.Sequence[~ActionsByName]
97 self
.actions
= [ActionsByName
.from_json(o
) for o
in actions
or []]
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):
105 actions : typing.Sequence[~ActionResult]
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
114 class ActionsByReceivers(Type
):
115 _toSchema
= {'actions': 'actions'}
116 _toPy
= {'actions': 'actions'}
117 def __init__(self
, actions
=None):
119 actions : typing.Sequence[~ActionsByReceiver]
121 self
.actions
= [ActionsByReceiver
.from_json(o
) for o
in actions
or []]
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):
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
138 class ApplicationsCharmActionsResults(Type
):
139 _toSchema
= {'results': 'results'}
140 _toPy
= {'results': 'results'}
141 def __init__(self
, results
=None):
143 results : typing.Sequence[~ApplicationCharmActionsResult]
145 self
.results
= [ApplicationCharmActionsResult
.from_json(o
) for o
in results
or []]
148 class Entities(Type
):
149 _toSchema
= {'entities': 'Entities'}
150 _toPy
= {'Entities': 'entities'}
151 def __init__(self
, entities
=None):
153 entities : typing.Sequence[~Entity]
155 self
.entities
= [Entity
.from_json(o
) for o
in entities
or []]
159 _toSchema
= {'tag': 'Tag'}
160 _toPy
= {'Tag': 'tag'}
161 def __init__(self
, tag
=None):
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):
178 self
.info
= ErrorInfo
.from_json(info
) if info
else None
179 self
.message
= message
182 class ErrorInfo(Type
):
183 _toSchema
= {'macaroon': 'Macaroon', 'macaroonpath': 'MacaroonPath'}
184 _toPy
= {'Macaroon': 'macaroon', 'MacaroonPath': 'macaroonpath'}
185 def __init__(self
, macaroon
=None, macaroonpath
=None):
190 self
.macaroon
= Macaroon
.from_json(macaroon
) if macaroon
else None
191 self
.macaroonpath
= macaroonpath
194 class FindActionsByNames(Type
):
195 _toSchema
= {'names': 'names'}
196 _toPy
= {'names': 'names'}
197 def __init__(self
, names
=None):
199 names : typing.Sequence[str]
204 class FindTags(Type
):
205 _toSchema
= {'prefixes': 'prefixes'}
206 _toPy
= {'prefixes': 'prefixes'}
207 def __init__(self
, prefixes
=None):
209 prefixes : typing.Sequence[str]
211 self
.prefixes
= prefixes
214 class FindTagsResults(Type
):
215 _toSchema
= {'matches': 'matches'}
216 _toPy
= {'matches': 'matches'}
217 def __init__(self
, matches
=None):
219 matches : typing.Sequence[~Entity]
221 self
.matches
= [Entity
.from_json(o
) for o
in matches
or []]
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):
229 caveats : typing.Sequence[~caveat]
230 data : typing.Sequence[int]
233 sig : typing.Sequence[int]
235 self
.caveats
= [caveat
.from_json(o
) for o
in caveats
or []]
237 self
.id_
= packet
.from_json(id_
) if id_
else None
238 self
.location
= packet
.from_json(location
) if location
else None
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):
247 applications : typing.Sequence[str]
249 machines : typing.Sequence[str]
251 units : typing.Sequence[str]
253 self
.applications
= applications
254 self
.commands
= commands
255 self
.machines
= machines
256 self
.timeout
= timeout
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):
267 verificationid : packet
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
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):
283 self
.headerlen
= headerlen
285 self
.totallen
= totallen
288 class BoolResult(Type
):
289 _toSchema
= {'result': 'Result', 'error': 'Error'}
290 _toPy
= {'Result': 'result', 'Error': 'error'}
291 def __init__(self
, error
=None, result
=None):
296 self
.error
= Error
.from_json(error
) if error
else None
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):
305 changes : typing.Sequence[str]
306 entitywatcherid : str
309 self
.changes
= changes
310 self
.entitywatcherid
= entitywatcherid
311 self
.error
= Error
.from_json(error
) if error
else None
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):
324 self
.info
= ErrorInfo
.from_json(info
) if info
else None
325 self
.message
= message
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):
335 jobs : typing.Sequence[str]
338 self
.containertype
= containertype
339 self
.error
= Error
.from_json(error
) if error
else None
344 class AgentGetEntitiesResults(Type
):
345 _toSchema
= {'entities': 'Entities'}
346 _toPy
= {'Entities': 'entities'}
347 def __init__(self
, entities
=None):
349 entities : typing.Sequence[~AgentGetEntitiesResult]
351 self
.entities
= [AgentGetEntitiesResult
.from_json(o
) for o
in entities
or []]
354 class EntityPassword(Type
):
355 _toSchema
= {'password': 'Password', 'tag': 'Tag'}
356 _toPy
= {'Password': 'password', 'Tag': 'tag'}
357 def __init__(self
, password
=None, tag
=None):
362 self
.password
= password
366 class EntityPasswords(Type
):
367 _toSchema
= {'changes': 'Changes'}
368 _toPy
= {'Changes': 'changes'}
369 def __init__(self
, changes
=None):
371 changes : typing.Sequence[~EntityPassword]
373 self
.changes
= [EntityPassword
.from_json(o
) for o
in changes
or []]
376 class ErrorResults(Type
):
377 _toSchema
= {'results': 'Results'}
378 _toPy
= {'Results': 'results'}
379 def __init__(self
, results
=None):
381 results : typing.Sequence[~ErrorResult]
383 self
.results
= [ErrorResult
.from_json(o
) for o
in results
or []]
386 class IsMasterResult(Type
):
387 _toSchema
= {'master': 'Master'}
388 _toPy
= {'Master': 'master'}
389 def __init__(self
, master
=None):
396 class ModelConfigResult(Type
):
397 _toSchema
= {'config': 'Config'}
398 _toPy
= {'Config': 'config'}
399 def __init__(self
, config
=None):
401 config : typing.Mapping[str, typing.Any]
406 class NotifyWatchResult(Type
):
407 _toSchema
= {'notifywatcherid': 'NotifyWatcherId', 'error': 'Error'}
408 _toPy
= {'NotifyWatcherId': 'notifywatcherid', 'Error': 'error'}
409 def __init__(self
, error
=None, notifywatcherid
=None):
412 notifywatcherid : str
414 self
.error
= Error
.from_json(error
) if error
else None
415 self
.notifywatcherid
= notifywatcherid
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):
431 self
.apiport
= apiport
432 self
.caprivatekey
= caprivatekey
434 self
.privatekey
= privatekey
435 self
.sharedsecret
= sharedsecret
436 self
.stateport
= stateport
437 self
.systemidentity
= systemidentity
440 class AllWatcherNextResults(Type
):
441 _toSchema
= {'deltas': 'Deltas'}
442 _toPy
= {'Deltas': 'deltas'}
443 def __init__(self
, deltas
=None):
445 deltas : typing.Sequence[~Delta]
447 self
.deltas
= [Delta
.from_json(o
) for o
in deltas
or []]
451 _toSchema
= {'removed': 'Removed'}
452 _toPy
= {'Removed': 'removed'}
453 def __init__(self
, removed
=None):
457 self
.removed
= removed
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):
465 annotations : typing.Mapping[str, str]
469 self
.annotations
= annotations
470 self
.entitytag
= entitytag
471 self
.error
= ErrorResult
.from_json(error
) if error
else None
474 class AnnotationsGetResults(Type
):
475 _toSchema
= {'results': 'Results'}
476 _toPy
= {'Results': 'results'}
477 def __init__(self
, results
=None):
479 results : typing.Sequence[~AnnotationsGetResult]
481 self
.results
= [AnnotationsGetResult
.from_json(o
) for o
in results
or []]
484 class AnnotationsSet(Type
):
485 _toSchema
= {'annotations': 'Annotations'}
486 _toPy
= {'Annotations': 'annotations'}
487 def __init__(self
, annotations
=None):
489 annotations : typing.Sequence[~EntityAnnotations]
491 self
.annotations
= [EntityAnnotations
.from_json(o
) for o
in annotations
or []]
494 class EntityAnnotations(Type
):
495 _toSchema
= {'entitytag': 'EntityTag', 'annotations': 'Annotations'}
496 _toPy
= {'Annotations': 'annotations', 'EntityTag': 'entitytag'}
497 def __init__(self
, annotations
=None, entitytag
=None):
499 annotations : typing.Mapping[str, str]
502 self
.annotations
= annotations
503 self
.entitytag
= entitytag
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):
511 applicationname : str
513 placement : typing.Sequence[~Placement]
515 self
.applicationname
= applicationname
516 self
.numunits
= numunits
517 self
.placement
= [Placement
.from_json(o
) for o
in placement
or []]
520 class AddApplicationUnitsResults(Type
):
521 _toSchema
= {'units': 'Units'}
522 _toPy
= {'Units': 'units'}
523 def __init__(self
, units
=None):
525 units : typing.Sequence[str]
530 class AddRelation(Type
):
531 _toSchema
= {'endpoints': 'Endpoints'}
532 _toPy
= {'Endpoints': 'endpoints'}
533 def __init__(self
, endpoints
=None):
535 endpoints : typing.Sequence[str]
537 self
.endpoints
= endpoints
540 class AddRelationResults(Type
):
541 _toSchema
= {'endpoints': 'Endpoints'}
542 _toPy
= {'Endpoints': 'endpoints'}
543 def __init__(self
, endpoints
=None):
545 endpoints : typing.Mapping[str, ~Relation]
547 self
.endpoints
= {k
: Relation
.from_json(v
) for k
, v
in (endpoints
or dict()).items()}
550 class ApplicationCharmRelations(Type
):
551 _toSchema
= {'applicationname': 'ApplicationName'}
552 _toPy
= {'ApplicationName': 'applicationname'}
553 def __init__(self
, applicationname
=None):
555 applicationname : str
557 self
.applicationname
= applicationname
560 class ApplicationCharmRelationsResults(Type
):
561 _toSchema
= {'charmrelations': 'CharmRelations'}
562 _toPy
= {'CharmRelations': 'charmrelations'}
563 def __init__(self
, charmrelations
=None):
565 charmrelations : typing.Sequence[str]
567 self
.charmrelations
= charmrelations
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):
575 applicationname : str
578 config : typing.Mapping[str, str]
581 endpointbindings : typing.Mapping[str, str]
583 placement : typing.Sequence[~Placement]
584 resources : typing.Mapping[str, str]
586 storage : typing.Mapping[str, ~Constraints]
588 self
.applicationname
= applicationname
589 self
.channel
= channel
590 self
.charmurl
= charmurl
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
599 self
.storage
= {k
: Constraints
.from_json(v
) for k
, v
in (storage
or dict()).items()}
602 class ApplicationDestroy(Type
):
603 _toSchema
= {'applicationname': 'ApplicationName'}
604 _toPy
= {'ApplicationName': 'applicationname'}
605 def __init__(self
, applicationname
=None):
607 applicationname : str
609 self
.applicationname
= applicationname
612 class ApplicationExpose(Type
):
613 _toSchema
= {'applicationname': 'ApplicationName'}
614 _toPy
= {'ApplicationName': 'applicationname'}
615 def __init__(self
, applicationname
=None):
617 applicationname : str
619 self
.applicationname
= applicationname
622 class ApplicationGet(Type
):
623 _toSchema
= {'applicationname': 'ApplicationName'}
624 _toPy
= {'ApplicationName': 'applicationname'}
625 def __init__(self
, applicationname
=None):
627 applicationname : str
629 self
.applicationname
= applicationname
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):
639 config : typing.Mapping[str, typing.Any]
642 self
.application
= application
645 self
.constraints
= Value
.from_json(constraints
) if constraints
else None
648 class ApplicationMetricCredential(Type
):
649 _toSchema
= {'metriccredentials': 'MetricCredentials', 'applicationname': 'ApplicationName'}
650 _toPy
= {'MetricCredentials': 'metriccredentials', 'ApplicationName': 'applicationname'}
651 def __init__(self
, applicationname
=None, metriccredentials
=None):
653 applicationname : str
654 metriccredentials : typing.Sequence[int]
656 self
.applicationname
= applicationname
657 self
.metriccredentials
= metriccredentials
660 class ApplicationMetricCredentials(Type
):
661 _toSchema
= {'creds': 'Creds'}
662 _toPy
= {'Creds': 'creds'}
663 def __init__(self
, creds
=None):
665 creds : typing.Sequence[~ApplicationMetricCredential]
667 self
.creds
= [ApplicationMetricCredential
.from_json(o
) for o
in creds
or []]
670 class ApplicationSet(Type
):
671 _toSchema
= {'applicationname': 'ApplicationName', 'options': 'Options'}
672 _toPy
= {'ApplicationName': 'applicationname', 'Options': 'options'}
673 def __init__(self
, applicationname
=None, options
=None):
675 applicationname : str
676 options : typing.Mapping[str, str]
678 self
.applicationname
= applicationname
679 self
.options
= options
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):
687 applicationname : str
692 resourceids : typing.Mapping[str, str]
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
702 class ApplicationUnexpose(Type
):
703 _toSchema
= {'applicationname': 'ApplicationName'}
704 _toPy
= {'ApplicationName': 'applicationname'}
705 def __init__(self
, applicationname
=None):
707 applicationname : str
709 self
.applicationname
= applicationname
712 class ApplicationUnset(Type
):
713 _toSchema
= {'applicationname': 'ApplicationName', 'options': 'Options'}
714 _toPy
= {'ApplicationName': 'applicationname', 'Options': 'options'}
715 def __init__(self
, applicationname
=None, options
=None):
717 applicationname : str
718 options : typing.Sequence[str]
720 self
.applicationname
= applicationname
721 self
.options
= options
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):
729 applicationname : str
735 settingsstrings : typing.Mapping[str, str]
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
748 class ApplicationsDeploy(Type
):
749 _toSchema
= {'applications': 'Applications'}
750 _toPy
= {'Applications': 'applications'}
751 def __init__(self
, applications
=None):
753 applications : typing.Sequence[~ApplicationDeploy]
755 self
.applications
= [ApplicationDeploy
.from_json(o
) for o
in applications
or []]
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):
772 class DestroyApplicationUnits(Type
):
773 _toSchema
= {'unitnames': 'UnitNames'}
774 _toPy
= {'UnitNames': 'unitnames'}
775 def __init__(self
, unitnames
=None):
777 unitnames : typing.Sequence[str]
779 self
.unitnames
= unitnames
782 class DestroyRelation(Type
):
783 _toSchema
= {'endpoints': 'Endpoints'}
784 _toPy
= {'Endpoints': 'endpoints'}
785 def __init__(self
, endpoints
=None):
787 endpoints : typing.Sequence[str]
789 self
.endpoints
= endpoints
792 class GetApplicationConstraints(Type
):
793 _toSchema
= {'applicationname': 'ApplicationName'}
794 _toPy
= {'ApplicationName': 'applicationname'}
795 def __init__(self
, applicationname
=None):
797 applicationname : str
799 self
.applicationname
= applicationname
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):
814 spaces : typing.Sequence[str]
815 tags : typing.Sequence[str]
819 self
.container
= container
820 self
.cpu_cores
= cpu_cores
821 self
.cpu_power
= cpu_power
822 self
.instance_type
= instance_type
824 self
.root_disk
= root_disk
827 self
.virt_type
= virt_type
830 class Placement(Type
):
831 _toSchema
= {'scope': 'Scope', 'directive': 'Directive'}
832 _toPy
= {'Directive': 'directive', 'Scope': 'scope'}
833 def __init__(self
, directive
=None, scope
=None):
838 self
.directive
= directive
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):
854 self
.interface
= interface
857 self
.optional
= optional
862 class SetConstraints(Type
):
863 _toSchema
= {'constraints': 'Constraints', 'applicationname': 'ApplicationName'}
864 _toPy
= {'ApplicationName': 'applicationname', 'Constraints': 'constraints'}
865 def __init__(self
, applicationname
=None, constraints
=None):
867 applicationname : str
870 self
.applicationname
= applicationname
871 self
.constraints
= Value
.from_json(constraints
) if constraints
else None
874 class StringResult(Type
):
875 _toSchema
= {'result': 'Result', 'error': 'Error'}
876 _toPy
= {'Result': 'result', 'Error': 'error'}
877 def __init__(self
, error
=None, result
=None):
882 self
.error
= Error
.from_json(error
) if error
else None
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):
898 spaces : typing.Sequence[str]
899 tags : typing.Sequence[str]
903 self
.container
= container
904 self
.cpu_cores
= cpu_cores
905 self
.cpu_power
= cpu_power
906 self
.instance_type
= instance_type
908 self
.root_disk
= root_disk
911 self
.virt_type
= virt_type
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):
919 changes : typing.Sequence[str]
921 stringswatcherid : str
923 self
.changes
= changes
924 self
.error
= Error
.from_json(error
) if error
else None
925 self
.stringswatcherid
= stringswatcherid
928 class BackupsCreateArgs(Type
):
929 _toSchema
= {'notes': 'Notes'}
930 _toPy
= {'Notes': 'notes'}
931 def __init__(self
, notes
=None):
938 class BackupsInfoArgs(Type
):
939 _toSchema
= {'id_': 'ID'}
940 _toPy
= {'ID': 'id_'}
941 def __init__(self
, id_
=None):
948 class BackupsListArgs(Type
):
958 class BackupsListResult(Type
):
959 _toSchema
= {'list_': 'List'}
960 _toPy
= {'List': 'list_'}
961 def __init__(self
, list_
=None):
963 list_ : typing.Sequence[~BackupsMetadataResult]
965 self
.list_
= [BackupsMetadataResult
.from_json(o
) for o
in list_
or []]
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):
990 self
.caprivatekey
= caprivatekey
991 self
.checksum
= checksum
992 self
.checksumformat
= checksumformat
993 self
.finished
= finished
994 self
.hostname
= hostname
996 self
.machine
= machine
1001 self
.started
= started
1002 self
.stored
= stored
1003 self
.version
= Number
.from_json(version
) if version
else None
1006 class BackupsRemoveArgs(Type
):
1007 _toSchema
= {'id_': 'ID'}
1008 _toPy
= {'ID': 'id_'}
1009 def __init__(self
, id_
=None):
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):
1034 class RestoreArgs(Type
):
1035 _toSchema
= {'backupid': 'BackupId'}
1036 _toPy
= {'BackupId': 'backupid'}
1037 def __init__(self
, backupid
=None):
1041 self
.backupid
= backupid
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):
1055 self
.message
= message
1060 class BlockResult(Type
):
1061 _toSchema
= {'result': 'result', 'error': 'error'}
1062 _toPy
= {'result': 'result', 'error': 'error'}
1063 def __init__(self
, error
=None, result
=None):
1068 self
.error
= Error
.from_json(error
) if error
else None
1069 self
.result
= Block
.from_json(result
) if result
else None
1072 class BlockResults(Type
):
1073 _toSchema
= {'results': 'results'}
1074 _toPy
= {'results': 'results'}
1075 def __init__(self
, results
=None):
1077 results : typing.Sequence[~BlockResult]
1079 self
.results
= [BlockResult
.from_json(o
) for o
in results
or []]
1082 class BlockSwitchParams(Type
):
1083 _toSchema
= {'message': 'message', 'type_': 'type'}
1084 _toPy
= {'message': 'message', 'type': 'type_'}
1085 def __init__(self
, message
=None, type_
=None):
1090 self
.message
= message
1094 class CharmInfo(Type
):
1095 _toSchema
= {'charmurl': 'CharmURL'}
1096 _toPy
= {'CharmURL': 'charmurl'}
1097 def __init__(self
, charmurl
=None):
1101 self
.charmurl
= charmurl
1104 class CharmsList(Type
):
1105 _toSchema
= {'names': 'Names'}
1106 _toPy
= {'Names': 'names'}
1107 def __init__(self
, names
=None):
1109 names : typing.Sequence[str]
1114 class CharmsListResult(Type
):
1115 _toSchema
= {'charmurls': 'CharmURLs'}
1116 _toPy
= {'CharmURLs': 'charmurls'}
1117 def __init__(self
, charmurls
=None):
1119 charmurls : typing.Sequence[str]
1121 self
.charmurls
= charmurls
1124 class IsMeteredResult(Type
):
1125 _toSchema
= {'metered': 'Metered'}
1126 _toPy
= {'Metered': 'metered'}
1127 def __init__(self
, metered
=None):
1131 self
.metered
= metered
1134 class APIHostPortsResult(Type
):
1135 _toSchema
= {'servers': 'Servers'}
1136 _toPy
= {'Servers': 'servers'}
1137 def __init__(self
, servers
=None):
1139 servers : typing.Sequence[~HostPort]
1141 self
.servers
= [HostPort
.from_json(o
) for o
in servers
or []]
1144 class AddCharm(Type
):
1145 _toSchema
= {'channel': 'Channel', 'url': 'URL'}
1146 _toPy
= {'URL': 'url', 'Channel': 'channel'}
1147 def __init__(self
, channel
=None, url
=None):
1152 self
.channel
= channel
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):
1162 charmstoremacaroon : Macaroon
1165 self
.channel
= channel
1166 self
.charmstoremacaroon
= Macaroon
.from_json(charmstoremacaroon
) if charmstoremacaroon
else None
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):
1175 addrs : typing.Sequence[~Address]
1178 disks : typing.Sequence[~Constraints]
1179 hardwarecharacteristics : HardwareCharacteristics
1181 jobs : typing.Sequence[str]
1184 placement : Placement
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
1195 self
.parentid
= parentid
1196 self
.placement
= Placement
.from_json(placement
) if placement
else None
1197 self
.series
= series
1200 class AddMachines(Type
):
1201 _toSchema
= {'machineparams': 'MachineParams'}
1202 _toPy
= {'MachineParams': 'machineparams'}
1203 def __init__(self
, machineparams
=None):
1205 machineparams : typing.Sequence[~AddMachineParams]
1207 self
.machineparams
= [AddMachineParams
.from_json(o
) for o
in machineparams
or []]
1210 class AddMachinesResult(Type
):
1211 _toSchema
= {'machine': 'Machine', 'error': 'Error'}
1212 _toPy
= {'Machine': 'machine', 'Error': 'error'}
1213 def __init__(self
, error
=None, machine
=None):
1218 self
.error
= Error
.from_json(error
) if error
else None
1219 self
.machine
= machine
1222 class AddMachinesResults(Type
):
1223 _toSchema
= {'machines': 'Machines'}
1224 _toPy
= {'Machines': 'machines'}
1225 def __init__(self
, machines
=None):
1227 machines : typing.Sequence[~AddMachinesResult]
1229 self
.machines
= [AddMachinesResult
.from_json(o
) for o
in machines
or []]
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):
1243 self
.spacename
= spacename
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):
1266 class AllWatcherId(Type
):
1267 _toSchema
= {'allwatcherid': 'AllWatcherId'}
1268 _toPy
= {'AllWatcherId': 'allwatcherid'}
1269 def __init__(self
, allwatcherid
=None):
1273 self
.allwatcherid
= allwatcherid
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):
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]
1291 self
.canupgradeto
= canupgradeto
1293 self
.exposed
= exposed
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()}
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):
1312 self
.number
= Number
.from_json(number
) if number
else None
1313 self
.series
= series
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):
1321 args : typing.Sequence[typing.Any]
1324 requires : typing.Sequence[str]
1328 self
.method
= method
1329 self
.requires
= requires
1332 class DestroyMachines(Type
):
1333 _toSchema
= {'force': 'Force', 'machinenames': 'MachineNames'}
1334 _toPy
= {'MachineNames': 'machinenames', 'Force': 'force'}
1335 def __init__(self
, force
=None, machinenames
=None):
1338 machinenames : typing.Sequence[str]
1341 self
.machinenames
= machinenames
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):
1349 data : typing.Mapping[str, typing.Any]
1362 self
.status
= status
1363 self
.version
= version
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):
1371 applicationname : str
1376 self
.applicationname
= applicationname
1379 self
.subordinate
= subordinate
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):
1387 data : typing.Mapping[str, typing.Any]
1395 self
.status
= status
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):
1410 self
.majorversion
= majorversion
1411 self
.minorversion
= minorversion
1412 self
.number
= Number
.from_json(number
) if number
else None
1413 self
.series
= series
1416 class FindToolsResult(Type
):
1417 _toSchema
= {'list_': 'List', 'error': 'Error'}
1418 _toPy
= {'List': 'list_', 'Error': 'error'}
1419 def __init__(self
, error
=None, list_
=None):
1422 list_ : typing.Sequence[~Tools]
1424 self
.error
= Error
.from_json(error
) if error
else None
1425 self
.list_
= [Tools
.from_json(o
) for o
in list_
or []]
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):
1433 applications : typing.Mapping[str, ~ApplicationStatus]
1434 availableversion : str
1435 machines : typing.Mapping[str, ~MachineStatus]
1437 relations : typing.Sequence[~RelationStatus]
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 []]
1446 class GetBundleChangesParams(Type
):
1447 _toSchema
= {'yaml': 'yaml'}
1448 _toPy
= {'yaml': 'yaml'}
1449 def __init__(self
, yaml
=None):
1456 class GetBundleChangesResults(Type
):
1457 _toSchema
= {'changes': 'changes', 'errors': 'errors'}
1458 _toPy
= {'changes': 'changes', 'errors': 'errors'}
1459 def __init__(self
, changes
=None, errors
=None):
1461 changes : typing.Sequence[~BundleChangesChange]
1462 errors : typing.Sequence[str]
1464 self
.changes
= [BundleChangesChange
.from_json(o
) for o
in changes
or []]
1465 self
.errors
= errors
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):
1474 availabilityzone : str
1479 tags : typing.Sequence[str]
1482 self
.availabilityzone
= availabilityzone
1483 self
.cpucores
= cpucores
1484 self
.cpupower
= cpupower
1486 self
.rootdisk
= rootdisk
1490 class History(Type
):
1491 _toSchema
= {'statuses': 'Statuses', 'error': 'Error'}
1492 _toPy
= {'Statuses': 'statuses', 'Error': 'error'}
1493 def __init__(self
, error
=None, statuses
=None):
1496 statuses : typing.Sequence[~DetailedStatus]
1498 self
.error
= Error
.from_json(error
) if error
else None
1499 self
.statuses
= [DetailedStatus
.from_json(o
) for o
in statuses
or []]
1502 class HostPort(Type
):
1503 _toSchema
= {'address': 'Address', 'port': 'Port'}
1504 _toPy
= {'Address': 'address', 'Port': 'port'}
1505 def __init__(self
, address
=None, port
=None):
1510 self
.address
= Address
.from_json(address
) if address
else None
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):
1519 agentstatus : DetailedStatus
1520 containers : typing.Mapping[str, ~MachineStatus]
1526 instancestatus : DetailedStatus
1527 jobs : typing.Sequence[str]
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
1537 self
.instanceid
= instanceid
1538 self
.instancestatus
= DetailedStatus
.from_json(instancestatus
) if instancestatus
else None
1540 self
.series
= series
1541 self
.wantsvote
= wantsvote
1544 class MeterStatus(Type
):
1545 _toSchema
= {'color': 'Color', 'message': 'Message'}
1546 _toPy
= {'Message': 'message', 'Color': 'color'}
1547 def __init__(self
, color
=None, message
=None):
1553 self
.message
= message
1556 class ModelConfigResults(Type
):
1557 _toSchema
= {'config': 'Config'}
1558 _toPy
= {'Config': 'config'}
1559 def __init__(self
, config
=None):
1561 config : typing.Mapping[str, typing.Any]
1563 self
.config
= config
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):
1578 status : EntityStatus
1580 users : typing.Sequence[~ModelUserInfo]
1583 self
.defaultseries
= defaultseries
1586 self
.ownertag
= ownertag
1587 self
.providertype
= providertype
1588 self
.serveruuid
= serveruuid
1589 self
.status
= EntityStatus
.from_json(status
) if status
else None
1591 self
.users
= [ModelUserInfo
.from_json(o
) for o
in users
or []]
1594 class ModelSet(Type
):
1595 _toSchema
= {'config': 'Config'}
1596 _toPy
= {'Config': 'config'}
1597 def __init__(self
, config
=None):
1599 config : typing.Mapping[str, typing.Any]
1601 self
.config
= config
1604 class ModelUnset(Type
):
1605 _toSchema
= {'keys': 'Keys'}
1606 _toPy
= {'Keys': 'keys'}
1607 def __init__(self
, keys
=None):
1609 keys : typing.Sequence[str]
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):
1621 lastconnection : str
1624 self
.access
= access
1625 self
.displayname
= displayname
1626 self
.lastconnection
= lastconnection
1630 class ModelUserInfoResult(Type
):
1631 _toSchema
= {'result': 'result', 'error': 'error'}
1632 _toPy
= {'result': 'result', 'error': 'error'}
1633 def __init__(self
, error
=None, result
=None):
1636 result : ModelUserInfo
1638 self
.error
= Error
.from_json(error
) if error
else None
1639 self
.result
= ModelUserInfo
.from_json(result
) if result
else None
1642 class ModelUserInfoResults(Type
):
1643 _toSchema
= {'results': 'results'}
1644 _toPy
= {'results': 'results'}
1645 def __init__(self
, results
=None):
1647 results : typing.Sequence[~ModelUserInfoResult]
1649 self
.results
= [ModelUserInfoResult
.from_json(o
) for o
in results
or []]
1652 class PrivateAddress(Type
):
1653 _toSchema
= {'target': 'Target'}
1654 _toPy
= {'Target': 'target'}
1655 def __init__(self
, target
=None):
1659 self
.target
= target
1662 class PrivateAddressResults(Type
):
1663 _toSchema
= {'privateaddress': 'PrivateAddress'}
1664 _toPy
= {'PrivateAddress': 'privateaddress'}
1665 def __init__(self
, privateaddress
=None):
1667 privateaddress : str
1669 self
.privateaddress
= privateaddress
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):
1678 disablepackagecommands : bool
1682 self
.datadir
= datadir
1683 self
.disablepackagecommands
= disablepackagecommands
1684 self
.machineid
= machineid
1688 class ProvisioningScriptResult(Type
):
1689 _toSchema
= {'script': 'Script'}
1690 _toPy
= {'Script': 'script'}
1691 def __init__(self
, script
=None):
1695 self
.script
= script
1698 class PublicAddress(Type
):
1699 _toSchema
= {'target': 'Target'}
1700 _toPy
= {'Target': 'target'}
1701 def __init__(self
, target
=None):
1705 self
.target
= target
1708 class PublicAddressResults(Type
):
1709 _toSchema
= {'publicaddress': 'PublicAddress'}
1710 _toPy
= {'PublicAddress': 'publicaddress'}
1711 def __init__(self
, publicaddress
=None):
1715 self
.publicaddress
= publicaddress
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):
1723 endpoints : typing.Sequence[~EndpointStatus]
1729 self
.endpoints
= [EndpointStatus
.from_json(o
) for o
in endpoints
or []]
1731 self
.interface
= interface
1736 class ResolveCharmResult(Type
):
1737 _toSchema
= {'url': 'URL', 'error': 'Error'}
1738 _toPy
= {'URL': 'url', 'Error': 'error'}
1739 def __init__(self
, error
=None, url
=None):
1745 self
.url
= URL
.from_json(url
) if url
else None
1748 class ResolveCharmResults(Type
):
1749 _toSchema
= {'urls': 'URLs'}
1750 _toPy
= {'URLs': 'urls'}
1751 def __init__(self
, urls
=None):
1753 urls : typing.Sequence[~ResolveCharmResult]
1755 self
.urls
= [ResolveCharmResult
.from_json(o
) for o
in urls
or []]
1758 class ResolveCharms(Type
):
1759 _toSchema
= {'references': 'References'}
1760 _toPy
= {'References': 'references'}
1761 def __init__(self
, references
=None):
1763 references : typing.Sequence[~URL]
1765 self
.references
= [URL
.from_json(o
) for o
in references
or []]
1768 class Resolved(Type
):
1769 _toSchema
= {'unitname': 'UnitName', 'retry': 'Retry'}
1770 _toPy
= {'UnitName': 'unitname', 'Retry': 'retry'}
1771 def __init__(self
, retry
=None, unitname
=None):
1777 self
.unitname
= unitname
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):
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):
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):
1817 filter_ : StatusHistoryFilter
1822 self
.filter_
= StatusHistoryFilter
.from_json(filter_
) if filter_
else None
1823 self
.historykind
= historykind
1828 class StatusHistoryRequests(Type
):
1829 _toSchema
= {'requests': 'Requests'}
1830 _toPy
= {'Requests': 'requests'}
1831 def __init__(self
, requests
=None):
1833 requests : typing.Sequence[~StatusHistoryRequest]
1835 self
.requests
= [StatusHistoryRequest
.from_json(o
) for o
in requests
or []]
1838 class StatusHistoryResult(Type
):
1839 _toSchema
= {'history': 'History', 'error': 'Error'}
1840 _toPy
= {'History': 'history', 'Error': 'error'}
1841 def __init__(self
, error
=None, history
=None):
1846 self
.error
= Error
.from_json(error
) if error
else None
1847 self
.history
= History
.from_json(history
) if history
else None
1850 class StatusHistoryResults(Type
):
1851 _toSchema
= {'results': 'Results'}
1852 _toPy
= {'Results': 'results'}
1853 def __init__(self
, results
=None):
1855 results : typing.Sequence[~StatusHistoryResult]
1857 self
.results
= [StatusHistoryResult
.from_json(o
) for o
in results
or []]
1860 class StatusParams(Type
):
1861 _toSchema
= {'patterns': 'Patterns'}
1862 _toPy
= {'Patterns': 'patterns'}
1863 def __init__(self
, patterns
=None):
1865 patterns : typing.Sequence[str]
1867 self
.patterns
= patterns
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):
1880 self
.sha256
= sha256
1883 self
.version
= Binary
.from_json(version
) if version
else None
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):
1898 self
.channel
= channel
1900 self
.revision
= revision
1901 self
.schema
= schema
1902 self
.series
= series
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):
1911 agentstatus : DetailedStatus
1914 openedports : typing.Sequence[str]
1916 subordinates : typing.Mapping[str, ~UnitStatus]
1917 workloadstatus : DetailedStatus
1919 self
.agentstatus
= DetailedStatus
.from_json(agentstatus
) if agentstatus
else None
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
1928 class DestroyControllerArgs(Type
):
1929 _toSchema
= {'destroy_models': 'destroy-models'}
1930 _toPy
= {'destroy-models': 'destroy_models'}
1931 def __init__(self
, destroy_models
=None):
1933 destroy_models : bool
1935 self
.destroy_models
= destroy_models
1938 class InitiateModelMigrationArgs(Type
):
1939 _toSchema
= {'specs': 'specs'}
1940 _toPy
= {'specs': 'specs'}
1941 def __init__(self
, specs
=None):
1943 specs : typing.Sequence[~ModelMigrationSpec]
1945 self
.specs
= [ModelMigrationSpec
.from_json(o
) for o
in specs
or []]
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):
1957 self
.error
= Error
.from_json(error
) if error
else None
1959 self
.model_tag
= model_tag
1962 class InitiateModelMigrationResults(Type
):
1963 _toSchema
= {'results': 'results'}
1964 _toPy
= {'results': 'results'}
1965 def __init__(self
, results
=None):
1967 results : typing.Sequence[~InitiateModelMigrationResult]
1969 self
.results
= [InitiateModelMigrationResult
.from_json(o
) for o
in results
or []]
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):
1982 self
.ownertag
= ownertag
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):
1991 blocks : typing.Sequence[str]
1996 self
.blocks
= blocks
1997 self
.model_uuid
= model_uuid
1999 self
.owner_tag
= owner_tag
2002 class ModelBlockInfoList(Type
):
2003 _toSchema
= {'models': 'models'}
2004 _toPy
= {'models': 'models'}
2005 def __init__(self
, models
=None):
2007 models : typing.Sequence[~ModelBlockInfo]
2009 self
.models
= [ModelBlockInfo
.from_json(o
) for o
in models
or []]
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):
2018 target_info : ModelMigrationTargetInfo
2020 self
.model_tag
= model_tag
2021 self
.target_info
= ModelMigrationTargetInfo
.from_json(target_info
) if target_info
else None
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):
2029 addrs : typing.Sequence[str]
2032 controller_tag : str
2036 self
.auth_tag
= auth_tag
2037 self
.ca_cert
= ca_cert
2038 self
.controller_tag
= controller_tag
2039 self
.password
= password
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):
2047 application_count : int
2048 hosted_machine_count : int
2053 self
.application_count
= application_count
2054 self
.hosted_machine_count
= hosted_machine_count
2056 self
.model_tag
= model_tag
2057 self
.owner_tag
= owner_tag
2060 class ModelStatusResults(Type
):
2061 _toSchema
= {'models': 'models'}
2062 _toPy
= {'models': 'models'}
2063 def __init__(self
, models
=None):
2065 models : typing.Sequence[~ModelStatus]
2067 self
.models
= [ModelStatus
.from_json(o
) for o
in models
or []]
2070 class RemoveBlocksArgs(Type
):
2071 _toSchema
= {'all_': 'all'}
2072 _toPy
= {'all': 'all_'}
2073 def __init__(self
, all_
=None):
2080 class UserModel(Type
):
2081 _toSchema
= {'model': 'Model', 'lastconnection': 'LastConnection'}
2082 _toPy
= {'LastConnection': 'lastconnection', 'Model': 'model'}
2083 def __init__(self
, lastconnection
=None, model
=None):
2085 lastconnection : str
2088 self
.lastconnection
= lastconnection
2089 self
.model
= Model
.from_json(model
) if model
else None
2092 class UserModelList(Type
):
2093 _toSchema
= {'usermodels': 'UserModels'}
2094 _toPy
= {'UserModels': 'usermodels'}
2095 def __init__(self
, usermodels
=None):
2097 usermodels : typing.Sequence[~UserModel]
2099 self
.usermodels
= [UserModel
.from_json(o
) for o
in usermodels
or []]
2102 class BytesResult(Type
):
2103 _toSchema
= {'result': 'Result'}
2104 _toPy
= {'Result': 'result'}
2105 def __init__(self
, result
=None):
2107 result : typing.Sequence[int]
2109 self
.result
= result
2112 class DeployerConnectionValues(Type
):
2113 _toSchema
= {'stateaddresses': 'StateAddresses', 'apiaddresses': 'APIAddresses'}
2114 _toPy
= {'APIAddresses': 'apiaddresses', 'StateAddresses': 'stateaddresses'}
2115 def __init__(self
, apiaddresses
=None, stateaddresses
=None):
2117 apiaddresses : typing.Sequence[str]
2118 stateaddresses : typing.Sequence[str]
2120 self
.apiaddresses
= apiaddresses
2121 self
.stateaddresses
= stateaddresses
2124 class LifeResult(Type
):
2125 _toSchema
= {'life': 'Life', 'error': 'Error'}
2126 _toPy
= {'Life': 'life', 'Error': 'error'}
2127 def __init__(self
, error
=None, life
=None):
2132 self
.error
= Error
.from_json(error
) if error
else None
2136 class LifeResults(Type
):
2137 _toSchema
= {'results': 'Results'}
2138 _toPy
= {'Results': 'results'}
2139 def __init__(self
, results
=None):
2141 results : typing.Sequence[~LifeResult]
2143 self
.results
= [LifeResult
.from_json(o
) for o
in results
or []]
2146 class StringsResult(Type
):
2147 _toSchema
= {'result': 'Result', 'error': 'Error'}
2148 _toPy
= {'Result': 'result', 'Error': 'error'}
2149 def __init__(self
, error
=None, result
=None):
2152 result : typing.Sequence[str]
2154 self
.error
= Error
.from_json(error
) if error
else None
2155 self
.result
= result
2158 class StringsWatchResults(Type
):
2159 _toSchema
= {'results': 'Results'}
2160 _toPy
= {'Results': 'results'}
2161 def __init__(self
, results
=None):
2163 results : typing.Sequence[~StringsWatchResult]
2165 self
.results
= [StringsWatchResult
.from_json(o
) for o
in results
or []]
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):
2174 subnetproviderid : str
2176 zones : typing.Sequence[str]
2178 self
.spacetag
= spacetag
2179 self
.subnetproviderid
= subnetproviderid
2180 self
.subnettag
= subnettag
2184 class AddSubnetsParams(Type
):
2185 _toSchema
= {'subnets': 'Subnets'}
2186 _toPy
= {'Subnets': 'subnets'}
2187 def __init__(self
, subnets
=None):
2189 subnets : typing.Sequence[~AddSubnetParams]
2191 self
.subnets
= [AddSubnetParams
.from_json(o
) for o
in subnets
or []]
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):
2202 subnettags : typing.Sequence[str]
2204 self
.providerid
= providerid
2205 self
.public
= public
2206 self
.spacetag
= spacetag
2207 self
.subnettags
= subnettags
2210 class CreateSpacesParams(Type
):
2211 _toSchema
= {'spaces': 'Spaces'}
2212 _toPy
= {'Spaces': 'spaces'}
2213 def __init__(self
, spaces
=None):
2215 spaces : typing.Sequence[~CreateSpaceParams]
2217 self
.spaces
= [CreateSpaceParams
.from_json(o
) for o
in spaces
or []]
2220 class DiscoverSpacesResults(Type
):
2221 _toSchema
= {'results': 'Results'}
2222 _toPy
= {'Results': 'results'}
2223 def __init__(self
, results
=None):
2225 results : typing.Sequence[~ProviderSpace]
2227 self
.results
= [ProviderSpace
.from_json(o
) for o
in results
or []]
2230 class ListSubnetsResults(Type
):
2231 _toSchema
= {'results': 'Results'}
2232 _toPy
= {'Results': 'results'}
2233 def __init__(self
, results
=None):
2235 results : typing.Sequence[~Subnet]
2237 self
.results
= [Subnet
.from_json(o
) for o
in results
or []]
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):
2248 subnets : typing.Sequence[~Subnet]
2250 self
.error
= Error
.from_json(error
) if error
else None
2252 self
.providerid
= providerid
2253 self
.subnets
= [Subnet
.from_json(o
) for o
in subnets
or []]
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):
2265 staticrangehighip : typing.Sequence[int]
2266 staticrangelowip : typing.Sequence[int]
2269 zones : typing.Sequence[str]
2273 self
.providerid
= providerid
2274 self
.spacetag
= spacetag
2275 self
.staticrangehighip
= staticrangehighip
2276 self
.staticrangelowip
= staticrangelowip
2277 self
.status
= status
2278 self
.vlantag
= vlantag
2282 class SubnetsFilters(Type
):
2283 _toSchema
= {'zone': 'Zone', 'spacetag': 'SpaceTag'}
2284 _toPy
= {'Zone': 'zone', 'SpaceTag': 'spacetag'}
2285 def __init__(self
, spacetag
=None, zone
=None):
2290 self
.spacetag
= spacetag
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):
2300 devicelinks : typing.Sequence[str]
2302 filesystemtype : str
2310 self
.busaddress
= busaddress
2311 self
.devicelinks
= devicelinks
2312 self
.devicename
= devicename
2313 self
.filesystemtype
= filesystemtype
2314 self
.hardwareid
= hardwareid
2317 self
.mountpoint
= mountpoint
2322 class MachineBlockDevices(Type
):
2323 _toSchema
= {'blockdevices': 'blockdevices', 'machine': 'machine'}
2324 _toPy
= {'blockdevices': 'blockdevices', 'machine': 'machine'}
2325 def __init__(self
, blockdevices
=None, machine
=None):
2327 blockdevices : typing.Sequence[~BlockDevice]
2330 self
.blockdevices
= [BlockDevice
.from_json(o
) for o
in blockdevices
or []]
2331 self
.machine
= machine
2334 class SetMachineBlockDevices(Type
):
2335 _toSchema
= {'machineblockdevices': 'machineblockdevices'}
2336 _toPy
= {'machineblockdevices': 'machineblockdevices'}
2337 def __init__(self
, machineblockdevices
=None):
2339 machineblockdevices : typing.Sequence[~MachineBlockDevices]
2341 self
.machineblockdevices
= [MachineBlockDevices
.from_json(o
) for o
in machineblockdevices
or []]
2344 class MachineStorageId(Type
):
2345 _toSchema
= {'machinetag': 'machinetag', 'attachmenttag': 'attachmenttag'}
2346 _toPy
= {'machinetag': 'machinetag', 'attachmenttag': 'attachmenttag'}
2347 def __init__(self
, attachmenttag
=None, machinetag
=None):
2352 self
.attachmenttag
= attachmenttag
2353 self
.machinetag
= machinetag
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):
2361 changes : typing.Sequence[~MachineStorageId]
2363 machinestorageidswatcherid : str
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
2370 class BoolResults(Type
):
2371 _toSchema
= {'results': 'Results'}
2372 _toPy
= {'Results': 'results'}
2373 def __init__(self
, results
=None):
2375 results : typing.Sequence[~BoolResult]
2377 self
.results
= [BoolResult
.from_json(o
) for o
in results
or []]
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):
2385 portrange : PortRange
2389 self
.portrange
= PortRange
.from_json(portrange
) if portrange
else None
2390 self
.relationtag
= relationtag
2391 self
.unittag
= unittag
2394 class MachinePorts(Type
):
2395 _toSchema
= {'machinetag': 'MachineTag', 'subnettag': 'SubnetTag'}
2396 _toPy
= {'MachineTag': 'machinetag', 'SubnetTag': 'subnettag'}
2397 def __init__(self
, machinetag
=None, subnettag
=None):
2402 self
.machinetag
= machinetag
2403 self
.subnettag
= subnettag
2406 class MachinePortsParams(Type
):
2407 _toSchema
= {'params': 'Params'}
2408 _toPy
= {'Params': 'params'}
2409 def __init__(self
, params
=None):
2411 params : typing.Sequence[~MachinePorts]
2413 self
.params
= [MachinePorts
.from_json(o
) for o
in params
or []]
2416 class MachinePortsResult(Type
):
2417 _toSchema
= {'ports': 'Ports', 'error': 'Error'}
2418 _toPy
= {'Ports': 'ports', 'Error': 'error'}
2419 def __init__(self
, error
=None, ports
=None):
2422 ports : typing.Sequence[~MachinePortRange]
2424 self
.error
= Error
.from_json(error
) if error
else None
2425 self
.ports
= [MachinePortRange
.from_json(o
) for o
in ports
or []]
2428 class MachinePortsResults(Type
):
2429 _toSchema
= {'results': 'Results'}
2430 _toPy
= {'Results': 'results'}
2431 def __init__(self
, results
=None):
2433 results : typing.Sequence[~MachinePortsResult]
2435 self
.results
= [MachinePortsResult
.from_json(o
) for o
in results
or []]
2438 class NotifyWatchResults(Type
):
2439 _toSchema
= {'results': 'Results'}
2440 _toPy
= {'Results': 'results'}
2441 def __init__(self
, results
=None):
2443 results : typing.Sequence[~NotifyWatchResult]
2445 self
.results
= [NotifyWatchResult
.from_json(o
) for o
in results
or []]
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):
2457 self
.fromport
= fromport
2458 self
.protocol
= protocol
2459 self
.toport
= toport
2462 class StringResults(Type
):
2463 _toSchema
= {'results': 'Results'}
2464 _toPy
= {'Results': 'results'}
2465 def __init__(self
, results
=None):
2467 results : typing.Sequence[~StringResult]
2469 self
.results
= [StringResult
.from_json(o
) for o
in results
or []]
2472 class StringsResults(Type
):
2473 _toSchema
= {'results': 'Results'}
2474 _toPy
= {'Results': 'results'}
2475 def __init__(self
, results
=None):
2477 results : typing.Sequence[~StringsResult]
2479 self
.results
= [StringsResult
.from_json(o
) for o
in results
or []]
2482 class ControllersChangeResult(Type
):
2483 _toSchema
= {'result': 'Result', 'error': 'Error'}
2484 _toPy
= {'Result': 'result', 'Error': 'error'}
2485 def __init__(self
, error
=None, result
=None):
2488 result : ControllersChanges
2490 self
.error
= Error
.from_json(error
) if error
else None
2491 self
.result
= ControllersChanges
.from_json(result
) if result
else None
2494 class ControllersChangeResults(Type
):
2495 _toSchema
= {'results': 'Results'}
2496 _toPy
= {'Results': 'results'}
2497 def __init__(self
, results
=None):
2499 results : typing.Sequence[~ControllersChangeResult]
2501 self
.results
= [ControllersChangeResult
.from_json(o
) for o
in results
or []]
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):
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]
2517 self
.converted
= converted
2518 self
.demoted
= demoted
2519 self
.maintained
= maintained
2520 self
.promoted
= promoted
2521 self
.removed
= removed
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):
2531 num_controllers : int
2532 placement : typing.Sequence[str]
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
2542 class ControllersSpecs(Type
):
2543 _toSchema
= {'specs': 'Specs'}
2544 _toPy
= {'Specs': 'specs'}
2545 def __init__(self
, specs
=None):
2547 specs : typing.Sequence[~ControllersSpec]
2549 self
.specs
= [ControllersSpec
.from_json(o
) for o
in specs
or []]
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):
2557 publicaddress : Address
2561 self
.publicaddress
= Address
.from_json(publicaddress
) if publicaddress
else None
2562 self
.series
= series
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):
2578 tags : typing.Mapping[str, str]
2581 self
.address
= address
2582 self
.arbiter
= arbiter
2583 self
.buildindexes
= buildindexes
2584 self
.hidden
= hidden
2586 self
.priority
= priority
2587 self
.slavedelay
= slavedelay
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):
2598 members : typing.Sequence[~HAMember]
2599 rsmembers : typing.Sequence[~Member]
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 []]
2606 class ResumeReplicationParams(Type
):
2607 _toSchema
= {'members': 'Members'}
2608 _toPy
= {'Members': 'members'}
2609 def __init__(self
, members
=None):
2611 members : typing.Sequence[~Member]
2613 self
.members
= [Member
.from_json(o
) for o
in members
or []]
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):
2629 self
.storageengine
= storageengine
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):
2645 self
.storageengine
= storageengine
2648 class SSHHostKeySet(Type
):
2649 _toSchema
= {'entity_keys': 'entity-keys'}
2650 _toPy
= {'entity-keys': 'entity_keys'}
2651 def __init__(self
, entity_keys
=None):
2653 entity_keys : typing.Sequence[~SSHHostKeys]
2655 self
.entity_keys
= [SSHHostKeys
.from_json(o
) for o
in entity_keys
or []]
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):
2663 public_keys : typing.Sequence[str]
2666 self
.public_keys
= public_keys
2670 class ImageFilterParams(Type
):
2671 _toSchema
= {'images': 'images'}
2672 _toPy
= {'images': 'images'}
2673 def __init__(self
, images
=None):
2675 images : typing.Sequence[~ImageSpec]
2677 self
.images
= [ImageSpec
.from_json(o
) for o
in images
or []]
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):
2692 self
.created
= created
2694 self
.series
= series
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):
2709 self
.series
= series
2712 class ListImageResult(Type
):
2713 _toSchema
= {'result': 'result'}
2714 _toPy
= {'result': 'result'}
2715 def __init__(self
, result
=None):
2717 result : typing.Sequence[~ImageMetadata]
2719 self
.result
= [ImageMetadata
.from_json(o
) for o
in result
or []]
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):
2731 root_storage_size : int
2732 root_storage_type : str
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
2752 class CloudImageMetadataList(Type
):
2753 _toSchema
= {'metadata': 'metadata'}
2754 _toPy
= {'metadata': 'metadata'}
2755 def __init__(self
, metadata
=None):
2757 metadata : typing.Sequence[~CloudImageMetadata]
2759 self
.metadata
= [CloudImageMetadata
.from_json(o
) for o
in metadata
or []]
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):
2767 arches : typing.Sequence[str]
2769 root_storage_type : str
2770 series : typing.Sequence[str]
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
2782 class ListCloudImageMetadataResult(Type
):
2783 _toSchema
= {'result': 'result'}
2784 _toPy
= {'result': 'result'}
2785 def __init__(self
, result
=None):
2787 result : typing.Sequence[~CloudImageMetadata]
2789 self
.result
= [CloudImageMetadata
.from_json(o
) for o
in result
or []]
2792 class MetadataImageIds(Type
):
2793 _toSchema
= {'image_ids': 'image_ids'}
2794 _toPy
= {'image_ids': 'image_ids'}
2795 def __init__(self
, image_ids
=None):
2797 image_ids : typing.Sequence[str]
2799 self
.image_ids
= image_ids
2802 class MetadataSaveParams(Type
):
2803 _toSchema
= {'metadata': 'metadata'}
2804 _toPy
= {'metadata': 'metadata'}
2805 def __init__(self
, metadata
=None):
2807 metadata : typing.Sequence[~CloudImageMetadataList]
2809 self
.metadata
= [CloudImageMetadataList
.from_json(o
) for o
in metadata
or []]
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):
2817 data : typing.Mapping[str, typing.Any]
2824 self
.status
= status
2828 class MachineAddresses(Type
):
2829 _toSchema
= {'addresses': 'Addresses', 'tag': 'Tag'}
2830 _toPy
= {'Addresses': 'addresses', 'Tag': 'tag'}
2831 def __init__(self
, addresses
=None, tag
=None):
2833 addresses : typing.Sequence[~Address]
2836 self
.addresses
= [Address
.from_json(o
) for o
in addresses
or []]
2840 class MachineAddressesResult(Type
):
2841 _toSchema
= {'addresses': 'Addresses', 'error': 'Error'}
2842 _toPy
= {'Addresses': 'addresses', 'Error': 'error'}
2843 def __init__(self
, addresses
=None, error
=None):
2845 addresses : typing.Sequence[~Address]
2848 self
.addresses
= [Address
.from_json(o
) for o
in addresses
or []]
2849 self
.error
= Error
.from_json(error
) if error
else None
2852 class MachineAddressesResults(Type
):
2853 _toSchema
= {'results': 'Results'}
2854 _toPy
= {'Results': 'results'}
2855 def __init__(self
, results
=None):
2857 results : typing.Sequence[~MachineAddressesResult]
2859 self
.results
= [MachineAddressesResult
.from_json(o
) for o
in results
or []]
2862 class SetMachinesAddresses(Type
):
2863 _toSchema
= {'machineaddresses': 'MachineAddresses'}
2864 _toPy
= {'MachineAddresses': 'machineaddresses'}
2865 def __init__(self
, machineaddresses
=None):
2867 machineaddresses : typing.Sequence[~MachineAddresses]
2869 self
.machineaddresses
= [MachineAddresses
.from_json(o
) for o
in machineaddresses
or []]
2872 class SetStatus(Type
):
2873 _toSchema
= {'entities': 'Entities'}
2874 _toPy
= {'Entities': 'entities'}
2875 def __init__(self
, entities
=None):
2877 entities : typing.Sequence[~EntityStatusArgs]
2879 self
.entities
= [EntityStatusArgs
.from_json(o
) for o
in entities
or []]
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):
2887 data : typing.Mapping[str, typing.Any]
2896 self
.error
= Error
.from_json(error
) if error
else None
2901 self
.status
= status
2904 class StatusResults(Type
):
2905 _toSchema
= {'results': 'Results'}
2906 _toPy
= {'Results': 'results'}
2907 def __init__(self
, results
=None):
2909 results : typing.Sequence[~StatusResult]
2911 self
.results
= [StatusResult
.from_json(o
) for o
in results
or []]
2914 class ListSSHKeys(Type
):
2915 _toSchema
= {'entities': 'Entities', 'mode': 'Mode'}
2916 _toPy
= {'Mode': 'mode', 'Entities': 'entities'}
2917 def __init__(self
, entities
=None, mode
=None):
2922 self
.entities
= Entities
.from_json(entities
) if entities
else None
2926 class ModifyUserSSHKeys(Type
):
2927 _toSchema
= {'keys': 'Keys', 'user': 'User'}
2928 _toPy
= {'User': 'user', 'Keys': 'keys'}
2929 def __init__(self
, keys
=None, user
=None):
2931 keys : typing.Sequence[str]
2938 class ApplicationTag(Type
):
2939 _toSchema
= {'name': 'Name'}
2940 _toPy
= {'Name': 'name'}
2941 def __init__(self
, name
=None):
2948 class ClaimLeadershipBulkParams(Type
):
2949 _toSchema
= {'params': 'Params'}
2950 _toPy
= {'Params': 'params'}
2951 def __init__(self
, params
=None):
2953 params : typing.Sequence[~ClaimLeadershipParams]
2955 self
.params
= [ClaimLeadershipParams
.from_json(o
) for o
in params
or []]
2958 class ClaimLeadershipBulkResults(Type
):
2959 _toSchema
= {'results': 'Results'}
2960 _toPy
= {'Results': 'results'}
2961 def __init__(self
, results
=None):
2963 results : typing.Sequence[~ErrorResult]
2965 self
.results
= [ErrorResult
.from_json(o
) for o
in results
or []]
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):
2973 applicationtag : str
2974 durationseconds : float
2977 self
.applicationtag
= applicationtag
2978 self
.durationseconds
= durationseconds
2979 self
.unittag
= unittag
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):
2989 results : typing.Mapping[str, typing.Any]
2992 self
.actiontag
= actiontag
2993 self
.message
= message
2994 self
.results
= results
2995 self
.status
= status
2998 class ActionExecutionResults(Type
):
2999 _toSchema
= {'results': 'results'}
3000 _toPy
= {'results': 'results'}
3001 def __init__(self
, results
=None):
3003 results : typing.Sequence[~ActionExecutionResult]
3005 self
.results
= [ActionExecutionResult
.from_json(o
) for o
in results
or []]
3008 class JobsResult(Type
):
3009 _toSchema
= {'jobs': 'Jobs', 'error': 'Error'}
3010 _toPy
= {'Jobs': 'jobs', 'Error': 'error'}
3011 def __init__(self
, error
=None, jobs
=None):
3014 jobs : typing.Sequence[str]
3016 self
.error
= Error
.from_json(error
) if error
else None
3020 class JobsResults(Type
):
3021 _toSchema
= {'results': 'Results'}
3022 _toPy
= {'Results': 'results'}
3023 def __init__(self
, results
=None):
3025 results : typing.Sequence[~JobsResult]
3027 self
.results
= [JobsResult
.from_json(o
) for o
in results
or []]
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):
3038 dnssearchdomains : typing.Sequence[str]
3039 dnsservers : typing.Sequence[str]
3042 gatewayaddress : str
3048 parentinterfacename : str
3049 provideraddressid : str
3051 providerspaceid : str
3052 providersubnetid : str
3053 providervlanid : str
3056 self
.address
= address
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
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
3078 class SetMachineNetworkConfig(Type
):
3079 _toSchema
= {'tag': 'Tag', 'config': 'Config'}
3080 _toPy
= {'Tag': 'tag', 'Config': 'config'}
3081 def __init__(self
, config
=None, tag
=None):
3083 config : typing.Sequence[~NetworkConfig]
3086 self
.config
= [NetworkConfig
.from_json(o
) for o
in config
or []]
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):
3100 self
.error
= Error
.from_json(error
) if error
else None
3104 class MeterStatusResults(Type
):
3105 _toSchema
= {'results': 'Results'}
3106 _toPy
= {'Results': 'results'}
3107 def __init__(self
, results
=None):
3109 results : typing.Sequence[~MeterStatusResult]
3111 self
.results
= [MeterStatusResult
.from_json(o
) for o
in results
or []]
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):
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):
3135 metrics : typing.Sequence[~Metric]
3138 self
.charmurl
= charmurl
3139 self
.created
= created
3140 self
.metrics
= [Metric
.from_json(o
) for o
in metrics
or []]
3144 class MetricBatchParam(Type
):
3145 _toSchema
= {'tag': 'Tag', 'batch': 'Batch'}
3146 _toPy
= {'Batch': 'batch', 'Tag': 'tag'}
3147 def __init__(self
, batch
=None, tag
=None):
3152 self
.batch
= MetricBatch
.from_json(batch
) if batch
else None
3156 class MetricBatchParams(Type
):
3157 _toSchema
= {'batches': 'Batches'}
3158 _toPy
= {'Batches': 'batches'}
3159 def __init__(self
, batches
=None):
3161 batches : typing.Sequence[~MetricBatchParam]
3163 self
.batches
= [MetricBatchParam
.from_json(o
) for o
in batches
or []]
3166 class EntityMetrics(Type
):
3167 _toSchema
= {'metrics': 'metrics', 'error': 'error'}
3168 _toPy
= {'metrics': 'metrics', 'error': 'error'}
3169 def __init__(self
, error
=None, metrics
=None):
3172 metrics : typing.Sequence[~MetricResult]
3174 self
.error
= Error
.from_json(error
) if error
else None
3175 self
.metrics
= [MetricResult
.from_json(o
) for o
in metrics
or []]
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):
3192 class MeterStatusParams(Type
):
3193 _toSchema
= {'statues': 'statues'}
3194 _toPy
= {'statues': 'statues'}
3195 def __init__(self
, statues
=None):
3197 statues : typing.Sequence[~MeterStatusParam]
3199 self
.statues
= [MeterStatusParam
.from_json(o
) for o
in statues
or []]
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):
3216 class MetricResults(Type
):
3217 _toSchema
= {'results': 'results'}
3218 _toPy
= {'results': 'results'}
3219 def __init__(self
, results
=None):
3221 results : typing.Sequence[~EntityMetrics]
3223 self
.results
= [EntityMetrics
.from_json(o
) for o
in results
or []]
3226 class PhaseResult(Type
):
3227 _toSchema
= {'phase': 'phase', 'error': 'Error'}
3228 _toPy
= {'phase': 'phase', 'Error': 'error'}
3229 def __init__(self
, error
=None, phase
=None):
3234 self
.error
= Error
.from_json(error
) if error
else None
3238 class PhaseResults(Type
):
3239 _toSchema
= {'results': 'Results'}
3240 _toPy
= {'Results': 'results'}
3241 def __init__(self
, results
=None):
3243 results : typing.Sequence[~PhaseResult]
3245 self
.results
= [PhaseResult
.from_json(o
) for o
in results
or []]
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):
3255 spec : ModelMigrationSpec
3257 self
.attempt
= attempt
3259 self
.spec
= ModelMigrationSpec
.from_json(spec
) if spec
else None
3262 class SerializedModel(Type
):
3263 _toSchema
= {'bytes_': 'bytes'}
3264 _toPy
= {'bytes': 'bytes_'}
3265 def __init__(self
, bytes_
=None):
3267 bytes_ : typing.Sequence[int]
3269 self
.bytes_
= bytes_
3272 class SetMigrationPhaseArgs(Type
):
3273 _toSchema
= {'phase': 'phase'}
3274 _toPy
= {'phase': 'phase'}
3275 def __init__(self
, phase
=None):
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):
3289 source_api_addrs : typing.Sequence[str]
3290 source_ca_cert : str
3291 target_api_addrs : typing.Sequence[str]
3292 target_ca_cert : str
3294 self
.attempt
= attempt
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
3302 class ModelArgs(Type
):
3303 _toSchema
= {'model_tag': 'model-tag'}
3304 _toPy
= {'model-tag': 'model_tag'}
3305 def __init__(self
, model_tag
=None):
3309 self
.model_tag
= model_tag
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):
3317 account : typing.Mapping[str, typing.Any]
3318 config : typing.Mapping[str, typing.Any]
3321 self
.account
= account
3322 self
.config
= config
3323 self
.ownertag
= ownertag
3326 class ModelInfoResult(Type
):
3327 _toSchema
= {'result': 'result', 'error': 'error'}
3328 _toPy
= {'result': 'result', 'error': 'error'}
3329 def __init__(self
, error
=None, result
=None):
3334 self
.error
= Error
.from_json(error
) if error
else None
3335 self
.result
= ModelInfo
.from_json(result
) if result
else None
3338 class ModelInfoResults(Type
):
3339 _toSchema
= {'results': 'results'}
3340 _toPy
= {'results': 'results'}
3341 def __init__(self
, results
=None):
3343 results : typing.Sequence[~ModelInfoResult]
3345 self
.results
= [ModelInfoResult
.from_json(o
) for o
in results
or []]
3348 class ModelSkeletonConfigArgs(Type
):
3349 _toSchema
= {'provider': 'Provider', 'region': 'Region'}
3350 _toPy
= {'Provider': 'provider', 'Region': 'region'}
3351 def __init__(self
, provider
=None, region
=None):
3356 self
.provider
= provider
3357 self
.region
= region
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):
3370 self
.access
= access
3371 self
.action
= action
3372 self
.model_tag
= model_tag
3373 self
.user_tag
= user_tag
3376 class ModifyModelAccessRequest(Type
):
3377 _toSchema
= {'changes': 'changes'}
3378 _toPy
= {'changes': 'changes'}
3379 def __init__(self
, changes
=None):
3381 changes : typing.Sequence[~ModifyModelAccess]
3383 self
.changes
= [ModifyModelAccess
.from_json(o
) for o
in changes
or []]
3386 class ConstraintsResult(Type
):
3387 _toSchema
= {'constraints': 'Constraints', 'error': 'Error'}
3388 _toPy
= {'Constraints': 'constraints', 'Error': 'error'}
3389 def __init__(self
, constraints
=None, error
=None):
3394 self
.constraints
= Value
.from_json(constraints
) if constraints
else None
3395 self
.error
= Error
.from_json(error
) if error
else None
3398 class ConstraintsResults(Type
):
3399 _toSchema
= {'results': 'Results'}
3400 _toPy
= {'Results': 'results'}
3401 def __init__(self
, results
=None):
3403 results : typing.Sequence[~ConstraintsResult]
3405 self
.results
= [ConstraintsResult
.from_json(o
) for o
in results
or []]
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):
3413 allowlxcloopmounts : bool
3416 authorizedkeys : str
3419 sslhostnameverification : bool
3420 updatebehavior : UpdateBehavior
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
3432 class ContainerManagerConfig(Type
):
3433 _toSchema
= {'managerconfig': 'ManagerConfig'}
3434 _toPy
= {'ManagerConfig': 'managerconfig'}
3435 def __init__(self
, managerconfig
=None):
3437 managerconfig : typing.Mapping[str, str]
3439 self
.managerconfig
= managerconfig
3442 class ContainerManagerConfigParams(Type
):
3443 _toSchema
= {'type_': 'Type'}
3444 _toPy
= {'Type': 'type_'}
3445 def __init__(self
, type_
=None):
3452 class DistributionGroupResult(Type
):
3453 _toSchema
= {'result': 'Result', 'error': 'Error'}
3454 _toPy
= {'Result': 'result', 'Error': 'error'}
3455 def __init__(self
, error
=None, result
=None):
3458 result : typing.Sequence[str]
3460 self
.error
= Error
.from_json(error
) if error
else None
3461 self
.result
= result
3464 class DistributionGroupResults(Type
):
3465 _toSchema
= {'results': 'Results'}
3466 _toPy
= {'Results': 'results'}
3467 def __init__(self
, results
=None):
3469 results : typing.Sequence[~DistributionGroupResult]
3471 self
.results
= [DistributionGroupResult
.from_json(o
) for o
in results
or []]
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):
3479 characteristics : HardwareCharacteristics
3481 networkconfig : typing.Sequence[~NetworkConfig]
3484 volumeattachments : typing.Mapping[str, ~VolumeAttachmentInfo]
3485 volumes : typing.Sequence[~Volume]
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 []]
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 []]
3496 class InstancesInfo(Type
):
3497 _toSchema
= {'machines': 'Machines'}
3498 _toPy
= {'Machines': 'machines'}
3499 def __init__(self
, machines
=None):
3501 machines : typing.Sequence[~InstanceInfo]
3503 self
.machines
= [InstanceInfo
.from_json(o
) for o
in machines
or []]
3506 class MachineContainers(Type
):
3507 _toSchema
= {'machinetag': 'MachineTag', 'containertypes': 'ContainerTypes'}
3508 _toPy
= {'MachineTag': 'machinetag', 'ContainerTypes': 'containertypes'}
3509 def __init__(self
, containertypes
=None, machinetag
=None):
3511 containertypes : typing.Sequence[str]
3514 self
.containertypes
= containertypes
3515 self
.machinetag
= machinetag
3518 class MachineContainersParams(Type
):
3519 _toSchema
= {'params': 'Params'}
3520 _toPy
= {'Params': 'params'}
3521 def __init__(self
, params
=None):
3523 params : typing.Sequence[~MachineContainers]
3525 self
.params
= [MachineContainers
.from_json(o
) for o
in params
or []]
3528 class MachineNetworkConfigResult(Type
):
3529 _toSchema
= {'info': 'Info', 'error': 'Error'}
3530 _toPy
= {'Info': 'info', 'Error': 'error'}
3531 def __init__(self
, error
=None, info
=None):
3534 info : typing.Sequence[~NetworkConfig]
3536 self
.error
= Error
.from_json(error
) if error
else None
3537 self
.info
= [NetworkConfig
.from_json(o
) for o
in info
or []]
3540 class MachineNetworkConfigResults(Type
):
3541 _toSchema
= {'results': 'Results'}
3542 _toPy
= {'Results': 'results'}
3543 def __init__(self
, results
=None):
3545 results : typing.Sequence[~MachineNetworkConfigResult]
3547 self
.results
= [MachineNetworkConfigResult
.from_json(o
) for o
in results
or []]
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):
3556 endpointbindings : typing.Mapping[str, str]
3557 imagemetadata : typing.Sequence[~CloudImageMetadata]
3558 jobs : typing.Sequence[str]
3561 subnetstozones : typing.Sequence[str]
3562 tags : typing.Mapping[str, str]
3563 volumes : typing.Sequence[~VolumeParams]
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 []]
3569 self
.placement
= placement
3570 self
.series
= series
3571 self
.subnetstozones
= subnetstozones
3573 self
.volumes
= [VolumeParams
.from_json(o
) for o
in volumes
or []]
3576 class ProvisioningInfoResult(Type
):
3577 _toSchema
= {'result': 'Result', 'error': 'Error'}
3578 _toPy
= {'Result': 'result', 'Error': 'error'}
3579 def __init__(self
, error
=None, result
=None):
3582 result : ProvisioningInfo
3584 self
.error
= Error
.from_json(error
) if error
else None
3585 self
.result
= ProvisioningInfo
.from_json(result
) if result
else None
3588 class ProvisioningInfoResults(Type
):
3589 _toSchema
= {'results': 'Results'}
3590 _toPy
= {'Results': 'results'}
3591 def __init__(self
, results
=None):
3593 results : typing.Sequence[~ProvisioningInfoResult]
3595 self
.results
= [ProvisioningInfoResult
.from_json(o
) for o
in results
or []]
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):
3611 self
.noproxy
= noproxy
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):
3619 disablesslhostnameverification : bool
3621 toolslist : typing.Sequence[~Tools]
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 []]
3628 class ToolsResults(Type
):
3629 _toSchema
= {'results': 'Results'}
3630 _toPy
= {'Results': 'results'}
3631 def __init__(self
, results
=None):
3633 results : typing.Sequence[~ToolsResult]
3635 self
.results
= [ToolsResult
.from_json(o
) for o
in results
or []]
3638 class UpdateBehavior(Type
):
3639 _toSchema
= {'enableosrefreshupdate': 'EnableOSRefreshUpdate', 'enableosupgrade': 'EnableOSUpgrade'}
3640 _toPy
= {'EnableOSRefreshUpdate': 'enableosrefreshupdate', 'EnableOSUpgrade': 'enableosupgrade'}
3641 def __init__(self
, enableosrefreshupdate
=None, enableosupgrade
=None):
3643 enableosrefreshupdate : bool
3644 enableosupgrade : bool
3646 self
.enableosrefreshupdate
= enableosrefreshupdate
3647 self
.enableosupgrade
= enableosupgrade
3651 _toSchema
= {'volumetag': 'volumetag', 'info': 'info'}
3652 _toPy
= {'volumetag': 'volumetag', 'info': 'info'}
3653 def __init__(self
, info
=None, volumetag
=None):
3658 self
.info
= VolumeInfo
.from_json(info
) if info
else None
3659 self
.volumetag
= volumetag
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):
3672 self
.busaddress
= busaddress
3673 self
.devicelink
= devicelink
3674 self
.devicename
= devicename
3675 self
.read_only
= read_only
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):
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
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):
3708 self
.hardwareid
= hardwareid
3709 self
.persistent
= persistent
3711 self
.volumeid
= volumeid
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):
3719 attachment : VolumeAttachmentParams
3720 attributes : typing.Mapping[str, typing.Any]
3723 tags : typing.Mapping[str, str]
3726 self
.attachment
= VolumeAttachmentParams
.from_json(attachment
) if attachment
else None
3727 self
.attributes
= attributes
3728 self
.provider
= provider
3731 self
.volumetag
= volumetag
3734 class WatchContainer(Type
):
3735 _toSchema
= {'machinetag': 'MachineTag', 'containertype': 'ContainerType'}
3736 _toPy
= {'MachineTag': 'machinetag', 'ContainerType': 'containertype'}
3737 def __init__(self
, containertype
=None, machinetag
=None):
3742 self
.containertype
= containertype
3743 self
.machinetag
= machinetag
3746 class WatchContainers(Type
):
3747 _toSchema
= {'params': 'Params'}
3748 _toPy
= {'Params': 'params'}
3749 def __init__(self
, params
=None):
3751 params : typing.Sequence[~WatchContainer]
3753 self
.params
= [WatchContainer
.from_json(o
) for o
in params
or []]
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):
3769 self
.noproxy
= noproxy
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):
3777 aptproxysettings : ProxyConfig
3779 proxysettings : ProxyConfig
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
3786 class ProxyConfigResults(Type
):
3787 _toSchema
= {'results': 'Results'}
3788 _toPy
= {'Results': 'results'}
3789 def __init__(self
, results
=None):
3791 results : typing.Sequence[~ProxyConfigResult]
3793 self
.results
= [ProxyConfigResult
.from_json(o
) for o
in results
or []]
3796 class RebootActionResult(Type
):
3797 _toSchema
= {'result': 'result', 'error': 'error'}
3798 _toPy
= {'result': 'result', 'error': 'error'}
3799 def __init__(self
, error
=None, result
=None):
3804 self
.error
= Error
.from_json(error
) if error
else None
3805 self
.result
= result
3808 class RebootActionResults(Type
):
3809 _toSchema
= {'results': 'results'}
3810 _toPy
= {'results': 'results'}
3811 def __init__(self
, results
=None):
3813 results : typing.Sequence[~RebootActionResult]
3815 self
.results
= [RebootActionResult
.from_json(o
) for o
in results
or []]
3818 class RelationUnitsChange(Type
):
3819 _toSchema
= {'changed': 'Changed', 'departed': 'Departed'}
3820 _toPy
= {'Departed': 'departed', 'Changed': 'changed'}
3821 def __init__(self
, changed
=None, departed
=None):
3823 changed : typing.Mapping[str, ~UnitSettings]
3824 departed : typing.Sequence[str]
3826 self
.changed
= {k
: UnitSettings
.from_json(v
) for k
, v
in (changed
or dict()).items()}
3827 self
.departed
= departed
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):
3835 changes : RelationUnitsChange
3837 relationunitswatcherid : str
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
3844 class UnitSettings(Type
):
3845 _toSchema
= {'version': 'Version'}
3846 _toPy
= {'Version': 'version'}
3847 def __init__(self
, version
=None):
3851 self
.version
= version
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):
3859 jitterretrytime : bool
3862 retrytimefactor : int
3865 self
.jitterretrytime
= jitterretrytime
3866 self
.maxretrytime
= maxretrytime
3867 self
.minretrytime
= minretrytime
3868 self
.retrytimefactor
= retrytimefactor
3869 self
.shouldretry
= shouldretry
3872 class RetryStrategyResult(Type
):
3873 _toSchema
= {'result': 'Result', 'error': 'Error'}
3874 _toPy
= {'Result': 'result', 'Error': 'error'}
3875 def __init__(self
, error
=None, result
=None):
3878 result : RetryStrategy
3880 self
.error
= Error
.from_json(error
) if error
else None
3881 self
.result
= RetryStrategy
.from_json(result
) if result
else None
3884 class RetryStrategyResults(Type
):
3885 _toSchema
= {'results': 'Results'}
3886 _toPy
= {'Results': 'results'}
3887 def __init__(self
, results
=None):
3889 results : typing.Sequence[~RetryStrategyResult]
3891 self
.results
= [RetryStrategyResult
.from_json(o
) for o
in results
or []]
3894 class SSHAddressResult(Type
):
3895 _toSchema
= {'address': 'address', 'error': 'error'}
3896 _toPy
= {'address': 'address', 'error': 'error'}
3897 def __init__(self
, address
=None, error
=None):
3902 self
.address
= address
3903 self
.error
= Error
.from_json(error
) if error
else None
3906 class SSHAddressResults(Type
):
3907 _toSchema
= {'results': 'results'}
3908 _toPy
= {'results': 'results'}
3909 def __init__(self
, results
=None):
3911 results : typing.Sequence[~SSHAddressResult]
3913 self
.results
= [SSHAddressResult
.from_json(o
) for o
in results
or []]
3916 class SSHProxyResult(Type
):
3917 _toSchema
= {'use_proxy': 'use-proxy'}
3918 _toPy
= {'use-proxy': 'use_proxy'}
3919 def __init__(self
, use_proxy
=None):
3923 self
.use_proxy
= use_proxy
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):
3932 public_keys : typing.Sequence[str]
3934 self
.error
= Error
.from_json(error
) if error
else None
3935 self
.public_keys
= public_keys
3938 class SSHPublicKeysResults(Type
):
3939 _toSchema
= {'results': 'results'}
3940 _toPy
= {'results': 'results'}
3941 def __init__(self
, results
=None):
3943 results : typing.Sequence[~SSHPublicKeysResult]
3945 self
.results
= [SSHPublicKeysResult
.from_json(o
) for o
in results
or []]
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):
3957 self
.controllertag
= controllertag
3958 self
.duration
= duration
3959 self
.modeltag
= modeltag
3962 class SingularClaims(Type
):
3963 _toSchema
= {'claims': 'Claims'}
3964 _toPy
= {'Claims': 'claims'}
3965 def __init__(self
, claims
=None):
3967 claims : typing.Sequence[~SingularClaim]
3969 self
.claims
= [SingularClaim
.from_json(o
) for o
in claims
or []]
3972 class ListSpacesResults(Type
):
3973 _toSchema
= {'results': 'Results'}
3974 _toPy
= {'Results': 'results'}
3975 def __init__(self
, results
=None):
3977 results : typing.Sequence[~Space]
3979 self
.results
= [Space
.from_json(o
) for o
in results
or []]
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):
3989 subnets : typing.Sequence[~Subnet]
3991 self
.error
= Error
.from_json(error
) if error
else None
3993 self
.subnets
= [Subnet
.from_json(o
) for o
in subnets
or []]
3996 class StatusHistoryPruneArgs(Type
):
3997 _toSchema
= {'maxhistorytime': 'MaxHistoryTime', 'maxhistorymb': 'MaxHistoryMB'}
3998 _toPy
= {'MaxHistoryTime': 'maxhistorytime', 'MaxHistoryMB': 'maxhistorymb'}
3999 def __init__(self
, maxhistorymb
=None, maxhistorytime
=None):
4002 maxhistorytime : int
4004 self
.maxhistorymb
= maxhistorymb
4005 self
.maxhistorytime
= maxhistorytime
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):
4016 self
.mountpoint
= mountpoint
4017 self
.read_only
= read_only
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):
4026 info : FilesystemInfo
4027 machineattachments : typing.Mapping[str, ~FilesystemAttachmentInfo]
4028 status : EntityStatus
4029 storage : StorageDetails
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
4040 class FilesystemDetailsListResult(Type
):
4041 _toSchema
= {'result': 'result', 'error': 'error'}
4042 _toPy
= {'result': 'result', 'error': 'error'}
4043 def __init__(self
, error
=None, result
=None):
4046 result : typing.Sequence[~FilesystemDetails]
4048 self
.error
= Error
.from_json(error
) if error
else None
4049 self
.result
= [FilesystemDetails
.from_json(o
) for o
in result
or []]
4052 class FilesystemDetailsListResults(Type
):
4053 _toSchema
= {'results': 'results'}
4054 _toPy
= {'results': 'results'}
4055 def __init__(self
, results
=None):
4057 results : typing.Sequence[~FilesystemDetailsListResult]
4059 self
.results
= [FilesystemDetailsListResult
.from_json(o
) for o
in results
or []]
4062 class FilesystemFilter(Type
):
4063 _toSchema
= {'machines': 'machines'}
4064 _toPy
= {'machines': 'machines'}
4065 def __init__(self
, machines
=None):
4067 machines : typing.Sequence[str]
4069 self
.machines
= machines
4072 class FilesystemFilters(Type
):
4073 _toSchema
= {'filters': 'filters'}
4074 _toPy
= {'filters': 'filters'}
4075 def __init__(self
, filters
=None):
4077 filters : typing.Sequence[~FilesystemFilter]
4079 self
.filters
= [FilesystemFilter
.from_json(o
) for o
in filters
or []]
4082 class FilesystemInfo(Type
):
4083 _toSchema
= {'filesystemid': 'filesystemid', 'size': 'size'}
4084 _toPy
= {'filesystemid': 'filesystemid', 'size': 'size'}
4085 def __init__(self
, filesystemid
=None, size
=None):
4090 self
.filesystemid
= filesystemid
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):
4100 storage : StorageConstraints
4103 self
.storagename
= storagename
4104 self
.storage
= StorageConstraints
.from_json(storage
) if storage
else None
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):
4118 self
.location
= location
4119 self
.machinetag
= machinetag
4120 self
.storagetag
= storagetag
4121 self
.unittag
= unittag
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):
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):
4144 attachments : typing.Mapping[str, ~StorageAttachmentDetails]
4147 status : EntityStatus
4150 self
.persistent
= persistent
4151 self
.attachments
= {k
: StorageAttachmentDetails
.from_json(v
) for k
, v
in (attachments
or dict()).items()}
4153 self
.ownertag
= ownertag
4154 self
.status
= EntityStatus
.from_json(status
) if status
else None
4155 self
.storagetag
= storagetag
4158 class StorageDetailsListResult(Type
):
4159 _toSchema
= {'result': 'result', 'error': 'error'}
4160 _toPy
= {'result': 'result', 'error': 'error'}
4161 def __init__(self
, error
=None, result
=None):
4164 result : typing.Sequence[~StorageDetails]
4166 self
.error
= Error
.from_json(error
) if error
else None
4167 self
.result
= [StorageDetails
.from_json(o
) for o
in result
or []]
4170 class StorageDetailsListResults(Type
):
4171 _toSchema
= {'results': 'results'}
4172 _toPy
= {'results': 'results'}
4173 def __init__(self
, results
=None):
4175 results : typing.Sequence[~StorageDetailsListResult]
4177 self
.results
= [StorageDetailsListResult
.from_json(o
) for o
in results
or []]
4180 class StorageDetailsResult(Type
):
4181 _toSchema
= {'result': 'result', 'error': 'error'}
4182 _toPy
= {'result': 'result', 'error': 'error'}
4183 def __init__(self
, error
=None, result
=None):
4186 result : StorageDetails
4188 self
.error
= Error
.from_json(error
) if error
else None
4189 self
.result
= StorageDetails
.from_json(result
) if result
else None
4192 class StorageDetailsResults(Type
):
4193 _toSchema
= {'results': 'results'}
4194 _toPy
= {'results': 'results'}
4195 def __init__(self
, results
=None):
4197 results : typing.Sequence[~StorageDetailsResult]
4199 self
.results
= [StorageDetailsResult
.from_json(o
) for o
in results
or []]
4202 class StorageFilter(Type
):
4212 class StorageFilters(Type
):
4213 _toSchema
= {'filters': 'filters'}
4214 _toPy
= {'filters': 'filters'}
4215 def __init__(self
, filters
=None):
4217 filters : typing.Sequence[~StorageFilter]
4219 self
.filters
= [StorageFilter
.from_json(o
) for o
in filters
or []]
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):
4227 attrs : typing.Mapping[str, typing.Any]
4233 self
.provider
= provider
4236 class StoragePoolFilter(Type
):
4237 _toSchema
= {'providers': 'providers', 'names': 'names'}
4238 _toPy
= {'providers': 'providers', 'names': 'names'}
4239 def __init__(self
, names
=None, providers
=None):
4241 names : typing.Sequence[str]
4242 providers : typing.Sequence[str]
4245 self
.providers
= providers
4248 class StoragePoolFilters(Type
):
4249 _toSchema
= {'filters': 'filters'}
4250 _toPy
= {'filters': 'filters'}
4251 def __init__(self
, filters
=None):
4253 filters : typing.Sequence[~StoragePoolFilter]
4255 self
.filters
= [StoragePoolFilter
.from_json(o
) for o
in filters
or []]
4258 class StoragePoolsResult(Type
):
4259 _toSchema
= {'storagepools': 'storagepools', 'error': 'error'}
4260 _toPy
= {'storagepools': 'storagepools', 'error': 'error'}
4261 def __init__(self
, error
=None, storagepools
=None):
4264 storagepools : typing.Sequence[~StoragePool]
4266 self
.error
= Error
.from_json(error
) if error
else None
4267 self
.storagepools
= [StoragePool
.from_json(o
) for o
in storagepools
or []]
4270 class StoragePoolsResults(Type
):
4271 _toSchema
= {'results': 'results'}
4272 _toPy
= {'results': 'results'}
4273 def __init__(self
, results
=None):
4275 results : typing.Sequence[~StoragePoolsResult]
4277 self
.results
= [StoragePoolsResult
.from_json(o
) for o
in results
or []]
4280 class StoragesAddParams(Type
):
4281 _toSchema
= {'storages': 'storages'}
4282 _toPy
= {'storages': 'storages'}
4283 def __init__(self
, storages
=None):
4285 storages : typing.Sequence[~StorageAddParams]
4287 self
.storages
= [StorageAddParams
.from_json(o
) for o
in storages
or []]
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):
4296 machineattachments : typing.Mapping[str, ~VolumeAttachmentInfo]
4297 status : EntityStatus
4298 storage : StorageDetails
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
4308 class VolumeDetailsListResult(Type
):
4309 _toSchema
= {'result': 'result', 'error': 'error'}
4310 _toPy
= {'result': 'result', 'error': 'error'}
4311 def __init__(self
, error
=None, result
=None):
4314 result : typing.Sequence[~VolumeDetails]
4316 self
.error
= Error
.from_json(error
) if error
else None
4317 self
.result
= [VolumeDetails
.from_json(o
) for o
in result
or []]
4320 class VolumeDetailsListResults(Type
):
4321 _toSchema
= {'results': 'results'}
4322 _toPy
= {'results': 'results'}
4323 def __init__(self
, results
=None):
4325 results : typing.Sequence[~VolumeDetailsListResult]
4327 self
.results
= [VolumeDetailsListResult
.from_json(o
) for o
in results
or []]
4330 class VolumeFilter(Type
):
4331 _toSchema
= {'machines': 'machines'}
4332 _toPy
= {'machines': 'machines'}
4333 def __init__(self
, machines
=None):
4335 machines : typing.Sequence[str]
4337 self
.machines
= machines
4340 class VolumeFilters(Type
):
4341 _toSchema
= {'filters': 'filters'}
4342 _toPy
= {'filters': 'filters'}
4343 def __init__(self
, filters
=None):
4345 filters : typing.Sequence[~VolumeFilter]
4347 self
.filters
= [VolumeFilter
.from_json(o
) for o
in filters
or []]
4350 class BlockDeviceResult(Type
):
4351 _toSchema
= {'result': 'result', 'error': 'error'}
4352 _toPy
= {'result': 'result', 'error': 'error'}
4353 def __init__(self
, error
=None, result
=None):
4356 result : BlockDevice
4358 self
.error
= Error
.from_json(error
) if error
else None
4359 self
.result
= BlockDevice
.from_json(result
) if result
else None
4362 class BlockDeviceResults(Type
):
4363 _toSchema
= {'results': 'results'}
4364 _toPy
= {'results': 'results'}
4365 def __init__(self
, results
=None):
4367 results : typing.Sequence[~BlockDeviceResult]
4369 self
.results
= [BlockDeviceResult
.from_json(o
) for o
in results
or []]
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):
4378 info : FilesystemInfo
4381 self
.filesystemtag
= filesystemtag
4382 self
.info
= FilesystemInfo
.from_json(info
) if info
else None
4383 self
.volumetag
= volumetag
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):
4392 info : FilesystemAttachmentInfo
4395 self
.filesystemtag
= filesystemtag
4396 self
.info
= FilesystemAttachmentInfo
.from_json(info
) if info
else None
4397 self
.machinetag
= machinetag
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):
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
4422 class FilesystemAttachmentParamsResult(Type
):
4423 _toSchema
= {'result': 'result', 'error': 'error'}
4424 _toPy
= {'result': 'result', 'error': 'error'}
4425 def __init__(self
, error
=None, result
=None):
4428 result : FilesystemAttachmentParams
4430 self
.error
= Error
.from_json(error
) if error
else None
4431 self
.result
= FilesystemAttachmentParams
.from_json(result
) if result
else None
4434 class FilesystemAttachmentParamsResults(Type
):
4435 _toSchema
= {'results': 'results'}
4436 _toPy
= {'results': 'results'}
4437 def __init__(self
, results
=None):
4439 results : typing.Sequence[~FilesystemAttachmentParamsResult]
4441 self
.results
= [FilesystemAttachmentParamsResult
.from_json(o
) for o
in results
or []]
4444 class FilesystemAttachmentResult(Type
):
4445 _toSchema
= {'result': 'result', 'error': 'error'}
4446 _toPy
= {'result': 'result', 'error': 'error'}
4447 def __init__(self
, error
=None, result
=None):
4450 result : FilesystemAttachment
4452 self
.error
= Error
.from_json(error
) if error
else None
4453 self
.result
= FilesystemAttachment
.from_json(result
) if result
else None
4456 class FilesystemAttachmentResults(Type
):
4457 _toSchema
= {'results': 'results'}
4458 _toPy
= {'results': 'results'}
4459 def __init__(self
, results
=None):
4461 results : typing.Sequence[~FilesystemAttachmentResult]
4463 self
.results
= [FilesystemAttachmentResult
.from_json(o
) for o
in results
or []]
4466 class FilesystemAttachments(Type
):
4467 _toSchema
= {'filesystemattachments': 'filesystemattachments'}
4468 _toPy
= {'filesystemattachments': 'filesystemattachments'}
4469 def __init__(self
, filesystemattachments
=None):
4471 filesystemattachments : typing.Sequence[~FilesystemAttachment]
4473 self
.filesystemattachments
= [FilesystemAttachment
.from_json(o
) for o
in filesystemattachments
or []]
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):
4481 attachment : FilesystemAttachmentParams
4482 attributes : typing.Mapping[str, typing.Any]
4486 tags : typing.Mapping[str, str]
4489 self
.attachment
= FilesystemAttachmentParams
.from_json(attachment
) if attachment
else None
4490 self
.attributes
= attributes
4491 self
.filesystemtag
= filesystemtag
4492 self
.provider
= provider
4495 self
.volumetag
= volumetag
4498 class FilesystemParamsResult(Type
):
4499 _toSchema
= {'result': 'result', 'error': 'error'}
4500 _toPy
= {'result': 'result', 'error': 'error'}
4501 def __init__(self
, error
=None, result
=None):
4504 result : FilesystemParams
4506 self
.error
= Error
.from_json(error
) if error
else None
4507 self
.result
= FilesystemParams
.from_json(result
) if result
else None
4510 class FilesystemParamsResults(Type
):
4511 _toSchema
= {'results': 'results'}
4512 _toPy
= {'results': 'results'}
4513 def __init__(self
, results
=None):
4515 results : typing.Sequence[~FilesystemParamsResult]
4517 self
.results
= [FilesystemParamsResult
.from_json(o
) for o
in results
or []]
4520 class FilesystemResult(Type
):
4521 _toSchema
= {'result': 'result', 'error': 'error'}
4522 _toPy
= {'result': 'result', 'error': 'error'}
4523 def __init__(self
, error
=None, result
=None):
4528 self
.error
= Error
.from_json(error
) if error
else None
4529 self
.result
= Filesystem
.from_json(result
) if result
else None
4532 class FilesystemResults(Type
):
4533 _toSchema
= {'results': 'results'}
4534 _toPy
= {'results': 'results'}
4535 def __init__(self
, results
=None):
4537 results : typing.Sequence[~FilesystemResult]
4539 self
.results
= [FilesystemResult
.from_json(o
) for o
in results
or []]
4542 class Filesystems(Type
):
4543 _toSchema
= {'filesystems': 'filesystems'}
4544 _toPy
= {'filesystems': 'filesystems'}
4545 def __init__(self
, filesystems
=None):
4547 filesystems : typing.Sequence[~Filesystem]
4549 self
.filesystems
= [Filesystem
.from_json(o
) for o
in filesystems
or []]
4552 class MachineStorageIds(Type
):
4553 _toSchema
= {'ids': 'ids'}
4554 _toPy
= {'ids': 'ids'}
4555 def __init__(self
, ids
=None):
4557 ids : typing.Sequence[~MachineStorageId]
4559 self
.ids
= [MachineStorageId
.from_json(o
) for o
in ids
or []]
4562 class MachineStorageIdsWatchResults(Type
):
4563 _toSchema
= {'results': 'Results'}
4564 _toPy
= {'Results': 'results'}
4565 def __init__(self
, results
=None):
4567 results : typing.Sequence[~MachineStorageIdsWatchResult]
4569 self
.results
= [MachineStorageIdsWatchResult
.from_json(o
) for o
in results
or []]
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):
4577 info : VolumeAttachmentInfo
4581 self
.info
= VolumeAttachmentInfo
.from_json(info
) if info
else None
4582 self
.machinetag
= machinetag
4583 self
.volumetag
= volumetag
4586 class VolumeAttachmentParamsResult(Type
):
4587 _toSchema
= {'result': 'result', 'error': 'error'}
4588 _toPy
= {'result': 'result', 'error': 'error'}
4589 def __init__(self
, error
=None, result
=None):
4592 result : VolumeAttachmentParams
4594 self
.error
= Error
.from_json(error
) if error
else None
4595 self
.result
= VolumeAttachmentParams
.from_json(result
) if result
else None
4598 class VolumeAttachmentParamsResults(Type
):
4599 _toSchema
= {'results': 'results'}
4600 _toPy
= {'results': 'results'}
4601 def __init__(self
, results
=None):
4603 results : typing.Sequence[~VolumeAttachmentParamsResult]
4605 self
.results
= [VolumeAttachmentParamsResult
.from_json(o
) for o
in results
or []]
4608 class VolumeAttachmentResult(Type
):
4609 _toSchema
= {'result': 'result', 'error': 'error'}
4610 _toPy
= {'result': 'result', 'error': 'error'}
4611 def __init__(self
, error
=None, result
=None):
4614 result : VolumeAttachment
4616 self
.error
= Error
.from_json(error
) if error
else None
4617 self
.result
= VolumeAttachment
.from_json(result
) if result
else None
4620 class VolumeAttachmentResults(Type
):
4621 _toSchema
= {'results': 'results'}
4622 _toPy
= {'results': 'results'}
4623 def __init__(self
, results
=None):
4625 results : typing.Sequence[~VolumeAttachmentResult]
4627 self
.results
= [VolumeAttachmentResult
.from_json(o
) for o
in results
or []]
4630 class VolumeAttachments(Type
):
4631 _toSchema
= {'volumeattachments': 'volumeattachments'}
4632 _toPy
= {'volumeattachments': 'volumeattachments'}
4633 def __init__(self
, volumeattachments
=None):
4635 volumeattachments : typing.Sequence[~VolumeAttachment]
4637 self
.volumeattachments
= [VolumeAttachment
.from_json(o
) for o
in volumeattachments
or []]
4640 class VolumeParamsResult(Type
):
4641 _toSchema
= {'result': 'result', 'error': 'error'}
4642 _toPy
= {'result': 'result', 'error': 'error'}
4643 def __init__(self
, error
=None, result
=None):
4646 result : VolumeParams
4648 self
.error
= Error
.from_json(error
) if error
else None
4649 self
.result
= VolumeParams
.from_json(result
) if result
else None
4652 class VolumeParamsResults(Type
):
4653 _toSchema
= {'results': 'results'}
4654 _toPy
= {'results': 'results'}
4655 def __init__(self
, results
=None):
4657 results : typing.Sequence[~VolumeParamsResult]
4659 self
.results
= [VolumeParamsResult
.from_json(o
) for o
in results
or []]
4662 class VolumeResult(Type
):
4663 _toSchema
= {'result': 'result', 'error': 'error'}
4664 _toPy
= {'result': 'result', 'error': 'error'}
4665 def __init__(self
, error
=None, result
=None):
4670 self
.error
= Error
.from_json(error
) if error
else None
4671 self
.result
= Volume
.from_json(result
) if result
else None
4674 class VolumeResults(Type
):
4675 _toSchema
= {'results': 'results'}
4676 _toPy
= {'results': 'results'}
4677 def __init__(self
, results
=None):
4679 results : typing.Sequence[~VolumeResult]
4681 self
.results
= [VolumeResult
.from_json(o
) for o
in results
or []]
4684 class Volumes(Type
):
4685 _toSchema
= {'volumes': 'volumes'}
4686 _toPy
= {'volumes': 'volumes'}
4687 def __init__(self
, volumes
=None):
4689 volumes : typing.Sequence[~Volume]
4691 self
.volumes
= [Volume
.from_json(o
) for o
in volumes
or []]
4694 class SpaceResult(Type
):
4695 _toSchema
= {'tag': 'Tag', 'error': 'Error'}
4696 _toPy
= {'Tag': 'tag', 'Error': 'error'}
4697 def __init__(self
, error
=None, tag
=None):
4702 self
.error
= Error
.from_json(error
) if error
else None
4706 class SpaceResults(Type
):
4707 _toSchema
= {'results': 'Results'}
4708 _toPy
= {'Results': 'results'}
4709 def __init__(self
, results
=None):
4711 results : typing.Sequence[~SpaceResult]
4713 self
.results
= [SpaceResult
.from_json(o
) for o
in results
or []]
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):
4725 self
.available
= available
4726 self
.error
= Error
.from_json(error
) if error
else None
4730 class ZoneResults(Type
):
4731 _toSchema
= {'results': 'Results'}
4732 _toPy
= {'Results': 'results'}
4733 def __init__(self
, results
=None):
4735 results : typing.Sequence[~ZoneResult]
4737 self
.results
= [ZoneResult
.from_json(o
) for o
in results
or []]
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):
4751 self
.globalname
= globalname
4752 self
.issystem
= issystem
4758 class UndertakerModelInfoResult(Type
):
4759 _toSchema
= {'result': 'Result', 'error': 'Error'}
4760 _toPy
= {'Result': 'result', 'Error': 'error'}
4761 def __init__(self
, error
=None, result
=None):
4764 result : UndertakerModelInfo
4766 self
.error
= Error
.from_json(error
) if error
else None
4767 self
.result
= UndertakerModelInfo
.from_json(result
) if result
else None
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):
4775 application : StatusResult
4777 units : typing.Mapping[str, ~StatusResult]
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()}
4784 class ApplicationStatusResults(Type
):
4785 _toSchema
= {'results': 'Results'}
4786 _toPy
= {'Results': 'results'}
4787 def __init__(self
, results
=None):
4789 results : typing.Sequence[~ApplicationStatusResult]
4791 self
.results
= [ApplicationStatusResult
.from_json(o
) for o
in results
or []]
4794 class CharmURL(Type
):
4795 _toSchema
= {'url': 'URL'}
4796 _toPy
= {'URL': 'url'}
4797 def __init__(self
, url
=None):
4804 class CharmURLs(Type
):
4805 _toSchema
= {'urls': 'URLs'}
4806 _toPy
= {'URLs': 'urls'}
4807 def __init__(self
, urls
=None):
4809 urls : typing.Sequence[~CharmURL]
4811 self
.urls
= [CharmURL
.from_json(o
) for o
in urls
or []]
4814 class ConfigSettingsResult(Type
):
4815 _toSchema
= {'settings': 'Settings', 'error': 'Error'}
4816 _toPy
= {'Settings': 'settings', 'Error': 'error'}
4817 def __init__(self
, error
=None, settings
=None):
4820 settings : typing.Mapping[str, typing.Any]
4822 self
.error
= Error
.from_json(error
) if error
else None
4823 self
.settings
= settings
4826 class ConfigSettingsResults(Type
):
4827 _toSchema
= {'results': 'Results'}
4828 _toPy
= {'Results': 'results'}
4829 def __init__(self
, results
=None):
4831 results : typing.Sequence[~ConfigSettingsResult]
4833 self
.results
= [ConfigSettingsResult
.from_json(o
) for o
in results
or []]
4836 class Endpoint(Type
):
4837 _toSchema
= {'relation': 'Relation', 'applicationname': 'ApplicationName'}
4838 _toPy
= {'Relation': 'relation', 'ApplicationName': 'applicationname'}
4839 def __init__(self
, applicationname
=None, relation
=None):
4841 applicationname : str
4844 self
.applicationname
= applicationname
4845 self
.relation
= Relation
.from_json(relation
) if relation
else None
4848 class EntitiesCharmURL(Type
):
4849 _toSchema
= {'entities': 'Entities'}
4850 _toPy
= {'Entities': 'entities'}
4851 def __init__(self
, entities
=None):
4853 entities : typing.Sequence[~EntityCharmURL]
4855 self
.entities
= [EntityCharmURL
.from_json(o
) for o
in entities
or []]
4858 class EntitiesPortRanges(Type
):
4859 _toSchema
= {'entities': 'Entities'}
4860 _toPy
= {'Entities': 'entities'}
4861 def __init__(self
, entities
=None):
4863 entities : typing.Sequence[~EntityPortRange]
4865 self
.entities
= [EntityPortRange
.from_json(o
) for o
in entities
or []]
4868 class EntityCharmURL(Type
):
4869 _toSchema
= {'charmurl': 'CharmURL', 'tag': 'Tag'}
4870 _toPy
= {'CharmURL': 'charmurl', 'Tag': 'tag'}
4871 def __init__(self
, charmurl
=None, tag
=None):
4876 self
.charmurl
= charmurl
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):
4890 self
.fromport
= fromport
4891 self
.protocol
= protocol
4893 self
.toport
= toport
4896 class GetLeadershipSettingsBulkResults(Type
):
4897 _toSchema
= {'results': 'Results'}
4898 _toPy
= {'Results': 'results'}
4899 def __init__(self
, results
=None):
4901 results : typing.Sequence[~GetLeadershipSettingsResult]
4903 self
.results
= [GetLeadershipSettingsResult
.from_json(o
) for o
in results
or []]
4906 class GetLeadershipSettingsResult(Type
):
4907 _toSchema
= {'settings': 'Settings', 'error': 'Error'}
4908 _toPy
= {'Settings': 'settings', 'Error': 'error'}
4909 def __init__(self
, error
=None, settings
=None):
4912 settings : typing.Mapping[str, str]
4914 self
.error
= Error
.from_json(error
) if error
else None
4915 self
.settings
= settings
4918 class IntResult(Type
):
4919 _toSchema
= {'result': 'Result', 'error': 'Error'}
4920 _toPy
= {'Result': 'result', 'Error': 'error'}
4921 def __init__(self
, error
=None, result
=None):
4926 self
.error
= Error
.from_json(error
) if error
else None
4927 self
.result
= result
4930 class IntResults(Type
):
4931 _toSchema
= {'results': 'Results'}
4932 _toPy
= {'Results': 'results'}
4933 def __init__(self
, results
=None):
4935 results : typing.Sequence[~IntResult]
4937 self
.results
= [IntResult
.from_json(o
) for o
in results
or []]
4940 class MergeLeadershipSettingsBulkParams(Type
):
4941 _toSchema
= {'params': 'Params'}
4942 _toPy
= {'Params': 'params'}
4943 def __init__(self
, params
=None):
4945 params : typing.Sequence[~MergeLeadershipSettingsParam]
4947 self
.params
= [MergeLeadershipSettingsParam
.from_json(o
) for o
in params
or []]
4950 class MergeLeadershipSettingsParam(Type
):
4951 _toSchema
= {'applicationtag': 'ApplicationTag', 'settings': 'Settings'}
4952 _toPy
= {'Settings': 'settings', 'ApplicationTag': 'applicationtag'}
4953 def __init__(self
, applicationtag
=None, settings
=None):
4955 applicationtag : str
4956 settings : typing.Mapping[str, str]
4958 self
.applicationtag
= applicationtag
4959 self
.settings
= settings
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):
4971 self
.error
= Error
.from_json(error
) if error
else None
4976 class RelationIds(Type
):
4977 _toSchema
= {'relationids': 'RelationIds'}
4978 _toPy
= {'RelationIds': 'relationids'}
4979 def __init__(self
, relationids
=None):
4981 relationids : typing.Sequence[int]
4983 self
.relationids
= relationids
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):
4997 self
.endpoint
= Endpoint
.from_json(endpoint
) if endpoint
else None
4998 self
.error
= Error
.from_json(error
) if error
else None
5004 class RelationResults(Type
):
5005 _toSchema
= {'results': 'Results'}
5006 _toPy
= {'Results': 'results'}
5007 def __init__(self
, results
=None):
5009 results : typing.Sequence[~RelationResult]
5011 self
.results
= [RelationResult
.from_json(o
) for o
in results
or []]
5014 class RelationUnit(Type
):
5015 _toSchema
= {'relation': 'Relation', 'unit': 'Unit'}
5016 _toPy
= {'Unit': 'unit', 'Relation': 'relation'}
5017 def __init__(self
, relation
=None, unit
=None):
5022 self
.relation
= relation
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):
5035 self
.localunit
= localunit
5036 self
.relation
= relation
5037 self
.remoteunit
= remoteunit
5040 class RelationUnitPairs(Type
):
5041 _toSchema
= {'relationunitpairs': 'RelationUnitPairs'}
5042 _toPy
= {'RelationUnitPairs': 'relationunitpairs'}
5043 def __init__(self
, relationunitpairs
=None):
5045 relationunitpairs : typing.Sequence[~RelationUnitPair]
5047 self
.relationunitpairs
= [RelationUnitPair
.from_json(o
) for o
in relationunitpairs
or []]
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):
5056 settings : typing.Mapping[str, str]
5059 self
.relation
= relation
5060 self
.settings
= settings
5064 class RelationUnits(Type
):
5065 _toSchema
= {'relationunits': 'RelationUnits'}
5066 _toPy
= {'RelationUnits': 'relationunits'}
5067 def __init__(self
, relationunits
=None):
5069 relationunits : typing.Sequence[~RelationUnit]
5071 self
.relationunits
= [RelationUnit
.from_json(o
) for o
in relationunits
or []]
5074 class RelationUnitsSettings(Type
):
5075 _toSchema
= {'relationunits': 'RelationUnits'}
5076 _toPy
= {'RelationUnits': 'relationunits'}
5077 def __init__(self
, relationunits
=None):
5079 relationunits : typing.Sequence[~RelationUnitSettings]
5081 self
.relationunits
= [RelationUnitSettings
.from_json(o
) for o
in relationunits
or []]
5084 class RelationUnitsWatchResults(Type
):
5085 _toSchema
= {'results': 'Results'}
5086 _toPy
= {'Results': 'results'}
5087 def __init__(self
, results
=None):
5089 results : typing.Sequence[~RelationUnitsWatchResult]
5091 self
.results
= [RelationUnitsWatchResult
.from_json(o
) for o
in results
or []]
5094 class ResolvedModeResult(Type
):
5095 _toSchema
= {'mode': 'Mode', 'error': 'Error'}
5096 _toPy
= {'Mode': 'mode', 'Error': 'error'}
5097 def __init__(self
, error
=None, mode
=None):
5102 self
.error
= Error
.from_json(error
) if error
else None
5106 class ResolvedModeResults(Type
):
5107 _toSchema
= {'results': 'Results'}
5108 _toPy
= {'Results': 'results'}
5109 def __init__(self
, results
=None):
5111 results : typing.Sequence[~ResolvedModeResult]
5113 self
.results
= [ResolvedModeResult
.from_json(o
) for o
in results
or []]
5116 class SettingsResult(Type
):
5117 _toSchema
= {'settings': 'Settings', 'error': 'Error'}
5118 _toPy
= {'Settings': 'settings', 'Error': 'error'}
5119 def __init__(self
, error
=None, settings
=None):
5122 settings : typing.Mapping[str, str]
5124 self
.error
= Error
.from_json(error
) if error
else None
5125 self
.settings
= settings
5128 class SettingsResults(Type
):
5129 _toSchema
= {'results': 'Results'}
5130 _toPy
= {'Results': 'results'}
5131 def __init__(self
, results
=None):
5133 results : typing.Sequence[~SettingsResult]
5135 self
.results
= [SettingsResult
.from_json(o
) for o
in results
or []]
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):
5152 self
.location
= location
5153 self
.ownertag
= ownertag
5154 self
.storagetag
= storagetag
5155 self
.unittag
= unittag
5158 class StorageAttachmentId(Type
):
5159 _toSchema
= {'storagetag': 'storagetag', 'unittag': 'unittag'}
5160 _toPy
= {'storagetag': 'storagetag', 'unittag': 'unittag'}
5161 def __init__(self
, storagetag
=None, unittag
=None):
5166 self
.storagetag
= storagetag
5167 self
.unittag
= unittag
5170 class StorageAttachmentIds(Type
):
5171 _toSchema
= {'ids': 'ids'}
5172 _toPy
= {'ids': 'ids'}
5173 def __init__(self
, ids
=None):
5175 ids : typing.Sequence[~StorageAttachmentId]
5177 self
.ids
= [StorageAttachmentId
.from_json(o
) for o
in ids
or []]
5180 class StorageAttachmentIdsResult(Type
):
5181 _toSchema
= {'result': 'result', 'error': 'error'}
5182 _toPy
= {'result': 'result', 'error': 'error'}
5183 def __init__(self
, error
=None, result
=None):
5186 result : StorageAttachmentIds
5188 self
.error
= Error
.from_json(error
) if error
else None
5189 self
.result
= StorageAttachmentIds
.from_json(result
) if result
else None
5192 class StorageAttachmentIdsResults(Type
):
5193 _toSchema
= {'results': 'results'}
5194 _toPy
= {'results': 'results'}
5195 def __init__(self
, results
=None):
5197 results : typing.Sequence[~StorageAttachmentIdsResult]
5199 self
.results
= [StorageAttachmentIdsResult
.from_json(o
) for o
in results
or []]
5202 class StorageAttachmentResult(Type
):
5203 _toSchema
= {'result': 'result', 'error': 'error'}
5204 _toPy
= {'result': 'result', 'error': 'error'}
5205 def __init__(self
, error
=None, result
=None):
5208 result : StorageAttachment
5210 self
.error
= Error
.from_json(error
) if error
else None
5211 self
.result
= StorageAttachment
.from_json(result
) if result
else None
5214 class StorageAttachmentResults(Type
):
5215 _toSchema
= {'results': 'results'}
5216 _toPy
= {'results': 'results'}
5217 def __init__(self
, results
=None):
5219 results : typing.Sequence[~StorageAttachmentResult]
5221 self
.results
= [StorageAttachmentResult
.from_json(o
) for o
in results
or []]
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):
5233 self
.error
= Error
.from_json(error
) if error
else None
5235 self
.result
= result
5238 class StringBoolResults(Type
):
5239 _toSchema
= {'results': 'Results'}
5240 _toPy
= {'Results': 'results'}
5241 def __init__(self
, results
=None):
5243 results : typing.Sequence[~StringBoolResult]
5245 self
.results
= [StringBoolResult
.from_json(o
) for o
in results
or []]
5248 class UnitNetworkConfig(Type
):
5249 _toSchema
= {'bindingname': 'BindingName', 'unittag': 'UnitTag'}
5250 _toPy
= {'BindingName': 'bindingname', 'UnitTag': 'unittag'}
5251 def __init__(self
, bindingname
=None, unittag
=None):
5256 self
.bindingname
= bindingname
5257 self
.unittag
= unittag
5260 class UnitNetworkConfigResult(Type
):
5261 _toSchema
= {'info': 'Info', 'error': 'Error'}
5262 _toPy
= {'Info': 'info', 'Error': 'error'}
5263 def __init__(self
, error
=None, info
=None):
5266 info : typing.Sequence[~NetworkConfig]
5268 self
.error
= Error
.from_json(error
) if error
else None
5269 self
.info
= [NetworkConfig
.from_json(o
) for o
in info
or []]
5272 class UnitNetworkConfigResults(Type
):
5273 _toSchema
= {'results': 'Results'}
5274 _toPy
= {'Results': 'results'}
5275 def __init__(self
, results
=None):
5277 results : typing.Sequence[~UnitNetworkConfigResult]
5279 self
.results
= [UnitNetworkConfigResult
.from_json(o
) for o
in results
or []]
5282 class UnitsNetworkConfig(Type
):
5283 _toSchema
= {'args': 'Args'}
5284 _toPy
= {'Args': 'args'}
5285 def __init__(self
, args
=None):
5287 args : typing.Sequence[~UnitNetworkConfig]
5289 self
.args
= [UnitNetworkConfig
.from_json(o
) for o
in args
or []]
5292 class EntitiesVersion(Type
):
5293 _toSchema
= {'agenttools': 'AgentTools'}
5294 _toPy
= {'AgentTools': 'agenttools'}
5295 def __init__(self
, agenttools
=None):
5297 agenttools : typing.Sequence[~EntityVersion]
5299 self
.agenttools
= [EntityVersion
.from_json(o
) for o
in agenttools
or []]
5302 class EntityVersion(Type
):
5303 _toSchema
= {'tag': 'Tag', 'tools': 'Tools'}
5304 _toPy
= {'Tag': 'tag', 'Tools': 'tools'}
5305 def __init__(self
, tag
=None, tools
=None):
5311 self
.tools
= Version
.from_json(tools
) if tools
else None
5314 class VersionResult(Type
):
5315 _toSchema
= {'version': 'Version', 'error': 'Error'}
5316 _toPy
= {'Version': 'version', 'Error': 'error'}
5317 def __init__(self
, error
=None, version
=None):
5322 self
.error
= Error
.from_json(error
) if error
else None
5323 self
.version
= Number
.from_json(version
) if version
else None
5326 class VersionResults(Type
):
5327 _toSchema
= {'results': 'Results'}
5328 _toPy
= {'Results': 'results'}
5329 def __init__(self
, results
=None):
5331 results : typing.Sequence[~VersionResult]
5333 self
.results
= [VersionResult
.from_json(o
) for o
in results
or []]
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):
5342 model_access_permission : str
5344 shared_model_tags : typing.Sequence[str]
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
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):
5360 secret_key : typing.Sequence[int]
5363 self
.error
= Error
.from_json(error
) if error
else None
5364 self
.secret_key
= secret_key
5368 class AddUserResults(Type
):
5369 _toSchema
= {'results': 'results'}
5370 _toPy
= {'results': 'results'}
5371 def __init__(self
, results
=None):
5373 results : typing.Sequence[~AddUserResult]
5375 self
.results
= [AddUserResult
.from_json(o
) for o
in results
or []]
5378 class AddUsers(Type
):
5379 _toSchema
= {'users': 'users'}
5380 _toPy
= {'users': 'users'}
5381 def __init__(self
, users
=None):
5383 users : typing.Sequence[~AddUser]
5385 self
.users
= [AddUser
.from_json(o
) for o
in users
or []]
5388 class MacaroonResult(Type
):
5389 _toSchema
= {'result': 'result', 'error': 'error'}
5390 _toPy
= {'result': 'result', 'error': 'error'}
5391 def __init__(self
, error
=None, result
=None):
5396 self
.error
= Error
.from_json(error
) if error
else None
5397 self
.result
= Macaroon
.from_json(result
) if result
else None
5400 class MacaroonResults(Type
):
5401 _toSchema
= {'results': 'results'}
5402 _toPy
= {'results': 'results'}
5403 def __init__(self
, results
=None):
5405 results : typing.Sequence[~MacaroonResult]
5407 self
.results
= [MacaroonResult
.from_json(o
) for o
in results
or []]
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):
5419 last_connection : str
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
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):
5435 entities : typing.Sequence[~Entity]
5436 include_disabled : bool
5438 self
.entities
= [Entity
.from_json(o
) for o
in entities
or []]
5439 self
.include_disabled
= include_disabled
5442 class UserInfoResult(Type
):
5443 _toSchema
= {'result': 'result', 'error': 'error'}
5444 _toPy
= {'result': 'result', 'error': 'error'}
5445 def __init__(self
, error
=None, result
=None):
5450 self
.error
= Error
.from_json(error
) if error
else None
5451 self
.result
= UserInfo
.from_json(result
) if result
else None
5454 class UserInfoResults(Type
):
5455 _toSchema
= {'results': 'results'}
5456 _toPy
= {'results': 'results'}
5457 def __init__(self
, results
=None):
5459 results : typing.Sequence[~UserInfoResult]
5461 self
.results
= [UserInfoResult
.from_json(o
) for o
in results
or []]
5467 schema
= {'definitions': {'Action': {'additionalProperties': False,
5468 'properties': {'name': {'type': 'string'},
5469 'parameters': {'patternProperties': {'.*': {'additionalProperties': True,
5472 'receiver': {'type': 'string'},
5473 'tag': {'type': 'string'}},
5474 'required': ['tag', 'receiver', 'name'],
5476 'ActionResult': {'additionalProperties': False,
5477 'properties': {'action': {'$ref': '#/definitions/Action'},
5478 'completed': {'format': 'date-time',
5480 'enqueued': {'format': 'date-time',
5482 'error': {'$ref': '#/definitions/Error'},
5483 'message': {'type': 'string'},
5484 'output': {'patternProperties': {'.*': {'additionalProperties': True,
5487 'started': {'format': 'date-time',
5489 'status': {'type': 'string'}},
5491 'ActionResults': {'additionalProperties': False,
5492 'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'},
5495 'ActionSpec': {'additionalProperties': False,
5496 'properties': {'Description': {'type': 'string'},
5497 'Params': {'patternProperties': {'.*': {'additionalProperties': True,
5500 'required': ['Description', 'Params'],
5502 'Actions': {'additionalProperties': False,
5503 'properties': {'ActionSpecs': {'patternProperties': {'.*': {'$ref': '#/definitions/ActionSpec'}},
5505 'required': ['ActionSpecs'],
5507 'ActionsByName': {'additionalProperties': False,
5508 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'},
5510 'error': {'$ref': '#/definitions/Error'},
5511 'name': {'type': 'string'}},
5513 'ActionsByNames': {'additionalProperties': False,
5514 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByName'},
5517 'ActionsByReceiver': {'additionalProperties': False,
5518 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'},
5520 'error': {'$ref': '#/definitions/Error'},
5521 'receiver': {'type': 'string'}},
5523 'ActionsByReceivers': {'additionalProperties': False,
5524 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByReceiver'},
5527 'ApplicationCharmActionsResult': {'additionalProperties': False,
5528 'properties': {'ApplicationTag': {'type': 'string'},
5529 'actions': {'$ref': '#/definitions/Actions'},
5530 'error': {'$ref': '#/definitions/Error'}},
5532 'ApplicationsCharmActionsResults': {'additionalProperties': False,
5533 'properties': {'results': {'items': {'$ref': '#/definitions/ApplicationCharmActionsResult'},
5536 'Entities': {'additionalProperties': False,
5537 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
5539 'required': ['Entities'],
5541 'Entity': {'additionalProperties': False,
5542 'properties': {'Tag': {'type': 'string'}},
5543 'required': ['Tag'],
5545 'Error': {'additionalProperties': False,
5546 'properties': {'Code': {'type': 'string'},
5547 'Info': {'$ref': '#/definitions/ErrorInfo'},
5548 'Message': {'type': 'string'}},
5549 'required': ['Message', 'Code'],
5551 'ErrorInfo': {'additionalProperties': False,
5552 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
5553 'MacaroonPath': {'type': 'string'}},
5555 'FindActionsByNames': {'additionalProperties': False,
5556 'properties': {'names': {'items': {'type': 'string'},
5559 'FindTags': {'additionalProperties': False,
5560 'properties': {'prefixes': {'items': {'type': 'string'},
5562 'required': ['prefixes'],
5564 'FindTagsResults': {'additionalProperties': False,
5565 'properties': {'matches': {'patternProperties': {'.*': {'items': {'$ref': '#/definitions/Entity'},
5568 'required': ['matches'],
5570 'Macaroon': {'additionalProperties': False,
5571 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
5573 'data': {'items': {'type': 'integer'},
5575 'id': {'$ref': '#/definitions/packet'},
5576 'location': {'$ref': '#/definitions/packet'},
5577 'sig': {'items': {'type': 'integer'},
5579 'required': ['data',
5585 'RunParams': {'additionalProperties': False,
5586 'properties': {'Applications': {'items': {'type': 'string'},
5588 'Commands': {'type': 'string'},
5589 'Machines': {'items': {'type': 'string'},
5591 'Timeout': {'type': 'integer'},
5592 'Units': {'items': {'type': 'string'},
5594 'required': ['Commands',
5600 'caveat': {'additionalProperties': False,
5601 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
5602 'location': {'$ref': '#/definitions/packet'},
5603 'verificationId': {'$ref': '#/definitions/packet'}},
5604 'required': ['location',
5608 'packet': {'additionalProperties': False,
5609 'properties': {'headerLen': {'type': 'integer'},
5610 'start': {'type': 'integer'},
5611 'totalLen': {'type': 'integer'}},
5612 'required': ['start', 'totalLen', 'headerLen'],
5614 'properties': {'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5615 'Result': {'$ref': '#/definitions/ActionResults'}},
5617 'ApplicationsCharmsActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5618 'Result': {'$ref': '#/definitions/ApplicationsCharmActionsResults'}},
5620 'Cancel': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5621 'Result': {'$ref': '#/definitions/ActionResults'}},
5623 'Enqueue': {'properties': {'Params': {'$ref': '#/definitions/Actions'},
5624 'Result': {'$ref': '#/definitions/ActionResults'}},
5626 'FindActionTagsByPrefix': {'properties': {'Params': {'$ref': '#/definitions/FindTags'},
5627 'Result': {'$ref': '#/definitions/FindTagsResults'}},
5629 'FindActionsByNames': {'properties': {'Params': {'$ref': '#/definitions/FindActionsByNames'},
5630 'Result': {'$ref': '#/definitions/ActionsByNames'}},
5632 'ListAll': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5633 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
5635 'ListCompleted': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5636 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
5638 'ListPending': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5639 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
5641 'ListRunning': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5642 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
5644 'Run': {'properties': {'Params': {'$ref': '#/definitions/RunParams'},
5645 'Result': {'$ref': '#/definitions/ActionResults'}},
5647 'RunOnAllMachines': {'properties': {'Params': {'$ref': '#/definitions/RunParams'},
5648 'Result': {'$ref': '#/definitions/ActionResults'}},
5653 @ReturnMapping(ActionResults
)
5654 async def Actions(self
, entities
):
5656 entities : typing.Sequence[~Entity]
5657 Returns -> typing.Sequence[~ActionResult]
5659 # map input types to rpc msg
5661 msg
= dict(Type
='Action', Request
='Actions', Version
=2, Params
=params
)
5662 params
['Entities'] = entities
5663 reply
= await self
.rpc(msg
)
5668 @ReturnMapping(ApplicationsCharmActionsResults
)
5669 async def ApplicationsCharmsActions(self
, entities
):
5671 entities : typing.Sequence[~Entity]
5672 Returns -> typing.Sequence[~ApplicationCharmActionsResult]
5674 # map input types to rpc msg
5676 msg
= dict(Type
='Action', Request
='ApplicationsCharmsActions', Version
=2, Params
=params
)
5677 params
['Entities'] = entities
5678 reply
= await self
.rpc(msg
)
5683 @ReturnMapping(ActionResults
)
5684 async def Cancel(self
, entities
):
5686 entities : typing.Sequence[~Entity]
5687 Returns -> typing.Sequence[~ActionResult]
5689 # map input types to rpc msg
5691 msg
= dict(Type
='Action', Request
='Cancel', Version
=2, Params
=params
)
5692 params
['Entities'] = entities
5693 reply
= await self
.rpc(msg
)
5698 @ReturnMapping(ActionResults
)
5699 async def Enqueue(self
, actionspecs
):
5701 actionspecs : typing.Mapping[str, ~ActionSpec]
5702 Returns -> typing.Sequence[~ActionResult]
5704 # map input types to rpc msg
5706 msg
= dict(Type
='Action', Request
='Enqueue', Version
=2, Params
=params
)
5707 params
['ActionSpecs'] = actionspecs
5708 reply
= await self
.rpc(msg
)
5713 @ReturnMapping(FindTagsResults
)
5714 async def FindActionTagsByPrefix(self
, prefixes
):
5716 prefixes : typing.Sequence[str]
5717 Returns -> typing.Sequence[~Entity]
5719 # map input types to rpc msg
5721 msg
= dict(Type
='Action', Request
='FindActionTagsByPrefix', Version
=2, Params
=params
)
5722 params
['prefixes'] = prefixes
5723 reply
= await self
.rpc(msg
)
5728 @ReturnMapping(ActionsByNames
)
5729 async def FindActionsByNames(self
, names
):
5731 names : typing.Sequence[str]
5732 Returns -> typing.Sequence[~ActionsByName]
5734 # map input types to rpc msg
5736 msg
= dict(Type
='Action', Request
='FindActionsByNames', Version
=2, Params
=params
)
5737 params
['names'] = names
5738 reply
= await self
.rpc(msg
)
5743 @ReturnMapping(ActionsByReceivers
)
5744 async def ListAll(self
, entities
):
5746 entities : typing.Sequence[~Entity]
5747 Returns -> typing.Sequence[~ActionsByReceiver]
5749 # map input types to rpc msg
5751 msg
= dict(Type
='Action', Request
='ListAll', Version
=2, Params
=params
)
5752 params
['Entities'] = entities
5753 reply
= await self
.rpc(msg
)
5758 @ReturnMapping(ActionsByReceivers
)
5759 async def ListCompleted(self
, entities
):
5761 entities : typing.Sequence[~Entity]
5762 Returns -> typing.Sequence[~ActionsByReceiver]
5764 # map input types to rpc msg
5766 msg
= dict(Type
='Action', Request
='ListCompleted', Version
=2, Params
=params
)
5767 params
['Entities'] = entities
5768 reply
= await self
.rpc(msg
)
5773 @ReturnMapping(ActionsByReceivers
)
5774 async def ListPending(self
, entities
):
5776 entities : typing.Sequence[~Entity]
5777 Returns -> typing.Sequence[~ActionsByReceiver]
5779 # map input types to rpc msg
5781 msg
= dict(Type
='Action', Request
='ListPending', Version
=2, Params
=params
)
5782 params
['Entities'] = entities
5783 reply
= await self
.rpc(msg
)
5788 @ReturnMapping(ActionsByReceivers
)
5789 async def ListRunning(self
, entities
):
5791 entities : typing.Sequence[~Entity]
5792 Returns -> typing.Sequence[~ActionsByReceiver]
5794 # map input types to rpc msg
5796 msg
= dict(Type
='Action', Request
='ListRunning', Version
=2, Params
=params
)
5797 params
['Entities'] = entities
5798 reply
= await self
.rpc(msg
)
5803 @ReturnMapping(ActionResults
)
5804 async def Run(self
, applications
, commands
, machines
, timeout
, units
):
5806 applications : typing.Sequence[str]
5808 machines : typing.Sequence[str]
5810 units : typing.Sequence[str]
5811 Returns -> typing.Sequence[~ActionResult]
5813 # map input types to rpc msg
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
)
5826 @ReturnMapping(ActionResults
)
5827 async def RunOnAllMachines(self
, applications
, commands
, machines
, timeout
, units
):
5829 applications : typing.Sequence[str]
5831 machines : typing.Sequence[str]
5833 units : typing.Sequence[str]
5834 Returns -> typing.Sequence[~ActionResult]
5836 # map input types to rpc msg
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
)
5848 class Addresser(Type
):
5851 schema
= {'definitions': {'BoolResult': {'additionalProperties': False,
5852 'properties': {'Error': {'$ref': '#/definitions/Error'},
5853 'Result': {'type': 'boolean'}},
5854 'required': ['Error', 'Result'],
5856 'EntitiesWatchResult': {'additionalProperties': False,
5857 'properties': {'Changes': {'items': {'type': 'string'},
5859 'EntityWatcherId': {'type': 'string'},
5860 'Error': {'$ref': '#/definitions/Error'}},
5861 'required': ['EntityWatcherId',
5865 'Error': {'additionalProperties': False,
5866 'properties': {'Code': {'type': 'string'},
5867 'Info': {'$ref': '#/definitions/ErrorInfo'},
5868 'Message': {'type': 'string'}},
5869 'required': ['Message', 'Code'],
5871 'ErrorInfo': {'additionalProperties': False,
5872 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
5873 'MacaroonPath': {'type': 'string'}},
5875 'ErrorResult': {'additionalProperties': False,
5876 'properties': {'Error': {'$ref': '#/definitions/Error'}},
5877 'required': ['Error'],
5879 'Macaroon': {'additionalProperties': False,
5880 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
5882 'data': {'items': {'type': 'integer'},
5884 'id': {'$ref': '#/definitions/packet'},
5885 'location': {'$ref': '#/definitions/packet'},
5886 'sig': {'items': {'type': 'integer'},
5888 'required': ['data',
5894 'caveat': {'additionalProperties': False,
5895 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
5896 'location': {'$ref': '#/definitions/packet'},
5897 'verificationId': {'$ref': '#/definitions/packet'}},
5898 'required': ['location',
5902 'packet': {'additionalProperties': False,
5903 'properties': {'headerLen': {'type': 'integer'},
5904 'start': {'type': 'integer'},
5905 'totalLen': {'type': 'integer'}},
5906 'required': ['start', 'totalLen', 'headerLen'],
5908 'properties': {'CanDeallocateAddresses': {'properties': {'Result': {'$ref': '#/definitions/BoolResult'}},
5910 'CleanupIPAddresses': {'properties': {'Result': {'$ref': '#/definitions/ErrorResult'}},
5912 'WatchIPAddresses': {'properties': {'Result': {'$ref': '#/definitions/EntitiesWatchResult'}},
5917 @ReturnMapping(BoolResult
)
5918 async def CanDeallocateAddresses(self
):
5921 Returns -> typing.Union[_ForwardRef('Error'), bool]
5923 # map input types to rpc msg
5925 msg
= dict(Type
='Addresser', Request
='CanDeallocateAddresses', Version
=2, Params
=params
)
5927 reply
= await self
.rpc(msg
)
5932 @ReturnMapping(ErrorResult
)
5933 async def CleanupIPAddresses(self
):
5938 # map input types to rpc msg
5940 msg
= dict(Type
='Addresser', Request
='CleanupIPAddresses', Version
=2, Params
=params
)
5942 reply
= await self
.rpc(msg
)
5947 @ReturnMapping(EntitiesWatchResult
)
5948 async def WatchIPAddresses(self
):
5951 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')]
5953 # map input types to rpc msg
5955 msg
= dict(Type
='Addresser', Request
='WatchIPAddresses', Version
=2, Params
=params
)
5957 reply
= await self
.rpc(msg
)
5964 schema
= {'definitions': {'AgentGetEntitiesResult': {'additionalProperties': False,
5965 'properties': {'ContainerType': {'type': 'string'},
5966 'Error': {'$ref': '#/definitions/Error'},
5967 'Jobs': {'items': {'type': 'string'},
5969 'Life': {'type': 'string'}},
5970 'required': ['Life',
5975 'AgentGetEntitiesResults': {'additionalProperties': False,
5976 'properties': {'Entities': {'items': {'$ref': '#/definitions/AgentGetEntitiesResult'},
5978 'required': ['Entities'],
5980 'Entities': {'additionalProperties': False,
5981 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
5983 'required': ['Entities'],
5985 'Entity': {'additionalProperties': False,
5986 'properties': {'Tag': {'type': 'string'}},
5987 'required': ['Tag'],
5989 'EntityPassword': {'additionalProperties': False,
5990 'properties': {'Password': {'type': 'string'},
5991 'Tag': {'type': 'string'}},
5992 'required': ['Tag', 'Password'],
5994 'EntityPasswords': {'additionalProperties': False,
5995 'properties': {'Changes': {'items': {'$ref': '#/definitions/EntityPassword'},
5997 'required': ['Changes'],
5999 'Error': {'additionalProperties': False,
6000 'properties': {'Code': {'type': 'string'},
6001 'Info': {'$ref': '#/definitions/ErrorInfo'},
6002 'Message': {'type': 'string'}},
6003 'required': ['Message', 'Code'],
6005 'ErrorInfo': {'additionalProperties': False,
6006 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
6007 'MacaroonPath': {'type': 'string'}},
6009 'ErrorResult': {'additionalProperties': False,
6010 'properties': {'Error': {'$ref': '#/definitions/Error'}},
6011 'required': ['Error'],
6013 'ErrorResults': {'additionalProperties': False,
6014 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
6016 'required': ['Results'],
6018 'IsMasterResult': {'additionalProperties': False,
6019 'properties': {'Master': {'type': 'boolean'}},
6020 'required': ['Master'],
6022 'Macaroon': {'additionalProperties': False,
6023 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
6025 'data': {'items': {'type': 'integer'},
6027 'id': {'$ref': '#/definitions/packet'},
6028 'location': {'$ref': '#/definitions/packet'},
6029 'sig': {'items': {'type': 'integer'},
6031 'required': ['data',
6037 'ModelConfigResult': {'additionalProperties': False,
6038 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
6041 'required': ['Config'],
6043 'NotifyWatchResult': {'additionalProperties': False,
6044 'properties': {'Error': {'$ref': '#/definitions/Error'},
6045 'NotifyWatcherId': {'type': 'string'}},
6046 'required': ['NotifyWatcherId', 'Error'],
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',
6064 'caveat': {'additionalProperties': False,
6065 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
6066 'location': {'$ref': '#/definitions/packet'},
6067 'verificationId': {'$ref': '#/definitions/packet'}},
6068 'required': ['location',
6072 'packet': {'additionalProperties': False,
6073 'properties': {'headerLen': {'type': 'integer'},
6074 'start': {'type': 'integer'},
6075 'totalLen': {'type': 'integer'}},
6076 'required': ['start', 'totalLen', 'headerLen'],
6078 'properties': {'ClearReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6079 'Result': {'$ref': '#/definitions/ErrorResults'}},
6081 'GetEntities': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6082 'Result': {'$ref': '#/definitions/AgentGetEntitiesResults'}},
6084 'IsMaster': {'properties': {'Result': {'$ref': '#/definitions/IsMasterResult'}},
6086 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
6088 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
6089 'Result': {'$ref': '#/definitions/ErrorResults'}},
6091 'StateServingInfo': {'properties': {'Result': {'$ref': '#/definitions/StateServingInfo'}},
6093 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
6098 @ReturnMapping(ErrorResults
)
6099 async def ClearReboot(self
, entities
):
6101 entities : typing.Sequence[~Entity]
6102 Returns -> typing.Sequence[~ErrorResult]
6104 # map input types to rpc msg
6106 msg
= dict(Type
='Agent', Request
='ClearReboot', Version
=2, Params
=params
)
6107 params
['Entities'] = entities
6108 reply
= await self
.rpc(msg
)
6113 @ReturnMapping(AgentGetEntitiesResults
)
6114 async def GetEntities(self
, entities
):
6116 entities : typing.Sequence[~Entity]
6117 Returns -> typing.Sequence[~AgentGetEntitiesResult]
6119 # map input types to rpc msg
6121 msg
= dict(Type
='Agent', Request
='GetEntities', Version
=2, Params
=params
)
6122 params
['Entities'] = entities
6123 reply
= await self
.rpc(msg
)
6128 @ReturnMapping(IsMasterResult
)
6129 async def IsMaster(self
):
6134 # map input types to rpc msg
6136 msg
= dict(Type
='Agent', Request
='IsMaster', Version
=2, Params
=params
)
6138 reply
= await self
.rpc(msg
)
6143 @ReturnMapping(ModelConfigResult
)
6144 async def ModelConfig(self
):
6147 Returns -> typing.Mapping[str, typing.Any]
6149 # map input types to rpc msg
6151 msg
= dict(Type
='Agent', Request
='ModelConfig', Version
=2, Params
=params
)
6153 reply
= await self
.rpc(msg
)
6158 @ReturnMapping(ErrorResults
)
6159 async def SetPasswords(self
, changes
):
6161 changes : typing.Sequence[~EntityPassword]
6162 Returns -> typing.Sequence[~ErrorResult]
6164 # map input types to rpc msg
6166 msg
= dict(Type
='Agent', Request
='SetPasswords', Version
=2, Params
=params
)
6167 params
['Changes'] = changes
6168 reply
= await self
.rpc(msg
)
6173 @ReturnMapping(StateServingInfo
)
6174 async def StateServingInfo(self
):
6177 Returns -> typing.Union[int, str]
6179 # map input types to rpc msg
6181 msg
= dict(Type
='Agent', Request
='StateServingInfo', Version
=2, Params
=params
)
6183 reply
= await self
.rpc(msg
)
6188 @ReturnMapping(NotifyWatchResult
)
6189 async def WatchForModelConfigChanges(self
):
6192 Returns -> typing.Union[_ForwardRef('Error'), str]
6194 # map input types to rpc msg
6196 msg
= dict(Type
='Agent', Request
='WatchForModelConfigChanges', Version
=2, Params
=params
)
6198 reply
= await self
.rpc(msg
)
6202 class AgentTools(Type
):
6205 schema
= {'properties': {'UpdateToolsAvailable': {'type': 'object'}}, 'type': 'object'}
6208 @ReturnMapping(None)
6209 async def UpdateToolsAvailable(self
):
6214 # map input types to rpc msg
6216 msg
= dict(Type
='AgentTools', Request
='UpdateToolsAvailable', Version
=1, Params
=params
)
6218 reply
= await self
.rpc(msg
)
6222 class AllModelWatcher(Type
):
6223 name
= 'AllModelWatcher'
6225 schema
= {'definitions': {'AllWatcherNextResults': {'additionalProperties': False,
6226 'properties': {'Deltas': {'items': {'$ref': '#/definitions/Delta'},
6228 'required': ['Deltas'],
6230 'Delta': {'additionalProperties': False,
6231 'properties': {'Entity': {'additionalProperties': True,
6233 'Removed': {'type': 'boolean'}},
6234 'required': ['Removed', 'Entity'],
6236 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherNextResults'}},
6238 'Stop': {'type': 'object'}},
6242 @ReturnMapping(AllWatcherNextResults
)
6243 async def Next(self
):
6246 Returns -> typing.Sequence[~Delta]
6248 # map input types to rpc msg
6250 msg
= dict(Type
='AllModelWatcher', Request
='Next', Version
=2, Params
=params
)
6252 reply
= await self
.rpc(msg
)
6257 @ReturnMapping(None)
6258 async def Stop(self
):
6263 # map input types to rpc msg
6265 msg
= dict(Type
='AllModelWatcher', Request
='Stop', Version
=2, Params
=params
)
6267 reply
= await self
.rpc(msg
)
6271 class AllWatcher(Type
):
6274 schema
= {'definitions': {'AllWatcherNextResults': {'additionalProperties': False,
6275 'properties': {'Deltas': {'items': {'$ref': '#/definitions/Delta'},
6277 'required': ['Deltas'],
6279 'Delta': {'additionalProperties': False,
6280 'properties': {'Entity': {'additionalProperties': True,
6282 'Removed': {'type': 'boolean'}},
6283 'required': ['Removed', 'Entity'],
6285 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherNextResults'}},
6287 'Stop': {'type': 'object'}},
6291 @ReturnMapping(AllWatcherNextResults
)
6292 async def Next(self
):
6295 Returns -> typing.Sequence[~Delta]
6297 # map input types to rpc msg
6299 msg
= dict(Type
='AllWatcher', Request
='Next', Version
=1, Params
=params
)
6301 reply
= await self
.rpc(msg
)
6306 @ReturnMapping(None)
6307 async def Stop(self
):
6312 # map input types to rpc msg
6314 msg
= dict(Type
='AllWatcher', Request
='Stop', Version
=1, Params
=params
)
6316 reply
= await self
.rpc(msg
)
6320 class Annotations(Type
):
6321 name
= 'Annotations'
6323 schema
= {'definitions': {'AnnotationsGetResult': {'additionalProperties': False,
6324 'properties': {'Annotations': {'patternProperties': {'.*': {'type': 'string'}},
6326 'EntityTag': {'type': 'string'},
6327 'Error': {'$ref': '#/definitions/ErrorResult'}},
6328 'required': ['EntityTag',
6332 'AnnotationsGetResults': {'additionalProperties': False,
6333 'properties': {'Results': {'items': {'$ref': '#/definitions/AnnotationsGetResult'},
6335 'required': ['Results'],
6337 'AnnotationsSet': {'additionalProperties': False,
6338 'properties': {'Annotations': {'items': {'$ref': '#/definitions/EntityAnnotations'},
6340 'required': ['Annotations'],
6342 'Entities': {'additionalProperties': False,
6343 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
6345 'required': ['Entities'],
6347 'Entity': {'additionalProperties': False,
6348 'properties': {'Tag': {'type': 'string'}},
6349 'required': ['Tag'],
6351 'EntityAnnotations': {'additionalProperties': False,
6352 'properties': {'Annotations': {'patternProperties': {'.*': {'type': 'string'}},
6354 'EntityTag': {'type': 'string'}},
6355 'required': ['EntityTag', 'Annotations'],
6357 'Error': {'additionalProperties': False,
6358 'properties': {'Code': {'type': 'string'},
6359 'Info': {'$ref': '#/definitions/ErrorInfo'},
6360 'Message': {'type': 'string'}},
6361 'required': ['Message', 'Code'],
6363 'ErrorInfo': {'additionalProperties': False,
6364 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
6365 'MacaroonPath': {'type': 'string'}},
6367 'ErrorResult': {'additionalProperties': False,
6368 'properties': {'Error': {'$ref': '#/definitions/Error'}},
6369 'required': ['Error'],
6371 'ErrorResults': {'additionalProperties': False,
6372 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
6374 'required': ['Results'],
6376 'Macaroon': {'additionalProperties': False,
6377 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
6379 'data': {'items': {'type': 'integer'},
6381 'id': {'$ref': '#/definitions/packet'},
6382 'location': {'$ref': '#/definitions/packet'},
6383 'sig': {'items': {'type': 'integer'},
6385 'required': ['data',
6391 'caveat': {'additionalProperties': False,
6392 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
6393 'location': {'$ref': '#/definitions/packet'},
6394 'verificationId': {'$ref': '#/definitions/packet'}},
6395 'required': ['location',
6399 'packet': {'additionalProperties': False,
6400 'properties': {'headerLen': {'type': 'integer'},
6401 'start': {'type': 'integer'},
6402 'totalLen': {'type': 'integer'}},
6403 'required': ['start', 'totalLen', 'headerLen'],
6405 'properties': {'Get': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6406 'Result': {'$ref': '#/definitions/AnnotationsGetResults'}},
6408 'Set': {'properties': {'Params': {'$ref': '#/definitions/AnnotationsSet'},
6409 'Result': {'$ref': '#/definitions/ErrorResults'}},
6414 @ReturnMapping(AnnotationsGetResults
)
6415 async def Get(self
, entities
):
6417 entities : typing.Sequence[~Entity]
6418 Returns -> typing.Sequence[~AnnotationsGetResult]
6420 # map input types to rpc msg
6422 msg
= dict(Type
='Annotations', Request
='Get', Version
=2, Params
=params
)
6423 params
['Entities'] = entities
6424 reply
= await self
.rpc(msg
)
6429 @ReturnMapping(ErrorResults
)
6430 async def Set(self
, annotations
):
6432 annotations : typing.Sequence[~EntityAnnotations]
6433 Returns -> typing.Sequence[~ErrorResult]
6435 # map input types to rpc msg
6437 msg
= dict(Type
='Annotations', Request
='Set', Version
=2, Params
=params
)
6438 params
['Annotations'] = annotations
6439 reply
= await self
.rpc(msg
)
6443 class Application(Type
):
6444 name
= 'Application'
6446 schema
= {'definitions': {'AddApplicationUnits': {'additionalProperties': False,
6447 'properties': {'ApplicationName': {'type': 'string'},
6448 'NumUnits': {'type': 'integer'},
6449 'Placement': {'items': {'$ref': '#/definitions/Placement'},
6451 'required': ['ApplicationName',
6455 'AddApplicationUnitsResults': {'additionalProperties': False,
6456 'properties': {'Units': {'items': {'type': 'string'},
6458 'required': ['Units'],
6460 'AddRelation': {'additionalProperties': False,
6461 'properties': {'Endpoints': {'items': {'type': 'string'},
6463 'required': ['Endpoints'],
6465 'AddRelationResults': {'additionalProperties': False,
6466 'properties': {'Endpoints': {'patternProperties': {'.*': {'$ref': '#/definitions/Relation'}},
6468 'required': ['Endpoints'],
6470 'ApplicationCharmRelations': {'additionalProperties': False,
6471 'properties': {'ApplicationName': {'type': 'string'}},
6472 'required': ['ApplicationName'],
6474 'ApplicationCharmRelationsResults': {'additionalProperties': False,
6475 'properties': {'CharmRelations': {'items': {'type': 'string'},
6477 'required': ['CharmRelations'],
6479 'ApplicationDeploy': {'additionalProperties': False,
6480 'properties': {'ApplicationName': {'type': 'string'},
6481 'Channel': {'type': 'string'},
6482 'CharmUrl': {'type': 'string'},
6483 'Config': {'patternProperties': {'.*': {'type': 'string'}},
6485 'ConfigYAML': {'type': 'string'},
6486 'Constraints': {'$ref': '#/definitions/Value'},
6487 'EndpointBindings': {'patternProperties': {'.*': {'type': 'string'}},
6489 'NumUnits': {'type': 'integer'},
6490 'Placement': {'items': {'$ref': '#/definitions/Placement'},
6492 'Resources': {'patternProperties': {'.*': {'type': 'string'}},
6494 'Series': {'type': 'string'},
6495 'Storage': {'patternProperties': {'.*': {'$ref': '#/definitions/Constraints'}},
6497 'required': ['ApplicationName',
6510 'ApplicationDestroy': {'additionalProperties': False,
6511 'properties': {'ApplicationName': {'type': 'string'}},
6512 'required': ['ApplicationName'],
6514 'ApplicationExpose': {'additionalProperties': False,
6515 'properties': {'ApplicationName': {'type': 'string'}},
6516 'required': ['ApplicationName'],
6518 'ApplicationGet': {'additionalProperties': False,
6519 'properties': {'ApplicationName': {'type': 'string'}},
6520 'required': ['ApplicationName'],
6522 'ApplicationGetResults': {'additionalProperties': False,
6523 'properties': {'Application': {'type': 'string'},
6524 'Charm': {'type': 'string'},
6525 'Config': {'patternProperties': {'.*': {'additionalProperties': True,
6528 'Constraints': {'$ref': '#/definitions/Value'}},
6529 'required': ['Application',
6534 'ApplicationMetricCredential': {'additionalProperties': False,
6535 'properties': {'ApplicationName': {'type': 'string'},
6536 'MetricCredentials': {'items': {'type': 'integer'},
6538 'required': ['ApplicationName',
6539 'MetricCredentials'],
6541 'ApplicationMetricCredentials': {'additionalProperties': False,
6542 'properties': {'Creds': {'items': {'$ref': '#/definitions/ApplicationMetricCredential'},
6544 'required': ['Creds'],
6546 'ApplicationSet': {'additionalProperties': False,
6547 'properties': {'ApplicationName': {'type': 'string'},
6548 'Options': {'patternProperties': {'.*': {'type': 'string'}},
6550 'required': ['ApplicationName', 'Options'],
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'}},
6560 'required': ['applicationname',
6567 'ApplicationUnexpose': {'additionalProperties': False,
6568 'properties': {'ApplicationName': {'type': 'string'}},
6569 'required': ['ApplicationName'],
6571 'ApplicationUnset': {'additionalProperties': False,
6572 'properties': {'ApplicationName': {'type': 'string'},
6573 'Options': {'items': {'type': 'string'},
6575 'required': ['ApplicationName',
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'}},
6587 'SettingsYAML': {'type': 'string'}},
6588 'required': ['ApplicationName',
6597 'ApplicationsDeploy': {'additionalProperties': False,
6598 'properties': {'Applications': {'items': {'$ref': '#/definitions/ApplicationDeploy'},
6600 'required': ['Applications'],
6602 'Constraints': {'additionalProperties': False,
6603 'properties': {'Count': {'type': 'integer'},
6604 'Pool': {'type': 'string'},
6605 'Size': {'type': 'integer'}},
6606 'required': ['Pool', 'Size', 'Count'],
6608 'DestroyApplicationUnits': {'additionalProperties': False,
6609 'properties': {'UnitNames': {'items': {'type': 'string'},
6611 'required': ['UnitNames'],
6613 'DestroyRelation': {'additionalProperties': False,
6614 'properties': {'Endpoints': {'items': {'type': 'string'},
6616 'required': ['Endpoints'],
6618 'Error': {'additionalProperties': False,
6619 'properties': {'Code': {'type': 'string'},
6620 'Info': {'$ref': '#/definitions/ErrorInfo'},
6621 'Message': {'type': 'string'}},
6622 'required': ['Message', 'Code'],
6624 'ErrorInfo': {'additionalProperties': False,
6625 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
6626 'MacaroonPath': {'type': 'string'}},
6628 'ErrorResult': {'additionalProperties': False,
6629 'properties': {'Error': {'$ref': '#/definitions/Error'}},
6630 'required': ['Error'],
6632 'ErrorResults': {'additionalProperties': False,
6633 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
6635 'required': ['Results'],
6637 'GetApplicationConstraints': {'additionalProperties': False,
6638 'properties': {'ApplicationName': {'type': 'string'}},
6639 'required': ['ApplicationName'],
6641 'GetConstraintsResults': {'additionalProperties': False,
6642 'properties': {'Constraints': {'$ref': '#/definitions/Value'}},
6643 'required': ['Constraints'],
6645 'Macaroon': {'additionalProperties': False,
6646 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
6648 'data': {'items': {'type': 'integer'},
6650 'id': {'$ref': '#/definitions/packet'},
6651 'location': {'$ref': '#/definitions/packet'},
6652 'sig': {'items': {'type': 'integer'},
6654 'required': ['data',
6660 'Placement': {'additionalProperties': False,
6661 'properties': {'Directive': {'type': 'string'},
6662 'Scope': {'type': 'string'}},
6663 'required': ['Scope', 'Directive'],
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',
6679 'SetConstraints': {'additionalProperties': False,
6680 'properties': {'ApplicationName': {'type': 'string'},
6681 'Constraints': {'$ref': '#/definitions/Value'}},
6682 'required': ['ApplicationName',
6685 'StringResult': {'additionalProperties': False,
6686 'properties': {'Error': {'$ref': '#/definitions/Error'},
6687 'Result': {'type': 'string'}},
6688 'required': ['Error', 'Result'],
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'},
6700 'tags': {'items': {'type': 'string'},
6702 'virt-type': {'type': 'string'}},
6704 'caveat': {'additionalProperties': False,
6705 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
6706 'location': {'$ref': '#/definitions/packet'},
6707 'verificationId': {'$ref': '#/definitions/packet'}},
6708 'required': ['location',
6712 'packet': {'additionalProperties': False,
6713 'properties': {'headerLen': {'type': 'integer'},
6714 'start': {'type': 'integer'},
6715 'totalLen': {'type': 'integer'}},
6716 'required': ['start', 'totalLen', 'headerLen'],
6718 'properties': {'AddRelation': {'properties': {'Params': {'$ref': '#/definitions/AddRelation'},
6719 'Result': {'$ref': '#/definitions/AddRelationResults'}},
6721 'AddUnits': {'properties': {'Params': {'$ref': '#/definitions/AddApplicationUnits'},
6722 'Result': {'$ref': '#/definitions/AddApplicationUnitsResults'}},
6724 'CharmRelations': {'properties': {'Params': {'$ref': '#/definitions/ApplicationCharmRelations'},
6725 'Result': {'$ref': '#/definitions/ApplicationCharmRelationsResults'}},
6727 'Deploy': {'properties': {'Params': {'$ref': '#/definitions/ApplicationsDeploy'},
6728 'Result': {'$ref': '#/definitions/ErrorResults'}},
6730 'Destroy': {'properties': {'Params': {'$ref': '#/definitions/ApplicationDestroy'}},
6732 'DestroyRelation': {'properties': {'Params': {'$ref': '#/definitions/DestroyRelation'}},
6734 'DestroyUnits': {'properties': {'Params': {'$ref': '#/definitions/DestroyApplicationUnits'}},
6736 'Expose': {'properties': {'Params': {'$ref': '#/definitions/ApplicationExpose'}},
6738 'Get': {'properties': {'Params': {'$ref': '#/definitions/ApplicationGet'},
6739 'Result': {'$ref': '#/definitions/ApplicationGetResults'}},
6741 'GetCharmURL': {'properties': {'Params': {'$ref': '#/definitions/ApplicationGet'},
6742 'Result': {'$ref': '#/definitions/StringResult'}},
6744 'GetConstraints': {'properties': {'Params': {'$ref': '#/definitions/GetApplicationConstraints'},
6745 'Result': {'$ref': '#/definitions/GetConstraintsResults'}},
6747 'Set': {'properties': {'Params': {'$ref': '#/definitions/ApplicationSet'}},
6749 'SetCharm': {'properties': {'Params': {'$ref': '#/definitions/ApplicationSetCharm'}},
6751 'SetConstraints': {'properties': {'Params': {'$ref': '#/definitions/SetConstraints'}},
6753 'SetMetricCredentials': {'properties': {'Params': {'$ref': '#/definitions/ApplicationMetricCredentials'},
6754 'Result': {'$ref': '#/definitions/ErrorResults'}},
6756 'Unexpose': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUnexpose'}},
6758 'Unset': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUnset'}},
6760 'Update': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUpdate'}},
6765 @ReturnMapping(AddRelationResults
)
6766 async def AddRelation(self
, endpoints
):
6768 endpoints : typing.Sequence[str]
6769 Returns -> typing.Mapping[str, ~Relation]
6771 # map input types to rpc msg
6773 msg
= dict(Type
='Application', Request
='AddRelation', Version
=1, Params
=params
)
6774 params
['Endpoints'] = endpoints
6775 reply
= await self
.rpc(msg
)
6780 @ReturnMapping(AddApplicationUnitsResults
)
6781 async def AddUnits(self
, applicationname
, numunits
, placement
):
6783 applicationname : str
6785 placement : typing.Sequence[~Placement]
6786 Returns -> typing.Sequence[str]
6788 # map input types to rpc msg
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
)
6799 @ReturnMapping(ApplicationCharmRelationsResults
)
6800 async def CharmRelations(self
, applicationname
):
6802 applicationname : str
6803 Returns -> typing.Sequence[str]
6805 # map input types to rpc msg
6807 msg
= dict(Type
='Application', Request
='CharmRelations', Version
=1, Params
=params
)
6808 params
['ApplicationName'] = applicationname
6809 reply
= await self
.rpc(msg
)
6814 @ReturnMapping(ErrorResults
)
6815 async def Deploy(self
, applications
):
6817 applications : typing.Sequence[~ApplicationDeploy]
6818 Returns -> typing.Sequence[~ErrorResult]
6820 # map input types to rpc msg
6822 msg
= dict(Type
='Application', Request
='Deploy', Version
=1, Params
=params
)
6823 params
['Applications'] = applications
6824 reply
= await self
.rpc(msg
)
6829 @ReturnMapping(None)
6830 async def Destroy(self
, applicationname
):
6832 applicationname : str
6835 # map input types to rpc msg
6837 msg
= dict(Type
='Application', Request
='Destroy', Version
=1, Params
=params
)
6838 params
['ApplicationName'] = applicationname
6839 reply
= await self
.rpc(msg
)
6844 @ReturnMapping(None)
6845 async def DestroyRelation(self
, endpoints
):
6847 endpoints : typing.Sequence[str]
6850 # map input types to rpc msg
6852 msg
= dict(Type
='Application', Request
='DestroyRelation', Version
=1, Params
=params
)
6853 params
['Endpoints'] = endpoints
6854 reply
= await self
.rpc(msg
)
6859 @ReturnMapping(None)
6860 async def DestroyUnits(self
, unitnames
):
6862 unitnames : typing.Sequence[str]
6865 # map input types to rpc msg
6867 msg
= dict(Type
='Application', Request
='DestroyUnits', Version
=1, Params
=params
)
6868 params
['UnitNames'] = unitnames
6869 reply
= await self
.rpc(msg
)
6874 @ReturnMapping(None)
6875 async def Expose(self
, applicationname
):
6877 applicationname : str
6880 # map input types to rpc msg
6882 msg
= dict(Type
='Application', Request
='Expose', Version
=1, Params
=params
)
6883 params
['ApplicationName'] = applicationname
6884 reply
= await self
.rpc(msg
)
6889 @ReturnMapping(ApplicationGetResults
)
6890 async def Get(self
, applicationname
):
6892 applicationname : str
6893 Returns -> typing.Union[str, typing.Mapping[str, typing.Any], _ForwardRef('Value')]
6895 # map input types to rpc msg
6897 msg
= dict(Type
='Application', Request
='Get', Version
=1, Params
=params
)
6898 params
['ApplicationName'] = applicationname
6899 reply
= await self
.rpc(msg
)
6904 @ReturnMapping(StringResult
)
6905 async def GetCharmURL(self
, applicationname
):
6907 applicationname : str
6908 Returns -> typing.Union[_ForwardRef('Error'), str]
6910 # map input types to rpc msg
6912 msg
= dict(Type
='Application', Request
='GetCharmURL', Version
=1, Params
=params
)
6913 params
['ApplicationName'] = applicationname
6914 reply
= await self
.rpc(msg
)
6919 @ReturnMapping(GetConstraintsResults
)
6920 async def GetConstraints(self
, applicationname
):
6922 applicationname : str
6925 # map input types to rpc msg
6927 msg
= dict(Type
='Application', Request
='GetConstraints', Version
=1, Params
=params
)
6928 params
['ApplicationName'] = applicationname
6929 reply
= await self
.rpc(msg
)
6934 @ReturnMapping(None)
6935 async def Set(self
, applicationname
, options
):
6937 applicationname : str
6938 options : typing.Mapping[str, str]
6941 # map input types to rpc msg
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
)
6951 @ReturnMapping(None)
6952 async def SetCharm(self
, applicationname
, charmurl
, cs_channel
, forceseries
, forceunits
, resourceids
):
6954 applicationname : str
6959 resourceids : typing.Mapping[str, str]
6962 # map input types to rpc msg
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
)
6976 @ReturnMapping(None)
6977 async def SetConstraints(self
, applicationname
, constraints
):
6979 applicationname : str
6983 # map input types to rpc msg
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
)
6993 @ReturnMapping(ErrorResults
)
6994 async def SetMetricCredentials(self
, creds
):
6996 creds : typing.Sequence[~ApplicationMetricCredential]
6997 Returns -> typing.Sequence[~ErrorResult]
6999 # map input types to rpc msg
7001 msg
= dict(Type
='Application', Request
='SetMetricCredentials', Version
=1, Params
=params
)
7002 params
['Creds'] = creds
7003 reply
= await self
.rpc(msg
)
7008 @ReturnMapping(None)
7009 async def Unexpose(self
, applicationname
):
7011 applicationname : str
7014 # map input types to rpc msg
7016 msg
= dict(Type
='Application', Request
='Unexpose', Version
=1, Params
=params
)
7017 params
['ApplicationName'] = applicationname
7018 reply
= await self
.rpc(msg
)
7023 @ReturnMapping(None)
7024 async def Unset(self
, applicationname
, options
):
7026 applicationname : str
7027 options : typing.Sequence[str]
7030 # map input types to rpc msg
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
)
7040 @ReturnMapping(None)
7041 async def Update(self
, applicationname
, charmurl
, constraints
, forcecharmurl
, forceseries
, minunits
, settingsstrings
, settingsyaml
):
7043 applicationname : str
7046 forcecharmurl : bool
7049 settingsstrings : typing.Mapping[str, str]
7053 # map input types to rpc msg
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
)
7068 class ApplicationScaler(Type
):
7069 name
= 'ApplicationScaler'
7071 schema
= {'definitions': {'Entities': {'additionalProperties': False,
7072 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
7074 'required': ['Entities'],
7076 'Entity': {'additionalProperties': False,
7077 'properties': {'Tag': {'type': 'string'}},
7078 'required': ['Tag'],
7080 'Error': {'additionalProperties': False,
7081 'properties': {'Code': {'type': 'string'},
7082 'Info': {'$ref': '#/definitions/ErrorInfo'},
7083 'Message': {'type': 'string'}},
7084 'required': ['Message', 'Code'],
7086 'ErrorInfo': {'additionalProperties': False,
7087 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
7088 'MacaroonPath': {'type': 'string'}},
7090 'ErrorResult': {'additionalProperties': False,
7091 'properties': {'Error': {'$ref': '#/definitions/Error'}},
7092 'required': ['Error'],
7094 'ErrorResults': {'additionalProperties': False,
7095 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
7097 'required': ['Results'],
7099 'Macaroon': {'additionalProperties': False,
7100 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
7102 'data': {'items': {'type': 'integer'},
7104 'id': {'$ref': '#/definitions/packet'},
7105 'location': {'$ref': '#/definitions/packet'},
7106 'sig': {'items': {'type': 'integer'},
7108 'required': ['data',
7114 'StringsWatchResult': {'additionalProperties': False,
7115 'properties': {'Changes': {'items': {'type': 'string'},
7117 'Error': {'$ref': '#/definitions/Error'},
7118 'StringsWatcherId': {'type': 'string'}},
7119 'required': ['StringsWatcherId',
7123 'caveat': {'additionalProperties': False,
7124 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
7125 'location': {'$ref': '#/definitions/packet'},
7126 'verificationId': {'$ref': '#/definitions/packet'}},
7127 'required': ['location',
7131 'packet': {'additionalProperties': False,
7132 'properties': {'headerLen': {'type': 'integer'},
7133 'start': {'type': 'integer'},
7134 'totalLen': {'type': 'integer'}},
7135 'required': ['start', 'totalLen', 'headerLen'],
7137 'properties': {'Rescale': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
7138 'Result': {'$ref': '#/definitions/ErrorResults'}},
7140 'Watch': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
7145 @ReturnMapping(ErrorResults
)
7146 async def Rescale(self
, entities
):
7148 entities : typing.Sequence[~Entity]
7149 Returns -> typing.Sequence[~ErrorResult]
7151 # map input types to rpc msg
7153 msg
= dict(Type
='ApplicationScaler', Request
='Rescale', Version
=1, Params
=params
)
7154 params
['Entities'] = entities
7155 reply
= await self
.rpc(msg
)
7160 @ReturnMapping(StringsWatchResult
)
7161 async def Watch(self
):
7164 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')]
7166 # map input types to rpc msg
7168 msg
= dict(Type
='ApplicationScaler', Request
='Watch', Version
=1, Params
=params
)
7170 reply
= await self
.rpc(msg
)
7174 class Backups(Type
):
7177 schema
= {'definitions': {'BackupsCreateArgs': {'additionalProperties': False,
7178 'properties': {'Notes': {'type': 'string'}},
7179 'required': ['Notes'],
7181 'BackupsInfoArgs': {'additionalProperties': False,
7182 'properties': {'ID': {'type': 'string'}},
7185 'BackupsListArgs': {'additionalProperties': False,
7187 'BackupsListResult': {'additionalProperties': False,
7188 'properties': {'List': {'items': {'$ref': '#/definitions/BackupsMetadataResult'},
7190 'required': ['List'],
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',
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',
7208 'Stored': {'format': 'date-time',
7210 'Version': {'$ref': '#/definitions/Number'}},
7227 'BackupsRemoveArgs': {'additionalProperties': False,
7228 'properties': {'ID': {'type': 'string'}},
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',
7243 'RestoreArgs': {'additionalProperties': False,
7244 'properties': {'BackupId': {'type': 'string'}},
7245 'required': ['BackupId'],
7247 'properties': {'Create': {'properties': {'Params': {'$ref': '#/definitions/BackupsCreateArgs'},
7248 'Result': {'$ref': '#/definitions/BackupsMetadataResult'}},
7250 'FinishRestore': {'type': 'object'},
7251 'Info': {'properties': {'Params': {'$ref': '#/definitions/BackupsInfoArgs'},
7252 'Result': {'$ref': '#/definitions/BackupsMetadataResult'}},
7254 'List': {'properties': {'Params': {'$ref': '#/definitions/BackupsListArgs'},
7255 'Result': {'$ref': '#/definitions/BackupsListResult'}},
7257 'PrepareRestore': {'type': 'object'},
7258 'Remove': {'properties': {'Params': {'$ref': '#/definitions/BackupsRemoveArgs'}},
7260 'Restore': {'properties': {'Params': {'$ref': '#/definitions/RestoreArgs'}},
7265 @ReturnMapping(BackupsMetadataResult
)
7266 async def Create(self
, notes
):
7269 Returns -> typing.Union[str, int, _ForwardRef('Number')]
7271 # map input types to rpc msg
7273 msg
= dict(Type
='Backups', Request
='Create', Version
=1, Params
=params
)
7274 params
['Notes'] = notes
7275 reply
= await self
.rpc(msg
)
7280 @ReturnMapping(None)
7281 async def FinishRestore(self
):
7286 # map input types to rpc msg
7288 msg
= dict(Type
='Backups', Request
='FinishRestore', Version
=1, Params
=params
)
7290 reply
= await self
.rpc(msg
)
7295 @ReturnMapping(BackupsMetadataResult
)
7296 async def Info(self
, id_
):
7299 Returns -> typing.Union[str, int, _ForwardRef('Number')]
7301 # map input types to rpc msg
7303 msg
= dict(Type
='Backups', Request
='Info', Version
=1, Params
=params
)
7305 reply
= await self
.rpc(msg
)
7310 @ReturnMapping(BackupsListResult
)
7311 async def List(self
):
7314 Returns -> typing.Sequence[~BackupsMetadataResult]
7316 # map input types to rpc msg
7318 msg
= dict(Type
='Backups', Request
='List', Version
=1, Params
=params
)
7320 reply
= await self
.rpc(msg
)
7325 @ReturnMapping(None)
7326 async def PrepareRestore(self
):
7331 # map input types to rpc msg
7333 msg
= dict(Type
='Backups', Request
='PrepareRestore', Version
=1, Params
=params
)
7335 reply
= await self
.rpc(msg
)
7340 @ReturnMapping(None)
7341 async def Remove(self
, id_
):
7346 # map input types to rpc msg
7348 msg
= dict(Type
='Backups', Request
='Remove', Version
=1, Params
=params
)
7350 reply
= await self
.rpc(msg
)
7355 @ReturnMapping(None)
7356 async def Restore(self
, backupid
):
7361 # map input types to rpc msg
7363 msg
= dict(Type
='Backups', Request
='Restore', Version
=1, Params
=params
)
7364 params
['BackupId'] = backupid
7365 reply
= await self
.rpc(msg
)
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'],
7379 'BlockResult': {'additionalProperties': False,
7380 'properties': {'error': {'$ref': '#/definitions/Error'},
7381 'result': {'$ref': '#/definitions/Block'}},
7382 'required': ['result'],
7384 'BlockResults': {'additionalProperties': False,
7385 'properties': {'results': {'items': {'$ref': '#/definitions/BlockResult'},
7388 'BlockSwitchParams': {'additionalProperties': False,
7389 'properties': {'message': {'type': 'string'},
7390 'type': {'type': 'string'}},
7391 'required': ['type'],
7393 'Error': {'additionalProperties': False,
7394 'properties': {'Code': {'type': 'string'},
7395 'Info': {'$ref': '#/definitions/ErrorInfo'},
7396 'Message': {'type': 'string'}},
7397 'required': ['Message', 'Code'],
7399 'ErrorInfo': {'additionalProperties': False,
7400 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
7401 'MacaroonPath': {'type': 'string'}},
7403 'ErrorResult': {'additionalProperties': False,
7404 'properties': {'Error': {'$ref': '#/definitions/Error'}},
7405 'required': ['Error'],
7407 'Macaroon': {'additionalProperties': False,
7408 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
7410 'data': {'items': {'type': 'integer'},
7412 'id': {'$ref': '#/definitions/packet'},
7413 'location': {'$ref': '#/definitions/packet'},
7414 'sig': {'items': {'type': 'integer'},
7416 'required': ['data',
7422 'caveat': {'additionalProperties': False,
7423 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
7424 'location': {'$ref': '#/definitions/packet'},
7425 'verificationId': {'$ref': '#/definitions/packet'}},
7426 'required': ['location',
7430 'packet': {'additionalProperties': False,
7431 'properties': {'headerLen': {'type': 'integer'},
7432 'start': {'type': 'integer'},
7433 'totalLen': {'type': 'integer'}},
7434 'required': ['start', 'totalLen', 'headerLen'],
7436 'properties': {'List': {'properties': {'Result': {'$ref': '#/definitions/BlockResults'}},
7438 'SwitchBlockOff': {'properties': {'Params': {'$ref': '#/definitions/BlockSwitchParams'},
7439 'Result': {'$ref': '#/definitions/ErrorResult'}},
7441 'SwitchBlockOn': {'properties': {'Params': {'$ref': '#/definitions/BlockSwitchParams'},
7442 'Result': {'$ref': '#/definitions/ErrorResult'}},
7447 @ReturnMapping(BlockResults
)
7448 async def List(self
):
7451 Returns -> typing.Sequence[~BlockResult]
7453 # map input types to rpc msg
7455 msg
= dict(Type
='Block', Request
='List', Version
=2, Params
=params
)
7457 reply
= await self
.rpc(msg
)
7462 @ReturnMapping(ErrorResult
)
7463 async def SwitchBlockOff(self
, message
, type_
):
7469 # map input types to rpc msg
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
)
7479 @ReturnMapping(ErrorResult
)
7480 async def SwitchBlockOn(self
, message
, type_
):
7486 # map input types to rpc msg
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
)
7495 class CharmRevisionUpdater(Type
):
7496 name
= 'CharmRevisionUpdater'
7498 schema
= {'definitions': {'Error': {'additionalProperties': False,
7499 'properties': {'Code': {'type': 'string'},
7500 'Info': {'$ref': '#/definitions/ErrorInfo'},
7501 'Message': {'type': 'string'}},
7502 'required': ['Message', 'Code'],
7504 'ErrorInfo': {'additionalProperties': False,
7505 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
7506 'MacaroonPath': {'type': 'string'}},
7508 'ErrorResult': {'additionalProperties': False,
7509 'properties': {'Error': {'$ref': '#/definitions/Error'}},
7510 'required': ['Error'],
7512 'Macaroon': {'additionalProperties': False,
7513 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
7515 'data': {'items': {'type': 'integer'},
7517 'id': {'$ref': '#/definitions/packet'},
7518 'location': {'$ref': '#/definitions/packet'},
7519 'sig': {'items': {'type': 'integer'},
7521 'required': ['data',
7527 'caveat': {'additionalProperties': False,
7528 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
7529 'location': {'$ref': '#/definitions/packet'},
7530 'verificationId': {'$ref': '#/definitions/packet'}},
7531 'required': ['location',
7535 'packet': {'additionalProperties': False,
7536 'properties': {'headerLen': {'type': 'integer'},
7537 'start': {'type': 'integer'},
7538 'totalLen': {'type': 'integer'}},
7539 'required': ['start', 'totalLen', 'headerLen'],
7541 'properties': {'UpdateLatestRevisions': {'properties': {'Result': {'$ref': '#/definitions/ErrorResult'}},
7546 @ReturnMapping(ErrorResult
)
7547 async def UpdateLatestRevisions(self
):
7552 # map input types to rpc msg
7554 msg
= dict(Type
='CharmRevisionUpdater', Request
='UpdateLatestRevisions', Version
=2, Params
=params
)
7556 reply
= await self
.rpc(msg
)
7563 schema
= {'definitions': {'CharmInfo': {'additionalProperties': False,
7564 'properties': {'CharmURL': {'type': 'string'}},
7565 'required': ['CharmURL'],
7567 'CharmsList': {'additionalProperties': False,
7568 'properties': {'Names': {'items': {'type': 'string'},
7570 'required': ['Names'],
7572 'CharmsListResult': {'additionalProperties': False,
7573 'properties': {'CharmURLs': {'items': {'type': 'string'},
7575 'required': ['CharmURLs'],
7577 'IsMeteredResult': {'additionalProperties': False,
7578 'properties': {'Metered': {'type': 'boolean'}},
7579 'required': ['Metered'],
7581 'properties': {'CharmInfo': {'properties': {'Params': {'$ref': '#/definitions/CharmInfo'},
7582 'Result': {'$ref': '#/definitions/CharmInfo'}},
7584 'IsMetered': {'properties': {'Params': {'$ref': '#/definitions/CharmInfo'},
7585 'Result': {'$ref': '#/definitions/IsMeteredResult'}},
7587 'List': {'properties': {'Params': {'$ref': '#/definitions/CharmsList'},
7588 'Result': {'$ref': '#/definitions/CharmsListResult'}},
7593 @ReturnMapping(CharmInfo
)
7594 async def CharmInfo(self
, charmurl
):
7599 # map input types to rpc msg
7601 msg
= dict(Type
='Charms', Request
='CharmInfo', Version
=2, Params
=params
)
7602 params
['CharmURL'] = charmurl
7603 reply
= await self
.rpc(msg
)
7608 @ReturnMapping(IsMeteredResult
)
7609 async def IsMetered(self
, charmurl
):
7614 # map input types to rpc msg
7616 msg
= dict(Type
='Charms', Request
='IsMetered', Version
=2, Params
=params
)
7617 params
['CharmURL'] = charmurl
7618 reply
= await self
.rpc(msg
)
7623 @ReturnMapping(CharmsListResult
)
7624 async def List(self
, names
):
7626 names : typing.Sequence[str]
7627 Returns -> typing.Sequence[str]
7629 # map input types to rpc msg
7631 msg
= dict(Type
='Charms', Request
='List', Version
=2, Params
=params
)
7632 params
['Names'] = names
7633 reply
= await self
.rpc(msg
)
7637 class Cleaner(Type
):
7640 schema
= {'definitions': {'Error': {'additionalProperties': False,
7641 'properties': {'Code': {'type': 'string'},
7642 'Info': {'$ref': '#/definitions/ErrorInfo'},
7643 'Message': {'type': 'string'}},
7644 'required': ['Message', 'Code'],
7646 'ErrorInfo': {'additionalProperties': False,
7647 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
7648 'MacaroonPath': {'type': 'string'}},
7650 'Macaroon': {'additionalProperties': False,
7651 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
7653 'data': {'items': {'type': 'integer'},
7655 'id': {'$ref': '#/definitions/packet'},
7656 'location': {'$ref': '#/definitions/packet'},
7657 'sig': {'items': {'type': 'integer'},
7659 'required': ['data',
7665 'NotifyWatchResult': {'additionalProperties': False,
7666 'properties': {'Error': {'$ref': '#/definitions/Error'},
7667 'NotifyWatcherId': {'type': 'string'}},
7668 'required': ['NotifyWatcherId', 'Error'],
7670 'caveat': {'additionalProperties': False,
7671 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
7672 'location': {'$ref': '#/definitions/packet'},
7673 'verificationId': {'$ref': '#/definitions/packet'}},
7674 'required': ['location',
7678 'packet': {'additionalProperties': False,
7679 'properties': {'headerLen': {'type': 'integer'},
7680 'start': {'type': 'integer'},
7681 'totalLen': {'type': 'integer'}},
7682 'required': ['start', 'totalLen', 'headerLen'],
7684 'properties': {'Cleanup': {'type': 'object'},
7685 'WatchCleanups': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
7690 @ReturnMapping(None)
7691 async def Cleanup(self
):
7696 # map input types to rpc msg
7698 msg
= dict(Type
='Cleaner', Request
='Cleanup', Version
=2, Params
=params
)
7700 reply
= await self
.rpc(msg
)
7705 @ReturnMapping(NotifyWatchResult
)
7706 async def WatchCleanups(self
):
7709 Returns -> typing.Union[_ForwardRef('Error'), str]
7711 # map input types to rpc msg
7713 msg
= dict(Type
='Cleaner', Request
='WatchCleanups', Version
=2, Params
=params
)
7715 reply
= await self
.rpc(msg
)
7722 schema
= {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
7723 'properties': {'Servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
7726 'required': ['Servers'],
7728 'AddCharm': {'additionalProperties': False,
7729 'properties': {'Channel': {'type': 'string'},
7730 'URL': {'type': 'string'}},
7731 'required': ['URL', 'Channel'],
7733 'AddCharmWithAuthorization': {'additionalProperties': False,
7734 'properties': {'Channel': {'type': 'string'},
7735 'CharmStoreMacaroon': {'$ref': '#/definitions/Macaroon'},
7736 'URL': {'type': 'string'}},
7739 'CharmStoreMacaroon'],
7741 'AddMachineParams': {'additionalProperties': False,
7742 'properties': {'Addrs': {'items': {'$ref': '#/definitions/Address'},
7744 'Constraints': {'$ref': '#/definitions/Value'},
7745 'ContainerType': {'type': 'string'},
7746 'Disks': {'items': {'$ref': '#/definitions/Constraints'},
7748 'HardwareCharacteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
7749 'InstanceId': {'type': 'string'},
7750 'Jobs': {'items': {'type': 'string'},
7752 'Nonce': {'type': 'string'},
7753 'ParentId': {'type': 'string'},
7754 'Placement': {'$ref': '#/definitions/Placement'},
7755 'Series': {'type': 'string'}},
7756 'required': ['Series',
7765 'HardwareCharacteristics',
7768 'AddMachines': {'additionalProperties': False,
7769 'properties': {'MachineParams': {'items': {'$ref': '#/definitions/AddMachineParams'},
7771 'required': ['MachineParams'],
7773 'AddMachinesResult': {'additionalProperties': False,
7774 'properties': {'Error': {'$ref': '#/definitions/Error'},
7775 'Machine': {'type': 'string'}},
7776 'required': ['Machine', 'Error'],
7778 'AddMachinesResults': {'additionalProperties': False,
7779 'properties': {'Machines': {'items': {'$ref': '#/definitions/AddMachinesResult'},
7781 'required': ['Machines'],
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'],
7790 'AgentVersionResult': {'additionalProperties': False,
7791 'properties': {'Version': {'$ref': '#/definitions/Number'}},
7792 'required': ['Version'],
7794 'AllWatcherId': {'additionalProperties': False,
7795 'properties': {'AllWatcherId': {'type': 'string'}},
7796 'required': ['AllWatcherId'],
7798 'ApplicationStatus': {'additionalProperties': False,
7799 'properties': {'CanUpgradeTo': {'type': 'string'},
7800 'Charm': {'type': 'string'},
7801 'Err': {'additionalProperties': True,
7803 'Exposed': {'type': 'boolean'},
7804 'Life': {'type': 'string'},
7805 'MeterStatuses': {'patternProperties': {'.*': {'$ref': '#/definitions/MeterStatus'}},
7807 'Relations': {'patternProperties': {'.*': {'items': {'type': 'string'},
7810 'Status': {'$ref': '#/definitions/DetailedStatus'},
7811 'SubordinateTo': {'items': {'type': 'string'},
7813 'Units': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitStatus'}},
7826 'Binary': {'additionalProperties': False,
7827 'properties': {'Arch': {'type': 'string'},
7828 'Number': {'$ref': '#/definitions/Number'},
7829 'Series': {'type': 'string'}},
7830 'required': ['Number', 'Series', 'Arch'],
7832 'BundleChangesChange': {'additionalProperties': False,
7833 'properties': {'args': {'items': {'additionalProperties': True,
7836 'id': {'type': 'string'},
7837 'method': {'type': 'string'},
7838 'requires': {'items': {'type': 'string'},
7845 'CharmInfo': {'additionalProperties': False,
7846 'properties': {'CharmURL': {'type': 'string'}},
7847 'required': ['CharmURL'],
7849 'Constraints': {'additionalProperties': False,
7850 'properties': {'Count': {'type': 'integer'},
7851 'Pool': {'type': 'string'},
7852 'Size': {'type': 'integer'}},
7853 'required': ['Pool', 'Size', 'Count'],
7855 'DestroyMachines': {'additionalProperties': False,
7856 'properties': {'Force': {'type': 'boolean'},
7857 'MachineNames': {'items': {'type': 'string'},
7859 'required': ['MachineNames', 'Force'],
7861 'DetailedStatus': {'additionalProperties': False,
7862 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
7865 'Err': {'additionalProperties': True,
7867 'Info': {'type': 'string'},
7868 'Kind': {'type': 'string'},
7869 'Life': {'type': 'string'},
7870 'Since': {'format': 'date-time',
7872 'Status': {'type': 'string'},
7873 'Version': {'type': 'string'}},
7874 'required': ['Status',
7883 'EndpointStatus': {'additionalProperties': False,
7884 'properties': {'ApplicationName': {'type': 'string'},
7885 'Name': {'type': 'string'},
7886 'Role': {'type': 'string'},
7887 'Subordinate': {'type': 'boolean'}},
7888 'required': ['ApplicationName',
7893 'Entities': {'additionalProperties': False,
7894 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
7896 'required': ['Entities'],
7898 'Entity': {'additionalProperties': False,
7899 'properties': {'Tag': {'type': 'string'}},
7900 'required': ['Tag'],
7902 'EntityStatus': {'additionalProperties': False,
7903 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
7906 'Info': {'type': 'string'},
7907 'Since': {'format': 'date-time',
7909 'Status': {'type': 'string'}},
7910 'required': ['Status',
7915 'Error': {'additionalProperties': False,
7916 'properties': {'Code': {'type': 'string'},
7917 'Info': {'$ref': '#/definitions/ErrorInfo'},
7918 'Message': {'type': 'string'}},
7919 'required': ['Message', 'Code'],
7921 'ErrorInfo': {'additionalProperties': False,
7922 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
7923 'MacaroonPath': {'type': 'string'}},
7925 'ErrorResult': {'additionalProperties': False,
7926 'properties': {'Error': {'$ref': '#/definitions/Error'}},
7927 'required': ['Error'],
7929 'ErrorResults': {'additionalProperties': False,
7930 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
7932 'required': ['Results'],
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',
7946 'FindToolsResult': {'additionalProperties': False,
7947 'properties': {'Error': {'$ref': '#/definitions/Error'},
7948 'List': {'items': {'$ref': '#/definitions/Tools'},
7950 'required': ['List', 'Error'],
7952 'FullStatus': {'additionalProperties': False,
7953 'properties': {'Applications': {'patternProperties': {'.*': {'$ref': '#/definitions/ApplicationStatus'}},
7955 'AvailableVersion': {'type': 'string'},
7956 'Machines': {'patternProperties': {'.*': {'$ref': '#/definitions/MachineStatus'}},
7958 'ModelName': {'type': 'string'},
7959 'Relations': {'items': {'$ref': '#/definitions/RelationStatus'},
7961 'required': ['ModelName',
7967 'GetBundleChangesParams': {'additionalProperties': False,
7968 'properties': {'yaml': {'type': 'string'}},
7969 'required': ['yaml'],
7971 'GetBundleChangesResults': {'additionalProperties': False,
7972 'properties': {'changes': {'items': {'$ref': '#/definitions/BundleChangesChange'},
7974 'errors': {'items': {'type': 'string'},
7977 'GetConstraintsResults': {'additionalProperties': False,
7978 'properties': {'Constraints': {'$ref': '#/definitions/Value'}},
7979 'required': ['Constraints'],
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'},
7991 'History': {'additionalProperties': False,
7992 'properties': {'Error': {'$ref': '#/definitions/Error'},
7993 'Statuses': {'items': {'$ref': '#/definitions/DetailedStatus'},
7995 'required': ['Statuses'],
7997 'HostPort': {'additionalProperties': False,
7998 'properties': {'Address': {'$ref': '#/definitions/Address'},
7999 'Port': {'type': 'integer'}},
8000 'required': ['Address', 'Port'],
8002 'Macaroon': {'additionalProperties': False,
8003 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
8005 'data': {'items': {'type': 'integer'},
8007 'id': {'$ref': '#/definitions/packet'},
8008 'location': {'$ref': '#/definitions/packet'},
8009 'sig': {'items': {'type': 'integer'},
8011 'required': ['data',
8017 'MachineStatus': {'additionalProperties': False,
8018 'properties': {'AgentStatus': {'$ref': '#/definitions/DetailedStatus'},
8019 'Containers': {'patternProperties': {'.*': {'$ref': '#/definitions/MachineStatus'}},
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'},
8029 'Series': {'type': 'string'},
8030 'WantsVote': {'type': 'boolean'}},
8031 'required': ['AgentStatus',
8043 'MeterStatus': {'additionalProperties': False,
8044 'properties': {'Color': {'type': 'string'},
8045 'Message': {'type': 'string'}},
8046 'required': ['Color', 'Message'],
8048 'ModelConfigResults': {'additionalProperties': False,
8049 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
8052 'required': ['Config'],
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'},
8066 'required': ['Name',
8077 'ModelSet': {'additionalProperties': False,
8078 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
8081 'required': ['Config'],
8083 'ModelUnset': {'additionalProperties': False,
8084 'properties': {'Keys': {'items': {'type': 'string'},
8086 'required': ['Keys'],
8088 'ModelUserInfo': {'additionalProperties': False,
8089 'properties': {'access': {'type': 'string'},
8090 'displayname': {'type': 'string'},
8091 'lastconnection': {'format': 'date-time',
8093 'user': {'type': 'string'}},
8094 'required': ['user',
8099 'ModelUserInfoResult': {'additionalProperties': False,
8100 'properties': {'error': {'$ref': '#/definitions/Error'},
8101 'result': {'$ref': '#/definitions/ModelUserInfo'}},
8103 'ModelUserInfoResults': {'additionalProperties': False,
8104 'properties': {'results': {'items': {'$ref': '#/definitions/ModelUserInfoResult'},
8106 'required': ['results'],
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',
8120 'Placement': {'additionalProperties': False,
8121 'properties': {'Directive': {'type': 'string'},
8122 'Scope': {'type': 'string'}},
8123 'required': ['Scope', 'Directive'],
8125 'PrivateAddress': {'additionalProperties': False,
8126 'properties': {'Target': {'type': 'string'}},
8127 'required': ['Target'],
8129 'PrivateAddressResults': {'additionalProperties': False,
8130 'properties': {'PrivateAddress': {'type': 'string'}},
8131 'required': ['PrivateAddress'],
8133 'ProvisioningScriptParams': {'additionalProperties': False,
8134 'properties': {'DataDir': {'type': 'string'},
8135 'DisablePackageCommands': {'type': 'boolean'},
8136 'MachineId': {'type': 'string'},
8137 'Nonce': {'type': 'string'}},
8138 'required': ['MachineId',
8141 'DisablePackageCommands'],
8143 'ProvisioningScriptResult': {'additionalProperties': False,
8144 'properties': {'Script': {'type': 'string'}},
8145 'required': ['Script'],
8147 'PublicAddress': {'additionalProperties': False,
8148 'properties': {'Target': {'type': 'string'}},
8149 'required': ['Target'],
8151 'PublicAddressResults': {'additionalProperties': False,
8152 'properties': {'PublicAddress': {'type': 'string'}},
8153 'required': ['PublicAddress'],
8155 'RelationStatus': {'additionalProperties': False,
8156 'properties': {'Endpoints': {'items': {'$ref': '#/definitions/EndpointStatus'},
8158 'Id': {'type': 'integer'},
8159 'Interface': {'type': 'string'},
8160 'Key': {'type': 'string'},
8161 'Scope': {'type': 'string'}},
8168 'ResolveCharmResult': {'additionalProperties': False,
8169 'properties': {'Error': {'type': 'string'},
8170 'URL': {'$ref': '#/definitions/URL'}},
8172 'ResolveCharmResults': {'additionalProperties': False,
8173 'properties': {'URLs': {'items': {'$ref': '#/definitions/ResolveCharmResult'},
8175 'required': ['URLs'],
8177 'ResolveCharms': {'additionalProperties': False,
8178 'properties': {'References': {'items': {'$ref': '#/definitions/URL'},
8180 'required': ['References'],
8182 'Resolved': {'additionalProperties': False,
8183 'properties': {'Retry': {'type': 'boolean'},
8184 'UnitName': {'type': 'string'}},
8185 'required': ['UnitName', 'Retry'],
8187 'SetConstraints': {'additionalProperties': False,
8188 'properties': {'ApplicationName': {'type': 'string'},
8189 'Constraints': {'$ref': '#/definitions/Value'}},
8190 'required': ['ApplicationName',
8193 'SetModelAgentVersion': {'additionalProperties': False,
8194 'properties': {'Version': {'$ref': '#/definitions/Number'}},
8195 'required': ['Version'],
8197 'StatusHistoryFilter': {'additionalProperties': False,
8198 'properties': {'Date': {'format': 'date-time',
8200 'Delta': {'type': 'integer'},
8201 'Size': {'type': 'integer'}},
8202 'required': ['Size', 'Date', 'Delta'],
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',
8214 'StatusHistoryRequests': {'additionalProperties': False,
8215 'properties': {'Requests': {'items': {'$ref': '#/definitions/StatusHistoryRequest'},
8217 'required': ['Requests'],
8219 'StatusHistoryResult': {'additionalProperties': False,
8220 'properties': {'Error': {'$ref': '#/definitions/Error'},
8221 'History': {'$ref': '#/definitions/History'}},
8222 'required': ['History'],
8224 'StatusHistoryResults': {'additionalProperties': False,
8225 'properties': {'Results': {'items': {'$ref': '#/definitions/StatusHistoryResult'},
8227 'required': ['Results'],
8229 'StatusParams': {'additionalProperties': False,
8230 'properties': {'Patterns': {'items': {'type': 'string'},
8232 'required': ['Patterns'],
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'],
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',
8255 'UnitStatus': {'additionalProperties': False,
8256 'properties': {'AgentStatus': {'$ref': '#/definitions/DetailedStatus'},
8257 'Charm': {'type': 'string'},
8258 'Machine': {'type': 'string'},
8259 'OpenedPorts': {'items': {'type': 'string'},
8261 'PublicAddress': {'type': 'string'},
8262 'Subordinates': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitStatus'}},
8264 'WorkloadStatus': {'$ref': '#/definitions/DetailedStatus'}},
8265 'required': ['AgentStatus',
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'},
8283 'tags': {'items': {'type': 'string'},
8285 'virt-type': {'type': 'string'}},
8287 'caveat': {'additionalProperties': False,
8288 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
8289 'location': {'$ref': '#/definitions/packet'},
8290 'verificationId': {'$ref': '#/definitions/packet'}},
8291 'required': ['location',
8295 'packet': {'additionalProperties': False,
8296 'properties': {'headerLen': {'type': 'integer'},
8297 'start': {'type': 'integer'},
8298 'totalLen': {'type': 'integer'}},
8299 'required': ['start', 'totalLen', 'headerLen'],
8301 'properties': {'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
8303 'AbortCurrentUpgrade': {'type': 'object'},
8304 'AddCharm': {'properties': {'Params': {'$ref': '#/definitions/AddCharm'}},
8306 'AddCharmWithAuthorization': {'properties': {'Params': {'$ref': '#/definitions/AddCharmWithAuthorization'}},
8308 'AddMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
8309 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
8311 'AddMachinesV2': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
8312 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
8314 'AgentVersion': {'properties': {'Result': {'$ref': '#/definitions/AgentVersionResult'}},
8316 'CharmInfo': {'properties': {'Params': {'$ref': '#/definitions/CharmInfo'},
8317 'Result': {'$ref': '#/definitions/CharmInfo'}},
8319 'DestroyMachines': {'properties': {'Params': {'$ref': '#/definitions/DestroyMachines'}},
8321 'DestroyModel': {'type': 'object'},
8322 'FindTools': {'properties': {'Params': {'$ref': '#/definitions/FindToolsParams'},
8323 'Result': {'$ref': '#/definitions/FindToolsResult'}},
8325 'FullStatus': {'properties': {'Params': {'$ref': '#/definitions/StatusParams'},
8326 'Result': {'$ref': '#/definitions/FullStatus'}},
8328 'GetBundleChanges': {'properties': {'Params': {'$ref': '#/definitions/GetBundleChangesParams'},
8329 'Result': {'$ref': '#/definitions/GetBundleChangesResults'}},
8331 'GetModelConstraints': {'properties': {'Result': {'$ref': '#/definitions/GetConstraintsResults'}},
8333 'InjectMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
8334 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
8336 'ModelGet': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}},
8338 'ModelInfo': {'properties': {'Result': {'$ref': '#/definitions/ModelInfo'}},
8340 'ModelSet': {'properties': {'Params': {'$ref': '#/definitions/ModelSet'}},
8342 'ModelUnset': {'properties': {'Params': {'$ref': '#/definitions/ModelUnset'}},
8344 'ModelUserInfo': {'properties': {'Result': {'$ref': '#/definitions/ModelUserInfoResults'}},
8346 'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/PrivateAddress'},
8347 'Result': {'$ref': '#/definitions/PrivateAddressResults'}},
8349 'ProvisioningScript': {'properties': {'Params': {'$ref': '#/definitions/ProvisioningScriptParams'},
8350 'Result': {'$ref': '#/definitions/ProvisioningScriptResult'}},
8352 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/PublicAddress'},
8353 'Result': {'$ref': '#/definitions/PublicAddressResults'}},
8355 'ResolveCharms': {'properties': {'Params': {'$ref': '#/definitions/ResolveCharms'},
8356 'Result': {'$ref': '#/definitions/ResolveCharmResults'}},
8358 'Resolved': {'properties': {'Params': {'$ref': '#/definitions/Resolved'}},
8360 'RetryProvisioning': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
8361 'Result': {'$ref': '#/definitions/ErrorResults'}},
8363 'SetModelAgentVersion': {'properties': {'Params': {'$ref': '#/definitions/SetModelAgentVersion'}},
8365 'SetModelConstraints': {'properties': {'Params': {'$ref': '#/definitions/SetConstraints'}},
8367 'StatusHistory': {'properties': {'Params': {'$ref': '#/definitions/StatusHistoryRequests'},
8368 'Result': {'$ref': '#/definitions/StatusHistoryResults'}},
8370 'WatchAll': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherId'}},
8375 @ReturnMapping(APIHostPortsResult
)
8376 async def APIHostPorts(self
):
8379 Returns -> typing.Sequence[~HostPort]
8381 # map input types to rpc msg
8383 msg
= dict(Type
='Client', Request
='APIHostPorts', Version
=1, Params
=params
)
8385 reply
= await self
.rpc(msg
)
8390 @ReturnMapping(None)
8391 async def AbortCurrentUpgrade(self
):
8396 # map input types to rpc msg
8398 msg
= dict(Type
='Client', Request
='AbortCurrentUpgrade', Version
=1, Params
=params
)
8400 reply
= await self
.rpc(msg
)
8405 @ReturnMapping(None)
8406 async def AddCharm(self
, channel
, url
):
8412 # map input types to rpc msg
8414 msg
= dict(Type
='Client', Request
='AddCharm', Version
=1, Params
=params
)
8415 params
['Channel'] = channel
8417 reply
= await self
.rpc(msg
)
8422 @ReturnMapping(None)
8423 async def AddCharmWithAuthorization(self
, channel
, charmstoremacaroon
, url
):
8426 charmstoremacaroon : Macaroon
8430 # map input types to rpc msg
8432 msg
= dict(Type
='Client', Request
='AddCharmWithAuthorization', Version
=1, Params
=params
)
8433 params
['Channel'] = channel
8434 params
['CharmStoreMacaroon'] = charmstoremacaroon
8436 reply
= await self
.rpc(msg
)
8441 @ReturnMapping(AddMachinesResults
)
8442 async def AddMachines(self
, machineparams
):
8444 machineparams : typing.Sequence[~AddMachineParams]
8445 Returns -> typing.Sequence[~AddMachinesResult]
8447 # map input types to rpc msg
8449 msg
= dict(Type
='Client', Request
='AddMachines', Version
=1, Params
=params
)
8450 params
['MachineParams'] = machineparams
8451 reply
= await self
.rpc(msg
)
8456 @ReturnMapping(AddMachinesResults
)
8457 async def AddMachinesV2(self
, machineparams
):
8459 machineparams : typing.Sequence[~AddMachineParams]
8460 Returns -> typing.Sequence[~AddMachinesResult]
8462 # map input types to rpc msg
8464 msg
= dict(Type
='Client', Request
='AddMachinesV2', Version
=1, Params
=params
)
8465 params
['MachineParams'] = machineparams
8466 reply
= await self
.rpc(msg
)
8471 @ReturnMapping(AgentVersionResult
)
8472 async def AgentVersion(self
):
8477 # map input types to rpc msg
8479 msg
= dict(Type
='Client', Request
='AgentVersion', Version
=1, Params
=params
)
8481 reply
= await self
.rpc(msg
)
8486 @ReturnMapping(CharmInfo
)
8487 async def CharmInfo(self
, charmurl
):
8492 # map input types to rpc msg
8494 msg
= dict(Type
='Client', Request
='CharmInfo', Version
=1, Params
=params
)
8495 params
['CharmURL'] = charmurl
8496 reply
= await self
.rpc(msg
)
8501 @ReturnMapping(None)
8502 async def DestroyMachines(self
, force
, machinenames
):
8505 machinenames : typing.Sequence[str]
8508 # map input types to rpc msg
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
)
8518 @ReturnMapping(None)
8519 async def DestroyModel(self
):
8524 # map input types to rpc msg
8526 msg
= dict(Type
='Client', Request
='DestroyModel', Version
=1, Params
=params
)
8528 reply
= await self
.rpc(msg
)
8533 @ReturnMapping(FindToolsResult
)
8534 async def FindTools(self
, arch
, majorversion
, minorversion
, number
, series
):
8541 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[~Tools]]
8543 # map input types to rpc msg
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
)
8556 @ReturnMapping(FullStatus
)
8557 async def FullStatus(self
, patterns
):
8559 patterns : typing.Sequence[str]
8560 Returns -> typing.Union[typing.Mapping[str, ~MachineStatus], typing.Sequence[~RelationStatus]]
8562 # map input types to rpc msg
8564 msg
= dict(Type
='Client', Request
='FullStatus', Version
=1, Params
=params
)
8565 params
['Patterns'] = patterns
8566 reply
= await self
.rpc(msg
)
8571 @ReturnMapping(GetBundleChangesResults
)
8572 async def GetBundleChanges(self
, yaml
):
8575 Returns -> typing.Sequence[~BundleChangesChange]
8577 # map input types to rpc msg
8579 msg
= dict(Type
='Client', Request
='GetBundleChanges', Version
=1, Params
=params
)
8580 params
['yaml'] = yaml
8581 reply
= await self
.rpc(msg
)
8586 @ReturnMapping(GetConstraintsResults
)
8587 async def GetModelConstraints(self
):
8592 # map input types to rpc msg
8594 msg
= dict(Type
='Client', Request
='GetModelConstraints', Version
=1, Params
=params
)
8596 reply
= await self
.rpc(msg
)
8601 @ReturnMapping(AddMachinesResults
)
8602 async def InjectMachines(self
, machineparams
):
8604 machineparams : typing.Sequence[~AddMachineParams]
8605 Returns -> typing.Sequence[~AddMachinesResult]
8607 # map input types to rpc msg
8609 msg
= dict(Type
='Client', Request
='InjectMachines', Version
=1, Params
=params
)
8610 params
['MachineParams'] = machineparams
8611 reply
= await self
.rpc(msg
)
8616 @ReturnMapping(ModelConfigResults
)
8617 async def ModelGet(self
):
8620 Returns -> typing.Mapping[str, typing.Any]
8622 # map input types to rpc msg
8624 msg
= dict(Type
='Client', Request
='ModelGet', Version
=1, Params
=params
)
8626 reply
= await self
.rpc(msg
)
8631 @ReturnMapping(ModelInfo
)
8632 async def ModelInfo(self
):
8635 Returns -> typing.Union[_ForwardRef('EntityStatus'), typing.Sequence[~ModelUserInfo]]
8637 # map input types to rpc msg
8639 msg
= dict(Type
='Client', Request
='ModelInfo', Version
=1, Params
=params
)
8641 reply
= await self
.rpc(msg
)
8646 @ReturnMapping(None)
8647 async def ModelSet(self
, config
):
8649 config : typing.Mapping[str, typing.Any]
8652 # map input types to rpc msg
8654 msg
= dict(Type
='Client', Request
='ModelSet', Version
=1, Params
=params
)
8655 params
['Config'] = config
8656 reply
= await self
.rpc(msg
)
8661 @ReturnMapping(None)
8662 async def ModelUnset(self
, keys
):
8664 keys : typing.Sequence[str]
8667 # map input types to rpc msg
8669 msg
= dict(Type
='Client', Request
='ModelUnset', Version
=1, Params
=params
)
8670 params
['Keys'] = keys
8671 reply
= await self
.rpc(msg
)
8676 @ReturnMapping(ModelUserInfoResults
)
8677 async def ModelUserInfo(self
):
8680 Returns -> typing.Sequence[~ModelUserInfoResult]
8682 # map input types to rpc msg
8684 msg
= dict(Type
='Client', Request
='ModelUserInfo', Version
=1, Params
=params
)
8686 reply
= await self
.rpc(msg
)
8691 @ReturnMapping(PrivateAddressResults
)
8692 async def PrivateAddress(self
, target
):
8697 # map input types to rpc msg
8699 msg
= dict(Type
='Client', Request
='PrivateAddress', Version
=1, Params
=params
)
8700 params
['Target'] = target
8701 reply
= await self
.rpc(msg
)
8706 @ReturnMapping(ProvisioningScriptResult
)
8707 async def ProvisioningScript(self
, datadir
, disablepackagecommands
, machineid
, nonce
):
8710 disablepackagecommands : bool
8715 # map input types to rpc msg
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
)
8727 @ReturnMapping(PublicAddressResults
)
8728 async def PublicAddress(self
, target
):
8733 # map input types to rpc msg
8735 msg
= dict(Type
='Client', Request
='PublicAddress', Version
=1, Params
=params
)
8736 params
['Target'] = target
8737 reply
= await self
.rpc(msg
)
8742 @ReturnMapping(ResolveCharmResults
)
8743 async def ResolveCharms(self
, references
):
8745 references : typing.Sequence[~URL]
8746 Returns -> typing.Sequence[~ResolveCharmResult]
8748 # map input types to rpc msg
8750 msg
= dict(Type
='Client', Request
='ResolveCharms', Version
=1, Params
=params
)
8751 params
['References'] = references
8752 reply
= await self
.rpc(msg
)
8757 @ReturnMapping(None)
8758 async def Resolved(self
, retry
, unitname
):
8764 # map input types to rpc msg
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
)
8774 @ReturnMapping(ErrorResults
)
8775 async def RetryProvisioning(self
, entities
):
8777 entities : typing.Sequence[~Entity]
8778 Returns -> typing.Sequence[~ErrorResult]
8780 # map input types to rpc msg
8782 msg
= dict(Type
='Client', Request
='RetryProvisioning', Version
=1, Params
=params
)
8783 params
['Entities'] = entities
8784 reply
= await self
.rpc(msg
)
8789 @ReturnMapping(None)
8790 async def SetModelAgentVersion(self
, build
, major
, minor
, patch
, tag
):
8799 # map input types to rpc msg
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
8807 reply
= await self
.rpc(msg
)
8812 @ReturnMapping(None)
8813 async def SetModelConstraints(self
, applicationname
, constraints
):
8815 applicationname : str
8819 # map input types to rpc msg
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
)
8829 @ReturnMapping(StatusHistoryResults
)
8830 async def StatusHistory(self
, requests
):
8832 requests : typing.Sequence[~StatusHistoryRequest]
8833 Returns -> typing.Sequence[~StatusHistoryResult]
8835 # map input types to rpc msg
8837 msg
= dict(Type
='Client', Request
='StatusHistory', Version
=1, Params
=params
)
8838 params
['Requests'] = requests
8839 reply
= await self
.rpc(msg
)
8844 @ReturnMapping(AllWatcherId
)
8845 async def WatchAll(self
):
8850 # map input types to rpc msg
8852 msg
= dict(Type
='Client', Request
='WatchAll', Version
=1, Params
=params
)
8854 reply
= await self
.rpc(msg
)
8858 class Controller(Type
):
8861 schema
= {'definitions': {'AllWatcherId': {'additionalProperties': False,
8862 'properties': {'AllWatcherId': {'type': 'string'}},
8863 'required': ['AllWatcherId'],
8865 'DestroyControllerArgs': {'additionalProperties': False,
8866 'properties': {'destroy-models': {'type': 'boolean'}},
8867 'required': ['destroy-models'],
8869 'Entities': {'additionalProperties': False,
8870 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
8872 'required': ['Entities'],
8874 'Entity': {'additionalProperties': False,
8875 'properties': {'Tag': {'type': 'string'}},
8876 'required': ['Tag'],
8878 'Error': {'additionalProperties': False,
8879 'properties': {'Code': {'type': 'string'},
8880 'Info': {'$ref': '#/definitions/ErrorInfo'},
8881 'Message': {'type': 'string'}},
8882 'required': ['Message', 'Code'],
8884 'ErrorInfo': {'additionalProperties': False,
8885 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
8886 'MacaroonPath': {'type': 'string'}},
8888 'InitiateModelMigrationArgs': {'additionalProperties': False,
8889 'properties': {'specs': {'items': {'$ref': '#/definitions/ModelMigrationSpec'},
8891 'required': ['specs'],
8893 'InitiateModelMigrationResult': {'additionalProperties': False,
8894 'properties': {'error': {'$ref': '#/definitions/Error'},
8895 'id': {'type': 'string'},
8896 'model-tag': {'type': 'string'}},
8897 'required': ['model-tag',
8901 'InitiateModelMigrationResults': {'additionalProperties': False,
8902 'properties': {'results': {'items': {'$ref': '#/definitions/InitiateModelMigrationResult'},
8904 'required': ['results'],
8906 'Macaroon': {'additionalProperties': False,
8907 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
8909 'data': {'items': {'type': 'integer'},
8911 'id': {'$ref': '#/definitions/packet'},
8912 'location': {'$ref': '#/definitions/packet'},
8913 'sig': {'items': {'type': 'integer'},
8915 'required': ['data',
8921 'Model': {'additionalProperties': False,
8922 'properties': {'Name': {'type': 'string'},
8923 'OwnerTag': {'type': 'string'},
8924 'UUID': {'type': 'string'}},
8925 'required': ['Name', 'UUID', 'OwnerTag'],
8927 'ModelBlockInfo': {'additionalProperties': False,
8928 'properties': {'blocks': {'items': {'type': 'string'},
8930 'model-uuid': {'type': 'string'},
8931 'name': {'type': 'string'},
8932 'owner-tag': {'type': 'string'}},
8933 'required': ['name',
8938 'ModelBlockInfoList': {'additionalProperties': False,
8939 'properties': {'models': {'items': {'$ref': '#/definitions/ModelBlockInfo'},
8942 'ModelConfigResults': {'additionalProperties': False,
8943 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
8946 'required': ['Config'],
8948 'ModelMigrationSpec': {'additionalProperties': False,
8949 'properties': {'model-tag': {'type': 'string'},
8950 'target-info': {'$ref': '#/definitions/ModelMigrationTargetInfo'}},
8951 'required': ['model-tag',
8954 'ModelMigrationTargetInfo': {'additionalProperties': False,
8955 'properties': {'addrs': {'items': {'type': 'string'},
8957 'auth-tag': {'type': 'string'},
8958 'ca-cert': {'type': 'string'},
8959 'controller-tag': {'type': 'string'},
8960 'password': {'type': 'string'}},
8961 'required': ['controller-tag',
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',
8975 'hosted-machine-count',
8976 'application-count',
8979 'ModelStatusResults': {'additionalProperties': False,
8980 'properties': {'models': {'items': {'$ref': '#/definitions/ModelStatus'},
8982 'required': ['models'],
8984 'RemoveBlocksArgs': {'additionalProperties': False,
8985 'properties': {'all': {'type': 'boolean'}},
8986 'required': ['all'],
8988 'UserModel': {'additionalProperties': False,
8989 'properties': {'LastConnection': {'format': 'date-time',
8991 'Model': {'$ref': '#/definitions/Model'}},
8992 'required': ['Model', 'LastConnection'],
8994 'UserModelList': {'additionalProperties': False,
8995 'properties': {'UserModels': {'items': {'$ref': '#/definitions/UserModel'},
8997 'required': ['UserModels'],
8999 'caveat': {'additionalProperties': False,
9000 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
9001 'location': {'$ref': '#/definitions/packet'},
9002 'verificationId': {'$ref': '#/definitions/packet'}},
9003 'required': ['location',
9007 'packet': {'additionalProperties': False,
9008 'properties': {'headerLen': {'type': 'integer'},
9009 'start': {'type': 'integer'},
9010 'totalLen': {'type': 'integer'}},
9011 'required': ['start', 'totalLen', 'headerLen'],
9013 'properties': {'AllModels': {'properties': {'Result': {'$ref': '#/definitions/UserModelList'}},
9015 'DestroyController': {'properties': {'Params': {'$ref': '#/definitions/DestroyControllerArgs'}},
9017 'InitiateModelMigration': {'properties': {'Params': {'$ref': '#/definitions/InitiateModelMigrationArgs'},
9018 'Result': {'$ref': '#/definitions/InitiateModelMigrationResults'}},
9020 'ListBlockedModels': {'properties': {'Result': {'$ref': '#/definitions/ModelBlockInfoList'}},
9022 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}},
9024 'ModelStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9025 'Result': {'$ref': '#/definitions/ModelStatusResults'}},
9027 'RemoveBlocks': {'properties': {'Params': {'$ref': '#/definitions/RemoveBlocksArgs'}},
9029 'WatchAllModels': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherId'}},
9034 @ReturnMapping(UserModelList
)
9035 async def AllModels(self
):
9038 Returns -> typing.Sequence[~UserModel]
9040 # map input types to rpc msg
9042 msg
= dict(Type
='Controller', Request
='AllModels', Version
=3, Params
=params
)
9044 reply
= await self
.rpc(msg
)
9049 @ReturnMapping(None)
9050 async def DestroyController(self
, destroy_models
):
9052 destroy_models : bool
9055 # map input types to rpc msg
9057 msg
= dict(Type
='Controller', Request
='DestroyController', Version
=3, Params
=params
)
9058 params
['destroy-models'] = destroy_models
9059 reply
= await self
.rpc(msg
)
9064 @ReturnMapping(InitiateModelMigrationResults
)
9065 async def InitiateModelMigration(self
, specs
):
9067 specs : typing.Sequence[~ModelMigrationSpec]
9068 Returns -> typing.Sequence[~InitiateModelMigrationResult]
9070 # map input types to rpc msg
9072 msg
= dict(Type
='Controller', Request
='InitiateModelMigration', Version
=3, Params
=params
)
9073 params
['specs'] = specs
9074 reply
= await self
.rpc(msg
)
9079 @ReturnMapping(ModelBlockInfoList
)
9080 async def ListBlockedModels(self
):
9083 Returns -> typing.Sequence[~ModelBlockInfo]
9085 # map input types to rpc msg
9087 msg
= dict(Type
='Controller', Request
='ListBlockedModels', Version
=3, Params
=params
)
9089 reply
= await self
.rpc(msg
)
9094 @ReturnMapping(ModelConfigResults
)
9095 async def ModelConfig(self
):
9098 Returns -> typing.Mapping[str, typing.Any]
9100 # map input types to rpc msg
9102 msg
= dict(Type
='Controller', Request
='ModelConfig', Version
=3, Params
=params
)
9104 reply
= await self
.rpc(msg
)
9109 @ReturnMapping(ModelStatusResults
)
9110 async def ModelStatus(self
, entities
):
9112 entities : typing.Sequence[~Entity]
9113 Returns -> typing.Sequence[~ModelStatus]
9115 # map input types to rpc msg
9117 msg
= dict(Type
='Controller', Request
='ModelStatus', Version
=3, Params
=params
)
9118 params
['Entities'] = entities
9119 reply
= await self
.rpc(msg
)
9124 @ReturnMapping(None)
9125 async def RemoveBlocks(self
, all_
):
9130 # map input types to rpc msg
9132 msg
= dict(Type
='Controller', Request
='RemoveBlocks', Version
=3, Params
=params
)
9133 params
['all'] = all_
9134 reply
= await self
.rpc(msg
)
9139 @ReturnMapping(AllWatcherId
)
9140 async def WatchAllModels(self
):
9145 # map input types to rpc msg
9147 msg
= dict(Type
='Controller', Request
='WatchAllModels', Version
=3, Params
=params
)
9149 reply
= await self
.rpc(msg
)
9153 class Deployer(Type
):
9156 schema
= {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
9157 'properties': {'Servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
9160 'required': ['Servers'],
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'],
9169 'BytesResult': {'additionalProperties': False,
9170 'properties': {'Result': {'items': {'type': 'integer'},
9172 'required': ['Result'],
9174 'DeployerConnectionValues': {'additionalProperties': False,
9175 'properties': {'APIAddresses': {'items': {'type': 'string'},
9177 'StateAddresses': {'items': {'type': 'string'},
9179 'required': ['StateAddresses',
9182 'Entities': {'additionalProperties': False,
9183 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
9185 'required': ['Entities'],
9187 'Entity': {'additionalProperties': False,
9188 'properties': {'Tag': {'type': 'string'}},
9189 'required': ['Tag'],
9191 'EntityPassword': {'additionalProperties': False,
9192 'properties': {'Password': {'type': 'string'},
9193 'Tag': {'type': 'string'}},
9194 'required': ['Tag', 'Password'],
9196 'EntityPasswords': {'additionalProperties': False,
9197 'properties': {'Changes': {'items': {'$ref': '#/definitions/EntityPassword'},
9199 'required': ['Changes'],
9201 'Error': {'additionalProperties': False,
9202 'properties': {'Code': {'type': 'string'},
9203 'Info': {'$ref': '#/definitions/ErrorInfo'},
9204 'Message': {'type': 'string'}},
9205 'required': ['Message', 'Code'],
9207 'ErrorInfo': {'additionalProperties': False,
9208 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
9209 'MacaroonPath': {'type': 'string'}},
9211 'ErrorResult': {'additionalProperties': False,
9212 'properties': {'Error': {'$ref': '#/definitions/Error'}},
9213 'required': ['Error'],
9215 'ErrorResults': {'additionalProperties': False,
9216 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
9218 'required': ['Results'],
9220 'HostPort': {'additionalProperties': False,
9221 'properties': {'Address': {'$ref': '#/definitions/Address'},
9222 'Port': {'type': 'integer'}},
9223 'required': ['Address', 'Port'],
9225 'LifeResult': {'additionalProperties': False,
9226 'properties': {'Error': {'$ref': '#/definitions/Error'},
9227 'Life': {'type': 'string'}},
9228 'required': ['Life', 'Error'],
9230 'LifeResults': {'additionalProperties': False,
9231 'properties': {'Results': {'items': {'$ref': '#/definitions/LifeResult'},
9233 'required': ['Results'],
9235 'Macaroon': {'additionalProperties': False,
9236 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
9238 'data': {'items': {'type': 'integer'},
9240 'id': {'$ref': '#/definitions/packet'},
9241 'location': {'$ref': '#/definitions/packet'},
9242 'sig': {'items': {'type': 'integer'},
9244 'required': ['data',
9250 'NotifyWatchResult': {'additionalProperties': False,
9251 'properties': {'Error': {'$ref': '#/definitions/Error'},
9252 'NotifyWatcherId': {'type': 'string'}},
9253 'required': ['NotifyWatcherId', 'Error'],
9255 'StringResult': {'additionalProperties': False,
9256 'properties': {'Error': {'$ref': '#/definitions/Error'},
9257 'Result': {'type': 'string'}},
9258 'required': ['Error', 'Result'],
9260 'StringsResult': {'additionalProperties': False,
9261 'properties': {'Error': {'$ref': '#/definitions/Error'},
9262 'Result': {'items': {'type': 'string'},
9264 'required': ['Error', 'Result'],
9266 'StringsWatchResult': {'additionalProperties': False,
9267 'properties': {'Changes': {'items': {'type': 'string'},
9269 'Error': {'$ref': '#/definitions/Error'},
9270 'StringsWatcherId': {'type': 'string'}},
9271 'required': ['StringsWatcherId',
9275 'StringsWatchResults': {'additionalProperties': False,
9276 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
9278 'required': ['Results'],
9280 'caveat': {'additionalProperties': False,
9281 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
9282 'location': {'$ref': '#/definitions/packet'},
9283 'verificationId': {'$ref': '#/definitions/packet'}},
9284 'required': ['location',
9288 'packet': {'additionalProperties': False,
9289 'properties': {'headerLen': {'type': 'integer'},
9290 'start': {'type': 'integer'},
9291 'totalLen': {'type': 'integer'}},
9292 'required': ['start', 'totalLen', 'headerLen'],
9294 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
9296 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
9298 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
9300 'ConnectionInfo': {'properties': {'Result': {'$ref': '#/definitions/DeployerConnectionValues'}},
9302 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9303 'Result': {'$ref': '#/definitions/LifeResults'}},
9305 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
9307 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9308 'Result': {'$ref': '#/definitions/ErrorResults'}},
9310 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
9311 'Result': {'$ref': '#/definitions/ErrorResults'}},
9313 'StateAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
9315 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
9317 'WatchUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9318 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
9323 @ReturnMapping(StringsResult
)
9324 async def APIAddresses(self
):
9327 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[str]]
9329 # map input types to rpc msg
9331 msg
= dict(Type
='Deployer', Request
='APIAddresses', Version
=1, Params
=params
)
9333 reply
= await self
.rpc(msg
)
9338 @ReturnMapping(APIHostPortsResult
)
9339 async def APIHostPorts(self
):
9342 Returns -> typing.Sequence[~HostPort]
9344 # map input types to rpc msg
9346 msg
= dict(Type
='Deployer', Request
='APIHostPorts', Version
=1, Params
=params
)
9348 reply
= await self
.rpc(msg
)
9353 @ReturnMapping(BytesResult
)
9354 async def CACert(self
):
9357 Returns -> typing.Sequence[int]
9359 # map input types to rpc msg
9361 msg
= dict(Type
='Deployer', Request
='CACert', Version
=1, Params
=params
)
9363 reply
= await self
.rpc(msg
)
9368 @ReturnMapping(DeployerConnectionValues
)
9369 async def ConnectionInfo(self
):
9372 Returns -> typing.Sequence[str]
9374 # map input types to rpc msg
9376 msg
= dict(Type
='Deployer', Request
='ConnectionInfo', Version
=1, Params
=params
)
9378 reply
= await self
.rpc(msg
)
9383 @ReturnMapping(LifeResults
)
9384 async def Life(self
, entities
):
9386 entities : typing.Sequence[~Entity]
9387 Returns -> typing.Sequence[~LifeResult]
9389 # map input types to rpc msg
9391 msg
= dict(Type
='Deployer', Request
='Life', Version
=1, Params
=params
)
9392 params
['Entities'] = entities
9393 reply
= await self
.rpc(msg
)
9398 @ReturnMapping(StringResult
)
9399 async def ModelUUID(self
):
9402 Returns -> typing.Union[_ForwardRef('Error'), str]
9404 # map input types to rpc msg
9406 msg
= dict(Type
='Deployer', Request
='ModelUUID', Version
=1, Params
=params
)
9408 reply
= await self
.rpc(msg
)
9413 @ReturnMapping(ErrorResults
)
9414 async def Remove(self
, entities
):
9416 entities : typing.Sequence[~Entity]
9417 Returns -> typing.Sequence[~ErrorResult]
9419 # map input types to rpc msg
9421 msg
= dict(Type
='Deployer', Request
='Remove', Version
=1, Params
=params
)
9422 params
['Entities'] = entities
9423 reply
= await self
.rpc(msg
)
9428 @ReturnMapping(ErrorResults
)
9429 async def SetPasswords(self
, changes
):
9431 changes : typing.Sequence[~EntityPassword]
9432 Returns -> typing.Sequence[~ErrorResult]
9434 # map input types to rpc msg
9436 msg
= dict(Type
='Deployer', Request
='SetPasswords', Version
=1, Params
=params
)
9437 params
['Changes'] = changes
9438 reply
= await self
.rpc(msg
)
9443 @ReturnMapping(StringsResult
)
9444 async def StateAddresses(self
):
9447 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[str]]
9449 # map input types to rpc msg
9451 msg
= dict(Type
='Deployer', Request
='StateAddresses', Version
=1, Params
=params
)
9453 reply
= await self
.rpc(msg
)
9458 @ReturnMapping(NotifyWatchResult
)
9459 async def WatchAPIHostPorts(self
):
9462 Returns -> typing.Union[_ForwardRef('Error'), str]
9464 # map input types to rpc msg
9466 msg
= dict(Type
='Deployer', Request
='WatchAPIHostPorts', Version
=1, Params
=params
)
9468 reply
= await self
.rpc(msg
)
9473 @ReturnMapping(StringsWatchResults
)
9474 async def WatchUnits(self
, entities
):
9476 entities : typing.Sequence[~Entity]
9477 Returns -> typing.Sequence[~StringsWatchResult]
9479 # map input types to rpc msg
9481 msg
= dict(Type
='Deployer', Request
='WatchUnits', Version
=1, Params
=params
)
9482 params
['Entities'] = entities
9483 reply
= await self
.rpc(msg
)
9487 class DiscoverSpaces(Type
):
9488 name
= 'DiscoverSpaces'
9490 schema
= {'definitions': {'AddSubnetParams': {'additionalProperties': False,
9491 'properties': {'SpaceTag': {'type': 'string'},
9492 'SubnetProviderId': {'type': 'string'},
9493 'SubnetTag': {'type': 'string'},
9494 'Zones': {'items': {'type': 'string'},
9496 'required': ['SpaceTag'],
9498 'AddSubnetsParams': {'additionalProperties': False,
9499 'properties': {'Subnets': {'items': {'$ref': '#/definitions/AddSubnetParams'},
9501 'required': ['Subnets'],
9503 'CreateSpaceParams': {'additionalProperties': False,
9504 'properties': {'ProviderId': {'type': 'string'},
9505 'Public': {'type': 'boolean'},
9506 'SpaceTag': {'type': 'string'},
9507 'SubnetTags': {'items': {'type': 'string'},
9509 'required': ['SubnetTags',
9513 'CreateSpacesParams': {'additionalProperties': False,
9514 'properties': {'Spaces': {'items': {'$ref': '#/definitions/CreateSpaceParams'},
9516 'required': ['Spaces'],
9518 'DiscoverSpacesResults': {'additionalProperties': False,
9519 'properties': {'Results': {'items': {'$ref': '#/definitions/ProviderSpace'},
9521 'required': ['Results'],
9523 'Error': {'additionalProperties': False,
9524 'properties': {'Code': {'type': 'string'},
9525 'Info': {'$ref': '#/definitions/ErrorInfo'},
9526 'Message': {'type': 'string'}},
9527 'required': ['Message', 'Code'],
9529 'ErrorInfo': {'additionalProperties': False,
9530 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
9531 'MacaroonPath': {'type': 'string'}},
9533 'ErrorResult': {'additionalProperties': False,
9534 'properties': {'Error': {'$ref': '#/definitions/Error'}},
9535 'required': ['Error'],
9537 'ErrorResults': {'additionalProperties': False,
9538 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
9540 'required': ['Results'],
9542 'ListSubnetsResults': {'additionalProperties': False,
9543 'properties': {'Results': {'items': {'$ref': '#/definitions/Subnet'},
9545 'required': ['Results'],
9547 'Macaroon': {'additionalProperties': False,
9548 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
9550 'data': {'items': {'type': 'integer'},
9552 'id': {'$ref': '#/definitions/packet'},
9553 'location': {'$ref': '#/definitions/packet'},
9554 'sig': {'items': {'type': 'integer'},
9556 'required': ['data',
9562 'ModelConfigResult': {'additionalProperties': False,
9563 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
9566 'required': ['Config'],
9568 'ProviderSpace': {'additionalProperties': False,
9569 'properties': {'Error': {'$ref': '#/definitions/Error'},
9570 'Name': {'type': 'string'},
9571 'ProviderId': {'type': 'string'},
9572 'Subnets': {'items': {'$ref': '#/definitions/Subnet'},
9574 'required': ['Name',
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'},
9585 'StaticRangeLowIP': {'items': {'type': 'integer'},
9587 'Status': {'type': 'string'},
9588 'VLANTag': {'type': 'integer'},
9589 'Zones': {'items': {'type': 'string'},
9591 'required': ['CIDR',
9597 'SubnetsFilters': {'additionalProperties': False,
9598 'properties': {'SpaceTag': {'type': 'string'},
9599 'Zone': {'type': 'string'}},
9601 'caveat': {'additionalProperties': False,
9602 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
9603 'location': {'$ref': '#/definitions/packet'},
9604 'verificationId': {'$ref': '#/definitions/packet'}},
9605 'required': ['location',
9609 'packet': {'additionalProperties': False,
9610 'properties': {'headerLen': {'type': 'integer'},
9611 'start': {'type': 'integer'},
9612 'totalLen': {'type': 'integer'}},
9613 'required': ['start', 'totalLen', 'headerLen'],
9615 'properties': {'AddSubnets': {'properties': {'Params': {'$ref': '#/definitions/AddSubnetsParams'},
9616 'Result': {'$ref': '#/definitions/ErrorResults'}},
9618 'CreateSpaces': {'properties': {'Params': {'$ref': '#/definitions/CreateSpacesParams'},
9619 'Result': {'$ref': '#/definitions/ErrorResults'}},
9621 'ListSpaces': {'properties': {'Result': {'$ref': '#/definitions/DiscoverSpacesResults'}},
9623 'ListSubnets': {'properties': {'Params': {'$ref': '#/definitions/SubnetsFilters'},
9624 'Result': {'$ref': '#/definitions/ListSubnetsResults'}},
9626 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
9631 @ReturnMapping(ErrorResults
)
9632 async def AddSubnets(self
, subnets
):
9634 subnets : typing.Sequence[~AddSubnetParams]
9635 Returns -> typing.Sequence[~ErrorResult]
9637 # map input types to rpc msg
9639 msg
= dict(Type
='DiscoverSpaces', Request
='AddSubnets', Version
=2, Params
=params
)
9640 params
['Subnets'] = subnets
9641 reply
= await self
.rpc(msg
)
9646 @ReturnMapping(ErrorResults
)
9647 async def CreateSpaces(self
, spaces
):
9649 spaces : typing.Sequence[~CreateSpaceParams]
9650 Returns -> typing.Sequence[~ErrorResult]
9652 # map input types to rpc msg
9654 msg
= dict(Type
='DiscoverSpaces', Request
='CreateSpaces', Version
=2, Params
=params
)
9655 params
['Spaces'] = spaces
9656 reply
= await self
.rpc(msg
)
9661 @ReturnMapping(DiscoverSpacesResults
)
9662 async def ListSpaces(self
):
9665 Returns -> typing.Sequence[~ProviderSpace]
9667 # map input types to rpc msg
9669 msg
= dict(Type
='DiscoverSpaces', Request
='ListSpaces', Version
=2, Params
=params
)
9671 reply
= await self
.rpc(msg
)
9676 @ReturnMapping(ListSubnetsResults
)
9677 async def ListSubnets(self
, spacetag
, zone
):
9681 Returns -> typing.Sequence[~Subnet]
9683 # map input types to rpc msg
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
)
9693 @ReturnMapping(ModelConfigResult
)
9694 async def ModelConfig(self
):
9697 Returns -> typing.Mapping[str, typing.Any]
9699 # map input types to rpc msg
9701 msg
= dict(Type
='DiscoverSpaces', Request
='ModelConfig', Version
=2, Params
=params
)
9703 reply
= await self
.rpc(msg
)
9707 class DiskManager(Type
):
9708 name
= 'DiskManager'
9710 schema
= {'definitions': {'BlockDevice': {'additionalProperties': False,
9711 'properties': {'BusAddress': {'type': 'string'},
9712 'DeviceLinks': {'items': {'type': 'string'},
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',
9733 'Error': {'additionalProperties': False,
9734 'properties': {'Code': {'type': 'string'},
9735 'Info': {'$ref': '#/definitions/ErrorInfo'},
9736 'Message': {'type': 'string'}},
9737 'required': ['Message', 'Code'],
9739 'ErrorInfo': {'additionalProperties': False,
9740 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
9741 'MacaroonPath': {'type': 'string'}},
9743 'ErrorResult': {'additionalProperties': False,
9744 'properties': {'Error': {'$ref': '#/definitions/Error'}},
9745 'required': ['Error'],
9747 'ErrorResults': {'additionalProperties': False,
9748 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
9750 'required': ['Results'],
9752 'Macaroon': {'additionalProperties': False,
9753 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
9755 'data': {'items': {'type': 'integer'},
9757 'id': {'$ref': '#/definitions/packet'},
9758 'location': {'$ref': '#/definitions/packet'},
9759 'sig': {'items': {'type': 'integer'},
9761 'required': ['data',
9767 'MachineBlockDevices': {'additionalProperties': False,
9768 'properties': {'blockdevices': {'items': {'$ref': '#/definitions/BlockDevice'},
9770 'machine': {'type': 'string'}},
9771 'required': ['machine'],
9773 'SetMachineBlockDevices': {'additionalProperties': False,
9774 'properties': {'machineblockdevices': {'items': {'$ref': '#/definitions/MachineBlockDevices'},
9776 'required': ['machineblockdevices'],
9778 'caveat': {'additionalProperties': False,
9779 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
9780 'location': {'$ref': '#/definitions/packet'},
9781 'verificationId': {'$ref': '#/definitions/packet'}},
9782 'required': ['location',
9786 'packet': {'additionalProperties': False,
9787 'properties': {'headerLen': {'type': 'integer'},
9788 'start': {'type': 'integer'},
9789 'totalLen': {'type': 'integer'}},
9790 'required': ['start', 'totalLen', 'headerLen'],
9792 'properties': {'SetMachineBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/SetMachineBlockDevices'},
9793 'Result': {'$ref': '#/definitions/ErrorResults'}},
9798 @ReturnMapping(ErrorResults
)
9799 async def SetMachineBlockDevices(self
, machineblockdevices
):
9801 machineblockdevices : typing.Sequence[~MachineBlockDevices]
9802 Returns -> typing.Sequence[~ErrorResult]
9804 # map input types to rpc msg
9806 msg
= dict(Type
='DiskManager', Request
='SetMachineBlockDevices', Version
=2, Params
=params
)
9807 params
['machineblockdevices'] = machineblockdevices
9808 reply
= await self
.rpc(msg
)
9812 class EntityWatcher(Type
):
9813 name
= 'EntityWatcher'
9815 schema
= {'definitions': {'EntitiesWatchResult': {'additionalProperties': False,
9816 'properties': {'Changes': {'items': {'type': 'string'},
9818 'EntityWatcherId': {'type': 'string'},
9819 'Error': {'$ref': '#/definitions/Error'}},
9820 'required': ['EntityWatcherId',
9824 'Error': {'additionalProperties': False,
9825 'properties': {'Code': {'type': 'string'},
9826 'Info': {'$ref': '#/definitions/ErrorInfo'},
9827 'Message': {'type': 'string'}},
9828 'required': ['Message', 'Code'],
9830 'ErrorInfo': {'additionalProperties': False,
9831 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
9832 'MacaroonPath': {'type': 'string'}},
9834 'Macaroon': {'additionalProperties': False,
9835 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
9837 'data': {'items': {'type': 'integer'},
9839 'id': {'$ref': '#/definitions/packet'},
9840 'location': {'$ref': '#/definitions/packet'},
9841 'sig': {'items': {'type': 'integer'},
9843 'required': ['data',
9849 'caveat': {'additionalProperties': False,
9850 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
9851 'location': {'$ref': '#/definitions/packet'},
9852 'verificationId': {'$ref': '#/definitions/packet'}},
9853 'required': ['location',
9857 'packet': {'additionalProperties': False,
9858 'properties': {'headerLen': {'type': 'integer'},
9859 'start': {'type': 'integer'},
9860 'totalLen': {'type': 'integer'}},
9861 'required': ['start', 'totalLen', 'headerLen'],
9863 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/EntitiesWatchResult'}},
9865 'Stop': {'type': 'object'}},
9869 @ReturnMapping(EntitiesWatchResult
)
9870 async def Next(self
):
9873 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')]
9875 # map input types to rpc msg
9877 msg
= dict(Type
='EntityWatcher', Request
='Next', Version
=2, Params
=params
)
9879 reply
= await self
.rpc(msg
)
9884 @ReturnMapping(None)
9885 async def Stop(self
):
9890 # map input types to rpc msg
9892 msg
= dict(Type
='EntityWatcher', Request
='Stop', Version
=2, Params
=params
)
9894 reply
= await self
.rpc(msg
)
9898 class FilesystemAttachmentsWatcher(Type
):
9899 name
= 'FilesystemAttachmentsWatcher'
9901 schema
= {'definitions': {'Error': {'additionalProperties': False,
9902 'properties': {'Code': {'type': 'string'},
9903 'Info': {'$ref': '#/definitions/ErrorInfo'},
9904 'Message': {'type': 'string'}},
9905 'required': ['Message', 'Code'],
9907 'ErrorInfo': {'additionalProperties': False,
9908 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
9909 'MacaroonPath': {'type': 'string'}},
9911 'Macaroon': {'additionalProperties': False,
9912 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
9914 'data': {'items': {'type': 'integer'},
9916 'id': {'$ref': '#/definitions/packet'},
9917 'location': {'$ref': '#/definitions/packet'},
9918 'sig': {'items': {'type': 'integer'},
9920 'required': ['data',
9926 'MachineStorageId': {'additionalProperties': False,
9927 'properties': {'attachmenttag': {'type': 'string'},
9928 'machinetag': {'type': 'string'}},
9929 'required': ['machinetag',
9932 'MachineStorageIdsWatchResult': {'additionalProperties': False,
9933 'properties': {'Changes': {'items': {'$ref': '#/definitions/MachineStorageId'},
9935 'Error': {'$ref': '#/definitions/Error'},
9936 'MachineStorageIdsWatcherId': {'type': 'string'}},
9937 'required': ['MachineStorageIdsWatcherId',
9941 'caveat': {'additionalProperties': False,
9942 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
9943 'location': {'$ref': '#/definitions/packet'},
9944 'verificationId': {'$ref': '#/definitions/packet'}},
9945 'required': ['location',
9949 'packet': {'additionalProperties': False,
9950 'properties': {'headerLen': {'type': 'integer'},
9951 'start': {'type': 'integer'},
9952 'totalLen': {'type': 'integer'}},
9953 'required': ['start', 'totalLen', 'headerLen'],
9955 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResult'}},
9957 'Stop': {'type': 'object'}},
9961 @ReturnMapping(MachineStorageIdsWatchResult
)
9962 async def Next(self
):
9965 Returns -> typing.Union[typing.Sequence[~MachineStorageId], _ForwardRef('Error')]
9967 # map input types to rpc msg
9969 msg
= dict(Type
='FilesystemAttachmentsWatcher', Request
='Next', Version
=2, Params
=params
)
9971 reply
= await self
.rpc(msg
)
9976 @ReturnMapping(None)
9977 async def Stop(self
):
9982 # map input types to rpc msg
9984 msg
= dict(Type
='FilesystemAttachmentsWatcher', Request
='Stop', Version
=2, Params
=params
)
9986 reply
= await self
.rpc(msg
)
9990 class Firewaller(Type
):
9993 schema
= {'definitions': {'BoolResult': {'additionalProperties': False,
9994 'properties': {'Error': {'$ref': '#/definitions/Error'},
9995 'Result': {'type': 'boolean'}},
9996 'required': ['Error', 'Result'],
9998 'BoolResults': {'additionalProperties': False,
9999 'properties': {'Results': {'items': {'$ref': '#/definitions/BoolResult'},
10001 'required': ['Results'],
10003 'Entities': {'additionalProperties': False,
10004 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
10006 'required': ['Entities'],
10008 'Entity': {'additionalProperties': False,
10009 'properties': {'Tag': {'type': 'string'}},
10010 'required': ['Tag'],
10012 'Error': {'additionalProperties': False,
10013 'properties': {'Code': {'type': 'string'},
10014 'Info': {'$ref': '#/definitions/ErrorInfo'},
10015 'Message': {'type': 'string'}},
10016 'required': ['Message', 'Code'],
10018 'ErrorInfo': {'additionalProperties': False,
10019 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
10020 'MacaroonPath': {'type': 'string'}},
10022 'LifeResult': {'additionalProperties': False,
10023 'properties': {'Error': {'$ref': '#/definitions/Error'},
10024 'Life': {'type': 'string'}},
10025 'required': ['Life', 'Error'],
10027 'LifeResults': {'additionalProperties': False,
10028 'properties': {'Results': {'items': {'$ref': '#/definitions/LifeResult'},
10030 'required': ['Results'],
10032 'Macaroon': {'additionalProperties': False,
10033 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
10035 'data': {'items': {'type': 'integer'},
10037 'id': {'$ref': '#/definitions/packet'},
10038 'location': {'$ref': '#/definitions/packet'},
10039 'sig': {'items': {'type': 'integer'},
10041 'required': ['data',
10047 'MachinePortRange': {'additionalProperties': False,
10048 'properties': {'PortRange': {'$ref': '#/definitions/PortRange'},
10049 'RelationTag': {'type': 'string'},
10050 'UnitTag': {'type': 'string'}},
10051 'required': ['UnitTag',
10055 'MachinePorts': {'additionalProperties': False,
10056 'properties': {'MachineTag': {'type': 'string'},
10057 'SubnetTag': {'type': 'string'}},
10058 'required': ['MachineTag', 'SubnetTag'],
10060 'MachinePortsParams': {'additionalProperties': False,
10061 'properties': {'Params': {'items': {'$ref': '#/definitions/MachinePorts'},
10063 'required': ['Params'],
10065 'MachinePortsResult': {'additionalProperties': False,
10066 'properties': {'Error': {'$ref': '#/definitions/Error'},
10067 'Ports': {'items': {'$ref': '#/definitions/MachinePortRange'},
10069 'required': ['Error', 'Ports'],
10071 'MachinePortsResults': {'additionalProperties': False,
10072 'properties': {'Results': {'items': {'$ref': '#/definitions/MachinePortsResult'},
10074 'required': ['Results'],
10076 'ModelConfigResult': {'additionalProperties': False,
10077 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
10078 'type': 'object'}},
10079 'type': 'object'}},
10080 'required': ['Config'],
10082 'NotifyWatchResult': {'additionalProperties': False,
10083 'properties': {'Error': {'$ref': '#/definitions/Error'},
10084 'NotifyWatcherId': {'type': 'string'}},
10085 'required': ['NotifyWatcherId', 'Error'],
10087 'NotifyWatchResults': {'additionalProperties': False,
10088 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
10090 'required': ['Results'],
10092 'PortRange': {'additionalProperties': False,
10093 'properties': {'FromPort': {'type': 'integer'},
10094 'Protocol': {'type': 'string'},
10095 'ToPort': {'type': 'integer'}},
10096 'required': ['FromPort', 'ToPort', 'Protocol'],
10098 'StringResult': {'additionalProperties': False,
10099 'properties': {'Error': {'$ref': '#/definitions/Error'},
10100 'Result': {'type': 'string'}},
10101 'required': ['Error', 'Result'],
10103 'StringResults': {'additionalProperties': False,
10104 'properties': {'Results': {'items': {'$ref': '#/definitions/StringResult'},
10106 'required': ['Results'],
10108 'StringsResult': {'additionalProperties': False,
10109 'properties': {'Error': {'$ref': '#/definitions/Error'},
10110 'Result': {'items': {'type': 'string'},
10112 'required': ['Error', 'Result'],
10114 'StringsResults': {'additionalProperties': False,
10115 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsResult'},
10117 'required': ['Results'],
10119 'StringsWatchResult': {'additionalProperties': False,
10120 'properties': {'Changes': {'items': {'type': 'string'},
10122 'Error': {'$ref': '#/definitions/Error'},
10123 'StringsWatcherId': {'type': 'string'}},
10124 'required': ['StringsWatcherId',
10128 'StringsWatchResults': {'additionalProperties': False,
10129 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
10131 'required': ['Results'],
10133 'caveat': {'additionalProperties': False,
10134 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
10135 'location': {'$ref': '#/definitions/packet'},
10136 'verificationId': {'$ref': '#/definitions/packet'}},
10137 'required': ['location',
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'}},
10150 'GetExposed': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10151 'Result': {'$ref': '#/definitions/BoolResults'}},
10153 'GetMachineActiveSubnets': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10154 'Result': {'$ref': '#/definitions/StringsResults'}},
10156 'GetMachinePorts': {'properties': {'Params': {'$ref': '#/definitions/MachinePortsParams'},
10157 'Result': {'$ref': '#/definitions/MachinePortsResults'}},
10159 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10160 'Result': {'$ref': '#/definitions/StringResults'}},
10162 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10163 'Result': {'$ref': '#/definitions/LifeResults'}},
10165 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
10167 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10168 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
10170 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
10172 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
10174 'WatchOpenedPorts': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10175 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
10177 'WatchUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10178 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
10179 'type': 'object'}},
10183 @ReturnMapping(StringResults
)
10184 async def GetAssignedMachine(self
, entities
):
10186 entities : typing.Sequence[~Entity]
10187 Returns -> typing.Sequence[~StringResult]
10189 # map input types to rpc msg
10191 msg
= dict(Type
='Firewaller', Request
='GetAssignedMachine', Version
=3, Params
=params
)
10192 params
['Entities'] = entities
10193 reply
= await self
.rpc(msg
)
10198 @ReturnMapping(BoolResults
)
10199 async def GetExposed(self
, entities
):
10201 entities : typing.Sequence[~Entity]
10202 Returns -> typing.Sequence[~BoolResult]
10204 # map input types to rpc msg
10206 msg
= dict(Type
='Firewaller', Request
='GetExposed', Version
=3, Params
=params
)
10207 params
['Entities'] = entities
10208 reply
= await self
.rpc(msg
)
10213 @ReturnMapping(StringsResults
)
10214 async def GetMachineActiveSubnets(self
, entities
):
10216 entities : typing.Sequence[~Entity]
10217 Returns -> typing.Sequence[~StringsResult]
10219 # map input types to rpc msg
10221 msg
= dict(Type
='Firewaller', Request
='GetMachineActiveSubnets', Version
=3, Params
=params
)
10222 params
['Entities'] = entities
10223 reply
= await self
.rpc(msg
)
10228 @ReturnMapping(MachinePortsResults
)
10229 async def GetMachinePorts(self
, params
):
10231 params : typing.Sequence[~MachinePorts]
10232 Returns -> typing.Sequence[~MachinePortsResult]
10234 # map input types to rpc msg
10236 msg
= dict(Type
='Firewaller', Request
='GetMachinePorts', Version
=3, Params
=params
)
10237 params
['Params'] = params
10238 reply
= await self
.rpc(msg
)
10243 @ReturnMapping(StringResults
)
10244 async def InstanceId(self
, entities
):
10246 entities : typing.Sequence[~Entity]
10247 Returns -> typing.Sequence[~StringResult]
10249 # map input types to rpc msg
10251 msg
= dict(Type
='Firewaller', Request
='InstanceId', Version
=3, Params
=params
)
10252 params
['Entities'] = entities
10253 reply
= await self
.rpc(msg
)
10258 @ReturnMapping(LifeResults
)
10259 async def Life(self
, entities
):
10261 entities : typing.Sequence[~Entity]
10262 Returns -> typing.Sequence[~LifeResult]
10264 # map input types to rpc msg
10266 msg
= dict(Type
='Firewaller', Request
='Life', Version
=3, Params
=params
)
10267 params
['Entities'] = entities
10268 reply
= await self
.rpc(msg
)
10273 @ReturnMapping(ModelConfigResult
)
10274 async def ModelConfig(self
):
10277 Returns -> typing.Mapping[str, typing.Any]
10279 # map input types to rpc msg
10281 msg
= dict(Type
='Firewaller', Request
='ModelConfig', Version
=3, Params
=params
)
10283 reply
= await self
.rpc(msg
)
10288 @ReturnMapping(NotifyWatchResults
)
10289 async def Watch(self
, entities
):
10291 entities : typing.Sequence[~Entity]
10292 Returns -> typing.Sequence[~NotifyWatchResult]
10294 # map input types to rpc msg
10296 msg
= dict(Type
='Firewaller', Request
='Watch', Version
=3, Params
=params
)
10297 params
['Entities'] = entities
10298 reply
= await self
.rpc(msg
)
10303 @ReturnMapping(NotifyWatchResult
)
10304 async def WatchForModelConfigChanges(self
):
10307 Returns -> typing.Union[_ForwardRef('Error'), str]
10309 # map input types to rpc msg
10311 msg
= dict(Type
='Firewaller', Request
='WatchForModelConfigChanges', Version
=3, Params
=params
)
10313 reply
= await self
.rpc(msg
)
10318 @ReturnMapping(StringsWatchResult
)
10319 async def WatchModelMachines(self
):
10322 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')]
10324 # map input types to rpc msg
10326 msg
= dict(Type
='Firewaller', Request
='WatchModelMachines', Version
=3, Params
=params
)
10328 reply
= await self
.rpc(msg
)
10333 @ReturnMapping(StringsWatchResults
)
10334 async def WatchOpenedPorts(self
, entities
):
10336 entities : typing.Sequence[~Entity]
10337 Returns -> typing.Sequence[~StringsWatchResult]
10339 # map input types to rpc msg
10341 msg
= dict(Type
='Firewaller', Request
='WatchOpenedPorts', Version
=3, Params
=params
)
10342 params
['Entities'] = entities
10343 reply
= await self
.rpc(msg
)
10348 @ReturnMapping(StringsWatchResults
)
10349 async def WatchUnits(self
, entities
):
10351 entities : typing.Sequence[~Entity]
10352 Returns -> typing.Sequence[~StringsWatchResult]
10354 # map input types to rpc msg
10356 msg
= dict(Type
='Firewaller', Request
='WatchUnits', Version
=3, Params
=params
)
10357 params
['Entities'] = entities
10358 reply
= await self
.rpc(msg
)
10362 class HighAvailability(Type
):
10363 name
= 'HighAvailability'
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',
10375 'SpaceProviderId'],
10377 'ControllersChangeResult': {'additionalProperties': False,
10378 'properties': {'Error': {'$ref': '#/definitions/Error'},
10379 'Result': {'$ref': '#/definitions/ControllersChanges'}},
10380 'required': ['Result', 'Error'],
10382 'ControllersChangeResults': {'additionalProperties': False,
10383 'properties': {'Results': {'items': {'$ref': '#/definitions/ControllersChangeResult'},
10385 'required': ['Results'],
10387 'ControllersChanges': {'additionalProperties': False,
10388 'properties': {'added': {'items': {'type': 'string'},
10390 'converted': {'items': {'type': 'string'},
10392 'demoted': {'items': {'type': 'string'},
10394 'maintained': {'items': {'type': 'string'},
10396 'promoted': {'items': {'type': 'string'},
10398 'removed': {'items': {'type': 'string'},
10401 'ControllersSpec': {'additionalProperties': False,
10402 'properties': {'ModelTag': {'type': 'string'},
10403 'constraints': {'$ref': '#/definitions/Value'},
10404 'num-controllers': {'type': 'integer'},
10405 'placement': {'items': {'type': 'string'},
10407 'series': {'type': 'string'}},
10408 'required': ['ModelTag',
10409 'num-controllers'],
10411 'ControllersSpecs': {'additionalProperties': False,
10412 'properties': {'Specs': {'items': {'$ref': '#/definitions/ControllersSpec'},
10414 'required': ['Specs'],
10416 'Error': {'additionalProperties': False,
10417 'properties': {'Code': {'type': 'string'},
10418 'Info': {'$ref': '#/definitions/ErrorInfo'},
10419 'Message': {'type': 'string'}},
10420 'required': ['Message', 'Code'],
10422 'ErrorInfo': {'additionalProperties': False,
10423 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
10424 'MacaroonPath': {'type': 'string'}},
10426 'HAMember': {'additionalProperties': False,
10427 'properties': {'PublicAddress': {'$ref': '#/definitions/Address'},
10428 'Series': {'type': 'string'},
10429 'Tag': {'type': 'string'}},
10430 'required': ['Tag', 'PublicAddress', 'Series'],
10432 'Macaroon': {'additionalProperties': False,
10433 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
10435 'data': {'items': {'type': 'integer'},
10437 'id': {'$ref': '#/definitions/packet'},
10438 'location': {'$ref': '#/definitions/packet'},
10439 'sig': {'items': {'type': 'integer'},
10441 'required': ['data',
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'}},
10457 'Votes': {'type': 'integer'}},
10468 'MongoUpgradeResults': {'additionalProperties': False,
10469 'properties': {'Master': {'$ref': '#/definitions/HAMember'},
10470 'Members': {'items': {'$ref': '#/definitions/HAMember'},
10472 'RsMembers': {'items': {'$ref': '#/definitions/Member'},
10474 'required': ['RsMembers',
10478 'ResumeReplicationParams': {'additionalProperties': False,
10479 'properties': {'Members': {'items': {'$ref': '#/definitions/Member'},
10481 'required': ['Members'],
10483 'UpgradeMongoParams': {'additionalProperties': False,
10484 'properties': {'Target': {'$ref': '#/definitions/Version'}},
10485 'required': ['Target'],
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'},
10497 'tags': {'items': {'type': 'string'},
10499 'virt-type': {'type': 'string'}},
10501 'Version': {'additionalProperties': False,
10502 'properties': {'Major': {'type': 'integer'},
10503 'Minor': {'type': 'integer'},
10504 'Patch': {'type': 'string'},
10505 'StorageEngine': {'type': 'string'}},
10506 'required': ['Major',
10511 'caveat': {'additionalProperties': False,
10512 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
10513 'location': {'$ref': '#/definitions/packet'},
10514 'verificationId': {'$ref': '#/definitions/packet'}},
10515 'required': ['location',
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'}},
10528 'ResumeHAReplicationAfterUpgrade': {'properties': {'Params': {'$ref': '#/definitions/ResumeReplicationParams'}},
10530 'StopHAReplicationForUpgrade': {'properties': {'Params': {'$ref': '#/definitions/UpgradeMongoParams'},
10531 'Result': {'$ref': '#/definitions/MongoUpgradeResults'}},
10532 'type': 'object'}},
10536 @ReturnMapping(ControllersChangeResults
)
10537 async def EnableHA(self
, specs
):
10539 specs : typing.Sequence[~ControllersSpec]
10540 Returns -> typing.Sequence[~ControllersChangeResult]
10542 # map input types to rpc msg
10544 msg
= dict(Type
='HighAvailability', Request
='EnableHA', Version
=2, Params
=params
)
10545 params
['Specs'] = specs
10546 reply
= await self
.rpc(msg
)
10551 @ReturnMapping(None)
10552 async def ResumeHAReplicationAfterUpgrade(self
, members
):
10554 members : typing.Sequence[~Member]
10557 # map input types to rpc msg
10559 msg
= dict(Type
='HighAvailability', Request
='ResumeHAReplicationAfterUpgrade', Version
=2, Params
=params
)
10560 params
['Members'] = members
10561 reply
= await self
.rpc(msg
)
10566 @ReturnMapping(MongoUpgradeResults
)
10567 async def StopHAReplicationForUpgrade(self
, major
, minor
, patch
, storageengine
):
10572 storageengine : str
10573 Returns -> typing.Union[_ForwardRef('HAMember'), typing.Sequence[~Member]]
10575 # map input types to rpc msg
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
)
10586 class HostKeyReporter(Type
):
10587 name
= 'HostKeyReporter'
10589 schema
= {'definitions': {'Error': {'additionalProperties': False,
10590 'properties': {'Code': {'type': 'string'},
10591 'Info': {'$ref': '#/definitions/ErrorInfo'},
10592 'Message': {'type': 'string'}},
10593 'required': ['Message', 'Code'],
10595 'ErrorInfo': {'additionalProperties': False,
10596 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
10597 'MacaroonPath': {'type': 'string'}},
10599 'ErrorResult': {'additionalProperties': False,
10600 'properties': {'Error': {'$ref': '#/definitions/Error'}},
10601 'required': ['Error'],
10603 'ErrorResults': {'additionalProperties': False,
10604 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
10606 'required': ['Results'],
10608 'Macaroon': {'additionalProperties': False,
10609 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
10611 'data': {'items': {'type': 'integer'},
10613 'id': {'$ref': '#/definitions/packet'},
10614 'location': {'$ref': '#/definitions/packet'},
10615 'sig': {'items': {'type': 'integer'},
10617 'required': ['data',
10623 'SSHHostKeySet': {'additionalProperties': False,
10624 'properties': {'entity-keys': {'items': {'$ref': '#/definitions/SSHHostKeys'},
10626 'required': ['entity-keys'],
10628 'SSHHostKeys': {'additionalProperties': False,
10629 'properties': {'public-keys': {'items': {'type': 'string'},
10631 'tag': {'type': 'string'}},
10632 'required': ['tag', 'public-keys'],
10634 'caveat': {'additionalProperties': False,
10635 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
10636 'location': {'$ref': '#/definitions/packet'},
10637 'verificationId': {'$ref': '#/definitions/packet'}},
10638 'required': ['location',
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'}},
10654 @ReturnMapping(ErrorResults
)
10655 async def ReportKeys(self
, entity_keys
):
10657 entity_keys : typing.Sequence[~SSHHostKeys]
10658 Returns -> typing.Sequence[~ErrorResult]
10660 # map input types to rpc msg
10662 msg
= dict(Type
='HostKeyReporter', Request
='ReportKeys', Version
=1, Params
=params
)
10663 params
['entity-keys'] = entity_keys
10664 reply
= await self
.rpc(msg
)
10668 class ImageManager(Type
):
10669 name
= 'ImageManager'
10671 schema
= {'definitions': {'Error': {'additionalProperties': False,
10672 'properties': {'Code': {'type': 'string'},
10673 'Info': {'$ref': '#/definitions/ErrorInfo'},
10674 'Message': {'type': 'string'}},
10675 'required': ['Message', 'Code'],
10677 'ErrorInfo': {'additionalProperties': False,
10678 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
10679 'MacaroonPath': {'type': 'string'}},
10681 'ErrorResult': {'additionalProperties': False,
10682 'properties': {'Error': {'$ref': '#/definitions/Error'}},
10683 'required': ['Error'],
10685 'ErrorResults': {'additionalProperties': False,
10686 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
10688 'required': ['Results'],
10690 'ImageFilterParams': {'additionalProperties': False,
10691 'properties': {'images': {'items': {'$ref': '#/definitions/ImageSpec'},
10693 'required': ['images'],
10695 'ImageMetadata': {'additionalProperties': False,
10696 'properties': {'arch': {'type': 'string'},
10697 'created': {'format': 'date-time',
10699 'kind': {'type': 'string'},
10700 'series': {'type': 'string'},
10701 'url': {'type': 'string'}},
10702 'required': ['kind',
10708 'ImageSpec': {'additionalProperties': False,
10709 'properties': {'arch': {'type': 'string'},
10710 'kind': {'type': 'string'},
10711 'series': {'type': 'string'}},
10712 'required': ['kind', 'arch', 'series'],
10714 'ListImageResult': {'additionalProperties': False,
10715 'properties': {'result': {'items': {'$ref': '#/definitions/ImageMetadata'},
10717 'required': ['result'],
10719 'Macaroon': {'additionalProperties': False,
10720 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
10722 'data': {'items': {'type': 'integer'},
10724 'id': {'$ref': '#/definitions/packet'},
10725 'location': {'$ref': '#/definitions/packet'},
10726 'sig': {'items': {'type': 'integer'},
10728 'required': ['data',
10734 'caveat': {'additionalProperties': False,
10735 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
10736 'location': {'$ref': '#/definitions/packet'},
10737 'verificationId': {'$ref': '#/definitions/packet'}},
10738 'required': ['location',
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'}},
10751 'ListImages': {'properties': {'Params': {'$ref': '#/definitions/ImageFilterParams'},
10752 'Result': {'$ref': '#/definitions/ListImageResult'}},
10753 'type': 'object'}},
10757 @ReturnMapping(ErrorResults
)
10758 async def DeleteImages(self
, images
):
10760 images : typing.Sequence[~ImageSpec]
10761 Returns -> typing.Sequence[~ErrorResult]
10763 # map input types to rpc msg
10765 msg
= dict(Type
='ImageManager', Request
='DeleteImages', Version
=2, Params
=params
)
10766 params
['images'] = images
10767 reply
= await self
.rpc(msg
)
10772 @ReturnMapping(ListImageResult
)
10773 async def ListImages(self
, images
):
10775 images : typing.Sequence[~ImageSpec]
10776 Returns -> typing.Sequence[~ImageMetadata]
10778 # map input types to rpc msg
10780 msg
= dict(Type
='ImageManager', Request
='ListImages', Version
=2, Params
=params
)
10781 params
['images'] = images
10782 reply
= await self
.rpc(msg
)
10786 class ImageMetadata(Type
):
10787 name
= 'ImageMetadata'
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',
10809 'CloudImageMetadataList': {'additionalProperties': False,
10810 'properties': {'metadata': {'items': {'$ref': '#/definitions/CloudImageMetadata'},
10813 'Error': {'additionalProperties': False,
10814 'properties': {'Code': {'type': 'string'},
10815 'Info': {'$ref': '#/definitions/ErrorInfo'},
10816 'Message': {'type': 'string'}},
10817 'required': ['Message', 'Code'],
10819 'ErrorInfo': {'additionalProperties': False,
10820 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
10821 'MacaroonPath': {'type': 'string'}},
10823 'ErrorResult': {'additionalProperties': False,
10824 'properties': {'Error': {'$ref': '#/definitions/Error'}},
10825 'required': ['Error'],
10827 'ErrorResults': {'additionalProperties': False,
10828 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
10830 'required': ['Results'],
10832 'ImageMetadataFilter': {'additionalProperties': False,
10833 'properties': {'arches': {'items': {'type': 'string'},
10835 'region': {'type': 'string'},
10836 'root-storage-type': {'type': 'string'},
10837 'series': {'items': {'type': 'string'},
10839 'stream': {'type': 'string'},
10840 'virt_type': {'type': 'string'}},
10842 'ListCloudImageMetadataResult': {'additionalProperties': False,
10843 'properties': {'result': {'items': {'$ref': '#/definitions/CloudImageMetadata'},
10845 'required': ['result'],
10847 'Macaroon': {'additionalProperties': False,
10848 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
10850 'data': {'items': {'type': 'integer'},
10852 'id': {'$ref': '#/definitions/packet'},
10853 'location': {'$ref': '#/definitions/packet'},
10854 'sig': {'items': {'type': 'integer'},
10856 'required': ['data',
10862 'MetadataImageIds': {'additionalProperties': False,
10863 'properties': {'image_ids': {'items': {'type': 'string'},
10865 'required': ['image_ids'],
10867 'MetadataSaveParams': {'additionalProperties': False,
10868 'properties': {'metadata': {'items': {'$ref': '#/definitions/CloudImageMetadataList'},
10871 'caveat': {'additionalProperties': False,
10872 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
10873 'location': {'$ref': '#/definitions/packet'},
10874 'verificationId': {'$ref': '#/definitions/packet'}},
10875 'required': ['location',
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'}},
10888 'List': {'properties': {'Params': {'$ref': '#/definitions/ImageMetadataFilter'},
10889 'Result': {'$ref': '#/definitions/ListCloudImageMetadataResult'}},
10891 'Save': {'properties': {'Params': {'$ref': '#/definitions/MetadataSaveParams'},
10892 'Result': {'$ref': '#/definitions/ErrorResults'}},
10894 'UpdateFromPublishedImages': {'type': 'object'}},
10898 @ReturnMapping(ErrorResults
)
10899 async def Delete(self
, image_ids
):
10901 image_ids : typing.Sequence[str]
10902 Returns -> typing.Sequence[~ErrorResult]
10904 # map input types to rpc msg
10906 msg
= dict(Type
='ImageMetadata', Request
='Delete', Version
=2, Params
=params
)
10907 params
['image_ids'] = image_ids
10908 reply
= await self
.rpc(msg
)
10913 @ReturnMapping(ListCloudImageMetadataResult
)
10914 async def List(self
, arches
, region
, root_storage_type
, series
, stream
, virt_type
):
10916 arches : typing.Sequence[str]
10918 root_storage_type : str
10919 series : typing.Sequence[str]
10922 Returns -> typing.Sequence[~CloudImageMetadata]
10924 # map input types to rpc msg
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
)
10938 @ReturnMapping(ErrorResults
)
10939 async def Save(self
, metadata
):
10941 metadata : typing.Sequence[~CloudImageMetadataList]
10942 Returns -> typing.Sequence[~ErrorResult]
10944 # map input types to rpc msg
10946 msg
= dict(Type
='ImageMetadata', Request
='Save', Version
=2, Params
=params
)
10947 params
['metadata'] = metadata
10948 reply
= await self
.rpc(msg
)
10953 @ReturnMapping(None)
10954 async def UpdateFromPublishedImages(self
):
10959 # map input types to rpc msg
10961 msg
= dict(Type
='ImageMetadata', Request
='UpdateFromPublishedImages', Version
=2, Params
=params
)
10963 reply
= await self
.rpc(msg
)
10967 class InstancePoller(Type
):
10968 name
= 'InstancePoller'
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'],
10977 'BoolResult': {'additionalProperties': False,
10978 'properties': {'Error': {'$ref': '#/definitions/Error'},
10979 'Result': {'type': 'boolean'}},
10980 'required': ['Error', 'Result'],
10982 'BoolResults': {'additionalProperties': False,
10983 'properties': {'Results': {'items': {'$ref': '#/definitions/BoolResult'},
10985 'required': ['Results'],
10987 'Entities': {'additionalProperties': False,
10988 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
10990 'required': ['Entities'],
10992 'Entity': {'additionalProperties': False,
10993 'properties': {'Tag': {'type': 'string'}},
10994 'required': ['Tag'],
10996 'EntityStatusArgs': {'additionalProperties': False,
10997 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
10998 'type': 'object'}},
11000 'Info': {'type': 'string'},
11001 'Status': {'type': 'string'},
11002 'Tag': {'type': 'string'}},
11003 'required': ['Tag',
11008 'Error': {'additionalProperties': False,
11009 'properties': {'Code': {'type': 'string'},
11010 'Info': {'$ref': '#/definitions/ErrorInfo'},
11011 'Message': {'type': 'string'}},
11012 'required': ['Message', 'Code'],
11014 'ErrorInfo': {'additionalProperties': False,
11015 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
11016 'MacaroonPath': {'type': 'string'}},
11018 'ErrorResult': {'additionalProperties': False,
11019 'properties': {'Error': {'$ref': '#/definitions/Error'}},
11020 'required': ['Error'],
11022 'ErrorResults': {'additionalProperties': False,
11023 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
11025 'required': ['Results'],
11027 'LifeResult': {'additionalProperties': False,
11028 'properties': {'Error': {'$ref': '#/definitions/Error'},
11029 'Life': {'type': 'string'}},
11030 'required': ['Life', 'Error'],
11032 'LifeResults': {'additionalProperties': False,
11033 'properties': {'Results': {'items': {'$ref': '#/definitions/LifeResult'},
11035 'required': ['Results'],
11037 'Macaroon': {'additionalProperties': False,
11038 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
11040 'data': {'items': {'type': 'integer'},
11042 'id': {'$ref': '#/definitions/packet'},
11043 'location': {'$ref': '#/definitions/packet'},
11044 'sig': {'items': {'type': 'integer'},
11046 'required': ['data',
11052 'MachineAddresses': {'additionalProperties': False,
11053 'properties': {'Addresses': {'items': {'$ref': '#/definitions/Address'},
11055 'Tag': {'type': 'string'}},
11056 'required': ['Tag', 'Addresses'],
11058 'MachineAddressesResult': {'additionalProperties': False,
11059 'properties': {'Addresses': {'items': {'$ref': '#/definitions/Address'},
11061 'Error': {'$ref': '#/definitions/Error'}},
11062 'required': ['Error', 'Addresses'],
11064 'MachineAddressesResults': {'additionalProperties': False,
11065 'properties': {'Results': {'items': {'$ref': '#/definitions/MachineAddressesResult'},
11067 'required': ['Results'],
11069 'ModelConfigResult': {'additionalProperties': False,
11070 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
11071 'type': 'object'}},
11072 'type': 'object'}},
11073 'required': ['Config'],
11075 'NotifyWatchResult': {'additionalProperties': False,
11076 'properties': {'Error': {'$ref': '#/definitions/Error'},
11077 'NotifyWatcherId': {'type': 'string'}},
11078 'required': ['NotifyWatcherId', 'Error'],
11080 'SetMachinesAddresses': {'additionalProperties': False,
11081 'properties': {'MachineAddresses': {'items': {'$ref': '#/definitions/MachineAddresses'},
11083 'required': ['MachineAddresses'],
11085 'SetStatus': {'additionalProperties': False,
11086 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
11088 'required': ['Entities'],
11090 'StatusResult': {'additionalProperties': False,
11091 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
11092 'type': 'object'}},
11094 'Error': {'$ref': '#/definitions/Error'},
11095 'Id': {'type': 'string'},
11096 'Info': {'type': 'string'},
11097 'Life': {'type': 'string'},
11098 'Since': {'format': 'date-time',
11100 'Status': {'type': 'string'}},
11101 'required': ['Error',
11109 'StatusResults': {'additionalProperties': False,
11110 'properties': {'Results': {'items': {'$ref': '#/definitions/StatusResult'},
11112 'required': ['Results'],
11114 'StringResult': {'additionalProperties': False,
11115 'properties': {'Error': {'$ref': '#/definitions/Error'},
11116 'Result': {'type': 'string'}},
11117 'required': ['Error', 'Result'],
11119 'StringResults': {'additionalProperties': False,
11120 'properties': {'Results': {'items': {'$ref': '#/definitions/StringResult'},
11122 'required': ['Results'],
11124 'StringsWatchResult': {'additionalProperties': False,
11125 'properties': {'Changes': {'items': {'type': 'string'},
11127 'Error': {'$ref': '#/definitions/Error'},
11128 'StringsWatcherId': {'type': 'string'}},
11129 'required': ['StringsWatcherId',
11133 'caveat': {'additionalProperties': False,
11134 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
11135 'location': {'$ref': '#/definitions/packet'},
11136 'verificationId': {'$ref': '#/definitions/packet'}},
11137 'required': ['location',
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'}},
11150 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11151 'Result': {'$ref': '#/definitions/StringResults'}},
11153 'InstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11154 'Result': {'$ref': '#/definitions/StatusResults'}},
11156 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11157 'Result': {'$ref': '#/definitions/LifeResults'}},
11159 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
11161 'ProviderAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11162 'Result': {'$ref': '#/definitions/MachineAddressesResults'}},
11164 'SetInstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
11165 'Result': {'$ref': '#/definitions/ErrorResults'}},
11167 'SetProviderAddresses': {'properties': {'Params': {'$ref': '#/definitions/SetMachinesAddresses'},
11168 'Result': {'$ref': '#/definitions/ErrorResults'}},
11170 'Status': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11171 'Result': {'$ref': '#/definitions/StatusResults'}},
11173 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
11175 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
11176 'type': 'object'}},
11180 @ReturnMapping(BoolResults
)
11181 async def AreManuallyProvisioned(self
, entities
):
11183 entities : typing.Sequence[~Entity]
11184 Returns -> typing.Sequence[~BoolResult]
11186 # map input types to rpc msg
11188 msg
= dict(Type
='InstancePoller', Request
='AreManuallyProvisioned', Version
=3, Params
=params
)
11189 params
['Entities'] = entities
11190 reply
= await self
.rpc(msg
)
11195 @ReturnMapping(StringResults
)
11196 async def InstanceId(self
, entities
):
11198 entities : typing.Sequence[~Entity]
11199 Returns -> typing.Sequence[~StringResult]
11201 # map input types to rpc msg
11203 msg
= dict(Type
='InstancePoller', Request
='InstanceId', Version
=3, Params
=params
)
11204 params
['Entities'] = entities
11205 reply
= await self
.rpc(msg
)
11210 @ReturnMapping(StatusResults
)
11211 async def InstanceStatus(self
, entities
):
11213 entities : typing.Sequence[~Entity]
11214 Returns -> typing.Sequence[~StatusResult]
11216 # map input types to rpc msg
11218 msg
= dict(Type
='InstancePoller', Request
='InstanceStatus', Version
=3, Params
=params
)
11219 params
['Entities'] = entities
11220 reply
= await self
.rpc(msg
)
11225 @ReturnMapping(LifeResults
)
11226 async def Life(self
, entities
):
11228 entities : typing.Sequence[~Entity]
11229 Returns -> typing.Sequence[~LifeResult]
11231 # map input types to rpc msg
11233 msg
= dict(Type
='InstancePoller', Request
='Life', Version
=3, Params
=params
)
11234 params
['Entities'] = entities
11235 reply
= await self
.rpc(msg
)
11240 @ReturnMapping(ModelConfigResult
)
11241 async def ModelConfig(self
):
11244 Returns -> typing.Mapping[str, typing.Any]
11246 # map input types to rpc msg
11248 msg
= dict(Type
='InstancePoller', Request
='ModelConfig', Version
=3, Params
=params
)
11250 reply
= await self
.rpc(msg
)
11255 @ReturnMapping(MachineAddressesResults
)
11256 async def ProviderAddresses(self
, entities
):
11258 entities : typing.Sequence[~Entity]
11259 Returns -> typing.Sequence[~MachineAddressesResult]
11261 # map input types to rpc msg
11263 msg
= dict(Type
='InstancePoller', Request
='ProviderAddresses', Version
=3, Params
=params
)
11264 params
['Entities'] = entities
11265 reply
= await self
.rpc(msg
)
11270 @ReturnMapping(ErrorResults
)
11271 async def SetInstanceStatus(self
, entities
):
11273 entities : typing.Sequence[~EntityStatusArgs]
11274 Returns -> typing.Sequence[~ErrorResult]
11276 # map input types to rpc msg
11278 msg
= dict(Type
='InstancePoller', Request
='SetInstanceStatus', Version
=3, Params
=params
)
11279 params
['Entities'] = entities
11280 reply
= await self
.rpc(msg
)
11285 @ReturnMapping(ErrorResults
)
11286 async def SetProviderAddresses(self
, machineaddresses
):
11288 machineaddresses : typing.Sequence[~MachineAddresses]
11289 Returns -> typing.Sequence[~ErrorResult]
11291 # map input types to rpc msg
11293 msg
= dict(Type
='InstancePoller', Request
='SetProviderAddresses', Version
=3, Params
=params
)
11294 params
['MachineAddresses'] = machineaddresses
11295 reply
= await self
.rpc(msg
)
11300 @ReturnMapping(StatusResults
)
11301 async def Status(self
, entities
):
11303 entities : typing.Sequence[~Entity]
11304 Returns -> typing.Sequence[~StatusResult]
11306 # map input types to rpc msg
11308 msg
= dict(Type
='InstancePoller', Request
='Status', Version
=3, Params
=params
)
11309 params
['Entities'] = entities
11310 reply
= await self
.rpc(msg
)
11315 @ReturnMapping(NotifyWatchResult
)
11316 async def WatchForModelConfigChanges(self
):
11319 Returns -> typing.Union[_ForwardRef('Error'), str]
11321 # map input types to rpc msg
11323 msg
= dict(Type
='InstancePoller', Request
='WatchForModelConfigChanges', Version
=3, Params
=params
)
11325 reply
= await self
.rpc(msg
)
11330 @ReturnMapping(StringsWatchResult
)
11331 async def WatchModelMachines(self
):
11334 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')]
11336 # map input types to rpc msg
11338 msg
= dict(Type
='InstancePoller', Request
='WatchModelMachines', Version
=3, Params
=params
)
11340 reply
= await self
.rpc(msg
)
11344 class KeyManager(Type
):
11345 name
= 'KeyManager'
11347 schema
= {'definitions': {'Entities': {'additionalProperties': False,
11348 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
11350 'required': ['Entities'],
11352 'Entity': {'additionalProperties': False,
11353 'properties': {'Tag': {'type': 'string'}},
11354 'required': ['Tag'],
11356 'Error': {'additionalProperties': False,
11357 'properties': {'Code': {'type': 'string'},
11358 'Info': {'$ref': '#/definitions/ErrorInfo'},
11359 'Message': {'type': 'string'}},
11360 'required': ['Message', 'Code'],
11362 'ErrorInfo': {'additionalProperties': False,
11363 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
11364 'MacaroonPath': {'type': 'string'}},
11366 'ErrorResult': {'additionalProperties': False,
11367 'properties': {'Error': {'$ref': '#/definitions/Error'}},
11368 'required': ['Error'],
11370 'ErrorResults': {'additionalProperties': False,
11371 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
11373 'required': ['Results'],
11375 'ListSSHKeys': {'additionalProperties': False,
11376 'properties': {'Entities': {'$ref': '#/definitions/Entities'},
11377 'Mode': {'type': 'boolean'}},
11378 'required': ['Entities', 'Mode'],
11380 'Macaroon': {'additionalProperties': False,
11381 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
11383 'data': {'items': {'type': 'integer'},
11385 'id': {'$ref': '#/definitions/packet'},
11386 'location': {'$ref': '#/definitions/packet'},
11387 'sig': {'items': {'type': 'integer'},
11389 'required': ['data',
11395 'ModifyUserSSHKeys': {'additionalProperties': False,
11396 'properties': {'Keys': {'items': {'type': 'string'},
11398 'User': {'type': 'string'}},
11399 'required': ['User', 'Keys'],
11401 'StringsResult': {'additionalProperties': False,
11402 'properties': {'Error': {'$ref': '#/definitions/Error'},
11403 'Result': {'items': {'type': 'string'},
11405 'required': ['Error', 'Result'],
11407 'StringsResults': {'additionalProperties': False,
11408 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsResult'},
11410 'required': ['Results'],
11412 'caveat': {'additionalProperties': False,
11413 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
11414 'location': {'$ref': '#/definitions/packet'},
11415 'verificationId': {'$ref': '#/definitions/packet'}},
11416 'required': ['location',
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'}},
11429 'DeleteKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'},
11430 'Result': {'$ref': '#/definitions/ErrorResults'}},
11432 'ImportKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'},
11433 'Result': {'$ref': '#/definitions/ErrorResults'}},
11435 'ListKeys': {'properties': {'Params': {'$ref': '#/definitions/ListSSHKeys'},
11436 'Result': {'$ref': '#/definitions/StringsResults'}},
11437 'type': 'object'}},
11441 @ReturnMapping(ErrorResults
)
11442 async def AddKeys(self
, keys
, user
):
11444 keys : typing.Sequence[str]
11446 Returns -> typing.Sequence[~ErrorResult]
11448 # map input types to rpc msg
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
)
11458 @ReturnMapping(ErrorResults
)
11459 async def DeleteKeys(self
, keys
, user
):
11461 keys : typing.Sequence[str]
11463 Returns -> typing.Sequence[~ErrorResult]
11465 # map input types to rpc msg
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
)
11475 @ReturnMapping(ErrorResults
)
11476 async def ImportKeys(self
, keys
, user
):
11478 keys : typing.Sequence[str]
11480 Returns -> typing.Sequence[~ErrorResult]
11482 # map input types to rpc msg
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
)
11492 @ReturnMapping(StringsResults
)
11493 async def ListKeys(self
, entities
, mode
):
11495 entities : Entities
11497 Returns -> typing.Sequence[~StringsResult]
11499 # map input types to rpc msg
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
)
11508 class KeyUpdater(Type
):
11509 name
= 'KeyUpdater'
11511 schema
= {'definitions': {'Entities': {'additionalProperties': False,
11512 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
11514 'required': ['Entities'],
11516 'Entity': {'additionalProperties': False,
11517 'properties': {'Tag': {'type': 'string'}},
11518 'required': ['Tag'],
11520 'Error': {'additionalProperties': False,
11521 'properties': {'Code': {'type': 'string'},
11522 'Info': {'$ref': '#/definitions/ErrorInfo'},
11523 'Message': {'type': 'string'}},
11524 'required': ['Message', 'Code'],
11526 'ErrorInfo': {'additionalProperties': False,
11527 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
11528 'MacaroonPath': {'type': 'string'}},
11530 'Macaroon': {'additionalProperties': False,
11531 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
11533 'data': {'items': {'type': 'integer'},
11535 'id': {'$ref': '#/definitions/packet'},
11536 'location': {'$ref': '#/definitions/packet'},
11537 'sig': {'items': {'type': 'integer'},
11539 'required': ['data',
11545 'NotifyWatchResult': {'additionalProperties': False,
11546 'properties': {'Error': {'$ref': '#/definitions/Error'},
11547 'NotifyWatcherId': {'type': 'string'}},
11548 'required': ['NotifyWatcherId', 'Error'],
11550 'NotifyWatchResults': {'additionalProperties': False,
11551 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
11553 'required': ['Results'],
11555 'StringsResult': {'additionalProperties': False,
11556 'properties': {'Error': {'$ref': '#/definitions/Error'},
11557 'Result': {'items': {'type': 'string'},
11559 'required': ['Error', 'Result'],
11561 'StringsResults': {'additionalProperties': False,
11562 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsResult'},
11564 'required': ['Results'],
11566 'caveat': {'additionalProperties': False,
11567 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
11568 'location': {'$ref': '#/definitions/packet'},
11569 'verificationId': {'$ref': '#/definitions/packet'}},
11570 'required': ['location',
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'}},
11583 'WatchAuthorisedKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11584 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
11585 'type': 'object'}},
11589 @ReturnMapping(StringsResults
)
11590 async def AuthorisedKeys(self
, entities
):
11592 entities : typing.Sequence[~Entity]
11593 Returns -> typing.Sequence[~StringsResult]
11595 # map input types to rpc msg
11597 msg
= dict(Type
='KeyUpdater', Request
='AuthorisedKeys', Version
=1, Params
=params
)
11598 params
['Entities'] = entities
11599 reply
= await self
.rpc(msg
)
11604 @ReturnMapping(NotifyWatchResults
)
11605 async def WatchAuthorisedKeys(self
, entities
):
11607 entities : typing.Sequence[~Entity]
11608 Returns -> typing.Sequence[~NotifyWatchResult]
11610 # map input types to rpc msg
11612 msg
= dict(Type
='KeyUpdater', Request
='WatchAuthorisedKeys', Version
=1, Params
=params
)
11613 params
['Entities'] = entities
11614 reply
= await self
.rpc(msg
)
11618 class LeadershipService(Type
):
11619 name
= 'LeadershipService'
11621 schema
= {'definitions': {'ApplicationTag': {'additionalProperties': False,
11622 'properties': {'Name': {'type': 'string'}},
11623 'required': ['Name'],
11625 'ClaimLeadershipBulkParams': {'additionalProperties': False,
11626 'properties': {'Params': {'items': {'$ref': '#/definitions/ClaimLeadershipParams'},
11628 'required': ['Params'],
11630 'ClaimLeadershipBulkResults': {'additionalProperties': False,
11631 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
11633 'required': ['Results'],
11635 'ClaimLeadershipParams': {'additionalProperties': False,
11636 'properties': {'ApplicationTag': {'type': 'string'},
11637 'DurationSeconds': {'type': 'number'},
11638 'UnitTag': {'type': 'string'}},
11639 'required': ['ApplicationTag',
11641 'DurationSeconds'],
11643 'Error': {'additionalProperties': False,
11644 'properties': {'Code': {'type': 'string'},
11645 'Info': {'$ref': '#/definitions/ErrorInfo'},
11646 'Message': {'type': 'string'}},
11647 'required': ['Message', 'Code'],
11649 'ErrorInfo': {'additionalProperties': False,
11650 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
11651 'MacaroonPath': {'type': 'string'}},
11653 'ErrorResult': {'additionalProperties': False,
11654 'properties': {'Error': {'$ref': '#/definitions/Error'}},
11655 'required': ['Error'],
11657 'Macaroon': {'additionalProperties': False,
11658 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
11660 'data': {'items': {'type': 'integer'},
11662 'id': {'$ref': '#/definitions/packet'},
11663 'location': {'$ref': '#/definitions/packet'},
11664 'sig': {'items': {'type': 'integer'},
11666 'required': ['data',
11672 'caveat': {'additionalProperties': False,
11673 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
11674 'location': {'$ref': '#/definitions/packet'},
11675 'verificationId': {'$ref': '#/definitions/packet'}},
11676 'required': ['location',
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'}},
11689 'ClaimLeadership': {'properties': {'Params': {'$ref': '#/definitions/ClaimLeadershipBulkParams'},
11690 'Result': {'$ref': '#/definitions/ClaimLeadershipBulkResults'}},
11691 'type': 'object'}},
11695 @ReturnMapping(ErrorResult
)
11696 async def BlockUntilLeadershipReleased(self
, name
):
11701 # map input types to rpc msg
11703 msg
= dict(Type
='LeadershipService', Request
='BlockUntilLeadershipReleased', Version
=2, Params
=params
)
11704 params
['Name'] = name
11705 reply
= await self
.rpc(msg
)
11710 @ReturnMapping(ClaimLeadershipBulkResults
)
11711 async def ClaimLeadership(self
, params
):
11713 params : typing.Sequence[~ClaimLeadershipParams]
11714 Returns -> typing.Sequence[~ErrorResult]
11716 # map input types to rpc msg
11718 msg
= dict(Type
='LeadershipService', Request
='ClaimLeadership', Version
=2, Params
=params
)
11719 params
['Params'] = params
11720 reply
= await self
.rpc(msg
)
11724 class LifeFlag(Type
):
11727 schema
= {'definitions': {'Entities': {'additionalProperties': False,
11728 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
11730 'required': ['Entities'],
11732 'Entity': {'additionalProperties': False,
11733 'properties': {'Tag': {'type': 'string'}},
11734 'required': ['Tag'],
11736 'Error': {'additionalProperties': False,
11737 'properties': {'Code': {'type': 'string'},
11738 'Info': {'$ref': '#/definitions/ErrorInfo'},
11739 'Message': {'type': 'string'}},
11740 'required': ['Message', 'Code'],
11742 'ErrorInfo': {'additionalProperties': False,
11743 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
11744 'MacaroonPath': {'type': 'string'}},
11746 'LifeResult': {'additionalProperties': False,
11747 'properties': {'Error': {'$ref': '#/definitions/Error'},
11748 'Life': {'type': 'string'}},
11749 'required': ['Life', 'Error'],
11751 'LifeResults': {'additionalProperties': False,
11752 'properties': {'Results': {'items': {'$ref': '#/definitions/LifeResult'},
11754 'required': ['Results'],
11756 'Macaroon': {'additionalProperties': False,
11757 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
11759 'data': {'items': {'type': 'integer'},
11761 'id': {'$ref': '#/definitions/packet'},
11762 'location': {'$ref': '#/definitions/packet'},
11763 'sig': {'items': {'type': 'integer'},
11765 'required': ['data',
11771 'NotifyWatchResult': {'additionalProperties': False,
11772 'properties': {'Error': {'$ref': '#/definitions/Error'},
11773 'NotifyWatcherId': {'type': 'string'}},
11774 'required': ['NotifyWatcherId', 'Error'],
11776 'NotifyWatchResults': {'additionalProperties': False,
11777 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
11779 'required': ['Results'],
11781 'caveat': {'additionalProperties': False,
11782 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
11783 'location': {'$ref': '#/definitions/packet'},
11784 'verificationId': {'$ref': '#/definitions/packet'}},
11785 'required': ['location',
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'}},
11798 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11799 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
11800 'type': 'object'}},
11804 @ReturnMapping(LifeResults
)
11805 async def Life(self
, entities
):
11807 entities : typing.Sequence[~Entity]
11808 Returns -> typing.Sequence[~LifeResult]
11810 # map input types to rpc msg
11812 msg
= dict(Type
='LifeFlag', Request
='Life', Version
=1, Params
=params
)
11813 params
['Entities'] = entities
11814 reply
= await self
.rpc(msg
)
11819 @ReturnMapping(NotifyWatchResults
)
11820 async def Watch(self
, entities
):
11822 entities : typing.Sequence[~Entity]
11823 Returns -> typing.Sequence[~NotifyWatchResult]
11825 # map input types to rpc msg
11827 msg
= dict(Type
='LifeFlag', Request
='Watch', Version
=1, Params
=params
)
11828 params
['Entities'] = entities
11829 reply
= await self
.rpc(msg
)
11833 class Logger(Type
):
11836 schema
= {'definitions': {'Entities': {'additionalProperties': False,
11837 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
11839 'required': ['Entities'],
11841 'Entity': {'additionalProperties': False,
11842 'properties': {'Tag': {'type': 'string'}},
11843 'required': ['Tag'],
11845 'Error': {'additionalProperties': False,
11846 'properties': {'Code': {'type': 'string'},
11847 'Info': {'$ref': '#/definitions/ErrorInfo'},
11848 'Message': {'type': 'string'}},
11849 'required': ['Message', 'Code'],
11851 'ErrorInfo': {'additionalProperties': False,
11852 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
11853 'MacaroonPath': {'type': 'string'}},
11855 'Macaroon': {'additionalProperties': False,
11856 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
11858 'data': {'items': {'type': 'integer'},
11860 'id': {'$ref': '#/definitions/packet'},
11861 'location': {'$ref': '#/definitions/packet'},
11862 'sig': {'items': {'type': 'integer'},
11864 'required': ['data',
11870 'NotifyWatchResult': {'additionalProperties': False,
11871 'properties': {'Error': {'$ref': '#/definitions/Error'},
11872 'NotifyWatcherId': {'type': 'string'}},
11873 'required': ['NotifyWatcherId', 'Error'],
11875 'NotifyWatchResults': {'additionalProperties': False,
11876 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
11878 'required': ['Results'],
11880 'StringResult': {'additionalProperties': False,
11881 'properties': {'Error': {'$ref': '#/definitions/Error'},
11882 'Result': {'type': 'string'}},
11883 'required': ['Error', 'Result'],
11885 'StringResults': {'additionalProperties': False,
11886 'properties': {'Results': {'items': {'$ref': '#/definitions/StringResult'},
11888 'required': ['Results'],
11890 'caveat': {'additionalProperties': False,
11891 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
11892 'location': {'$ref': '#/definitions/packet'},
11893 'verificationId': {'$ref': '#/definitions/packet'}},
11894 'required': ['location',
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'}},
11907 'WatchLoggingConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11908 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
11909 'type': 'object'}},
11913 @ReturnMapping(StringResults
)
11914 async def LoggingConfig(self
, entities
):
11916 entities : typing.Sequence[~Entity]
11917 Returns -> typing.Sequence[~StringResult]
11919 # map input types to rpc msg
11921 msg
= dict(Type
='Logger', Request
='LoggingConfig', Version
=1, Params
=params
)
11922 params
['Entities'] = entities
11923 reply
= await self
.rpc(msg
)
11928 @ReturnMapping(NotifyWatchResults
)
11929 async def WatchLoggingConfig(self
, entities
):
11931 entities : typing.Sequence[~Entity]
11932 Returns -> typing.Sequence[~NotifyWatchResult]
11934 # map input types to rpc msg
11936 msg
= dict(Type
='Logger', Request
='WatchLoggingConfig', Version
=1, Params
=params
)
11937 params
['Entities'] = entities
11938 reply
= await self
.rpc(msg
)
11942 class MachineActions(Type
):
11943 name
= 'MachineActions'
11945 schema
= {'definitions': {'Action': {'additionalProperties': False,
11946 'properties': {'name': {'type': 'string'},
11947 'parameters': {'patternProperties': {'.*': {'additionalProperties': True,
11948 'type': 'object'}},
11950 'receiver': {'type': 'string'},
11951 'tag': {'type': 'string'}},
11952 'required': ['tag', 'receiver', 'name'],
11954 'ActionExecutionResult': {'additionalProperties': False,
11955 'properties': {'actiontag': {'type': 'string'},
11956 'message': {'type': 'string'},
11957 'results': {'patternProperties': {'.*': {'additionalProperties': True,
11958 'type': 'object'}},
11960 'status': {'type': 'string'}},
11961 'required': ['actiontag', 'status'],
11963 'ActionExecutionResults': {'additionalProperties': False,
11964 'properties': {'results': {'items': {'$ref': '#/definitions/ActionExecutionResult'},
11967 'ActionResult': {'additionalProperties': False,
11968 'properties': {'action': {'$ref': '#/definitions/Action'},
11969 'completed': {'format': 'date-time',
11971 'enqueued': {'format': 'date-time',
11973 'error': {'$ref': '#/definitions/Error'},
11974 'message': {'type': 'string'},
11975 'output': {'patternProperties': {'.*': {'additionalProperties': True,
11976 'type': 'object'}},
11978 'started': {'format': 'date-time',
11980 'status': {'type': 'string'}},
11982 'ActionResults': {'additionalProperties': False,
11983 'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'},
11986 'ActionsByReceiver': {'additionalProperties': False,
11987 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'},
11989 'error': {'$ref': '#/definitions/Error'},
11990 'receiver': {'type': 'string'}},
11992 'ActionsByReceivers': {'additionalProperties': False,
11993 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByReceiver'},
11996 'Entities': {'additionalProperties': False,
11997 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
11999 'required': ['Entities'],
12001 'Entity': {'additionalProperties': False,
12002 'properties': {'Tag': {'type': 'string'}},
12003 'required': ['Tag'],
12005 'Error': {'additionalProperties': False,
12006 'properties': {'Code': {'type': 'string'},
12007 'Info': {'$ref': '#/definitions/ErrorInfo'},
12008 'Message': {'type': 'string'}},
12009 'required': ['Message', 'Code'],
12011 'ErrorInfo': {'additionalProperties': False,
12012 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
12013 'MacaroonPath': {'type': 'string'}},
12015 'ErrorResult': {'additionalProperties': False,
12016 'properties': {'Error': {'$ref': '#/definitions/Error'}},
12017 'required': ['Error'],
12019 'ErrorResults': {'additionalProperties': False,
12020 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
12022 'required': ['Results'],
12024 'Macaroon': {'additionalProperties': False,
12025 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
12027 'data': {'items': {'type': 'integer'},
12029 'id': {'$ref': '#/definitions/packet'},
12030 'location': {'$ref': '#/definitions/packet'},
12031 'sig': {'items': {'type': 'integer'},
12033 'required': ['data',
12039 'StringsWatchResult': {'additionalProperties': False,
12040 'properties': {'Changes': {'items': {'type': 'string'},
12042 'Error': {'$ref': '#/definitions/Error'},
12043 'StringsWatcherId': {'type': 'string'}},
12044 'required': ['StringsWatcherId',
12048 'StringsWatchResults': {'additionalProperties': False,
12049 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
12051 'required': ['Results'],
12053 'caveat': {'additionalProperties': False,
12054 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
12055 'location': {'$ref': '#/definitions/packet'},
12056 'verificationId': {'$ref': '#/definitions/packet'}},
12057 'required': ['location',
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'}},
12070 'BeginActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12071 'Result': {'$ref': '#/definitions/ErrorResults'}},
12073 'FinishActions': {'properties': {'Params': {'$ref': '#/definitions/ActionExecutionResults'},
12074 'Result': {'$ref': '#/definitions/ErrorResults'}},
12076 'RunningActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12077 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
12079 'WatchActionNotifications': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12080 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
12081 'type': 'object'}},
12085 @ReturnMapping(ActionResults
)
12086 async def Actions(self
, entities
):
12088 entities : typing.Sequence[~Entity]
12089 Returns -> typing.Sequence[~ActionResult]
12091 # map input types to rpc msg
12093 msg
= dict(Type
='MachineActions', Request
='Actions', Version
=1, Params
=params
)
12094 params
['Entities'] = entities
12095 reply
= await self
.rpc(msg
)
12100 @ReturnMapping(ErrorResults
)
12101 async def BeginActions(self
, entities
):
12103 entities : typing.Sequence[~Entity]
12104 Returns -> typing.Sequence[~ErrorResult]
12106 # map input types to rpc msg
12108 msg
= dict(Type
='MachineActions', Request
='BeginActions', Version
=1, Params
=params
)
12109 params
['Entities'] = entities
12110 reply
= await self
.rpc(msg
)
12115 @ReturnMapping(ErrorResults
)
12116 async def FinishActions(self
, results
):
12118 results : typing.Sequence[~ActionExecutionResult]
12119 Returns -> typing.Sequence[~ErrorResult]
12121 # map input types to rpc msg
12123 msg
= dict(Type
='MachineActions', Request
='FinishActions', Version
=1, Params
=params
)
12124 params
['results'] = results
12125 reply
= await self
.rpc(msg
)
12130 @ReturnMapping(ActionsByReceivers
)
12131 async def RunningActions(self
, entities
):
12133 entities : typing.Sequence[~Entity]
12134 Returns -> typing.Sequence[~ActionsByReceiver]
12136 # map input types to rpc msg
12138 msg
= dict(Type
='MachineActions', Request
='RunningActions', Version
=1, Params
=params
)
12139 params
['Entities'] = entities
12140 reply
= await self
.rpc(msg
)
12145 @ReturnMapping(StringsWatchResults
)
12146 async def WatchActionNotifications(self
, entities
):
12148 entities : typing.Sequence[~Entity]
12149 Returns -> typing.Sequence[~StringsWatchResult]
12151 # map input types to rpc msg
12153 msg
= dict(Type
='MachineActions', Request
='WatchActionNotifications', Version
=1, Params
=params
)
12154 params
['Entities'] = entities
12155 reply
= await self
.rpc(msg
)
12159 class MachineManager(Type
):
12160 name
= 'MachineManager'
12162 schema
= {'definitions': {'AddMachineParams': {'additionalProperties': False,
12163 'properties': {'Addrs': {'items': {'$ref': '#/definitions/Address'},
12165 'Constraints': {'$ref': '#/definitions/Value'},
12166 'ContainerType': {'type': 'string'},
12167 'Disks': {'items': {'$ref': '#/definitions/Constraints'},
12169 'HardwareCharacteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
12170 'InstanceId': {'type': 'string'},
12171 'Jobs': {'items': {'type': 'string'},
12173 'Nonce': {'type': 'string'},
12174 'ParentId': {'type': 'string'},
12175 'Placement': {'$ref': '#/definitions/Placement'},
12176 'Series': {'type': 'string'}},
12177 'required': ['Series',
12186 'HardwareCharacteristics',
12189 'AddMachines': {'additionalProperties': False,
12190 'properties': {'MachineParams': {'items': {'$ref': '#/definitions/AddMachineParams'},
12192 'required': ['MachineParams'],
12194 'AddMachinesResult': {'additionalProperties': False,
12195 'properties': {'Error': {'$ref': '#/definitions/Error'},
12196 'Machine': {'type': 'string'}},
12197 'required': ['Machine', 'Error'],
12199 'AddMachinesResults': {'additionalProperties': False,
12200 'properties': {'Machines': {'items': {'$ref': '#/definitions/AddMachinesResult'},
12202 'required': ['Machines'],
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'],
12211 'Constraints': {'additionalProperties': False,
12212 'properties': {'Count': {'type': 'integer'},
12213 'Pool': {'type': 'string'},
12214 'Size': {'type': 'integer'}},
12215 'required': ['Pool', 'Size', 'Count'],
12217 'Error': {'additionalProperties': False,
12218 'properties': {'Code': {'type': 'string'},
12219 'Info': {'$ref': '#/definitions/ErrorInfo'},
12220 'Message': {'type': 'string'}},
12221 'required': ['Message', 'Code'],
12223 'ErrorInfo': {'additionalProperties': False,
12224 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
12225 'MacaroonPath': {'type': 'string'}},
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'},
12237 'Macaroon': {'additionalProperties': False,
12238 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
12240 'data': {'items': {'type': 'integer'},
12242 'id': {'$ref': '#/definitions/packet'},
12243 'location': {'$ref': '#/definitions/packet'},
12244 'sig': {'items': {'type': 'integer'},
12246 'required': ['data',
12252 'Placement': {'additionalProperties': False,
12253 'properties': {'Directive': {'type': 'string'},
12254 'Scope': {'type': 'string'}},
12255 'required': ['Scope', 'Directive'],
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'},
12267 'tags': {'items': {'type': 'string'},
12269 'virt-type': {'type': 'string'}},
12271 'caveat': {'additionalProperties': False,
12272 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
12273 'location': {'$ref': '#/definitions/packet'},
12274 'verificationId': {'$ref': '#/definitions/packet'}},
12275 'required': ['location',
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'}},
12291 @ReturnMapping(AddMachinesResults
)
12292 async def AddMachines(self
, machineparams
):
12294 machineparams : typing.Sequence[~AddMachineParams]
12295 Returns -> typing.Sequence[~AddMachinesResult]
12297 # map input types to rpc msg
12299 msg
= dict(Type
='MachineManager', Request
='AddMachines', Version
=2, Params
=params
)
12300 params
['MachineParams'] = machineparams
12301 reply
= await self
.rpc(msg
)
12305 class Machiner(Type
):
12308 schema
= {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
12309 'properties': {'Servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
12312 'required': ['Servers'],
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'],
12321 'BytesResult': {'additionalProperties': False,
12322 'properties': {'Result': {'items': {'type': 'integer'},
12324 'required': ['Result'],
12326 'Entities': {'additionalProperties': False,
12327 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
12329 'required': ['Entities'],
12331 'Entity': {'additionalProperties': False,
12332 'properties': {'Tag': {'type': 'string'}},
12333 'required': ['Tag'],
12335 'EntityStatusArgs': {'additionalProperties': False,
12336 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
12337 'type': 'object'}},
12339 'Info': {'type': 'string'},
12340 'Status': {'type': 'string'},
12341 'Tag': {'type': 'string'}},
12342 'required': ['Tag',
12347 'Error': {'additionalProperties': False,
12348 'properties': {'Code': {'type': 'string'},
12349 'Info': {'$ref': '#/definitions/ErrorInfo'},
12350 'Message': {'type': 'string'}},
12351 'required': ['Message', 'Code'],
12353 'ErrorInfo': {'additionalProperties': False,
12354 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
12355 'MacaroonPath': {'type': 'string'}},
12357 'ErrorResult': {'additionalProperties': False,
12358 'properties': {'Error': {'$ref': '#/definitions/Error'}},
12359 'required': ['Error'],
12361 'ErrorResults': {'additionalProperties': False,
12362 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
12364 'required': ['Results'],
12366 'HostPort': {'additionalProperties': False,
12367 'properties': {'Address': {'$ref': '#/definitions/Address'},
12368 'Port': {'type': 'integer'}},
12369 'required': ['Address', 'Port'],
12371 'JobsResult': {'additionalProperties': False,
12372 'properties': {'Error': {'$ref': '#/definitions/Error'},
12373 'Jobs': {'items': {'type': 'string'},
12375 'required': ['Jobs', 'Error'],
12377 'JobsResults': {'additionalProperties': False,
12378 'properties': {'Results': {'items': {'$ref': '#/definitions/JobsResult'},
12380 'required': ['Results'],
12382 'LifeResult': {'additionalProperties': False,
12383 'properties': {'Error': {'$ref': '#/definitions/Error'},
12384 'Life': {'type': 'string'}},
12385 'required': ['Life', 'Error'],
12387 'LifeResults': {'additionalProperties': False,
12388 'properties': {'Results': {'items': {'$ref': '#/definitions/LifeResult'},
12390 'required': ['Results'],
12392 'Macaroon': {'additionalProperties': False,
12393 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
12395 'data': {'items': {'type': 'integer'},
12397 'id': {'$ref': '#/definitions/packet'},
12398 'location': {'$ref': '#/definitions/packet'},
12399 'sig': {'items': {'type': 'integer'},
12401 'required': ['data',
12407 'MachineAddresses': {'additionalProperties': False,
12408 'properties': {'Addresses': {'items': {'$ref': '#/definitions/Address'},
12410 'Tag': {'type': 'string'}},
12411 'required': ['Tag', 'Addresses'],
12413 'NetworkConfig': {'additionalProperties': False,
12414 'properties': {'Address': {'type': 'string'},
12415 'CIDR': {'type': 'string'},
12416 'ConfigType': {'type': 'string'},
12417 'DNSSearchDomains': {'items': {'type': 'string'},
12419 'DNSServers': {'items': {'type': 'string'},
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',
12441 'ProviderSubnetId',
12443 'ProviderAddressId',
12447 'ParentInterfaceName',
12451 'NotifyWatchResult': {'additionalProperties': False,
12452 'properties': {'Error': {'$ref': '#/definitions/Error'},
12453 'NotifyWatcherId': {'type': 'string'}},
12454 'required': ['NotifyWatcherId', 'Error'],
12456 'NotifyWatchResults': {'additionalProperties': False,
12457 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
12459 'required': ['Results'],
12461 'SetMachineNetworkConfig': {'additionalProperties': False,
12462 'properties': {'Config': {'items': {'$ref': '#/definitions/NetworkConfig'},
12464 'Tag': {'type': 'string'}},
12465 'required': ['Tag', 'Config'],
12467 'SetMachinesAddresses': {'additionalProperties': False,
12468 'properties': {'MachineAddresses': {'items': {'$ref': '#/definitions/MachineAddresses'},
12470 'required': ['MachineAddresses'],
12472 'SetStatus': {'additionalProperties': False,
12473 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
12475 'required': ['Entities'],
12477 'StringResult': {'additionalProperties': False,
12478 'properties': {'Error': {'$ref': '#/definitions/Error'},
12479 'Result': {'type': 'string'}},
12480 'required': ['Error', 'Result'],
12482 'StringsResult': {'additionalProperties': False,
12483 'properties': {'Error': {'$ref': '#/definitions/Error'},
12484 'Result': {'items': {'type': 'string'},
12486 'required': ['Error', 'Result'],
12488 'caveat': {'additionalProperties': False,
12489 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
12490 'location': {'$ref': '#/definitions/packet'},
12491 'verificationId': {'$ref': '#/definitions/packet'}},
12492 'required': ['location',
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'}},
12504 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
12506 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
12508 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12509 'Result': {'$ref': '#/definitions/ErrorResults'}},
12511 'Jobs': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12512 'Result': {'$ref': '#/definitions/JobsResults'}},
12514 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12515 'Result': {'$ref': '#/definitions/LifeResults'}},
12517 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
12519 'SetMachineAddresses': {'properties': {'Params': {'$ref': '#/definitions/SetMachinesAddresses'},
12520 'Result': {'$ref': '#/definitions/ErrorResults'}},
12522 'SetObservedNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/SetMachineNetworkConfig'}},
12524 'SetProviderNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12525 'Result': {'$ref': '#/definitions/ErrorResults'}},
12527 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
12528 'Result': {'$ref': '#/definitions/ErrorResults'}},
12530 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
12531 'Result': {'$ref': '#/definitions/ErrorResults'}},
12533 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12534 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
12536 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
12537 'type': 'object'}},
12541 @ReturnMapping(StringsResult
)
12542 async def APIAddresses(self
):
12545 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[str]]
12547 # map input types to rpc msg
12549 msg
= dict(Type
='Machiner', Request
='APIAddresses', Version
=1, Params
=params
)
12551 reply
= await self
.rpc(msg
)
12556 @ReturnMapping(APIHostPortsResult
)
12557 async def APIHostPorts(self
):
12560 Returns -> typing.Sequence[~HostPort]
12562 # map input types to rpc msg
12564 msg
= dict(Type
='Machiner', Request
='APIHostPorts', Version
=1, Params
=params
)
12566 reply
= await self
.rpc(msg
)
12571 @ReturnMapping(BytesResult
)
12572 async def CACert(self
):
12575 Returns -> typing.Sequence[int]
12577 # map input types to rpc msg
12579 msg
= dict(Type
='Machiner', Request
='CACert', Version
=1, Params
=params
)
12581 reply
= await self
.rpc(msg
)
12586 @ReturnMapping(ErrorResults
)
12587 async def EnsureDead(self
, entities
):
12589 entities : typing.Sequence[~Entity]
12590 Returns -> typing.Sequence[~ErrorResult]
12592 # map input types to rpc msg
12594 msg
= dict(Type
='Machiner', Request
='EnsureDead', Version
=1, Params
=params
)
12595 params
['Entities'] = entities
12596 reply
= await self
.rpc(msg
)
12601 @ReturnMapping(JobsResults
)
12602 async def Jobs(self
, entities
):
12604 entities : typing.Sequence[~Entity]
12605 Returns -> typing.Sequence[~JobsResult]
12607 # map input types to rpc msg
12609 msg
= dict(Type
='Machiner', Request
='Jobs', Version
=1, Params
=params
)
12610 params
['Entities'] = entities
12611 reply
= await self
.rpc(msg
)
12616 @ReturnMapping(LifeResults
)
12617 async def Life(self
, entities
):
12619 entities : typing.Sequence[~Entity]
12620 Returns -> typing.Sequence[~LifeResult]
12622 # map input types to rpc msg
12624 msg
= dict(Type
='Machiner', Request
='Life', Version
=1, Params
=params
)
12625 params
['Entities'] = entities
12626 reply
= await self
.rpc(msg
)
12631 @ReturnMapping(StringResult
)
12632 async def ModelUUID(self
):
12635 Returns -> typing.Union[_ForwardRef('Error'), str]
12637 # map input types to rpc msg
12639 msg
= dict(Type
='Machiner', Request
='ModelUUID', Version
=1, Params
=params
)
12641 reply
= await self
.rpc(msg
)
12646 @ReturnMapping(ErrorResults
)
12647 async def SetMachineAddresses(self
, machineaddresses
):
12649 machineaddresses : typing.Sequence[~MachineAddresses]
12650 Returns -> typing.Sequence[~ErrorResult]
12652 # map input types to rpc msg
12654 msg
= dict(Type
='Machiner', Request
='SetMachineAddresses', Version
=1, Params
=params
)
12655 params
['MachineAddresses'] = machineaddresses
12656 reply
= await self
.rpc(msg
)
12661 @ReturnMapping(None)
12662 async def SetObservedNetworkConfig(self
, config
, tag
):
12664 config : typing.Sequence[~NetworkConfig]
12668 # map input types to rpc msg
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
)
12678 @ReturnMapping(ErrorResults
)
12679 async def SetProviderNetworkConfig(self
, entities
):
12681 entities : typing.Sequence[~Entity]
12682 Returns -> typing.Sequence[~ErrorResult]
12684 # map input types to rpc msg
12686 msg
= dict(Type
='Machiner', Request
='SetProviderNetworkConfig', Version
=1, Params
=params
)
12687 params
['Entities'] = entities
12688 reply
= await self
.rpc(msg
)
12693 @ReturnMapping(ErrorResults
)
12694 async def SetStatus(self
, entities
):
12696 entities : typing.Sequence[~EntityStatusArgs]
12697 Returns -> typing.Sequence[~ErrorResult]
12699 # map input types to rpc msg
12701 msg
= dict(Type
='Machiner', Request
='SetStatus', Version
=1, Params
=params
)
12702 params
['Entities'] = entities
12703 reply
= await self
.rpc(msg
)
12708 @ReturnMapping(ErrorResults
)
12709 async def UpdateStatus(self
, entities
):
12711 entities : typing.Sequence[~EntityStatusArgs]
12712 Returns -> typing.Sequence[~ErrorResult]
12714 # map input types to rpc msg
12716 msg
= dict(Type
='Machiner', Request
='UpdateStatus', Version
=1, Params
=params
)
12717 params
['Entities'] = entities
12718 reply
= await self
.rpc(msg
)
12723 @ReturnMapping(NotifyWatchResults
)
12724 async def Watch(self
, entities
):
12726 entities : typing.Sequence[~Entity]
12727 Returns -> typing.Sequence[~NotifyWatchResult]
12729 # map input types to rpc msg
12731 msg
= dict(Type
='Machiner', Request
='Watch', Version
=1, Params
=params
)
12732 params
['Entities'] = entities
12733 reply
= await self
.rpc(msg
)
12738 @ReturnMapping(NotifyWatchResult
)
12739 async def WatchAPIHostPorts(self
):
12742 Returns -> typing.Union[_ForwardRef('Error'), str]
12744 # map input types to rpc msg
12746 msg
= dict(Type
='Machiner', Request
='WatchAPIHostPorts', Version
=1, Params
=params
)
12748 reply
= await self
.rpc(msg
)
12752 class MeterStatus(Type
):
12753 name
= 'MeterStatus'
12755 schema
= {'definitions': {'Entities': {'additionalProperties': False,
12756 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
12758 'required': ['Entities'],
12760 'Entity': {'additionalProperties': False,
12761 'properties': {'Tag': {'type': 'string'}},
12762 'required': ['Tag'],
12764 'Error': {'additionalProperties': False,
12765 'properties': {'Code': {'type': 'string'},
12766 'Info': {'$ref': '#/definitions/ErrorInfo'},
12767 'Message': {'type': 'string'}},
12768 'required': ['Message', 'Code'],
12770 'ErrorInfo': {'additionalProperties': False,
12771 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
12772 'MacaroonPath': {'type': 'string'}},
12774 'Macaroon': {'additionalProperties': False,
12775 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
12777 'data': {'items': {'type': 'integer'},
12779 'id': {'$ref': '#/definitions/packet'},
12780 'location': {'$ref': '#/definitions/packet'},
12781 'sig': {'items': {'type': 'integer'},
12783 'required': ['data',
12789 'MeterStatusResult': {'additionalProperties': False,
12790 'properties': {'Code': {'type': 'string'},
12791 'Error': {'$ref': '#/definitions/Error'},
12792 'Info': {'type': 'string'}},
12793 'required': ['Code', 'Info', 'Error'],
12795 'MeterStatusResults': {'additionalProperties': False,
12796 'properties': {'Results': {'items': {'$ref': '#/definitions/MeterStatusResult'},
12798 'required': ['Results'],
12800 'NotifyWatchResult': {'additionalProperties': False,
12801 'properties': {'Error': {'$ref': '#/definitions/Error'},
12802 'NotifyWatcherId': {'type': 'string'}},
12803 'required': ['NotifyWatcherId', 'Error'],
12805 'NotifyWatchResults': {'additionalProperties': False,
12806 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
12808 'required': ['Results'],
12810 'caveat': {'additionalProperties': False,
12811 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
12812 'location': {'$ref': '#/definitions/packet'},
12813 'verificationId': {'$ref': '#/definitions/packet'}},
12814 'required': ['location',
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'}},
12827 'WatchMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12828 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
12829 'type': 'object'}},
12833 @ReturnMapping(MeterStatusResults
)
12834 async def GetMeterStatus(self
, entities
):
12836 entities : typing.Sequence[~Entity]
12837 Returns -> typing.Sequence[~MeterStatusResult]
12839 # map input types to rpc msg
12841 msg
= dict(Type
='MeterStatus', Request
='GetMeterStatus', Version
=1, Params
=params
)
12842 params
['Entities'] = entities
12843 reply
= await self
.rpc(msg
)
12848 @ReturnMapping(NotifyWatchResults
)
12849 async def WatchMeterStatus(self
, entities
):
12851 entities : typing.Sequence[~Entity]
12852 Returns -> typing.Sequence[~NotifyWatchResult]
12854 # map input types to rpc msg
12856 msg
= dict(Type
='MeterStatus', Request
='WatchMeterStatus', Version
=1, Params
=params
)
12857 params
['Entities'] = entities
12858 reply
= await self
.rpc(msg
)
12862 class MetricsAdder(Type
):
12863 name
= 'MetricsAdder'
12865 schema
= {'definitions': {'Error': {'additionalProperties': False,
12866 'properties': {'Code': {'type': 'string'},
12867 'Info': {'$ref': '#/definitions/ErrorInfo'},
12868 'Message': {'type': 'string'}},
12869 'required': ['Message', 'Code'],
12871 'ErrorInfo': {'additionalProperties': False,
12872 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
12873 'MacaroonPath': {'type': 'string'}},
12875 'ErrorResult': {'additionalProperties': False,
12876 'properties': {'Error': {'$ref': '#/definitions/Error'}},
12877 'required': ['Error'],
12879 'ErrorResults': {'additionalProperties': False,
12880 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
12882 'required': ['Results'],
12884 'Macaroon': {'additionalProperties': False,
12885 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
12887 'data': {'items': {'type': 'integer'},
12889 'id': {'$ref': '#/definitions/packet'},
12890 'location': {'$ref': '#/definitions/packet'},
12891 'sig': {'items': {'type': 'integer'},
12893 'required': ['data',
12899 'Metric': {'additionalProperties': False,
12900 'properties': {'Key': {'type': 'string'},
12901 'Time': {'format': 'date-time',
12903 'Value': {'type': 'string'}},
12904 'required': ['Key', 'Value', 'Time'],
12906 'MetricBatch': {'additionalProperties': False,
12907 'properties': {'CharmURL': {'type': 'string'},
12908 'Created': {'format': 'date-time',
12910 'Metrics': {'items': {'$ref': '#/definitions/Metric'},
12912 'UUID': {'type': 'string'}},
12913 'required': ['UUID',
12918 'MetricBatchParam': {'additionalProperties': False,
12919 'properties': {'Batch': {'$ref': '#/definitions/MetricBatch'},
12920 'Tag': {'type': 'string'}},
12921 'required': ['Tag', 'Batch'],
12923 'MetricBatchParams': {'additionalProperties': False,
12924 'properties': {'Batches': {'items': {'$ref': '#/definitions/MetricBatchParam'},
12926 'required': ['Batches'],
12928 'caveat': {'additionalProperties': False,
12929 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
12930 'location': {'$ref': '#/definitions/packet'},
12931 'verificationId': {'$ref': '#/definitions/packet'}},
12932 'required': ['location',
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'}},
12948 @ReturnMapping(ErrorResults
)
12949 async def AddMetricBatches(self
, batches
):
12951 batches : typing.Sequence[~MetricBatchParam]
12952 Returns -> typing.Sequence[~ErrorResult]
12954 # map input types to rpc msg
12956 msg
= dict(Type
='MetricsAdder', Request
='AddMetricBatches', Version
=2, Params
=params
)
12957 params
['Batches'] = batches
12958 reply
= await self
.rpc(msg
)
12962 class MetricsDebug(Type
):
12963 name
= 'MetricsDebug'
12965 schema
= {'definitions': {'Entities': {'additionalProperties': False,
12966 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
12968 'required': ['Entities'],
12970 'Entity': {'additionalProperties': False,
12971 'properties': {'Tag': {'type': 'string'}},
12972 'required': ['Tag'],
12974 'EntityMetrics': {'additionalProperties': False,
12975 'properties': {'error': {'$ref': '#/definitions/Error'},
12976 'metrics': {'items': {'$ref': '#/definitions/MetricResult'},
12979 'Error': {'additionalProperties': False,
12980 'properties': {'Code': {'type': 'string'},
12981 'Info': {'$ref': '#/definitions/ErrorInfo'},
12982 'Message': {'type': 'string'}},
12983 'required': ['Message', 'Code'],
12985 'ErrorInfo': {'additionalProperties': False,
12986 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
12987 'MacaroonPath': {'type': 'string'}},
12989 'ErrorResult': {'additionalProperties': False,
12990 'properties': {'Error': {'$ref': '#/definitions/Error'}},
12991 'required': ['Error'],
12993 'ErrorResults': {'additionalProperties': False,
12994 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
12996 'required': ['Results'],
12998 'Macaroon': {'additionalProperties': False,
12999 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
13001 'data': {'items': {'type': 'integer'},
13003 'id': {'$ref': '#/definitions/packet'},
13004 'location': {'$ref': '#/definitions/packet'},
13005 'sig': {'items': {'type': 'integer'},
13007 'required': ['data',
13013 'MeterStatusParam': {'additionalProperties': False,
13014 'properties': {'code': {'type': 'string'},
13015 'info': {'type': 'string'},
13016 'tag': {'type': 'string'}},
13017 'required': ['tag', 'code', 'info'],
13019 'MeterStatusParams': {'additionalProperties': False,
13020 'properties': {'statues': {'items': {'$ref': '#/definitions/MeterStatusParam'},
13022 'required': ['statues'],
13024 'MetricResult': {'additionalProperties': False,
13025 'properties': {'key': {'type': 'string'},
13026 'time': {'format': 'date-time',
13028 'value': {'type': 'string'}},
13029 'required': ['time', 'key', 'value'],
13031 'MetricResults': {'additionalProperties': False,
13032 'properties': {'results': {'items': {'$ref': '#/definitions/EntityMetrics'},
13034 'required': ['results'],
13036 'caveat': {'additionalProperties': False,
13037 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
13038 'location': {'$ref': '#/definitions/packet'},
13039 'verificationId': {'$ref': '#/definitions/packet'}},
13040 'required': ['location',
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'}},
13053 'SetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/MeterStatusParams'},
13054 'Result': {'$ref': '#/definitions/ErrorResults'}},
13055 'type': 'object'}},
13059 @ReturnMapping(MetricResults
)
13060 async def GetMetrics(self
, entities
):
13062 entities : typing.Sequence[~Entity]
13063 Returns -> typing.Sequence[~EntityMetrics]
13065 # map input types to rpc msg
13067 msg
= dict(Type
='MetricsDebug', Request
='GetMetrics', Version
=2, Params
=params
)
13068 params
['Entities'] = entities
13069 reply
= await self
.rpc(msg
)
13074 @ReturnMapping(ErrorResults
)
13075 async def SetMeterStatus(self
, statues
):
13077 statues : typing.Sequence[~MeterStatusParam]
13078 Returns -> typing.Sequence[~ErrorResult]
13080 # map input types to rpc msg
13082 msg
= dict(Type
='MetricsDebug', Request
='SetMeterStatus', Version
=2, Params
=params
)
13083 params
['statues'] = statues
13084 reply
= await self
.rpc(msg
)
13088 class MetricsManager(Type
):
13089 name
= 'MetricsManager'
13091 schema
= {'definitions': {'Entities': {'additionalProperties': False,
13092 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
13094 'required': ['Entities'],
13096 'Entity': {'additionalProperties': False,
13097 'properties': {'Tag': {'type': 'string'}},
13098 'required': ['Tag'],
13100 'Error': {'additionalProperties': False,
13101 'properties': {'Code': {'type': 'string'},
13102 'Info': {'$ref': '#/definitions/ErrorInfo'},
13103 'Message': {'type': 'string'}},
13104 'required': ['Message', 'Code'],
13106 'ErrorInfo': {'additionalProperties': False,
13107 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
13108 'MacaroonPath': {'type': 'string'}},
13110 'ErrorResult': {'additionalProperties': False,
13111 'properties': {'Error': {'$ref': '#/definitions/Error'}},
13112 'required': ['Error'],
13114 'ErrorResults': {'additionalProperties': False,
13115 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
13117 'required': ['Results'],
13119 'Macaroon': {'additionalProperties': False,
13120 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
13122 'data': {'items': {'type': 'integer'},
13124 'id': {'$ref': '#/definitions/packet'},
13125 'location': {'$ref': '#/definitions/packet'},
13126 'sig': {'items': {'type': 'integer'},
13128 'required': ['data',
13134 'caveat': {'additionalProperties': False,
13135 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
13136 'location': {'$ref': '#/definitions/packet'},
13137 'verificationId': {'$ref': '#/definitions/packet'}},
13138 'required': ['location',
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'}},
13151 'SendMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13152 'Result': {'$ref': '#/definitions/ErrorResults'}},
13153 'type': 'object'}},
13157 @ReturnMapping(ErrorResults
)
13158 async def CleanupOldMetrics(self
, entities
):
13160 entities : typing.Sequence[~Entity]
13161 Returns -> typing.Sequence[~ErrorResult]
13163 # map input types to rpc msg
13165 msg
= dict(Type
='MetricsManager', Request
='CleanupOldMetrics', Version
=1, Params
=params
)
13166 params
['Entities'] = entities
13167 reply
= await self
.rpc(msg
)
13172 @ReturnMapping(ErrorResults
)
13173 async def SendMetrics(self
, entities
):
13175 entities : typing.Sequence[~Entity]
13176 Returns -> typing.Sequence[~ErrorResult]
13178 # map input types to rpc msg
13180 msg
= dict(Type
='MetricsManager', Request
='SendMetrics', Version
=1, Params
=params
)
13181 params
['Entities'] = entities
13182 reply
= await self
.rpc(msg
)
13186 class MigrationFlag(Type
):
13187 name
= 'MigrationFlag'
13189 schema
= {'definitions': {'Entities': {'additionalProperties': False,
13190 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
13192 'required': ['Entities'],
13194 'Entity': {'additionalProperties': False,
13195 'properties': {'Tag': {'type': 'string'}},
13196 'required': ['Tag'],
13198 'Error': {'additionalProperties': False,
13199 'properties': {'Code': {'type': 'string'},
13200 'Info': {'$ref': '#/definitions/ErrorInfo'},
13201 'Message': {'type': 'string'}},
13202 'required': ['Message', 'Code'],
13204 'ErrorInfo': {'additionalProperties': False,
13205 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
13206 'MacaroonPath': {'type': 'string'}},
13208 'Macaroon': {'additionalProperties': False,
13209 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
13211 'data': {'items': {'type': 'integer'},
13213 'id': {'$ref': '#/definitions/packet'},
13214 'location': {'$ref': '#/definitions/packet'},
13215 'sig': {'items': {'type': 'integer'},
13217 'required': ['data',
13223 'NotifyWatchResult': {'additionalProperties': False,
13224 'properties': {'Error': {'$ref': '#/definitions/Error'},
13225 'NotifyWatcherId': {'type': 'string'}},
13226 'required': ['NotifyWatcherId', 'Error'],
13228 'NotifyWatchResults': {'additionalProperties': False,
13229 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
13231 'required': ['Results'],
13233 'PhaseResult': {'additionalProperties': False,
13234 'properties': {'Error': {'$ref': '#/definitions/Error'},
13235 'phase': {'type': 'string'}},
13236 'required': ['phase', 'Error'],
13238 'PhaseResults': {'additionalProperties': False,
13239 'properties': {'Results': {'items': {'$ref': '#/definitions/PhaseResult'},
13241 'required': ['Results'],
13243 'caveat': {'additionalProperties': False,
13244 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
13245 'location': {'$ref': '#/definitions/packet'},
13246 'verificationId': {'$ref': '#/definitions/packet'}},
13247 'required': ['location',
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'}},
13260 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13261 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
13262 'type': 'object'}},
13266 @ReturnMapping(PhaseResults
)
13267 async def Phase(self
, entities
):
13269 entities : typing.Sequence[~Entity]
13270 Returns -> typing.Sequence[~PhaseResult]
13272 # map input types to rpc msg
13274 msg
= dict(Type
='MigrationFlag', Request
='Phase', Version
=1, Params
=params
)
13275 params
['Entities'] = entities
13276 reply
= await self
.rpc(msg
)
13281 @ReturnMapping(NotifyWatchResults
)
13282 async def Watch(self
, entities
):
13284 entities : typing.Sequence[~Entity]
13285 Returns -> typing.Sequence[~NotifyWatchResult]
13287 # map input types to rpc msg
13289 msg
= dict(Type
='MigrationFlag', Request
='Watch', Version
=1, Params
=params
)
13290 params
['Entities'] = entities
13291 reply
= await self
.rpc(msg
)
13295 class MigrationMaster(Type
):
13296 name
= 'MigrationMaster'
13298 schema
= {'definitions': {'Error': {'additionalProperties': False,
13299 'properties': {'Code': {'type': 'string'},
13300 'Info': {'$ref': '#/definitions/ErrorInfo'},
13301 'Message': {'type': 'string'}},
13302 'required': ['Message', 'Code'],
13304 'ErrorInfo': {'additionalProperties': False,
13305 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
13306 'MacaroonPath': {'type': 'string'}},
13308 'FullMigrationStatus': {'additionalProperties': False,
13309 'properties': {'attempt': {'type': 'integer'},
13310 'phase': {'type': 'string'},
13311 'spec': {'$ref': '#/definitions/ModelMigrationSpec'}},
13312 'required': ['spec',
13316 'Macaroon': {'additionalProperties': False,
13317 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
13319 'data': {'items': {'type': 'integer'},
13321 'id': {'$ref': '#/definitions/packet'},
13322 'location': {'$ref': '#/definitions/packet'},
13323 'sig': {'items': {'type': 'integer'},
13325 'required': ['data',
13331 'ModelMigrationSpec': {'additionalProperties': False,
13332 'properties': {'model-tag': {'type': 'string'},
13333 'target-info': {'$ref': '#/definitions/ModelMigrationTargetInfo'}},
13334 'required': ['model-tag',
13337 'ModelMigrationTargetInfo': {'additionalProperties': False,
13338 'properties': {'addrs': {'items': {'type': 'string'},
13340 'auth-tag': {'type': 'string'},
13341 'ca-cert': {'type': 'string'},
13342 'controller-tag': {'type': 'string'},
13343 'password': {'type': 'string'}},
13344 'required': ['controller-tag',
13350 'NotifyWatchResult': {'additionalProperties': False,
13351 'properties': {'Error': {'$ref': '#/definitions/Error'},
13352 'NotifyWatcherId': {'type': 'string'}},
13353 'required': ['NotifyWatcherId', 'Error'],
13355 'SerializedModel': {'additionalProperties': False,
13356 'properties': {'bytes': {'items': {'type': 'integer'},
13358 'required': ['bytes'],
13360 'SetMigrationPhaseArgs': {'additionalProperties': False,
13361 'properties': {'phase': {'type': 'string'}},
13362 'required': ['phase'],
13364 'caveat': {'additionalProperties': False,
13365 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
13366 'location': {'$ref': '#/definitions/packet'},
13367 'verificationId': {'$ref': '#/definitions/packet'}},
13368 'required': ['location',
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'}},
13380 'GetMigrationStatus': {'properties': {'Result': {'$ref': '#/definitions/FullMigrationStatus'}},
13382 'SetPhase': {'properties': {'Params': {'$ref': '#/definitions/SetMigrationPhaseArgs'}},
13384 'Watch': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
13385 'type': 'object'}},
13389 @ReturnMapping(SerializedModel
)
13390 async def Export(self
):
13393 Returns -> typing.Sequence[int]
13395 # map input types to rpc msg
13397 msg
= dict(Type
='MigrationMaster', Request
='Export', Version
=1, Params
=params
)
13399 reply
= await self
.rpc(msg
)
13404 @ReturnMapping(FullMigrationStatus
)
13405 async def GetMigrationStatus(self
):
13408 Returns -> typing.Union[int, str, _ForwardRef('ModelMigrationSpec')]
13410 # map input types to rpc msg
13412 msg
= dict(Type
='MigrationMaster', Request
='GetMigrationStatus', Version
=1, Params
=params
)
13414 reply
= await self
.rpc(msg
)
13419 @ReturnMapping(None)
13420 async def SetPhase(self
, phase
):
13425 # map input types to rpc msg
13427 msg
= dict(Type
='MigrationMaster', Request
='SetPhase', Version
=1, Params
=params
)
13428 params
['phase'] = phase
13429 reply
= await self
.rpc(msg
)
13434 @ReturnMapping(NotifyWatchResult
)
13435 async def Watch(self
):
13438 Returns -> typing.Union[_ForwardRef('Error'), str]
13440 # map input types to rpc msg
13442 msg
= dict(Type
='MigrationMaster', Request
='Watch', Version
=1, Params
=params
)
13444 reply
= await self
.rpc(msg
)
13448 class MigrationMinion(Type
):
13449 name
= 'MigrationMinion'
13451 schema
= {'definitions': {'Error': {'additionalProperties': False,
13452 'properties': {'Code': {'type': 'string'},
13453 'Info': {'$ref': '#/definitions/ErrorInfo'},
13454 'Message': {'type': 'string'}},
13455 'required': ['Message', 'Code'],
13457 'ErrorInfo': {'additionalProperties': False,
13458 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
13459 'MacaroonPath': {'type': 'string'}},
13461 'Macaroon': {'additionalProperties': False,
13462 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
13464 'data': {'items': {'type': 'integer'},
13466 'id': {'$ref': '#/definitions/packet'},
13467 'location': {'$ref': '#/definitions/packet'},
13468 'sig': {'items': {'type': 'integer'},
13470 'required': ['data',
13476 'NotifyWatchResult': {'additionalProperties': False,
13477 'properties': {'Error': {'$ref': '#/definitions/Error'},
13478 'NotifyWatcherId': {'type': 'string'}},
13479 'required': ['NotifyWatcherId', 'Error'],
13481 'caveat': {'additionalProperties': False,
13482 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
13483 'location': {'$ref': '#/definitions/packet'},
13484 'verificationId': {'$ref': '#/definitions/packet'}},
13485 'required': ['location',
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'}},
13500 @ReturnMapping(NotifyWatchResult
)
13501 async def Watch(self
):
13504 Returns -> typing.Union[_ForwardRef('Error'), str]
13506 # map input types to rpc msg
13508 msg
= dict(Type
='MigrationMinion', Request
='Watch', Version
=1, Params
=params
)
13510 reply
= await self
.rpc(msg
)
13514 class MigrationStatusWatcher(Type
):
13515 name
= 'MigrationStatusWatcher'
13517 schema
= {'definitions': {'MigrationStatus': {'additionalProperties': False,
13518 'properties': {'attempt': {'type': 'integer'},
13519 'phase': {'type': 'string'},
13520 'source-api-addrs': {'items': {'type': 'string'},
13522 'source-ca-cert': {'type': 'string'},
13523 'target-api-addrs': {'items': {'type': 'string'},
13525 'target-ca-cert': {'type': 'string'}},
13526 'required': ['attempt',
13528 'source-api-addrs',
13530 'target-api-addrs',
13532 'type': 'object'}},
13533 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MigrationStatus'}},
13535 'Stop': {'type': 'object'}},
13539 @ReturnMapping(MigrationStatus
)
13540 async def Next(self
):
13543 Returns -> typing.Union[int, typing.Sequence[str]]
13545 # map input types to rpc msg
13547 msg
= dict(Type
='MigrationStatusWatcher', Request
='Next', Version
=1, Params
=params
)
13549 reply
= await self
.rpc(msg
)
13554 @ReturnMapping(None)
13555 async def Stop(self
):
13560 # map input types to rpc msg
13562 msg
= dict(Type
='MigrationStatusWatcher', Request
='Stop', Version
=1, Params
=params
)
13564 reply
= await self
.rpc(msg
)
13568 class MigrationTarget(Type
):
13569 name
= 'MigrationTarget'
13571 schema
= {'definitions': {'ModelArgs': {'additionalProperties': False,
13572 'properties': {'model-tag': {'type': 'string'}},
13573 'required': ['model-tag'],
13575 'SerializedModel': {'additionalProperties': False,
13576 'properties': {'bytes': {'items': {'type': 'integer'},
13578 'required': ['bytes'],
13579 'type': 'object'}},
13580 'properties': {'Abort': {'properties': {'Params': {'$ref': '#/definitions/ModelArgs'}},
13582 'Activate': {'properties': {'Params': {'$ref': '#/definitions/ModelArgs'}},
13584 'Import': {'properties': {'Params': {'$ref': '#/definitions/SerializedModel'}},
13585 'type': 'object'}},
13589 @ReturnMapping(None)
13590 async def Abort(self
, model_tag
):
13595 # map input types to rpc msg
13597 msg
= dict(Type
='MigrationTarget', Request
='Abort', Version
=1, Params
=params
)
13598 params
['model-tag'] = model_tag
13599 reply
= await self
.rpc(msg
)
13604 @ReturnMapping(None)
13605 async def Activate(self
, model_tag
):
13610 # map input types to rpc msg
13612 msg
= dict(Type
='MigrationTarget', Request
='Activate', Version
=1, Params
=params
)
13613 params
['model-tag'] = model_tag
13614 reply
= await self
.rpc(msg
)
13619 @ReturnMapping(None)
13620 async def Import(self
, bytes_
):
13622 bytes_ : typing.Sequence[int]
13625 # map input types to rpc msg
13627 msg
= dict(Type
='MigrationTarget', Request
='Import', Version
=1, Params
=params
)
13628 params
['bytes'] = bytes_
13629 reply
= await self
.rpc(msg
)
13633 class ModelManager(Type
):
13634 name
= 'ModelManager'
13636 schema
= {'definitions': {'Entities': {'additionalProperties': False,
13637 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
13639 'required': ['Entities'],
13641 'Entity': {'additionalProperties': False,
13642 'properties': {'Tag': {'type': 'string'}},
13643 'required': ['Tag'],
13645 'EntityStatus': {'additionalProperties': False,
13646 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
13647 'type': 'object'}},
13649 'Info': {'type': 'string'},
13650 'Since': {'format': 'date-time',
13652 'Status': {'type': 'string'}},
13653 'required': ['Status',
13658 'Error': {'additionalProperties': False,
13659 'properties': {'Code': {'type': 'string'},
13660 'Info': {'$ref': '#/definitions/ErrorInfo'},
13661 'Message': {'type': 'string'}},
13662 'required': ['Message', 'Code'],
13664 'ErrorInfo': {'additionalProperties': False,
13665 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
13666 'MacaroonPath': {'type': 'string'}},
13668 'ErrorResult': {'additionalProperties': False,
13669 'properties': {'Error': {'$ref': '#/definitions/Error'}},
13670 'required': ['Error'],
13672 'ErrorResults': {'additionalProperties': False,
13673 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
13675 'required': ['Results'],
13677 'Macaroon': {'additionalProperties': False,
13678 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
13680 'data': {'items': {'type': 'integer'},
13682 'id': {'$ref': '#/definitions/packet'},
13683 'location': {'$ref': '#/definitions/packet'},
13684 'sig': {'items': {'type': 'integer'},
13686 'required': ['data',
13692 'Model': {'additionalProperties': False,
13693 'properties': {'Name': {'type': 'string'},
13694 'OwnerTag': {'type': 'string'},
13695 'UUID': {'type': 'string'}},
13696 'required': ['Name', 'UUID', 'OwnerTag'],
13698 'ModelConfigResult': {'additionalProperties': False,
13699 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
13700 'type': 'object'}},
13701 'type': 'object'}},
13702 'required': ['Config'],
13704 'ModelCreateArgs': {'additionalProperties': False,
13705 'properties': {'Account': {'patternProperties': {'.*': {'additionalProperties': True,
13706 'type': 'object'}},
13708 'Config': {'patternProperties': {'.*': {'additionalProperties': True,
13709 'type': 'object'}},
13711 'OwnerTag': {'type': 'string'}},
13712 'required': ['OwnerTag',
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'},
13728 'required': ['Name',
13739 'ModelInfoResult': {'additionalProperties': False,
13740 'properties': {'error': {'$ref': '#/definitions/Error'},
13741 'result': {'$ref': '#/definitions/ModelInfo'}},
13743 'ModelInfoResults': {'additionalProperties': False,
13744 'properties': {'results': {'items': {'$ref': '#/definitions/ModelInfoResult'},
13746 'required': ['results'],
13748 'ModelSkeletonConfigArgs': {'additionalProperties': False,
13749 'properties': {'Provider': {'type': 'string'},
13750 'Region': {'type': 'string'}},
13751 'required': ['Provider', 'Region'],
13753 'ModelUserInfo': {'additionalProperties': False,
13754 'properties': {'access': {'type': 'string'},
13755 'displayname': {'type': 'string'},
13756 'lastconnection': {'format': 'date-time',
13758 'user': {'type': 'string'}},
13759 'required': ['user',
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',
13774 'ModifyModelAccessRequest': {'additionalProperties': False,
13775 'properties': {'changes': {'items': {'$ref': '#/definitions/ModifyModelAccess'},
13777 'required': ['changes'],
13779 'UserModel': {'additionalProperties': False,
13780 'properties': {'LastConnection': {'format': 'date-time',
13782 'Model': {'$ref': '#/definitions/Model'}},
13783 'required': ['Model', 'LastConnection'],
13785 'UserModelList': {'additionalProperties': False,
13786 'properties': {'UserModels': {'items': {'$ref': '#/definitions/UserModel'},
13788 'required': ['UserModels'],
13790 'caveat': {'additionalProperties': False,
13791 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
13792 'location': {'$ref': '#/definitions/packet'},
13793 'verificationId': {'$ref': '#/definitions/packet'}},
13794 'required': ['location',
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'}},
13807 'CreateModel': {'properties': {'Params': {'$ref': '#/definitions/ModelCreateArgs'},
13808 'Result': {'$ref': '#/definitions/Model'}},
13810 'ListModels': {'properties': {'Params': {'$ref': '#/definitions/Entity'},
13811 'Result': {'$ref': '#/definitions/UserModelList'}},
13813 'ModelInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13814 'Result': {'$ref': '#/definitions/ModelInfoResults'}},
13816 'ModifyModelAccess': {'properties': {'Params': {'$ref': '#/definitions/ModifyModelAccessRequest'},
13817 'Result': {'$ref': '#/definitions/ErrorResults'}},
13818 'type': 'object'}},
13822 @ReturnMapping(ModelConfigResult
)
13823 async def ConfigSkeleton(self
, provider
, region
):
13827 Returns -> typing.Mapping[str, typing.Any]
13829 # map input types to rpc msg
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
)
13839 @ReturnMapping(Model
)
13840 async def CreateModel(self
, account
, config
, ownertag
):
13842 account : typing.Mapping[str, typing.Any]
13843 config : typing.Mapping[str, typing.Any]
13845 Returns -> <class 'str'>
13847 # map input types to rpc msg
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
)
13858 @ReturnMapping(UserModelList
)
13859 async def ListModels(self
, tag
):
13862 Returns -> typing.Sequence[~UserModel]
13864 # map input types to rpc msg
13866 msg
= dict(Type
='ModelManager', Request
='ListModels', Version
=2, Params
=params
)
13867 params
['Tag'] = tag
13868 reply
= await self
.rpc(msg
)
13873 @ReturnMapping(ModelInfoResults
)
13874 async def ModelInfo(self
, entities
):
13876 entities : typing.Sequence[~Entity]
13877 Returns -> typing.Sequence[~ModelInfoResult]
13879 # map input types to rpc msg
13881 msg
= dict(Type
='ModelManager', Request
='ModelInfo', Version
=2, Params
=params
)
13882 params
['Entities'] = entities
13883 reply
= await self
.rpc(msg
)
13888 @ReturnMapping(ErrorResults
)
13889 async def ModifyModelAccess(self
, changes
):
13891 changes : typing.Sequence[~ModifyModelAccess]
13892 Returns -> typing.Sequence[~ErrorResult]
13894 # map input types to rpc msg
13896 msg
= dict(Type
='ModelManager', Request
='ModifyModelAccess', Version
=2, Params
=params
)
13897 params
['changes'] = changes
13898 reply
= await self
.rpc(msg
)
13902 class NotifyWatcher(Type
):
13903 name
= 'NotifyWatcher'
13905 schema
= {'properties': {'Next': {'type': 'object'}, 'Stop': {'type': 'object'}},
13909 @ReturnMapping(None)
13910 async def Next(self
):
13915 # map input types to rpc msg
13917 msg
= dict(Type
='NotifyWatcher', Request
='Next', Version
=1, Params
=params
)
13919 reply
= await self
.rpc(msg
)
13924 @ReturnMapping(None)
13925 async def Stop(self
):
13930 # map input types to rpc msg
13932 msg
= dict(Type
='NotifyWatcher', Request
='Stop', Version
=1, Params
=params
)
13934 reply
= await self
.rpc(msg
)
13938 class Pinger(Type
):
13941 schema
= {'properties': {'Ping': {'type': 'object'}, 'Stop': {'type': 'object'}},
13945 @ReturnMapping(None)
13946 async def Ping(self
):
13951 # map input types to rpc msg
13953 msg
= dict(Type
='Pinger', Request
='Ping', Version
=1, Params
=params
)
13955 reply
= await self
.rpc(msg
)
13960 @ReturnMapping(None)
13961 async def Stop(self
):
13966 # map input types to rpc msg
13968 msg
= dict(Type
='Pinger', Request
='Stop', Version
=1, Params
=params
)
13970 reply
= await self
.rpc(msg
)
13974 class Provisioner(Type
):
13975 name
= 'Provisioner'
13977 schema
= {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
13978 'properties': {'Servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
13981 'required': ['Servers'],
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'],
13990 'Binary': {'additionalProperties': False,
13991 'properties': {'Arch': {'type': 'string'},
13992 'Number': {'$ref': '#/definitions/Number'},
13993 'Series': {'type': 'string'}},
13994 'required': ['Number', 'Series', 'Arch'],
13996 'BytesResult': {'additionalProperties': False,
13997 'properties': {'Result': {'items': {'type': 'integer'},
13999 'required': ['Result'],
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',
14021 'ConstraintsResult': {'additionalProperties': False,
14022 'properties': {'Constraints': {'$ref': '#/definitions/Value'},
14023 'Error': {'$ref': '#/definitions/Error'}},
14024 'required': ['Error', 'Constraints'],
14026 'ConstraintsResults': {'additionalProperties': False,
14027 'properties': {'Results': {'items': {'$ref': '#/definitions/ConstraintsResult'},
14029 'required': ['Results'],
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',
14042 'SSLHostnameVerification',
14046 'AllowLXCLoopMounts',
14049 'ContainerManagerConfig': {'additionalProperties': False,
14050 'properties': {'ManagerConfig': {'patternProperties': {'.*': {'type': 'string'}},
14051 'type': 'object'}},
14052 'required': ['ManagerConfig'],
14054 'ContainerManagerConfigParams': {'additionalProperties': False,
14055 'properties': {'Type': {'type': 'string'}},
14056 'required': ['Type'],
14058 'DistributionGroupResult': {'additionalProperties': False,
14059 'properties': {'Error': {'$ref': '#/definitions/Error'},
14060 'Result': {'items': {'type': 'string'},
14062 'required': ['Error', 'Result'],
14064 'DistributionGroupResults': {'additionalProperties': False,
14065 'properties': {'Results': {'items': {'$ref': '#/definitions/DistributionGroupResult'},
14067 'required': ['Results'],
14069 'Entities': {'additionalProperties': False,
14070 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
14072 'required': ['Entities'],
14074 'Entity': {'additionalProperties': False,
14075 'properties': {'Tag': {'type': 'string'}},
14076 'required': ['Tag'],
14078 'EntityPassword': {'additionalProperties': False,
14079 'properties': {'Password': {'type': 'string'},
14080 'Tag': {'type': 'string'}},
14081 'required': ['Tag', 'Password'],
14083 'EntityPasswords': {'additionalProperties': False,
14084 'properties': {'Changes': {'items': {'$ref': '#/definitions/EntityPassword'},
14086 'required': ['Changes'],
14088 'EntityStatusArgs': {'additionalProperties': False,
14089 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
14090 'type': 'object'}},
14092 'Info': {'type': 'string'},
14093 'Status': {'type': 'string'},
14094 'Tag': {'type': 'string'}},
14095 'required': ['Tag',
14100 'Error': {'additionalProperties': False,
14101 'properties': {'Code': {'type': 'string'},
14102 'Info': {'$ref': '#/definitions/ErrorInfo'},
14103 'Message': {'type': 'string'}},
14104 'required': ['Message', 'Code'],
14106 'ErrorInfo': {'additionalProperties': False,
14107 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
14108 'MacaroonPath': {'type': 'string'}},
14110 'ErrorResult': {'additionalProperties': False,
14111 'properties': {'Error': {'$ref': '#/definitions/Error'}},
14112 'required': ['Error'],
14114 'ErrorResults': {'additionalProperties': False,
14115 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
14117 'required': ['Results'],
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',
14131 'FindToolsResult': {'additionalProperties': False,
14132 'properties': {'Error': {'$ref': '#/definitions/Error'},
14133 'List': {'items': {'$ref': '#/definitions/Tools'},
14135 'required': ['List', 'Error'],
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'},
14147 'HostPort': {'additionalProperties': False,
14148 'properties': {'Address': {'$ref': '#/definitions/Address'},
14149 'Port': {'type': 'integer'}},
14150 'required': ['Address', 'Port'],
14152 'InstanceInfo': {'additionalProperties': False,
14153 'properties': {'Characteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
14154 'InstanceId': {'type': 'string'},
14155 'NetworkConfig': {'items': {'$ref': '#/definitions/NetworkConfig'},
14157 'Nonce': {'type': 'string'},
14158 'Tag': {'type': 'string'},
14159 'VolumeAttachments': {'patternProperties': {'.*': {'$ref': '#/definitions/VolumeAttachmentInfo'}},
14161 'Volumes': {'items': {'$ref': '#/definitions/Volume'},
14163 'required': ['Tag',
14168 'VolumeAttachments',
14171 'InstancesInfo': {'additionalProperties': False,
14172 'properties': {'Machines': {'items': {'$ref': '#/definitions/InstanceInfo'},
14174 'required': ['Machines'],
14176 'LifeResult': {'additionalProperties': False,
14177 'properties': {'Error': {'$ref': '#/definitions/Error'},
14178 'Life': {'type': 'string'}},
14179 'required': ['Life', 'Error'],
14181 'LifeResults': {'additionalProperties': False,
14182 'properties': {'Results': {'items': {'$ref': '#/definitions/LifeResult'},
14184 'required': ['Results'],
14186 'Macaroon': {'additionalProperties': False,
14187 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
14189 'data': {'items': {'type': 'integer'},
14191 'id': {'$ref': '#/definitions/packet'},
14192 'location': {'$ref': '#/definitions/packet'},
14193 'sig': {'items': {'type': 'integer'},
14195 'required': ['data',
14201 'MachineContainers': {'additionalProperties': False,
14202 'properties': {'ContainerTypes': {'items': {'type': 'string'},
14204 'MachineTag': {'type': 'string'}},
14205 'required': ['MachineTag',
14208 'MachineContainersParams': {'additionalProperties': False,
14209 'properties': {'Params': {'items': {'$ref': '#/definitions/MachineContainers'},
14211 'required': ['Params'],
14213 'MachineNetworkConfigResult': {'additionalProperties': False,
14214 'properties': {'Error': {'$ref': '#/definitions/Error'},
14215 'Info': {'items': {'$ref': '#/definitions/NetworkConfig'},
14217 'required': ['Error', 'Info'],
14219 'MachineNetworkConfigResults': {'additionalProperties': False,
14220 'properties': {'Results': {'items': {'$ref': '#/definitions/MachineNetworkConfigResult'},
14222 'required': ['Results'],
14224 'ModelConfigResult': {'additionalProperties': False,
14225 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
14226 'type': 'object'}},
14227 'type': 'object'}},
14228 'required': ['Config'],
14230 'NetworkConfig': {'additionalProperties': False,
14231 'properties': {'Address': {'type': 'string'},
14232 'CIDR': {'type': 'string'},
14233 'ConfigType': {'type': 'string'},
14234 'DNSSearchDomains': {'items': {'type': 'string'},
14236 'DNSServers': {'items': {'type': 'string'},
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',
14258 'ProviderSubnetId',
14260 'ProviderAddressId',
14264 'ParentInterfaceName',
14268 'NotifyWatchResult': {'additionalProperties': False,
14269 'properties': {'Error': {'$ref': '#/definitions/Error'},
14270 'NotifyWatcherId': {'type': 'string'}},
14271 'required': ['NotifyWatcherId', 'Error'],
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',
14285 'ProvisioningInfo': {'additionalProperties': False,
14286 'properties': {'Constraints': {'$ref': '#/definitions/Value'},
14287 'EndpointBindings': {'patternProperties': {'.*': {'type': 'string'}},
14289 'ImageMetadata': {'items': {'$ref': '#/definitions/CloudImageMetadata'},
14291 'Jobs': {'items': {'type': 'string'},
14293 'Placement': {'type': 'string'},
14294 'Series': {'type': 'string'},
14295 'SubnetsToZones': {'patternProperties': {'.*': {'items': {'type': 'string'},
14298 'Tags': {'patternProperties': {'.*': {'type': 'string'}},
14300 'Volumes': {'items': {'$ref': '#/definitions/VolumeParams'},
14302 'required': ['Constraints',
14310 'EndpointBindings'],
14312 'ProvisioningInfoResult': {'additionalProperties': False,
14313 'properties': {'Error': {'$ref': '#/definitions/Error'},
14314 'Result': {'$ref': '#/definitions/ProvisioningInfo'}},
14315 'required': ['Error', 'Result'],
14317 'ProvisioningInfoResults': {'additionalProperties': False,
14318 'properties': {'Results': {'items': {'$ref': '#/definitions/ProvisioningInfoResult'},
14320 'required': ['Results'],
14322 'SetStatus': {'additionalProperties': False,
14323 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
14325 'required': ['Entities'],
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'],
14334 'StatusResult': {'additionalProperties': False,
14335 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
14336 'type': 'object'}},
14338 'Error': {'$ref': '#/definitions/Error'},
14339 'Id': {'type': 'string'},
14340 'Info': {'type': 'string'},
14341 'Life': {'type': 'string'},
14342 'Since': {'format': 'date-time',
14344 'Status': {'type': 'string'}},
14345 'required': ['Error',
14353 'StatusResults': {'additionalProperties': False,
14354 'properties': {'Results': {'items': {'$ref': '#/definitions/StatusResult'},
14356 'required': ['Results'],
14358 'StringResult': {'additionalProperties': False,
14359 'properties': {'Error': {'$ref': '#/definitions/Error'},
14360 'Result': {'type': 'string'}},
14361 'required': ['Error', 'Result'],
14363 'StringResults': {'additionalProperties': False,
14364 'properties': {'Results': {'items': {'$ref': '#/definitions/StringResult'},
14366 'required': ['Results'],
14368 'StringsResult': {'additionalProperties': False,
14369 'properties': {'Error': {'$ref': '#/definitions/Error'},
14370 'Result': {'items': {'type': 'string'},
14372 'required': ['Error', 'Result'],
14374 'StringsWatchResult': {'additionalProperties': False,
14375 'properties': {'Changes': {'items': {'type': 'string'},
14377 'Error': {'$ref': '#/definitions/Error'},
14378 'StringsWatcherId': {'type': 'string'}},
14379 'required': ['StringsWatcherId',
14383 'StringsWatchResults': {'additionalProperties': False,
14384 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
14386 'required': ['Results'],
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'],
14395 'ToolsResult': {'additionalProperties': False,
14396 'properties': {'DisableSSLHostnameVerification': {'type': 'boolean'},
14397 'Error': {'$ref': '#/definitions/Error'},
14398 'ToolsList': {'items': {'$ref': '#/definitions/Tools'},
14400 'required': ['ToolsList',
14401 'DisableSSLHostnameVerification',
14404 'ToolsResults': {'additionalProperties': False,
14405 'properties': {'Results': {'items': {'$ref': '#/definitions/ToolsResult'},
14407 'required': ['Results'],
14409 'UpdateBehavior': {'additionalProperties': False,
14410 'properties': {'EnableOSRefreshUpdate': {'type': 'boolean'},
14411 'EnableOSUpgrade': {'type': 'boolean'}},
14412 'required': ['EnableOSRefreshUpdate',
14413 'EnableOSUpgrade'],
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'},
14425 'tags': {'items': {'type': 'string'},
14427 'virt-type': {'type': 'string'}},
14429 'Volume': {'additionalProperties': False,
14430 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'},
14431 'volumetag': {'type': 'string'}},
14432 'required': ['volumetag', 'info'],
14434 'VolumeAttachmentInfo': {'additionalProperties': False,
14435 'properties': {'busaddress': {'type': 'string'},
14436 'devicelink': {'type': 'string'},
14437 'devicename': {'type': 'string'},
14438 'read-only': {'type': 'boolean'}},
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',
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'],
14458 'VolumeParams': {'additionalProperties': False,
14459 'properties': {'attachment': {'$ref': '#/definitions/VolumeAttachmentParams'},
14460 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
14461 'type': 'object'}},
14463 'provider': {'type': 'string'},
14464 'size': {'type': 'integer'},
14465 'tags': {'patternProperties': {'.*': {'type': 'string'}},
14467 'volumetag': {'type': 'string'}},
14468 'required': ['volumetag', 'size', 'provider'],
14470 'WatchContainer': {'additionalProperties': False,
14471 'properties': {'ContainerType': {'type': 'string'},
14472 'MachineTag': {'type': 'string'}},
14473 'required': ['MachineTag', 'ContainerType'],
14475 'WatchContainers': {'additionalProperties': False,
14476 'properties': {'Params': {'items': {'$ref': '#/definitions/WatchContainer'},
14478 'required': ['Params'],
14480 'caveat': {'additionalProperties': False,
14481 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
14482 'location': {'$ref': '#/definitions/packet'},
14483 'verificationId': {'$ref': '#/definitions/packet'}},
14484 'required': ['location',
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'}},
14496 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
14498 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
14500 'Constraints': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14501 'Result': {'$ref': '#/definitions/ConstraintsResults'}},
14503 'ContainerConfig': {'properties': {'Result': {'$ref': '#/definitions/ContainerConfig'}},
14505 'ContainerManagerConfig': {'properties': {'Params': {'$ref': '#/definitions/ContainerManagerConfigParams'},
14506 'Result': {'$ref': '#/definitions/ContainerManagerConfig'}},
14508 'DistributionGroup': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14509 'Result': {'$ref': '#/definitions/DistributionGroupResults'}},
14511 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14512 'Result': {'$ref': '#/definitions/ErrorResults'}},
14514 'FindTools': {'properties': {'Params': {'$ref': '#/definitions/FindToolsParams'},
14515 'Result': {'$ref': '#/definitions/FindToolsResult'}},
14517 'GetContainerInterfaceInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14518 'Result': {'$ref': '#/definitions/MachineNetworkConfigResults'}},
14520 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14521 'Result': {'$ref': '#/definitions/StringResults'}},
14523 'InstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14524 'Result': {'$ref': '#/definitions/StatusResults'}},
14526 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14527 'Result': {'$ref': '#/definitions/LifeResults'}},
14529 'MachinesWithTransientErrors': {'properties': {'Result': {'$ref': '#/definitions/StatusResults'}},
14531 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
14533 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
14535 'PrepareContainerInterfaceInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14536 'Result': {'$ref': '#/definitions/MachineNetworkConfigResults'}},
14538 'ProvisioningInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14539 'Result': {'$ref': '#/definitions/ProvisioningInfoResults'}},
14541 'ReleaseContainerAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14542 'Result': {'$ref': '#/definitions/ErrorResults'}},
14544 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14545 'Result': {'$ref': '#/definitions/ErrorResults'}},
14547 'Series': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14548 'Result': {'$ref': '#/definitions/StringResults'}},
14550 'SetInstanceInfo': {'properties': {'Params': {'$ref': '#/definitions/InstancesInfo'},
14551 'Result': {'$ref': '#/definitions/ErrorResults'}},
14553 'SetInstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
14554 'Result': {'$ref': '#/definitions/ErrorResults'}},
14556 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
14557 'Result': {'$ref': '#/definitions/ErrorResults'}},
14559 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
14560 'Result': {'$ref': '#/definitions/ErrorResults'}},
14562 'SetSupportedContainers': {'properties': {'Params': {'$ref': '#/definitions/MachineContainersParams'},
14563 'Result': {'$ref': '#/definitions/ErrorResults'}},
14565 'StateAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
14567 'Status': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14568 'Result': {'$ref': '#/definitions/StatusResults'}},
14570 'Tools': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14571 'Result': {'$ref': '#/definitions/ToolsResults'}},
14573 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
14574 'Result': {'$ref': '#/definitions/ErrorResults'}},
14576 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
14578 'WatchAllContainers': {'properties': {'Params': {'$ref': '#/definitions/WatchContainers'},
14579 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
14581 'WatchContainers': {'properties': {'Params': {'$ref': '#/definitions/WatchContainers'},
14582 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
14584 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
14586 'WatchMachineErrorRetry': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
14588 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
14589 'type': 'object'}},
14593 @ReturnMapping(StringsResult
)
14594 async def APIAddresses(self
):
14597 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[str]]
14599 # map input types to rpc msg
14601 msg
= dict(Type
='Provisioner', Request
='APIAddresses', Version
=3, Params
=params
)
14603 reply
= await self
.rpc(msg
)
14608 @ReturnMapping(APIHostPortsResult
)
14609 async def APIHostPorts(self
):
14612 Returns -> typing.Sequence[~HostPort]
14614 # map input types to rpc msg
14616 msg
= dict(Type
='Provisioner', Request
='APIHostPorts', Version
=3, Params
=params
)
14618 reply
= await self
.rpc(msg
)
14623 @ReturnMapping(BytesResult
)
14624 async def CACert(self
):
14627 Returns -> typing.Sequence[int]
14629 # map input types to rpc msg
14631 msg
= dict(Type
='Provisioner', Request
='CACert', Version
=3, Params
=params
)
14633 reply
= await self
.rpc(msg
)
14638 @ReturnMapping(ConstraintsResults
)
14639 async def Constraints(self
, entities
):
14641 entities : typing.Sequence[~Entity]
14642 Returns -> typing.Sequence[~ConstraintsResult]
14644 # map input types to rpc msg
14646 msg
= dict(Type
='Provisioner', Request
='Constraints', Version
=3, Params
=params
)
14647 params
['Entities'] = entities
14648 reply
= await self
.rpc(msg
)
14653 @ReturnMapping(ContainerConfig
)
14654 async def ContainerConfig(self
):
14657 Returns -> typing.Union[bool, str, _ForwardRef('Settings'), _ForwardRef('Settings'), _ForwardRef('UpdateBehavior')]
14659 # map input types to rpc msg
14661 msg
= dict(Type
='Provisioner', Request
='ContainerConfig', Version
=3, Params
=params
)
14663 reply
= await self
.rpc(msg
)
14668 @ReturnMapping(ContainerManagerConfig
)
14669 async def ContainerManagerConfig(self
, type_
):
14672 Returns -> typing.Mapping[str, str]
14674 # map input types to rpc msg
14676 msg
= dict(Type
='Provisioner', Request
='ContainerManagerConfig', Version
=3, Params
=params
)
14677 params
['Type'] = type_
14678 reply
= await self
.rpc(msg
)
14683 @ReturnMapping(DistributionGroupResults
)
14684 async def DistributionGroup(self
, entities
):
14686 entities : typing.Sequence[~Entity]
14687 Returns -> typing.Sequence[~DistributionGroupResult]
14689 # map input types to rpc msg
14691 msg
= dict(Type
='Provisioner', Request
='DistributionGroup', Version
=3, Params
=params
)
14692 params
['Entities'] = entities
14693 reply
= await self
.rpc(msg
)
14698 @ReturnMapping(ErrorResults
)
14699 async def EnsureDead(self
, entities
):
14701 entities : typing.Sequence[~Entity]
14702 Returns -> typing.Sequence[~ErrorResult]
14704 # map input types to rpc msg
14706 msg
= dict(Type
='Provisioner', Request
='EnsureDead', Version
=3, Params
=params
)
14707 params
['Entities'] = entities
14708 reply
= await self
.rpc(msg
)
14713 @ReturnMapping(FindToolsResult
)
14714 async def FindTools(self
, arch
, majorversion
, minorversion
, number
, series
):
14721 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[~Tools]]
14723 # map input types to rpc msg
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
)
14736 @ReturnMapping(MachineNetworkConfigResults
)
14737 async def GetContainerInterfaceInfo(self
, entities
):
14739 entities : typing.Sequence[~Entity]
14740 Returns -> typing.Sequence[~MachineNetworkConfigResult]
14742 # map input types to rpc msg
14744 msg
= dict(Type
='Provisioner', Request
='GetContainerInterfaceInfo', Version
=3, Params
=params
)
14745 params
['Entities'] = entities
14746 reply
= await self
.rpc(msg
)
14751 @ReturnMapping(StringResults
)
14752 async def InstanceId(self
, entities
):
14754 entities : typing.Sequence[~Entity]
14755 Returns -> typing.Sequence[~StringResult]
14757 # map input types to rpc msg
14759 msg
= dict(Type
='Provisioner', Request
='InstanceId', Version
=3, Params
=params
)
14760 params
['Entities'] = entities
14761 reply
= await self
.rpc(msg
)
14766 @ReturnMapping(StatusResults
)
14767 async def InstanceStatus(self
, entities
):
14769 entities : typing.Sequence[~Entity]
14770 Returns -> typing.Sequence[~StatusResult]
14772 # map input types to rpc msg
14774 msg
= dict(Type
='Provisioner', Request
='InstanceStatus', Version
=3, Params
=params
)
14775 params
['Entities'] = entities
14776 reply
= await self
.rpc(msg
)
14781 @ReturnMapping(LifeResults
)
14782 async def Life(self
, entities
):
14784 entities : typing.Sequence[~Entity]
14785 Returns -> typing.Sequence[~LifeResult]
14787 # map input types to rpc msg
14789 msg
= dict(Type
='Provisioner', Request
='Life', Version
=3, Params
=params
)
14790 params
['Entities'] = entities
14791 reply
= await self
.rpc(msg
)
14796 @ReturnMapping(StatusResults
)
14797 async def MachinesWithTransientErrors(self
):
14800 Returns -> typing.Sequence[~StatusResult]
14802 # map input types to rpc msg
14804 msg
= dict(Type
='Provisioner', Request
='MachinesWithTransientErrors', Version
=3, Params
=params
)
14806 reply
= await self
.rpc(msg
)
14811 @ReturnMapping(ModelConfigResult
)
14812 async def ModelConfig(self
):
14815 Returns -> typing.Mapping[str, typing.Any]
14817 # map input types to rpc msg
14819 msg
= dict(Type
='Provisioner', Request
='ModelConfig', Version
=3, Params
=params
)
14821 reply
= await self
.rpc(msg
)
14826 @ReturnMapping(StringResult
)
14827 async def ModelUUID(self
):
14830 Returns -> typing.Union[_ForwardRef('Error'), str]
14832 # map input types to rpc msg
14834 msg
= dict(Type
='Provisioner', Request
='ModelUUID', Version
=3, Params
=params
)
14836 reply
= await self
.rpc(msg
)
14841 @ReturnMapping(MachineNetworkConfigResults
)
14842 async def PrepareContainerInterfaceInfo(self
, entities
):
14844 entities : typing.Sequence[~Entity]
14845 Returns -> typing.Sequence[~MachineNetworkConfigResult]
14847 # map input types to rpc msg
14849 msg
= dict(Type
='Provisioner', Request
='PrepareContainerInterfaceInfo', Version
=3, Params
=params
)
14850 params
['Entities'] = entities
14851 reply
= await self
.rpc(msg
)
14856 @ReturnMapping(ProvisioningInfoResults
)
14857 async def ProvisioningInfo(self
, entities
):
14859 entities : typing.Sequence[~Entity]
14860 Returns -> typing.Sequence[~ProvisioningInfoResult]
14862 # map input types to rpc msg
14864 msg
= dict(Type
='Provisioner', Request
='ProvisioningInfo', Version
=3, Params
=params
)
14865 params
['Entities'] = entities
14866 reply
= await self
.rpc(msg
)
14871 @ReturnMapping(ErrorResults
)
14872 async def ReleaseContainerAddresses(self
, entities
):
14874 entities : typing.Sequence[~Entity]
14875 Returns -> typing.Sequence[~ErrorResult]
14877 # map input types to rpc msg
14879 msg
= dict(Type
='Provisioner', Request
='ReleaseContainerAddresses', Version
=3, Params
=params
)
14880 params
['Entities'] = entities
14881 reply
= await self
.rpc(msg
)
14886 @ReturnMapping(ErrorResults
)
14887 async def Remove(self
, entities
):
14889 entities : typing.Sequence[~Entity]
14890 Returns -> typing.Sequence[~ErrorResult]
14892 # map input types to rpc msg
14894 msg
= dict(Type
='Provisioner', Request
='Remove', Version
=3, Params
=params
)
14895 params
['Entities'] = entities
14896 reply
= await self
.rpc(msg
)
14901 @ReturnMapping(StringResults
)
14902 async def Series(self
, entities
):
14904 entities : typing.Sequence[~Entity]
14905 Returns -> typing.Sequence[~StringResult]
14907 # map input types to rpc msg
14909 msg
= dict(Type
='Provisioner', Request
='Series', Version
=3, Params
=params
)
14910 params
['Entities'] = entities
14911 reply
= await self
.rpc(msg
)
14916 @ReturnMapping(ErrorResults
)
14917 async def SetInstanceInfo(self
, machines
):
14919 machines : typing.Sequence[~InstanceInfo]
14920 Returns -> typing.Sequence[~ErrorResult]
14922 # map input types to rpc msg
14924 msg
= dict(Type
='Provisioner', Request
='SetInstanceInfo', Version
=3, Params
=params
)
14925 params
['Machines'] = machines
14926 reply
= await self
.rpc(msg
)
14931 @ReturnMapping(ErrorResults
)
14932 async def SetInstanceStatus(self
, entities
):
14934 entities : typing.Sequence[~EntityStatusArgs]
14935 Returns -> typing.Sequence[~ErrorResult]
14937 # map input types to rpc msg
14939 msg
= dict(Type
='Provisioner', Request
='SetInstanceStatus', Version
=3, Params
=params
)
14940 params
['Entities'] = entities
14941 reply
= await self
.rpc(msg
)
14946 @ReturnMapping(ErrorResults
)
14947 async def SetPasswords(self
, changes
):
14949 changes : typing.Sequence[~EntityPassword]
14950 Returns -> typing.Sequence[~ErrorResult]
14952 # map input types to rpc msg
14954 msg
= dict(Type
='Provisioner', Request
='SetPasswords', Version
=3, Params
=params
)
14955 params
['Changes'] = changes
14956 reply
= await self
.rpc(msg
)
14961 @ReturnMapping(ErrorResults
)
14962 async def SetStatus(self
, entities
):
14964 entities : typing.Sequence[~EntityStatusArgs]
14965 Returns -> typing.Sequence[~ErrorResult]
14967 # map input types to rpc msg
14969 msg
= dict(Type
='Provisioner', Request
='SetStatus', Version
=3, Params
=params
)
14970 params
['Entities'] = entities
14971 reply
= await self
.rpc(msg
)
14976 @ReturnMapping(ErrorResults
)
14977 async def SetSupportedContainers(self
, params
):
14979 params : typing.Sequence[~MachineContainers]
14980 Returns -> typing.Sequence[~ErrorResult]
14982 # map input types to rpc msg
14984 msg
= dict(Type
='Provisioner', Request
='SetSupportedContainers', Version
=3, Params
=params
)
14985 params
['Params'] = params
14986 reply
= await self
.rpc(msg
)
14991 @ReturnMapping(StringsResult
)
14992 async def StateAddresses(self
):
14995 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[str]]
14997 # map input types to rpc msg
14999 msg
= dict(Type
='Provisioner', Request
='StateAddresses', Version
=3, Params
=params
)
15001 reply
= await self
.rpc(msg
)
15006 @ReturnMapping(StatusResults
)
15007 async def Status(self
, entities
):
15009 entities : typing.Sequence[~Entity]
15010 Returns -> typing.Sequence[~StatusResult]
15012 # map input types to rpc msg
15014 msg
= dict(Type
='Provisioner', Request
='Status', Version
=3, Params
=params
)
15015 params
['Entities'] = entities
15016 reply
= await self
.rpc(msg
)
15021 @ReturnMapping(ToolsResults
)
15022 async def Tools(self
, entities
):
15024 entities : typing.Sequence[~Entity]
15025 Returns -> typing.Sequence[~ToolsResult]
15027 # map input types to rpc msg
15029 msg
= dict(Type
='Provisioner', Request
='Tools', Version
=3, Params
=params
)
15030 params
['Entities'] = entities
15031 reply
= await self
.rpc(msg
)
15036 @ReturnMapping(ErrorResults
)
15037 async def UpdateStatus(self
, entities
):
15039 entities : typing.Sequence[~EntityStatusArgs]
15040 Returns -> typing.Sequence[~ErrorResult]
15042 # map input types to rpc msg
15044 msg
= dict(Type
='Provisioner', Request
='UpdateStatus', Version
=3, Params
=params
)
15045 params
['Entities'] = entities
15046 reply
= await self
.rpc(msg
)
15051 @ReturnMapping(NotifyWatchResult
)
15052 async def WatchAPIHostPorts(self
):
15055 Returns -> typing.Union[_ForwardRef('Error'), str]
15057 # map input types to rpc msg
15059 msg
= dict(Type
='Provisioner', Request
='WatchAPIHostPorts', Version
=3, Params
=params
)
15061 reply
= await self
.rpc(msg
)
15066 @ReturnMapping(StringsWatchResults
)
15067 async def WatchAllContainers(self
, params
):
15069 params : typing.Sequence[~WatchContainer]
15070 Returns -> typing.Sequence[~StringsWatchResult]
15072 # map input types to rpc msg
15074 msg
= dict(Type
='Provisioner', Request
='WatchAllContainers', Version
=3, Params
=params
)
15075 params
['Params'] = params
15076 reply
= await self
.rpc(msg
)
15081 @ReturnMapping(StringsWatchResults
)
15082 async def WatchContainers(self
, params
):
15084 params : typing.Sequence[~WatchContainer]
15085 Returns -> typing.Sequence[~StringsWatchResult]
15087 # map input types to rpc msg
15089 msg
= dict(Type
='Provisioner', Request
='WatchContainers', Version
=3, Params
=params
)
15090 params
['Params'] = params
15091 reply
= await self
.rpc(msg
)
15096 @ReturnMapping(NotifyWatchResult
)
15097 async def WatchForModelConfigChanges(self
):
15100 Returns -> typing.Union[_ForwardRef('Error'), str]
15102 # map input types to rpc msg
15104 msg
= dict(Type
='Provisioner', Request
='WatchForModelConfigChanges', Version
=3, Params
=params
)
15106 reply
= await self
.rpc(msg
)
15111 @ReturnMapping(NotifyWatchResult
)
15112 async def WatchMachineErrorRetry(self
):
15115 Returns -> typing.Union[_ForwardRef('Error'), str]
15117 # map input types to rpc msg
15119 msg
= dict(Type
='Provisioner', Request
='WatchMachineErrorRetry', Version
=3, Params
=params
)
15121 reply
= await self
.rpc(msg
)
15126 @ReturnMapping(StringsWatchResult
)
15127 async def WatchModelMachines(self
):
15130 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')]
15132 # map input types to rpc msg
15134 msg
= dict(Type
='Provisioner', Request
='WatchModelMachines', Version
=3, Params
=params
)
15136 reply
= await self
.rpc(msg
)
15140 class ProxyUpdater(Type
):
15141 name
= 'ProxyUpdater'
15143 schema
= {'definitions': {'Entities': {'additionalProperties': False,
15144 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
15146 'required': ['Entities'],
15148 'Entity': {'additionalProperties': False,
15149 'properties': {'Tag': {'type': 'string'}},
15150 'required': ['Tag'],
15152 'Error': {'additionalProperties': False,
15153 'properties': {'Code': {'type': 'string'},
15154 'Info': {'$ref': '#/definitions/ErrorInfo'},
15155 'Message': {'type': 'string'}},
15156 'required': ['Message', 'Code'],
15158 'ErrorInfo': {'additionalProperties': False,
15159 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
15160 'MacaroonPath': {'type': 'string'}},
15162 'Macaroon': {'additionalProperties': False,
15163 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
15165 'data': {'items': {'type': 'integer'},
15167 'id': {'$ref': '#/definitions/packet'},
15168 'location': {'$ref': '#/definitions/packet'},
15169 'sig': {'items': {'type': 'integer'},
15171 'required': ['data',
15177 'NotifyWatchResult': {'additionalProperties': False,
15178 'properties': {'Error': {'$ref': '#/definitions/Error'},
15179 'NotifyWatcherId': {'type': 'string'}},
15180 'required': ['NotifyWatcherId', 'Error'],
15182 'NotifyWatchResults': {'additionalProperties': False,
15183 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
15185 'required': ['Results'],
15187 'ProxyConfig': {'additionalProperties': False,
15188 'properties': {'FTP': {'type': 'string'},
15189 'HTTP': {'type': 'string'},
15190 'HTTPS': {'type': 'string'},
15191 'NoProxy': {'type': 'string'}},
15192 'required': ['HTTP',
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'],
15204 'ProxyConfigResults': {'additionalProperties': False,
15205 'properties': {'Results': {'items': {'$ref': '#/definitions/ProxyConfigResult'},
15207 'required': ['Results'],
15209 'caveat': {'additionalProperties': False,
15210 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
15211 'location': {'$ref': '#/definitions/packet'},
15212 'verificationId': {'$ref': '#/definitions/packet'}},
15213 'required': ['location',
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'}},
15226 'WatchForProxyConfigAndAPIHostPortChanges': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15227 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
15228 'type': 'object'}},
15232 @ReturnMapping(ProxyConfigResults
)
15233 async def ProxyConfig(self
, entities
):
15235 entities : typing.Sequence[~Entity]
15236 Returns -> typing.Sequence[~ProxyConfigResult]
15238 # map input types to rpc msg
15240 msg
= dict(Type
='ProxyUpdater', Request
='ProxyConfig', Version
=1, Params
=params
)
15241 params
['Entities'] = entities
15242 reply
= await self
.rpc(msg
)
15247 @ReturnMapping(NotifyWatchResults
)
15248 async def WatchForProxyConfigAndAPIHostPortChanges(self
, entities
):
15250 entities : typing.Sequence[~Entity]
15251 Returns -> typing.Sequence[~NotifyWatchResult]
15253 # map input types to rpc msg
15255 msg
= dict(Type
='ProxyUpdater', Request
='WatchForProxyConfigAndAPIHostPortChanges', Version
=1, Params
=params
)
15256 params
['Entities'] = entities
15257 reply
= await self
.rpc(msg
)
15261 class Reboot(Type
):
15264 schema
= {'definitions': {'Entities': {'additionalProperties': False,
15265 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
15267 'required': ['Entities'],
15269 'Entity': {'additionalProperties': False,
15270 'properties': {'Tag': {'type': 'string'}},
15271 'required': ['Tag'],
15273 'Error': {'additionalProperties': False,
15274 'properties': {'Code': {'type': 'string'},
15275 'Info': {'$ref': '#/definitions/ErrorInfo'},
15276 'Message': {'type': 'string'}},
15277 'required': ['Message', 'Code'],
15279 'ErrorInfo': {'additionalProperties': False,
15280 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
15281 'MacaroonPath': {'type': 'string'}},
15283 'ErrorResult': {'additionalProperties': False,
15284 'properties': {'Error': {'$ref': '#/definitions/Error'}},
15285 'required': ['Error'],
15287 'ErrorResults': {'additionalProperties': False,
15288 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
15290 'required': ['Results'],
15292 'Macaroon': {'additionalProperties': False,
15293 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
15295 'data': {'items': {'type': 'integer'},
15297 'id': {'$ref': '#/definitions/packet'},
15298 'location': {'$ref': '#/definitions/packet'},
15299 'sig': {'items': {'type': 'integer'},
15301 'required': ['data',
15307 'NotifyWatchResult': {'additionalProperties': False,
15308 'properties': {'Error': {'$ref': '#/definitions/Error'},
15309 'NotifyWatcherId': {'type': 'string'}},
15310 'required': ['NotifyWatcherId', 'Error'],
15312 'RebootActionResult': {'additionalProperties': False,
15313 'properties': {'error': {'$ref': '#/definitions/Error'},
15314 'result': {'type': 'string'}},
15316 'RebootActionResults': {'additionalProperties': False,
15317 'properties': {'results': {'items': {'$ref': '#/definitions/RebootActionResult'},
15320 'caveat': {'additionalProperties': False,
15321 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
15322 'location': {'$ref': '#/definitions/packet'},
15323 'verificationId': {'$ref': '#/definitions/packet'}},
15324 'required': ['location',
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'}},
15337 'GetRebootAction': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15338 'Result': {'$ref': '#/definitions/RebootActionResults'}},
15340 'RequestReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15341 'Result': {'$ref': '#/definitions/ErrorResults'}},
15343 'WatchForRebootEvent': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
15344 'type': 'object'}},
15348 @ReturnMapping(ErrorResults
)
15349 async def ClearReboot(self
, entities
):
15351 entities : typing.Sequence[~Entity]
15352 Returns -> typing.Sequence[~ErrorResult]
15354 # map input types to rpc msg
15356 msg
= dict(Type
='Reboot', Request
='ClearReboot', Version
=2, Params
=params
)
15357 params
['Entities'] = entities
15358 reply
= await self
.rpc(msg
)
15363 @ReturnMapping(RebootActionResults
)
15364 async def GetRebootAction(self
, entities
):
15366 entities : typing.Sequence[~Entity]
15367 Returns -> typing.Sequence[~RebootActionResult]
15369 # map input types to rpc msg
15371 msg
= dict(Type
='Reboot', Request
='GetRebootAction', Version
=2, Params
=params
)
15372 params
['Entities'] = entities
15373 reply
= await self
.rpc(msg
)
15378 @ReturnMapping(ErrorResults
)
15379 async def RequestReboot(self
, entities
):
15381 entities : typing.Sequence[~Entity]
15382 Returns -> typing.Sequence[~ErrorResult]
15384 # map input types to rpc msg
15386 msg
= dict(Type
='Reboot', Request
='RequestReboot', Version
=2, Params
=params
)
15387 params
['Entities'] = entities
15388 reply
= await self
.rpc(msg
)
15393 @ReturnMapping(NotifyWatchResult
)
15394 async def WatchForRebootEvent(self
):
15397 Returns -> typing.Union[_ForwardRef('Error'), str]
15399 # map input types to rpc msg
15401 msg
= dict(Type
='Reboot', Request
='WatchForRebootEvent', Version
=2, Params
=params
)
15403 reply
= await self
.rpc(msg
)
15407 class RelationUnitsWatcher(Type
):
15408 name
= 'RelationUnitsWatcher'
15410 schema
= {'definitions': {'Error': {'additionalProperties': False,
15411 'properties': {'Code': {'type': 'string'},
15412 'Info': {'$ref': '#/definitions/ErrorInfo'},
15413 'Message': {'type': 'string'}},
15414 'required': ['Message', 'Code'],
15416 'ErrorInfo': {'additionalProperties': False,
15417 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
15418 'MacaroonPath': {'type': 'string'}},
15420 'Macaroon': {'additionalProperties': False,
15421 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
15423 'data': {'items': {'type': 'integer'},
15425 'id': {'$ref': '#/definitions/packet'},
15426 'location': {'$ref': '#/definitions/packet'},
15427 'sig': {'items': {'type': 'integer'},
15429 'required': ['data',
15435 'RelationUnitsChange': {'additionalProperties': False,
15436 'properties': {'Changed': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitSettings'}},
15438 'Departed': {'items': {'type': 'string'},
15440 'required': ['Changed', 'Departed'],
15442 'RelationUnitsWatchResult': {'additionalProperties': False,
15443 'properties': {'Changes': {'$ref': '#/definitions/RelationUnitsChange'},
15444 'Error': {'$ref': '#/definitions/Error'},
15445 'RelationUnitsWatcherId': {'type': 'string'}},
15446 'required': ['RelationUnitsWatcherId',
15450 'UnitSettings': {'additionalProperties': False,
15451 'properties': {'Version': {'type': 'integer'}},
15452 'required': ['Version'],
15454 'caveat': {'additionalProperties': False,
15455 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
15456 'location': {'$ref': '#/definitions/packet'},
15457 'verificationId': {'$ref': '#/definitions/packet'}},
15458 'required': ['location',
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'}},
15470 'Stop': {'type': 'object'}},
15474 @ReturnMapping(RelationUnitsWatchResult
)
15475 async def Next(self
):
15478 Returns -> typing.Union[_ForwardRef('RelationUnitsChange'), _ForwardRef('Error'), str]
15480 # map input types to rpc msg
15482 msg
= dict(Type
='RelationUnitsWatcher', Request
='Next', Version
=1, Params
=params
)
15484 reply
= await self
.rpc(msg
)
15489 @ReturnMapping(None)
15490 async def Stop(self
):
15495 # map input types to rpc msg
15497 msg
= dict(Type
='RelationUnitsWatcher', Request
='Stop', Version
=1, Params
=params
)
15499 reply
= await self
.rpc(msg
)
15503 class Resumer(Type
):
15506 schema
= {'properties': {'ResumeTransactions': {'type': 'object'}}, 'type': 'object'}
15509 @ReturnMapping(None)
15510 async def ResumeTransactions(self
):
15515 # map input types to rpc msg
15517 msg
= dict(Type
='Resumer', Request
='ResumeTransactions', Version
=2, Params
=params
)
15519 reply
= await self
.rpc(msg
)
15523 class RetryStrategy(Type
):
15524 name
= 'RetryStrategy'
15526 schema
= {'definitions': {'Entities': {'additionalProperties': False,
15527 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
15529 'required': ['Entities'],
15531 'Entity': {'additionalProperties': False,
15532 'properties': {'Tag': {'type': 'string'}},
15533 'required': ['Tag'],
15535 'Error': {'additionalProperties': False,
15536 'properties': {'Code': {'type': 'string'},
15537 'Info': {'$ref': '#/definitions/ErrorInfo'},
15538 'Message': {'type': 'string'}},
15539 'required': ['Message', 'Code'],
15541 'ErrorInfo': {'additionalProperties': False,
15542 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
15543 'MacaroonPath': {'type': 'string'}},
15545 'Macaroon': {'additionalProperties': False,
15546 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
15548 'data': {'items': {'type': 'integer'},
15550 'id': {'$ref': '#/definitions/packet'},
15551 'location': {'$ref': '#/definitions/packet'},
15552 'sig': {'items': {'type': 'integer'},
15554 'required': ['data',
15560 'NotifyWatchResult': {'additionalProperties': False,
15561 'properties': {'Error': {'$ref': '#/definitions/Error'},
15562 'NotifyWatcherId': {'type': 'string'}},
15563 'required': ['NotifyWatcherId', 'Error'],
15565 'NotifyWatchResults': {'additionalProperties': False,
15566 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
15568 'required': ['Results'],
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',
15580 'RetryTimeFactor'],
15582 'RetryStrategyResult': {'additionalProperties': False,
15583 'properties': {'Error': {'$ref': '#/definitions/Error'},
15584 'Result': {'$ref': '#/definitions/RetryStrategy'}},
15585 'required': ['Error', 'Result'],
15587 'RetryStrategyResults': {'additionalProperties': False,
15588 'properties': {'Results': {'items': {'$ref': '#/definitions/RetryStrategyResult'},
15590 'required': ['Results'],
15592 'caveat': {'additionalProperties': False,
15593 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
15594 'location': {'$ref': '#/definitions/packet'},
15595 'verificationId': {'$ref': '#/definitions/packet'}},
15596 'required': ['location',
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'}},
15609 'WatchRetryStrategy': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15610 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
15611 'type': 'object'}},
15615 @ReturnMapping(RetryStrategyResults
)
15616 async def RetryStrategy(self
, entities
):
15618 entities : typing.Sequence[~Entity]
15619 Returns -> typing.Sequence[~RetryStrategyResult]
15621 # map input types to rpc msg
15623 msg
= dict(Type
='RetryStrategy', Request
='RetryStrategy', Version
=1, Params
=params
)
15624 params
['Entities'] = entities
15625 reply
= await self
.rpc(msg
)
15630 @ReturnMapping(NotifyWatchResults
)
15631 async def WatchRetryStrategy(self
, entities
):
15633 entities : typing.Sequence[~Entity]
15634 Returns -> typing.Sequence[~NotifyWatchResult]
15636 # map input types to rpc msg
15638 msg
= dict(Type
='RetryStrategy', Request
='WatchRetryStrategy', Version
=1, Params
=params
)
15639 params
['Entities'] = entities
15640 reply
= await self
.rpc(msg
)
15644 class SSHClient(Type
):
15647 schema
= {'definitions': {'Entities': {'additionalProperties': False,
15648 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
15650 'required': ['Entities'],
15652 'Entity': {'additionalProperties': False,
15653 'properties': {'Tag': {'type': 'string'}},
15654 'required': ['Tag'],
15656 'Error': {'additionalProperties': False,
15657 'properties': {'Code': {'type': 'string'},
15658 'Info': {'$ref': '#/definitions/ErrorInfo'},
15659 'Message': {'type': 'string'}},
15660 'required': ['Message', 'Code'],
15662 'ErrorInfo': {'additionalProperties': False,
15663 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
15664 'MacaroonPath': {'type': 'string'}},
15666 'Macaroon': {'additionalProperties': False,
15667 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
15669 'data': {'items': {'type': 'integer'},
15671 'id': {'$ref': '#/definitions/packet'},
15672 'location': {'$ref': '#/definitions/packet'},
15673 'sig': {'items': {'type': 'integer'},
15675 'required': ['data',
15681 'SSHAddressResult': {'additionalProperties': False,
15682 'properties': {'address': {'type': 'string'},
15683 'error': {'$ref': '#/definitions/Error'}},
15685 'SSHAddressResults': {'additionalProperties': False,
15686 'properties': {'results': {'items': {'$ref': '#/definitions/SSHAddressResult'},
15688 'required': ['results'],
15690 'SSHProxyResult': {'additionalProperties': False,
15691 'properties': {'use-proxy': {'type': 'boolean'}},
15692 'required': ['use-proxy'],
15694 'SSHPublicKeysResult': {'additionalProperties': False,
15695 'properties': {'error': {'$ref': '#/definitions/Error'},
15696 'public-keys': {'items': {'type': 'string'},
15699 'SSHPublicKeysResults': {'additionalProperties': False,
15700 'properties': {'results': {'items': {'$ref': '#/definitions/SSHPublicKeysResult'},
15702 'required': ['results'],
15704 'caveat': {'additionalProperties': False,
15705 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
15706 'location': {'$ref': '#/definitions/packet'},
15707 'verificationId': {'$ref': '#/definitions/packet'}},
15708 'required': ['location',
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'}},
15721 'Proxy': {'properties': {'Result': {'$ref': '#/definitions/SSHProxyResult'}},
15723 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15724 'Result': {'$ref': '#/definitions/SSHAddressResults'}},
15726 'PublicKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15727 'Result': {'$ref': '#/definitions/SSHPublicKeysResults'}},
15728 'type': 'object'}},
15732 @ReturnMapping(SSHAddressResults
)
15733 async def PrivateAddress(self
, entities
):
15735 entities : typing.Sequence[~Entity]
15736 Returns -> typing.Sequence[~SSHAddressResult]
15738 # map input types to rpc msg
15740 msg
= dict(Type
='SSHClient', Request
='PrivateAddress', Version
=1, Params
=params
)
15741 params
['Entities'] = entities
15742 reply
= await self
.rpc(msg
)
15747 @ReturnMapping(SSHProxyResult
)
15748 async def Proxy(self
):
15753 # map input types to rpc msg
15755 msg
= dict(Type
='SSHClient', Request
='Proxy', Version
=1, Params
=params
)
15757 reply
= await self
.rpc(msg
)
15762 @ReturnMapping(SSHAddressResults
)
15763 async def PublicAddress(self
, entities
):
15765 entities : typing.Sequence[~Entity]
15766 Returns -> typing.Sequence[~SSHAddressResult]
15768 # map input types to rpc msg
15770 msg
= dict(Type
='SSHClient', Request
='PublicAddress', Version
=1, Params
=params
)
15771 params
['Entities'] = entities
15772 reply
= await self
.rpc(msg
)
15777 @ReturnMapping(SSHPublicKeysResults
)
15778 async def PublicKeys(self
, entities
):
15780 entities : typing.Sequence[~Entity]
15781 Returns -> typing.Sequence[~SSHPublicKeysResult]
15783 # map input types to rpc msg
15785 msg
= dict(Type
='SSHClient', Request
='PublicKeys', Version
=1, Params
=params
)
15786 params
['Entities'] = entities
15787 reply
= await self
.rpc(msg
)
15791 class Singular(Type
):
15794 schema
= {'definitions': {'Entities': {'additionalProperties': False,
15795 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
15797 'required': ['Entities'],
15799 'Entity': {'additionalProperties': False,
15800 'properties': {'Tag': {'type': 'string'}},
15801 'required': ['Tag'],
15803 'Error': {'additionalProperties': False,
15804 'properties': {'Code': {'type': 'string'},
15805 'Info': {'$ref': '#/definitions/ErrorInfo'},
15806 'Message': {'type': 'string'}},
15807 'required': ['Message', 'Code'],
15809 'ErrorInfo': {'additionalProperties': False,
15810 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
15811 'MacaroonPath': {'type': 'string'}},
15813 'ErrorResult': {'additionalProperties': False,
15814 'properties': {'Error': {'$ref': '#/definitions/Error'}},
15815 'required': ['Error'],
15817 'ErrorResults': {'additionalProperties': False,
15818 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
15820 'required': ['Results'],
15822 'Macaroon': {'additionalProperties': False,
15823 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
15825 'data': {'items': {'type': 'integer'},
15827 'id': {'$ref': '#/definitions/packet'},
15828 'location': {'$ref': '#/definitions/packet'},
15829 'sig': {'items': {'type': 'integer'},
15831 'required': ['data',
15837 'SingularClaim': {'additionalProperties': False,
15838 'properties': {'ControllerTag': {'type': 'string'},
15839 'Duration': {'type': 'integer'},
15840 'ModelTag': {'type': 'string'}},
15841 'required': ['ModelTag',
15845 'SingularClaims': {'additionalProperties': False,
15846 'properties': {'Claims': {'items': {'$ref': '#/definitions/SingularClaim'},
15848 'required': ['Claims'],
15850 'caveat': {'additionalProperties': False,
15851 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
15852 'location': {'$ref': '#/definitions/packet'},
15853 'verificationId': {'$ref': '#/definitions/packet'}},
15854 'required': ['location',
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'}},
15867 'Wait': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15868 'Result': {'$ref': '#/definitions/ErrorResults'}},
15869 'type': 'object'}},
15873 @ReturnMapping(ErrorResults
)
15874 async def Claim(self
, claims
):
15876 claims : typing.Sequence[~SingularClaim]
15877 Returns -> typing.Sequence[~ErrorResult]
15879 # map input types to rpc msg
15881 msg
= dict(Type
='Singular', Request
='Claim', Version
=1, Params
=params
)
15882 params
['Claims'] = claims
15883 reply
= await self
.rpc(msg
)
15888 @ReturnMapping(ErrorResults
)
15889 async def Wait(self
, entities
):
15891 entities : typing.Sequence[~Entity]
15892 Returns -> typing.Sequence[~ErrorResult]
15894 # map input types to rpc msg
15896 msg
= dict(Type
='Singular', Request
='Wait', Version
=1, Params
=params
)
15897 params
['Entities'] = entities
15898 reply
= await self
.rpc(msg
)
15902 class Spaces(Type
):
15905 schema
= {'definitions': {'CreateSpaceParams': {'additionalProperties': False,
15906 'properties': {'ProviderId': {'type': 'string'},
15907 'Public': {'type': 'boolean'},
15908 'SpaceTag': {'type': 'string'},
15909 'SubnetTags': {'items': {'type': 'string'},
15911 'required': ['SubnetTags',
15915 'CreateSpacesParams': {'additionalProperties': False,
15916 'properties': {'Spaces': {'items': {'$ref': '#/definitions/CreateSpaceParams'},
15918 'required': ['Spaces'],
15920 'Error': {'additionalProperties': False,
15921 'properties': {'Code': {'type': 'string'},
15922 'Info': {'$ref': '#/definitions/ErrorInfo'},
15923 'Message': {'type': 'string'}},
15924 'required': ['Message', 'Code'],
15926 'ErrorInfo': {'additionalProperties': False,
15927 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
15928 'MacaroonPath': {'type': 'string'}},
15930 'ErrorResult': {'additionalProperties': False,
15931 'properties': {'Error': {'$ref': '#/definitions/Error'}},
15932 'required': ['Error'],
15934 'ErrorResults': {'additionalProperties': False,
15935 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
15937 'required': ['Results'],
15939 'ListSpacesResults': {'additionalProperties': False,
15940 'properties': {'Results': {'items': {'$ref': '#/definitions/Space'},
15942 'required': ['Results'],
15944 'Macaroon': {'additionalProperties': False,
15945 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
15947 'data': {'items': {'type': 'integer'},
15949 'id': {'$ref': '#/definitions/packet'},
15950 'location': {'$ref': '#/definitions/packet'},
15951 'sig': {'items': {'type': 'integer'},
15953 'required': ['data',
15959 'Space': {'additionalProperties': False,
15960 'properties': {'Error': {'$ref': '#/definitions/Error'},
15961 'Name': {'type': 'string'},
15962 'Subnets': {'items': {'$ref': '#/definitions/Subnet'},
15964 'required': ['Name', 'Subnets'],
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'},
15973 'StaticRangeLowIP': {'items': {'type': 'integer'},
15975 'Status': {'type': 'string'},
15976 'VLANTag': {'type': 'integer'},
15977 'Zones': {'items': {'type': 'string'},
15979 'required': ['CIDR',
15985 'caveat': {'additionalProperties': False,
15986 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
15987 'location': {'$ref': '#/definitions/packet'},
15988 'verificationId': {'$ref': '#/definitions/packet'}},
15989 'required': ['location',
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'}},
16002 'ListSpaces': {'properties': {'Result': {'$ref': '#/definitions/ListSpacesResults'}},
16003 'type': 'object'}},
16007 @ReturnMapping(ErrorResults
)
16008 async def CreateSpaces(self
, spaces
):
16010 spaces : typing.Sequence[~CreateSpaceParams]
16011 Returns -> typing.Sequence[~ErrorResult]
16013 # map input types to rpc msg
16015 msg
= dict(Type
='Spaces', Request
='CreateSpaces', Version
=2, Params
=params
)
16016 params
['Spaces'] = spaces
16017 reply
= await self
.rpc(msg
)
16022 @ReturnMapping(ListSpacesResults
)
16023 async def ListSpaces(self
):
16026 Returns -> typing.Sequence[~Space]
16028 # map input types to rpc msg
16030 msg
= dict(Type
='Spaces', Request
='ListSpaces', Version
=2, Params
=params
)
16032 reply
= await self
.rpc(msg
)
16036 class StatusHistory(Type
):
16037 name
= 'StatusHistory'
16039 schema
= {'definitions': {'StatusHistoryPruneArgs': {'additionalProperties': False,
16040 'properties': {'MaxHistoryMB': {'type': 'integer'},
16041 'MaxHistoryTime': {'type': 'integer'}},
16042 'required': ['MaxHistoryTime',
16044 'type': 'object'}},
16045 'properties': {'Prune': {'properties': {'Params': {'$ref': '#/definitions/StatusHistoryPruneArgs'}},
16046 'type': 'object'}},
16050 @ReturnMapping(None)
16051 async def Prune(self
, maxhistorymb
, maxhistorytime
):
16054 maxhistorytime : int
16057 # map input types to rpc msg
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
)
16066 class Storage(Type
):
16069 schema
= {'definitions': {'Entities': {'additionalProperties': False,
16070 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
16072 'required': ['Entities'],
16074 'Entity': {'additionalProperties': False,
16075 'properties': {'Tag': {'type': 'string'}},
16076 'required': ['Tag'],
16078 'EntityStatus': {'additionalProperties': False,
16079 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
16080 'type': 'object'}},
16082 'Info': {'type': 'string'},
16083 'Since': {'format': 'date-time',
16085 'Status': {'type': 'string'}},
16086 'required': ['Status',
16091 'Error': {'additionalProperties': False,
16092 'properties': {'Code': {'type': 'string'},
16093 'Info': {'$ref': '#/definitions/ErrorInfo'},
16094 'Message': {'type': 'string'}},
16095 'required': ['Message', 'Code'],
16097 'ErrorInfo': {'additionalProperties': False,
16098 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
16099 'MacaroonPath': {'type': 'string'}},
16101 'ErrorResult': {'additionalProperties': False,
16102 'properties': {'Error': {'$ref': '#/definitions/Error'}},
16103 'required': ['Error'],
16105 'ErrorResults': {'additionalProperties': False,
16106 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
16108 'required': ['Results'],
16110 'FilesystemAttachmentInfo': {'additionalProperties': False,
16111 'properties': {'mountpoint': {'type': 'string'},
16112 'read-only': {'type': 'boolean'}},
16114 'FilesystemDetails': {'additionalProperties': False,
16115 'properties': {'filesystemtag': {'type': 'string'},
16116 'info': {'$ref': '#/definitions/FilesystemInfo'},
16117 'machineattachments': {'patternProperties': {'.*': {'$ref': '#/definitions/FilesystemAttachmentInfo'}},
16119 'status': {'$ref': '#/definitions/EntityStatus'},
16120 'storage': {'$ref': '#/definitions/StorageDetails'},
16121 'volumetag': {'type': 'string'}},
16122 'required': ['filesystemtag',
16126 'FilesystemDetailsListResult': {'additionalProperties': False,
16127 'properties': {'error': {'$ref': '#/definitions/Error'},
16128 'result': {'items': {'$ref': '#/definitions/FilesystemDetails'},
16131 'FilesystemDetailsListResults': {'additionalProperties': False,
16132 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemDetailsListResult'},
16135 'FilesystemFilter': {'additionalProperties': False,
16136 'properties': {'machines': {'items': {'type': 'string'},
16139 'FilesystemFilters': {'additionalProperties': False,
16140 'properties': {'filters': {'items': {'$ref': '#/definitions/FilesystemFilter'},
16143 'FilesystemInfo': {'additionalProperties': False,
16144 'properties': {'filesystemid': {'type': 'string'},
16145 'size': {'type': 'integer'}},
16146 'required': ['filesystemid', 'size'],
16148 'Macaroon': {'additionalProperties': False,
16149 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
16151 'data': {'items': {'type': 'integer'},
16153 'id': {'$ref': '#/definitions/packet'},
16154 'location': {'$ref': '#/definitions/packet'},
16155 'sig': {'items': {'type': 'integer'},
16157 'required': ['data',
16163 'StorageAddParams': {'additionalProperties': False,
16164 'properties': {'StorageName': {'type': 'string'},
16165 'storage': {'$ref': '#/definitions/StorageConstraints'},
16166 'unit': {'type': 'string'}},
16167 'required': ['unit',
16171 'StorageAttachmentDetails': {'additionalProperties': False,
16172 'properties': {'location': {'type': 'string'},
16173 'machinetag': {'type': 'string'},
16174 'storagetag': {'type': 'string'},
16175 'unittag': {'type': 'string'}},
16176 'required': ['storagetag',
16180 'StorageConstraints': {'additionalProperties': False,
16181 'properties': {'Count': {'type': 'integer'},
16182 'Pool': {'type': 'string'},
16183 'Size': {'type': 'integer'}},
16184 'required': ['Pool', 'Size', 'Count'],
16186 'StorageDetails': {'additionalProperties': False,
16187 'properties': {'Persistent': {'type': 'boolean'},
16188 'attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/StorageAttachmentDetails'}},
16190 'kind': {'type': 'integer'},
16191 'ownertag': {'type': 'string'},
16192 'status': {'$ref': '#/definitions/EntityStatus'},
16193 'storagetag': {'type': 'string'}},
16194 'required': ['storagetag',
16200 'StorageDetailsListResult': {'additionalProperties': False,
16201 'properties': {'error': {'$ref': '#/definitions/Error'},
16202 'result': {'items': {'$ref': '#/definitions/StorageDetails'},
16205 'StorageDetailsListResults': {'additionalProperties': False,
16206 'properties': {'results': {'items': {'$ref': '#/definitions/StorageDetailsListResult'},
16209 'StorageDetailsResult': {'additionalProperties': False,
16210 'properties': {'error': {'$ref': '#/definitions/Error'},
16211 'result': {'$ref': '#/definitions/StorageDetails'}},
16213 'StorageDetailsResults': {'additionalProperties': False,
16214 'properties': {'results': {'items': {'$ref': '#/definitions/StorageDetailsResult'},
16217 'StorageFilter': {'additionalProperties': False,
16219 'StorageFilters': {'additionalProperties': False,
16220 'properties': {'filters': {'items': {'$ref': '#/definitions/StorageFilter'},
16223 'StoragePool': {'additionalProperties': False,
16224 'properties': {'attrs': {'patternProperties': {'.*': {'additionalProperties': True,
16225 'type': 'object'}},
16227 'name': {'type': 'string'},
16228 'provider': {'type': 'string'}},
16229 'required': ['name', 'provider', 'attrs'],
16231 'StoragePoolFilter': {'additionalProperties': False,
16232 'properties': {'names': {'items': {'type': 'string'},
16234 'providers': {'items': {'type': 'string'},
16237 'StoragePoolFilters': {'additionalProperties': False,
16238 'properties': {'filters': {'items': {'$ref': '#/definitions/StoragePoolFilter'},
16241 'StoragePoolsResult': {'additionalProperties': False,
16242 'properties': {'error': {'$ref': '#/definitions/Error'},
16243 'storagepools': {'items': {'$ref': '#/definitions/StoragePool'},
16246 'StoragePoolsResults': {'additionalProperties': False,
16247 'properties': {'results': {'items': {'$ref': '#/definitions/StoragePoolsResult'},
16250 'StoragesAddParams': {'additionalProperties': False,
16251 'properties': {'storages': {'items': {'$ref': '#/definitions/StorageAddParams'},
16253 'required': ['storages'],
16255 'VolumeAttachmentInfo': {'additionalProperties': False,
16256 'properties': {'busaddress': {'type': 'string'},
16257 'devicelink': {'type': 'string'},
16258 'devicename': {'type': 'string'},
16259 'read-only': {'type': 'boolean'}},
16261 'VolumeDetails': {'additionalProperties': False,
16262 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'},
16263 'machineattachments': {'patternProperties': {'.*': {'$ref': '#/definitions/VolumeAttachmentInfo'}},
16265 'status': {'$ref': '#/definitions/EntityStatus'},
16266 'storage': {'$ref': '#/definitions/StorageDetails'},
16267 'volumetag': {'type': 'string'}},
16268 'required': ['volumetag', 'info', 'status'],
16270 'VolumeDetailsListResult': {'additionalProperties': False,
16271 'properties': {'error': {'$ref': '#/definitions/Error'},
16272 'result': {'items': {'$ref': '#/definitions/VolumeDetails'},
16275 'VolumeDetailsListResults': {'additionalProperties': False,
16276 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeDetailsListResult'},
16279 'VolumeFilter': {'additionalProperties': False,
16280 'properties': {'machines': {'items': {'type': 'string'},
16283 'VolumeFilters': {'additionalProperties': False,
16284 'properties': {'filters': {'items': {'$ref': '#/definitions/VolumeFilter'},
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'],
16294 'caveat': {'additionalProperties': False,
16295 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
16296 'location': {'$ref': '#/definitions/packet'},
16297 'verificationId': {'$ref': '#/definitions/packet'}},
16298 'required': ['location',
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'}},
16311 'CreatePool': {'properties': {'Params': {'$ref': '#/definitions/StoragePool'}},
16313 'ListFilesystems': {'properties': {'Params': {'$ref': '#/definitions/FilesystemFilters'},
16314 'Result': {'$ref': '#/definitions/FilesystemDetailsListResults'}},
16316 'ListPools': {'properties': {'Params': {'$ref': '#/definitions/StoragePoolFilters'},
16317 'Result': {'$ref': '#/definitions/StoragePoolsResults'}},
16319 'ListStorageDetails': {'properties': {'Params': {'$ref': '#/definitions/StorageFilters'},
16320 'Result': {'$ref': '#/definitions/StorageDetailsListResults'}},
16322 'ListVolumes': {'properties': {'Params': {'$ref': '#/definitions/VolumeFilters'},
16323 'Result': {'$ref': '#/definitions/VolumeDetailsListResults'}},
16325 'StorageDetails': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16326 'Result': {'$ref': '#/definitions/StorageDetailsResults'}},
16327 'type': 'object'}},
16331 @ReturnMapping(ErrorResults
)
16332 async def AddToUnit(self
, storages
):
16334 storages : typing.Sequence[~StorageAddParams]
16335 Returns -> typing.Sequence[~ErrorResult]
16337 # map input types to rpc msg
16339 msg
= dict(Type
='Storage', Request
='AddToUnit', Version
=2, Params
=params
)
16340 params
['storages'] = storages
16341 reply
= await self
.rpc(msg
)
16346 @ReturnMapping(None)
16347 async def CreatePool(self
, attrs
, name
, provider
):
16349 attrs : typing.Mapping[str, typing.Any]
16354 # map input types to rpc msg
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
)
16365 @ReturnMapping(FilesystemDetailsListResults
)
16366 async def ListFilesystems(self
, filters
):
16368 filters : typing.Sequence[~FilesystemFilter]
16369 Returns -> typing.Sequence[~FilesystemDetailsListResult]
16371 # map input types to rpc msg
16373 msg
= dict(Type
='Storage', Request
='ListFilesystems', Version
=2, Params
=params
)
16374 params
['filters'] = filters
16375 reply
= await self
.rpc(msg
)
16380 @ReturnMapping(StoragePoolsResults
)
16381 async def ListPools(self
, filters
):
16383 filters : typing.Sequence[~StoragePoolFilter]
16384 Returns -> typing.Sequence[~StoragePoolsResult]
16386 # map input types to rpc msg
16388 msg
= dict(Type
='Storage', Request
='ListPools', Version
=2, Params
=params
)
16389 params
['filters'] = filters
16390 reply
= await self
.rpc(msg
)
16395 @ReturnMapping(StorageDetailsListResults
)
16396 async def ListStorageDetails(self
, filters
):
16398 filters : typing.Sequence[~StorageFilter]
16399 Returns -> typing.Sequence[~StorageDetailsListResult]
16401 # map input types to rpc msg
16403 msg
= dict(Type
='Storage', Request
='ListStorageDetails', Version
=2, Params
=params
)
16404 params
['filters'] = filters
16405 reply
= await self
.rpc(msg
)
16410 @ReturnMapping(VolumeDetailsListResults
)
16411 async def ListVolumes(self
, filters
):
16413 filters : typing.Sequence[~VolumeFilter]
16414 Returns -> typing.Sequence[~VolumeDetailsListResult]
16416 # map input types to rpc msg
16418 msg
= dict(Type
='Storage', Request
='ListVolumes', Version
=2, Params
=params
)
16419 params
['filters'] = filters
16420 reply
= await self
.rpc(msg
)
16425 @ReturnMapping(StorageDetailsResults
)
16426 async def StorageDetails(self
, entities
):
16428 entities : typing.Sequence[~Entity]
16429 Returns -> typing.Sequence[~StorageDetailsResult]
16431 # map input types to rpc msg
16433 msg
= dict(Type
='Storage', Request
='StorageDetails', Version
=2, Params
=params
)
16434 params
['Entities'] = entities
16435 reply
= await self
.rpc(msg
)
16439 class StorageProvisioner(Type
):
16440 name
= 'StorageProvisioner'
16442 schema
= {'definitions': {'BlockDevice': {'additionalProperties': False,
16443 'properties': {'BusAddress': {'type': 'string'},
16444 'DeviceLinks': {'items': {'type': 'string'},
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',
16465 'BlockDeviceResult': {'additionalProperties': False,
16466 'properties': {'error': {'$ref': '#/definitions/Error'},
16467 'result': {'$ref': '#/definitions/BlockDevice'}},
16468 'required': ['result'],
16470 'BlockDeviceResults': {'additionalProperties': False,
16471 'properties': {'results': {'items': {'$ref': '#/definitions/BlockDeviceResult'},
16474 'Entities': {'additionalProperties': False,
16475 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
16477 'required': ['Entities'],
16479 'Entity': {'additionalProperties': False,
16480 'properties': {'Tag': {'type': 'string'}},
16481 'required': ['Tag'],
16483 'EntityStatusArgs': {'additionalProperties': False,
16484 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
16485 'type': 'object'}},
16487 'Info': {'type': 'string'},
16488 'Status': {'type': 'string'},
16489 'Tag': {'type': 'string'}},
16490 'required': ['Tag',
16495 'Error': {'additionalProperties': False,
16496 'properties': {'Code': {'type': 'string'},
16497 'Info': {'$ref': '#/definitions/ErrorInfo'},
16498 'Message': {'type': 'string'}},
16499 'required': ['Message', 'Code'],
16501 'ErrorInfo': {'additionalProperties': False,
16502 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
16503 'MacaroonPath': {'type': 'string'}},
16505 'ErrorResult': {'additionalProperties': False,
16506 'properties': {'Error': {'$ref': '#/definitions/Error'}},
16507 'required': ['Error'],
16509 'ErrorResults': {'additionalProperties': False,
16510 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
16512 'required': ['Results'],
16514 'Filesystem': {'additionalProperties': False,
16515 'properties': {'filesystemtag': {'type': 'string'},
16516 'info': {'$ref': '#/definitions/FilesystemInfo'},
16517 'volumetag': {'type': 'string'}},
16518 'required': ['filesystemtag', 'info'],
16520 'FilesystemAttachment': {'additionalProperties': False,
16521 'properties': {'filesystemtag': {'type': 'string'},
16522 'info': {'$ref': '#/definitions/FilesystemAttachmentInfo'},
16523 'machinetag': {'type': 'string'}},
16524 'required': ['filesystemtag',
16528 'FilesystemAttachmentInfo': {'additionalProperties': False,
16529 'properties': {'mountpoint': {'type': 'string'},
16530 'read-only': {'type': 'boolean'}},
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',
16544 'FilesystemAttachmentParamsResult': {'additionalProperties': False,
16545 'properties': {'error': {'$ref': '#/definitions/Error'},
16546 'result': {'$ref': '#/definitions/FilesystemAttachmentParams'}},
16547 'required': ['result'],
16549 'FilesystemAttachmentParamsResults': {'additionalProperties': False,
16550 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemAttachmentParamsResult'},
16553 'FilesystemAttachmentResult': {'additionalProperties': False,
16554 'properties': {'error': {'$ref': '#/definitions/Error'},
16555 'result': {'$ref': '#/definitions/FilesystemAttachment'}},
16556 'required': ['result'],
16558 'FilesystemAttachmentResults': {'additionalProperties': False,
16559 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemAttachmentResult'},
16562 'FilesystemAttachments': {'additionalProperties': False,
16563 'properties': {'filesystemattachments': {'items': {'$ref': '#/definitions/FilesystemAttachment'},
16565 'required': ['filesystemattachments'],
16567 'FilesystemInfo': {'additionalProperties': False,
16568 'properties': {'filesystemid': {'type': 'string'},
16569 'size': {'type': 'integer'}},
16570 'required': ['filesystemid', 'size'],
16572 'FilesystemParams': {'additionalProperties': False,
16573 'properties': {'attachment': {'$ref': '#/definitions/FilesystemAttachmentParams'},
16574 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
16575 'type': 'object'}},
16577 'filesystemtag': {'type': 'string'},
16578 'provider': {'type': 'string'},
16579 'size': {'type': 'integer'},
16580 'tags': {'patternProperties': {'.*': {'type': 'string'}},
16582 'volumetag': {'type': 'string'}},
16583 'required': ['filesystemtag',
16587 'FilesystemParamsResult': {'additionalProperties': False,
16588 'properties': {'error': {'$ref': '#/definitions/Error'},
16589 'result': {'$ref': '#/definitions/FilesystemParams'}},
16590 'required': ['result'],
16592 'FilesystemParamsResults': {'additionalProperties': False,
16593 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemParamsResult'},
16596 'FilesystemResult': {'additionalProperties': False,
16597 'properties': {'error': {'$ref': '#/definitions/Error'},
16598 'result': {'$ref': '#/definitions/Filesystem'}},
16599 'required': ['result'],
16601 'FilesystemResults': {'additionalProperties': False,
16602 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemResult'},
16605 'Filesystems': {'additionalProperties': False,
16606 'properties': {'filesystems': {'items': {'$ref': '#/definitions/Filesystem'},
16608 'required': ['filesystems'],
16610 'LifeResult': {'additionalProperties': False,
16611 'properties': {'Error': {'$ref': '#/definitions/Error'},
16612 'Life': {'type': 'string'}},
16613 'required': ['Life', 'Error'],
16615 'LifeResults': {'additionalProperties': False,
16616 'properties': {'Results': {'items': {'$ref': '#/definitions/LifeResult'},
16618 'required': ['Results'],
16620 'Macaroon': {'additionalProperties': False,
16621 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
16623 'data': {'items': {'type': 'integer'},
16625 'id': {'$ref': '#/definitions/packet'},
16626 'location': {'$ref': '#/definitions/packet'},
16627 'sig': {'items': {'type': 'integer'},
16629 'required': ['data',
16635 'MachineStorageId': {'additionalProperties': False,
16636 'properties': {'attachmenttag': {'type': 'string'},
16637 'machinetag': {'type': 'string'}},
16638 'required': ['machinetag',
16641 'MachineStorageIds': {'additionalProperties': False,
16642 'properties': {'ids': {'items': {'$ref': '#/definitions/MachineStorageId'},
16644 'required': ['ids'],
16646 'MachineStorageIdsWatchResult': {'additionalProperties': False,
16647 'properties': {'Changes': {'items': {'$ref': '#/definitions/MachineStorageId'},
16649 'Error': {'$ref': '#/definitions/Error'},
16650 'MachineStorageIdsWatcherId': {'type': 'string'}},
16651 'required': ['MachineStorageIdsWatcherId',
16655 'MachineStorageIdsWatchResults': {'additionalProperties': False,
16656 'properties': {'Results': {'items': {'$ref': '#/definitions/MachineStorageIdsWatchResult'},
16658 'required': ['Results'],
16660 'ModelConfigResult': {'additionalProperties': False,
16661 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
16662 'type': 'object'}},
16663 'type': 'object'}},
16664 'required': ['Config'],
16666 'NotifyWatchResult': {'additionalProperties': False,
16667 'properties': {'Error': {'$ref': '#/definitions/Error'},
16668 'NotifyWatcherId': {'type': 'string'}},
16669 'required': ['NotifyWatcherId', 'Error'],
16671 'NotifyWatchResults': {'additionalProperties': False,
16672 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
16674 'required': ['Results'],
16676 'SetStatus': {'additionalProperties': False,
16677 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
16679 'required': ['Entities'],
16681 'StringResult': {'additionalProperties': False,
16682 'properties': {'Error': {'$ref': '#/definitions/Error'},
16683 'Result': {'type': 'string'}},
16684 'required': ['Error', 'Result'],
16686 'StringResults': {'additionalProperties': False,
16687 'properties': {'Results': {'items': {'$ref': '#/definitions/StringResult'},
16689 'required': ['Results'],
16691 'StringsWatchResult': {'additionalProperties': False,
16692 'properties': {'Changes': {'items': {'type': 'string'},
16694 'Error': {'$ref': '#/definitions/Error'},
16695 'StringsWatcherId': {'type': 'string'}},
16696 'required': ['StringsWatcherId',
16700 'StringsWatchResults': {'additionalProperties': False,
16701 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
16703 'required': ['Results'],
16705 'Volume': {'additionalProperties': False,
16706 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'},
16707 'volumetag': {'type': 'string'}},
16708 'required': ['volumetag', 'info'],
16710 'VolumeAttachment': {'additionalProperties': False,
16711 'properties': {'info': {'$ref': '#/definitions/VolumeAttachmentInfo'},
16712 'machinetag': {'type': 'string'},
16713 'volumetag': {'type': 'string'}},
16714 'required': ['volumetag',
16718 'VolumeAttachmentInfo': {'additionalProperties': False,
16719 'properties': {'busaddress': {'type': 'string'},
16720 'devicelink': {'type': 'string'},
16721 'devicename': {'type': 'string'},
16722 'read-only': {'type': 'boolean'}},
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',
16735 'VolumeAttachmentParamsResult': {'additionalProperties': False,
16736 'properties': {'error': {'$ref': '#/definitions/Error'},
16737 'result': {'$ref': '#/definitions/VolumeAttachmentParams'}},
16738 'required': ['result'],
16740 'VolumeAttachmentParamsResults': {'additionalProperties': False,
16741 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeAttachmentParamsResult'},
16744 'VolumeAttachmentResult': {'additionalProperties': False,
16745 'properties': {'error': {'$ref': '#/definitions/Error'},
16746 'result': {'$ref': '#/definitions/VolumeAttachment'}},
16747 'required': ['result'],
16749 'VolumeAttachmentResults': {'additionalProperties': False,
16750 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeAttachmentResult'},
16753 'VolumeAttachments': {'additionalProperties': False,
16754 'properties': {'volumeattachments': {'items': {'$ref': '#/definitions/VolumeAttachment'},
16756 'required': ['volumeattachments'],
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'],
16765 'VolumeParams': {'additionalProperties': False,
16766 'properties': {'attachment': {'$ref': '#/definitions/VolumeAttachmentParams'},
16767 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
16768 'type': 'object'}},
16770 'provider': {'type': 'string'},
16771 'size': {'type': 'integer'},
16772 'tags': {'patternProperties': {'.*': {'type': 'string'}},
16774 'volumetag': {'type': 'string'}},
16775 'required': ['volumetag', 'size', 'provider'],
16777 'VolumeParamsResult': {'additionalProperties': False,
16778 'properties': {'error': {'$ref': '#/definitions/Error'},
16779 'result': {'$ref': '#/definitions/VolumeParams'}},
16780 'required': ['result'],
16782 'VolumeParamsResults': {'additionalProperties': False,
16783 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeParamsResult'},
16786 'VolumeResult': {'additionalProperties': False,
16787 'properties': {'error': {'$ref': '#/definitions/Error'},
16788 'result': {'$ref': '#/definitions/Volume'}},
16789 'required': ['result'],
16791 'VolumeResults': {'additionalProperties': False,
16792 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeResult'},
16795 'Volumes': {'additionalProperties': False,
16796 'properties': {'volumes': {'items': {'$ref': '#/definitions/Volume'},
16798 'required': ['volumes'],
16800 'caveat': {'additionalProperties': False,
16801 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
16802 'location': {'$ref': '#/definitions/packet'},
16803 'verificationId': {'$ref': '#/definitions/packet'}},
16804 'required': ['location',
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'}},
16817 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16818 'Result': {'$ref': '#/definitions/ErrorResults'}},
16820 'FilesystemAttachmentParams': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
16821 'Result': {'$ref': '#/definitions/FilesystemAttachmentParamsResults'}},
16823 'FilesystemAttachments': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
16824 'Result': {'$ref': '#/definitions/FilesystemAttachmentResults'}},
16826 'FilesystemParams': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16827 'Result': {'$ref': '#/definitions/FilesystemParamsResults'}},
16829 'Filesystems': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16830 'Result': {'$ref': '#/definitions/FilesystemResults'}},
16832 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16833 'Result': {'$ref': '#/definitions/StringResults'}},
16835 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16836 'Result': {'$ref': '#/definitions/LifeResults'}},
16838 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
16840 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16841 'Result': {'$ref': '#/definitions/ErrorResults'}},
16843 'RemoveAttachment': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
16844 'Result': {'$ref': '#/definitions/ErrorResults'}},
16846 'SetFilesystemAttachmentInfo': {'properties': {'Params': {'$ref': '#/definitions/FilesystemAttachments'},
16847 'Result': {'$ref': '#/definitions/ErrorResults'}},
16849 'SetFilesystemInfo': {'properties': {'Params': {'$ref': '#/definitions/Filesystems'},
16850 'Result': {'$ref': '#/definitions/ErrorResults'}},
16852 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
16853 'Result': {'$ref': '#/definitions/ErrorResults'}},
16855 'SetVolumeAttachmentInfo': {'properties': {'Params': {'$ref': '#/definitions/VolumeAttachments'},
16856 'Result': {'$ref': '#/definitions/ErrorResults'}},
16858 'SetVolumeInfo': {'properties': {'Params': {'$ref': '#/definitions/Volumes'},
16859 'Result': {'$ref': '#/definitions/ErrorResults'}},
16861 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
16862 'Result': {'$ref': '#/definitions/ErrorResults'}},
16864 'VolumeAttachmentParams': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
16865 'Result': {'$ref': '#/definitions/VolumeAttachmentParamsResults'}},
16867 'VolumeAttachments': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
16868 'Result': {'$ref': '#/definitions/VolumeAttachmentResults'}},
16870 'VolumeBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
16871 'Result': {'$ref': '#/definitions/BlockDeviceResults'}},
16873 'VolumeParams': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16874 'Result': {'$ref': '#/definitions/VolumeParamsResults'}},
16876 'Volumes': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16877 'Result': {'$ref': '#/definitions/VolumeResults'}},
16879 'WatchBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16880 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
16882 'WatchFilesystemAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16883 'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResults'}},
16885 'WatchFilesystems': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16886 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
16888 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
16890 'WatchMachines': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16891 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
16893 'WatchVolumeAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16894 'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResults'}},
16896 'WatchVolumes': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16897 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
16898 'type': 'object'}},
16902 @ReturnMapping(LifeResults
)
16903 async def AttachmentLife(self
, ids
):
16905 ids : typing.Sequence[~MachineStorageId]
16906 Returns -> typing.Sequence[~LifeResult]
16908 # map input types to rpc msg
16910 msg
= dict(Type
='StorageProvisioner', Request
='AttachmentLife', Version
=2, Params
=params
)
16911 params
['ids'] = ids
16912 reply
= await self
.rpc(msg
)
16917 @ReturnMapping(ErrorResults
)
16918 async def EnsureDead(self
, entities
):
16920 entities : typing.Sequence[~Entity]
16921 Returns -> typing.Sequence[~ErrorResult]
16923 # map input types to rpc msg
16925 msg
= dict(Type
='StorageProvisioner', Request
='EnsureDead', Version
=2, Params
=params
)
16926 params
['Entities'] = entities
16927 reply
= await self
.rpc(msg
)
16932 @ReturnMapping(FilesystemAttachmentParamsResults
)
16933 async def FilesystemAttachmentParams(self
, ids
):
16935 ids : typing.Sequence[~MachineStorageId]
16936 Returns -> typing.Sequence[~FilesystemAttachmentParamsResult]
16938 # map input types to rpc msg
16940 msg
= dict(Type
='StorageProvisioner', Request
='FilesystemAttachmentParams', Version
=2, Params
=params
)
16941 params
['ids'] = ids
16942 reply
= await self
.rpc(msg
)
16947 @ReturnMapping(FilesystemAttachmentResults
)
16948 async def FilesystemAttachments(self
, ids
):
16950 ids : typing.Sequence[~MachineStorageId]
16951 Returns -> typing.Sequence[~FilesystemAttachmentResult]
16953 # map input types to rpc msg
16955 msg
= dict(Type
='StorageProvisioner', Request
='FilesystemAttachments', Version
=2, Params
=params
)
16956 params
['ids'] = ids
16957 reply
= await self
.rpc(msg
)
16962 @ReturnMapping(FilesystemParamsResults
)
16963 async def FilesystemParams(self
, entities
):
16965 entities : typing.Sequence[~Entity]
16966 Returns -> typing.Sequence[~FilesystemParamsResult]
16968 # map input types to rpc msg
16970 msg
= dict(Type
='StorageProvisioner', Request
='FilesystemParams', Version
=2, Params
=params
)
16971 params
['Entities'] = entities
16972 reply
= await self
.rpc(msg
)
16977 @ReturnMapping(FilesystemResults
)
16978 async def Filesystems(self
, entities
):
16980 entities : typing.Sequence[~Entity]
16981 Returns -> typing.Sequence[~FilesystemResult]
16983 # map input types to rpc msg
16985 msg
= dict(Type
='StorageProvisioner', Request
='Filesystems', Version
=2, Params
=params
)
16986 params
['Entities'] = entities
16987 reply
= await self
.rpc(msg
)
16992 @ReturnMapping(StringResults
)
16993 async def InstanceId(self
, entities
):
16995 entities : typing.Sequence[~Entity]
16996 Returns -> typing.Sequence[~StringResult]
16998 # map input types to rpc msg
17000 msg
= dict(Type
='StorageProvisioner', Request
='InstanceId', Version
=2, Params
=params
)
17001 params
['Entities'] = entities
17002 reply
= await self
.rpc(msg
)
17007 @ReturnMapping(LifeResults
)
17008 async def Life(self
, entities
):
17010 entities : typing.Sequence[~Entity]
17011 Returns -> typing.Sequence[~LifeResult]
17013 # map input types to rpc msg
17015 msg
= dict(Type
='StorageProvisioner', Request
='Life', Version
=2, Params
=params
)
17016 params
['Entities'] = entities
17017 reply
= await self
.rpc(msg
)
17022 @ReturnMapping(ModelConfigResult
)
17023 async def ModelConfig(self
):
17026 Returns -> typing.Mapping[str, typing.Any]
17028 # map input types to rpc msg
17030 msg
= dict(Type
='StorageProvisioner', Request
='ModelConfig', Version
=2, Params
=params
)
17032 reply
= await self
.rpc(msg
)
17037 @ReturnMapping(ErrorResults
)
17038 async def Remove(self
, entities
):
17040 entities : typing.Sequence[~Entity]
17041 Returns -> typing.Sequence[~ErrorResult]
17043 # map input types to rpc msg
17045 msg
= dict(Type
='StorageProvisioner', Request
='Remove', Version
=2, Params
=params
)
17046 params
['Entities'] = entities
17047 reply
= await self
.rpc(msg
)
17052 @ReturnMapping(ErrorResults
)
17053 async def RemoveAttachment(self
, ids
):
17055 ids : typing.Sequence[~MachineStorageId]
17056 Returns -> typing.Sequence[~ErrorResult]
17058 # map input types to rpc msg
17060 msg
= dict(Type
='StorageProvisioner', Request
='RemoveAttachment', Version
=2, Params
=params
)
17061 params
['ids'] = ids
17062 reply
= await self
.rpc(msg
)
17067 @ReturnMapping(ErrorResults
)
17068 async def SetFilesystemAttachmentInfo(self
, filesystemattachments
):
17070 filesystemattachments : typing.Sequence[~FilesystemAttachment]
17071 Returns -> typing.Sequence[~ErrorResult]
17073 # map input types to rpc msg
17075 msg
= dict(Type
='StorageProvisioner', Request
='SetFilesystemAttachmentInfo', Version
=2, Params
=params
)
17076 params
['filesystemattachments'] = filesystemattachments
17077 reply
= await self
.rpc(msg
)
17082 @ReturnMapping(ErrorResults
)
17083 async def SetFilesystemInfo(self
, filesystems
):
17085 filesystems : typing.Sequence[~Filesystem]
17086 Returns -> typing.Sequence[~ErrorResult]
17088 # map input types to rpc msg
17090 msg
= dict(Type
='StorageProvisioner', Request
='SetFilesystemInfo', Version
=2, Params
=params
)
17091 params
['filesystems'] = filesystems
17092 reply
= await self
.rpc(msg
)
17097 @ReturnMapping(ErrorResults
)
17098 async def SetStatus(self
, entities
):
17100 entities : typing.Sequence[~EntityStatusArgs]
17101 Returns -> typing.Sequence[~ErrorResult]
17103 # map input types to rpc msg
17105 msg
= dict(Type
='StorageProvisioner', Request
='SetStatus', Version
=2, Params
=params
)
17106 params
['Entities'] = entities
17107 reply
= await self
.rpc(msg
)
17112 @ReturnMapping(ErrorResults
)
17113 async def SetVolumeAttachmentInfo(self
, volumeattachments
):
17115 volumeattachments : typing.Sequence[~VolumeAttachment]
17116 Returns -> typing.Sequence[~ErrorResult]
17118 # map input types to rpc msg
17120 msg
= dict(Type
='StorageProvisioner', Request
='SetVolumeAttachmentInfo', Version
=2, Params
=params
)
17121 params
['volumeattachments'] = volumeattachments
17122 reply
= await self
.rpc(msg
)
17127 @ReturnMapping(ErrorResults
)
17128 async def SetVolumeInfo(self
, volumes
):
17130 volumes : typing.Sequence[~Volume]
17131 Returns -> typing.Sequence[~ErrorResult]
17133 # map input types to rpc msg
17135 msg
= dict(Type
='StorageProvisioner', Request
='SetVolumeInfo', Version
=2, Params
=params
)
17136 params
['volumes'] = volumes
17137 reply
= await self
.rpc(msg
)
17142 @ReturnMapping(ErrorResults
)
17143 async def UpdateStatus(self
, entities
):
17145 entities : typing.Sequence[~EntityStatusArgs]
17146 Returns -> typing.Sequence[~ErrorResult]
17148 # map input types to rpc msg
17150 msg
= dict(Type
='StorageProvisioner', Request
='UpdateStatus', Version
=2, Params
=params
)
17151 params
['Entities'] = entities
17152 reply
= await self
.rpc(msg
)
17157 @ReturnMapping(VolumeAttachmentParamsResults
)
17158 async def VolumeAttachmentParams(self
, ids
):
17160 ids : typing.Sequence[~MachineStorageId]
17161 Returns -> typing.Sequence[~VolumeAttachmentParamsResult]
17163 # map input types to rpc msg
17165 msg
= dict(Type
='StorageProvisioner', Request
='VolumeAttachmentParams', Version
=2, Params
=params
)
17166 params
['ids'] = ids
17167 reply
= await self
.rpc(msg
)
17172 @ReturnMapping(VolumeAttachmentResults
)
17173 async def VolumeAttachments(self
, ids
):
17175 ids : typing.Sequence[~MachineStorageId]
17176 Returns -> typing.Sequence[~VolumeAttachmentResult]
17178 # map input types to rpc msg
17180 msg
= dict(Type
='StorageProvisioner', Request
='VolumeAttachments', Version
=2, Params
=params
)
17181 params
['ids'] = ids
17182 reply
= await self
.rpc(msg
)
17187 @ReturnMapping(BlockDeviceResults
)
17188 async def VolumeBlockDevices(self
, ids
):
17190 ids : typing.Sequence[~MachineStorageId]
17191 Returns -> typing.Sequence[~BlockDeviceResult]
17193 # map input types to rpc msg
17195 msg
= dict(Type
='StorageProvisioner', Request
='VolumeBlockDevices', Version
=2, Params
=params
)
17196 params
['ids'] = ids
17197 reply
= await self
.rpc(msg
)
17202 @ReturnMapping(VolumeParamsResults
)
17203 async def VolumeParams(self
, entities
):
17205 entities : typing.Sequence[~Entity]
17206 Returns -> typing.Sequence[~VolumeParamsResult]
17208 # map input types to rpc msg
17210 msg
= dict(Type
='StorageProvisioner', Request
='VolumeParams', Version
=2, Params
=params
)
17211 params
['Entities'] = entities
17212 reply
= await self
.rpc(msg
)
17217 @ReturnMapping(VolumeResults
)
17218 async def Volumes(self
, entities
):
17220 entities : typing.Sequence[~Entity]
17221 Returns -> typing.Sequence[~VolumeResult]
17223 # map input types to rpc msg
17225 msg
= dict(Type
='StorageProvisioner', Request
='Volumes', Version
=2, Params
=params
)
17226 params
['Entities'] = entities
17227 reply
= await self
.rpc(msg
)
17232 @ReturnMapping(NotifyWatchResults
)
17233 async def WatchBlockDevices(self
, entities
):
17235 entities : typing.Sequence[~Entity]
17236 Returns -> typing.Sequence[~NotifyWatchResult]
17238 # map input types to rpc msg
17240 msg
= dict(Type
='StorageProvisioner', Request
='WatchBlockDevices', Version
=2, Params
=params
)
17241 params
['Entities'] = entities
17242 reply
= await self
.rpc(msg
)
17247 @ReturnMapping(MachineStorageIdsWatchResults
)
17248 async def WatchFilesystemAttachments(self
, entities
):
17250 entities : typing.Sequence[~Entity]
17251 Returns -> typing.Sequence[~MachineStorageIdsWatchResult]
17253 # map input types to rpc msg
17255 msg
= dict(Type
='StorageProvisioner', Request
='WatchFilesystemAttachments', Version
=2, Params
=params
)
17256 params
['Entities'] = entities
17257 reply
= await self
.rpc(msg
)
17262 @ReturnMapping(StringsWatchResults
)
17263 async def WatchFilesystems(self
, entities
):
17265 entities : typing.Sequence[~Entity]
17266 Returns -> typing.Sequence[~StringsWatchResult]
17268 # map input types to rpc msg
17270 msg
= dict(Type
='StorageProvisioner', Request
='WatchFilesystems', Version
=2, Params
=params
)
17271 params
['Entities'] = entities
17272 reply
= await self
.rpc(msg
)
17277 @ReturnMapping(NotifyWatchResult
)
17278 async def WatchForModelConfigChanges(self
):
17281 Returns -> typing.Union[_ForwardRef('Error'), str]
17283 # map input types to rpc msg
17285 msg
= dict(Type
='StorageProvisioner', Request
='WatchForModelConfigChanges', Version
=2, Params
=params
)
17287 reply
= await self
.rpc(msg
)
17292 @ReturnMapping(NotifyWatchResults
)
17293 async def WatchMachines(self
, entities
):
17295 entities : typing.Sequence[~Entity]
17296 Returns -> typing.Sequence[~NotifyWatchResult]
17298 # map input types to rpc msg
17300 msg
= dict(Type
='StorageProvisioner', Request
='WatchMachines', Version
=2, Params
=params
)
17301 params
['Entities'] = entities
17302 reply
= await self
.rpc(msg
)
17307 @ReturnMapping(MachineStorageIdsWatchResults
)
17308 async def WatchVolumeAttachments(self
, entities
):
17310 entities : typing.Sequence[~Entity]
17311 Returns -> typing.Sequence[~MachineStorageIdsWatchResult]
17313 # map input types to rpc msg
17315 msg
= dict(Type
='StorageProvisioner', Request
='WatchVolumeAttachments', Version
=2, Params
=params
)
17316 params
['Entities'] = entities
17317 reply
= await self
.rpc(msg
)
17322 @ReturnMapping(StringsWatchResults
)
17323 async def WatchVolumes(self
, entities
):
17325 entities : typing.Sequence[~Entity]
17326 Returns -> typing.Sequence[~StringsWatchResult]
17328 # map input types to rpc msg
17330 msg
= dict(Type
='StorageProvisioner', Request
='WatchVolumes', Version
=2, Params
=params
)
17331 params
['Entities'] = entities
17332 reply
= await self
.rpc(msg
)
17336 class StringsWatcher(Type
):
17337 name
= 'StringsWatcher'
17339 schema
= {'definitions': {'Error': {'additionalProperties': False,
17340 'properties': {'Code': {'type': 'string'},
17341 'Info': {'$ref': '#/definitions/ErrorInfo'},
17342 'Message': {'type': 'string'}},
17343 'required': ['Message', 'Code'],
17345 'ErrorInfo': {'additionalProperties': False,
17346 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
17347 'MacaroonPath': {'type': 'string'}},
17349 'Macaroon': {'additionalProperties': False,
17350 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
17352 'data': {'items': {'type': 'integer'},
17354 'id': {'$ref': '#/definitions/packet'},
17355 'location': {'$ref': '#/definitions/packet'},
17356 'sig': {'items': {'type': 'integer'},
17358 'required': ['data',
17364 'StringsWatchResult': {'additionalProperties': False,
17365 'properties': {'Changes': {'items': {'type': 'string'},
17367 'Error': {'$ref': '#/definitions/Error'},
17368 'StringsWatcherId': {'type': 'string'}},
17369 'required': ['StringsWatcherId',
17373 'caveat': {'additionalProperties': False,
17374 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
17375 'location': {'$ref': '#/definitions/packet'},
17376 'verificationId': {'$ref': '#/definitions/packet'}},
17377 'required': ['location',
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'}},
17389 'Stop': {'type': 'object'}},
17393 @ReturnMapping(StringsWatchResult
)
17394 async def Next(self
):
17397 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')]
17399 # map input types to rpc msg
17401 msg
= dict(Type
='StringsWatcher', Request
='Next', Version
=1, Params
=params
)
17403 reply
= await self
.rpc(msg
)
17408 @ReturnMapping(None)
17409 async def Stop(self
):
17414 # map input types to rpc msg
17416 msg
= dict(Type
='StringsWatcher', Request
='Stop', Version
=1, Params
=params
)
17418 reply
= await self
.rpc(msg
)
17422 class Subnets(Type
):
17425 schema
= {'definitions': {'AddSubnetParams': {'additionalProperties': False,
17426 'properties': {'SpaceTag': {'type': 'string'},
17427 'SubnetProviderId': {'type': 'string'},
17428 'SubnetTag': {'type': 'string'},
17429 'Zones': {'items': {'type': 'string'},
17431 'required': ['SpaceTag'],
17433 'AddSubnetsParams': {'additionalProperties': False,
17434 'properties': {'Subnets': {'items': {'$ref': '#/definitions/AddSubnetParams'},
17436 'required': ['Subnets'],
17438 'Error': {'additionalProperties': False,
17439 'properties': {'Code': {'type': 'string'},
17440 'Info': {'$ref': '#/definitions/ErrorInfo'},
17441 'Message': {'type': 'string'}},
17442 'required': ['Message', 'Code'],
17444 'ErrorInfo': {'additionalProperties': False,
17445 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
17446 'MacaroonPath': {'type': 'string'}},
17448 'ErrorResult': {'additionalProperties': False,
17449 'properties': {'Error': {'$ref': '#/definitions/Error'}},
17450 'required': ['Error'],
17452 'ErrorResults': {'additionalProperties': False,
17453 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
17455 'required': ['Results'],
17457 'ListSubnetsResults': {'additionalProperties': False,
17458 'properties': {'Results': {'items': {'$ref': '#/definitions/Subnet'},
17460 'required': ['Results'],
17462 'Macaroon': {'additionalProperties': False,
17463 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
17465 'data': {'items': {'type': 'integer'},
17467 'id': {'$ref': '#/definitions/packet'},
17468 'location': {'$ref': '#/definitions/packet'},
17469 'sig': {'items': {'type': 'integer'},
17471 'required': ['data',
17477 'SpaceResult': {'additionalProperties': False,
17478 'properties': {'Error': {'$ref': '#/definitions/Error'},
17479 'Tag': {'type': 'string'}},
17480 'required': ['Error', 'Tag'],
17482 'SpaceResults': {'additionalProperties': False,
17483 'properties': {'Results': {'items': {'$ref': '#/definitions/SpaceResult'},
17485 'required': ['Results'],
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'},
17494 'StaticRangeLowIP': {'items': {'type': 'integer'},
17496 'Status': {'type': 'string'},
17497 'VLANTag': {'type': 'integer'},
17498 'Zones': {'items': {'type': 'string'},
17500 'required': ['CIDR',
17506 'SubnetsFilters': {'additionalProperties': False,
17507 'properties': {'SpaceTag': {'type': 'string'},
17508 'Zone': {'type': 'string'}},
17510 'ZoneResult': {'additionalProperties': False,
17511 'properties': {'Available': {'type': 'boolean'},
17512 'Error': {'$ref': '#/definitions/Error'},
17513 'Name': {'type': 'string'}},
17514 'required': ['Error', 'Name', 'Available'],
17516 'ZoneResults': {'additionalProperties': False,
17517 'properties': {'Results': {'items': {'$ref': '#/definitions/ZoneResult'},
17519 'required': ['Results'],
17521 'caveat': {'additionalProperties': False,
17522 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
17523 'location': {'$ref': '#/definitions/packet'},
17524 'verificationId': {'$ref': '#/definitions/packet'}},
17525 'required': ['location',
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'}},
17538 'AllSpaces': {'properties': {'Result': {'$ref': '#/definitions/SpaceResults'}},
17540 'AllZones': {'properties': {'Result': {'$ref': '#/definitions/ZoneResults'}},
17542 'ListSubnets': {'properties': {'Params': {'$ref': '#/definitions/SubnetsFilters'},
17543 'Result': {'$ref': '#/definitions/ListSubnetsResults'}},
17544 'type': 'object'}},
17548 @ReturnMapping(ErrorResults
)
17549 async def AddSubnets(self
, subnets
):
17551 subnets : typing.Sequence[~AddSubnetParams]
17552 Returns -> typing.Sequence[~ErrorResult]
17554 # map input types to rpc msg
17556 msg
= dict(Type
='Subnets', Request
='AddSubnets', Version
=2, Params
=params
)
17557 params
['Subnets'] = subnets
17558 reply
= await self
.rpc(msg
)
17563 @ReturnMapping(SpaceResults
)
17564 async def AllSpaces(self
):
17567 Returns -> typing.Sequence[~SpaceResult]
17569 # map input types to rpc msg
17571 msg
= dict(Type
='Subnets', Request
='AllSpaces', Version
=2, Params
=params
)
17573 reply
= await self
.rpc(msg
)
17578 @ReturnMapping(ZoneResults
)
17579 async def AllZones(self
):
17582 Returns -> typing.Sequence[~ZoneResult]
17584 # map input types to rpc msg
17586 msg
= dict(Type
='Subnets', Request
='AllZones', Version
=2, Params
=params
)
17588 reply
= await self
.rpc(msg
)
17593 @ReturnMapping(ListSubnetsResults
)
17594 async def ListSubnets(self
, spacetag
, zone
):
17598 Returns -> typing.Sequence[~Subnet]
17600 # map input types to rpc msg
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
)
17609 class Undertaker(Type
):
17610 name
= 'Undertaker'
17612 schema
= {'definitions': {'EntityStatusArgs': {'additionalProperties': False,
17613 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
17614 'type': 'object'}},
17616 'Info': {'type': 'string'},
17617 'Status': {'type': 'string'},
17618 'Tag': {'type': 'string'}},
17619 'required': ['Tag',
17624 'Error': {'additionalProperties': False,
17625 'properties': {'Code': {'type': 'string'},
17626 'Info': {'$ref': '#/definitions/ErrorInfo'},
17627 'Message': {'type': 'string'}},
17628 'required': ['Message', 'Code'],
17630 'ErrorInfo': {'additionalProperties': False,
17631 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
17632 'MacaroonPath': {'type': 'string'}},
17634 'ErrorResult': {'additionalProperties': False,
17635 'properties': {'Error': {'$ref': '#/definitions/Error'}},
17636 'required': ['Error'],
17638 'ErrorResults': {'additionalProperties': False,
17639 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
17641 'required': ['Results'],
17643 'Macaroon': {'additionalProperties': False,
17644 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
17646 'data': {'items': {'type': 'integer'},
17648 'id': {'$ref': '#/definitions/packet'},
17649 'location': {'$ref': '#/definitions/packet'},
17650 'sig': {'items': {'type': 'integer'},
17652 'required': ['data',
17658 'ModelConfigResult': {'additionalProperties': False,
17659 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
17660 'type': 'object'}},
17661 'type': 'object'}},
17662 'required': ['Config'],
17664 'NotifyWatchResult': {'additionalProperties': False,
17665 'properties': {'Error': {'$ref': '#/definitions/Error'},
17666 'NotifyWatcherId': {'type': 'string'}},
17667 'required': ['NotifyWatcherId', 'Error'],
17669 'NotifyWatchResults': {'additionalProperties': False,
17670 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
17672 'required': ['Results'],
17674 'SetStatus': {'additionalProperties': False,
17675 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
17677 'required': ['Entities'],
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',
17691 'UndertakerModelInfoResult': {'additionalProperties': False,
17692 'properties': {'Error': {'$ref': '#/definitions/Error'},
17693 'Result': {'$ref': '#/definitions/UndertakerModelInfo'}},
17694 'required': ['Error', 'Result'],
17696 'caveat': {'additionalProperties': False,
17697 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
17698 'location': {'$ref': '#/definitions/packet'},
17699 'verificationId': {'$ref': '#/definitions/packet'}},
17700 'required': ['location',
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'}},
17712 'ModelInfo': {'properties': {'Result': {'$ref': '#/definitions/UndertakerModelInfoResult'}},
17714 'ProcessDyingModel': {'type': 'object'},
17715 'RemoveModel': {'type': 'object'},
17716 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
17717 'Result': {'$ref': '#/definitions/ErrorResults'}},
17719 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
17720 'Result': {'$ref': '#/definitions/ErrorResults'}},
17722 'WatchModelResources': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
17723 'type': 'object'}},
17727 @ReturnMapping(ModelConfigResult
)
17728 async def ModelConfig(self
):
17731 Returns -> typing.Mapping[str, typing.Any]
17733 # map input types to rpc msg
17735 msg
= dict(Type
='Undertaker', Request
='ModelConfig', Version
=1, Params
=params
)
17737 reply
= await self
.rpc(msg
)
17742 @ReturnMapping(UndertakerModelInfoResult
)
17743 async def ModelInfo(self
):
17746 Returns -> typing.Union[_ForwardRef('Error'), _ForwardRef('UndertakerModelInfo')]
17748 # map input types to rpc msg
17750 msg
= dict(Type
='Undertaker', Request
='ModelInfo', Version
=1, Params
=params
)
17752 reply
= await self
.rpc(msg
)
17757 @ReturnMapping(None)
17758 async def ProcessDyingModel(self
):
17763 # map input types to rpc msg
17765 msg
= dict(Type
='Undertaker', Request
='ProcessDyingModel', Version
=1, Params
=params
)
17767 reply
= await self
.rpc(msg
)
17772 @ReturnMapping(None)
17773 async def RemoveModel(self
):
17778 # map input types to rpc msg
17780 msg
= dict(Type
='Undertaker', Request
='RemoveModel', Version
=1, Params
=params
)
17782 reply
= await self
.rpc(msg
)
17787 @ReturnMapping(ErrorResults
)
17788 async def SetStatus(self
, entities
):
17790 entities : typing.Sequence[~EntityStatusArgs]
17791 Returns -> typing.Sequence[~ErrorResult]
17793 # map input types to rpc msg
17795 msg
= dict(Type
='Undertaker', Request
='SetStatus', Version
=1, Params
=params
)
17796 params
['Entities'] = entities
17797 reply
= await self
.rpc(msg
)
17802 @ReturnMapping(ErrorResults
)
17803 async def UpdateStatus(self
, entities
):
17805 entities : typing.Sequence[~EntityStatusArgs]
17806 Returns -> typing.Sequence[~ErrorResult]
17808 # map input types to rpc msg
17810 msg
= dict(Type
='Undertaker', Request
='UpdateStatus', Version
=1, Params
=params
)
17811 params
['Entities'] = entities
17812 reply
= await self
.rpc(msg
)
17817 @ReturnMapping(NotifyWatchResults
)
17818 async def WatchModelResources(self
):
17821 Returns -> typing.Sequence[~NotifyWatchResult]
17823 # map input types to rpc msg
17825 msg
= dict(Type
='Undertaker', Request
='WatchModelResources', Version
=1, Params
=params
)
17827 reply
= await self
.rpc(msg
)
17831 class UnitAssigner(Type
):
17832 name
= 'UnitAssigner'
17834 schema
= {'definitions': {'Entities': {'additionalProperties': False,
17835 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
17837 'required': ['Entities'],
17839 'Entity': {'additionalProperties': False,
17840 'properties': {'Tag': {'type': 'string'}},
17841 'required': ['Tag'],
17843 'EntityStatusArgs': {'additionalProperties': False,
17844 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
17845 'type': 'object'}},
17847 'Info': {'type': 'string'},
17848 'Status': {'type': 'string'},
17849 'Tag': {'type': 'string'}},
17850 'required': ['Tag',
17855 'Error': {'additionalProperties': False,
17856 'properties': {'Code': {'type': 'string'},
17857 'Info': {'$ref': '#/definitions/ErrorInfo'},
17858 'Message': {'type': 'string'}},
17859 'required': ['Message', 'Code'],
17861 'ErrorInfo': {'additionalProperties': False,
17862 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
17863 'MacaroonPath': {'type': 'string'}},
17865 'ErrorResult': {'additionalProperties': False,
17866 'properties': {'Error': {'$ref': '#/definitions/Error'}},
17867 'required': ['Error'],
17869 'ErrorResults': {'additionalProperties': False,
17870 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
17872 'required': ['Results'],
17874 'Macaroon': {'additionalProperties': False,
17875 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
17877 'data': {'items': {'type': 'integer'},
17879 'id': {'$ref': '#/definitions/packet'},
17880 'location': {'$ref': '#/definitions/packet'},
17881 'sig': {'items': {'type': 'integer'},
17883 'required': ['data',
17889 'SetStatus': {'additionalProperties': False,
17890 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
17892 'required': ['Entities'],
17894 'StringsWatchResult': {'additionalProperties': False,
17895 'properties': {'Changes': {'items': {'type': 'string'},
17897 'Error': {'$ref': '#/definitions/Error'},
17898 'StringsWatcherId': {'type': 'string'}},
17899 'required': ['StringsWatcherId',
17903 'caveat': {'additionalProperties': False,
17904 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
17905 'location': {'$ref': '#/definitions/packet'},
17906 'verificationId': {'$ref': '#/definitions/packet'}},
17907 'required': ['location',
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'}},
17920 'SetAgentStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
17921 'Result': {'$ref': '#/definitions/ErrorResults'}},
17923 'WatchUnitAssignments': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
17924 'type': 'object'}},
17928 @ReturnMapping(ErrorResults
)
17929 async def AssignUnits(self
, entities
):
17931 entities : typing.Sequence[~Entity]
17932 Returns -> typing.Sequence[~ErrorResult]
17934 # map input types to rpc msg
17936 msg
= dict(Type
='UnitAssigner', Request
='AssignUnits', Version
=1, Params
=params
)
17937 params
['Entities'] = entities
17938 reply
= await self
.rpc(msg
)
17943 @ReturnMapping(ErrorResults
)
17944 async def SetAgentStatus(self
, entities
):
17946 entities : typing.Sequence[~EntityStatusArgs]
17947 Returns -> typing.Sequence[~ErrorResult]
17949 # map input types to rpc msg
17951 msg
= dict(Type
='UnitAssigner', Request
='SetAgentStatus', Version
=1, Params
=params
)
17952 params
['Entities'] = entities
17953 reply
= await self
.rpc(msg
)
17958 @ReturnMapping(StringsWatchResult
)
17959 async def WatchUnitAssignments(self
):
17962 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')]
17964 # map input types to rpc msg
17966 msg
= dict(Type
='UnitAssigner', Request
='WatchUnitAssignments', Version
=1, Params
=params
)
17968 reply
= await self
.rpc(msg
)
17972 class Uniter(Type
):
17975 schema
= {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
17976 'properties': {'Servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
17979 'required': ['Servers'],
17981 'Action': {'additionalProperties': False,
17982 'properties': {'name': {'type': 'string'},
17983 'parameters': {'patternProperties': {'.*': {'additionalProperties': True,
17984 'type': 'object'}},
17986 'receiver': {'type': 'string'},
17987 'tag': {'type': 'string'}},
17988 'required': ['tag', 'receiver', 'name'],
17990 'ActionExecutionResult': {'additionalProperties': False,
17991 'properties': {'actiontag': {'type': 'string'},
17992 'message': {'type': 'string'},
17993 'results': {'patternProperties': {'.*': {'additionalProperties': True,
17994 'type': 'object'}},
17996 'status': {'type': 'string'}},
17997 'required': ['actiontag', 'status'],
17999 'ActionExecutionResults': {'additionalProperties': False,
18000 'properties': {'results': {'items': {'$ref': '#/definitions/ActionExecutionResult'},
18003 'ActionResult': {'additionalProperties': False,
18004 'properties': {'action': {'$ref': '#/definitions/Action'},
18005 'completed': {'format': 'date-time',
18007 'enqueued': {'format': 'date-time',
18009 'error': {'$ref': '#/definitions/Error'},
18010 'message': {'type': 'string'},
18011 'output': {'patternProperties': {'.*': {'additionalProperties': True,
18012 'type': 'object'}},
18014 'started': {'format': 'date-time',
18016 'status': {'type': 'string'}},
18018 'ActionResults': {'additionalProperties': False,
18019 'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'},
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'],
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',
18038 'ApplicationStatusResults': {'additionalProperties': False,
18039 'properties': {'Results': {'items': {'$ref': '#/definitions/ApplicationStatusResult'},
18041 'required': ['Results'],
18043 'BoolResult': {'additionalProperties': False,
18044 'properties': {'Error': {'$ref': '#/definitions/Error'},
18045 'Result': {'type': 'boolean'}},
18046 'required': ['Error', 'Result'],
18048 'BoolResults': {'additionalProperties': False,
18049 'properties': {'Results': {'items': {'$ref': '#/definitions/BoolResult'},
18051 'required': ['Results'],
18053 'BytesResult': {'additionalProperties': False,
18054 'properties': {'Result': {'items': {'type': 'integer'},
18056 'required': ['Result'],
18058 'CharmURL': {'additionalProperties': False,
18059 'properties': {'URL': {'type': 'string'}},
18060 'required': ['URL'],
18062 'CharmURLs': {'additionalProperties': False,
18063 'properties': {'URLs': {'items': {'$ref': '#/definitions/CharmURL'},
18065 'required': ['URLs'],
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'],
18074 'ConfigSettingsResults': {'additionalProperties': False,
18075 'properties': {'Results': {'items': {'$ref': '#/definitions/ConfigSettingsResult'},
18077 'required': ['Results'],
18079 'Endpoint': {'additionalProperties': False,
18080 'properties': {'ApplicationName': {'type': 'string'},
18081 'Relation': {'$ref': '#/definitions/Relation'}},
18082 'required': ['ApplicationName', 'Relation'],
18084 'Entities': {'additionalProperties': False,
18085 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
18087 'required': ['Entities'],
18089 'EntitiesCharmURL': {'additionalProperties': False,
18090 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityCharmURL'},
18092 'required': ['Entities'],
18094 'EntitiesPortRanges': {'additionalProperties': False,
18095 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityPortRange'},
18097 'required': ['Entities'],
18099 'Entity': {'additionalProperties': False,
18100 'properties': {'Tag': {'type': 'string'}},
18101 'required': ['Tag'],
18103 'EntityCharmURL': {'additionalProperties': False,
18104 'properties': {'CharmURL': {'type': 'string'},
18105 'Tag': {'type': 'string'}},
18106 'required': ['Tag', 'CharmURL'],
18108 'EntityPortRange': {'additionalProperties': False,
18109 'properties': {'FromPort': {'type': 'integer'},
18110 'Protocol': {'type': 'string'},
18111 'Tag': {'type': 'string'},
18112 'ToPort': {'type': 'integer'}},
18113 'required': ['Tag',
18118 'EntityStatusArgs': {'additionalProperties': False,
18119 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
18120 'type': 'object'}},
18122 'Info': {'type': 'string'},
18123 'Status': {'type': 'string'},
18124 'Tag': {'type': 'string'}},
18125 'required': ['Tag',
18130 'Error': {'additionalProperties': False,
18131 'properties': {'Code': {'type': 'string'},
18132 'Info': {'$ref': '#/definitions/ErrorInfo'},
18133 'Message': {'type': 'string'}},
18134 'required': ['Message', 'Code'],
18136 'ErrorInfo': {'additionalProperties': False,
18137 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
18138 'MacaroonPath': {'type': 'string'}},
18140 'ErrorResult': {'additionalProperties': False,
18141 'properties': {'Error': {'$ref': '#/definitions/Error'}},
18142 'required': ['Error'],
18144 'ErrorResults': {'additionalProperties': False,
18145 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
18147 'required': ['Results'],
18149 'GetLeadershipSettingsBulkResults': {'additionalProperties': False,
18150 'properties': {'Results': {'items': {'$ref': '#/definitions/GetLeadershipSettingsResult'},
18152 'required': ['Results'],
18154 'GetLeadershipSettingsResult': {'additionalProperties': False,
18155 'properties': {'Error': {'$ref': '#/definitions/Error'},
18156 'Settings': {'patternProperties': {'.*': {'type': 'string'}},
18157 'type': 'object'}},
18158 'required': ['Settings',
18161 'HostPort': {'additionalProperties': False,
18162 'properties': {'Address': {'$ref': '#/definitions/Address'},
18163 'Port': {'type': 'integer'}},
18164 'required': ['Address', 'Port'],
18166 'IntResult': {'additionalProperties': False,
18167 'properties': {'Error': {'$ref': '#/definitions/Error'},
18168 'Result': {'type': 'integer'}},
18169 'required': ['Error', 'Result'],
18171 'IntResults': {'additionalProperties': False,
18172 'properties': {'Results': {'items': {'$ref': '#/definitions/IntResult'},
18174 'required': ['Results'],
18176 'LifeResult': {'additionalProperties': False,
18177 'properties': {'Error': {'$ref': '#/definitions/Error'},
18178 'Life': {'type': 'string'}},
18179 'required': ['Life', 'Error'],
18181 'LifeResults': {'additionalProperties': False,
18182 'properties': {'Results': {'items': {'$ref': '#/definitions/LifeResult'},
18184 'required': ['Results'],
18186 'Macaroon': {'additionalProperties': False,
18187 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
18189 'data': {'items': {'type': 'integer'},
18191 'id': {'$ref': '#/definitions/packet'},
18192 'location': {'$ref': '#/definitions/packet'},
18193 'sig': {'items': {'type': 'integer'},
18195 'required': ['data',
18201 'MachinePortRange': {'additionalProperties': False,
18202 'properties': {'PortRange': {'$ref': '#/definitions/PortRange'},
18203 'RelationTag': {'type': 'string'},
18204 'UnitTag': {'type': 'string'}},
18205 'required': ['UnitTag',
18209 'MachinePortsResult': {'additionalProperties': False,
18210 'properties': {'Error': {'$ref': '#/definitions/Error'},
18211 'Ports': {'items': {'$ref': '#/definitions/MachinePortRange'},
18213 'required': ['Error', 'Ports'],
18215 'MachinePortsResults': {'additionalProperties': False,
18216 'properties': {'Results': {'items': {'$ref': '#/definitions/MachinePortsResult'},
18218 'required': ['Results'],
18220 'MergeLeadershipSettingsBulkParams': {'additionalProperties': False,
18221 'properties': {'Params': {'items': {'$ref': '#/definitions/MergeLeadershipSettingsParam'},
18223 'required': ['Params'],
18225 'MergeLeadershipSettingsParam': {'additionalProperties': False,
18226 'properties': {'ApplicationTag': {'type': 'string'},
18227 'Settings': {'patternProperties': {'.*': {'type': 'string'}},
18228 'type': 'object'}},
18229 'required': ['ApplicationTag',
18232 'MeterStatusResult': {'additionalProperties': False,
18233 'properties': {'Code': {'type': 'string'},
18234 'Error': {'$ref': '#/definitions/Error'},
18235 'Info': {'type': 'string'}},
18236 'required': ['Code', 'Info', 'Error'],
18238 'MeterStatusResults': {'additionalProperties': False,
18239 'properties': {'Results': {'items': {'$ref': '#/definitions/MeterStatusResult'},
18241 'required': ['Results'],
18243 'Metric': {'additionalProperties': False,
18244 'properties': {'Key': {'type': 'string'},
18245 'Time': {'format': 'date-time',
18247 'Value': {'type': 'string'}},
18248 'required': ['Key', 'Value', 'Time'],
18250 'MetricBatch': {'additionalProperties': False,
18251 'properties': {'CharmURL': {'type': 'string'},
18252 'Created': {'format': 'date-time',
18254 'Metrics': {'items': {'$ref': '#/definitions/Metric'},
18256 'UUID': {'type': 'string'}},
18257 'required': ['UUID',
18262 'MetricBatchParam': {'additionalProperties': False,
18263 'properties': {'Batch': {'$ref': '#/definitions/MetricBatch'},
18264 'Tag': {'type': 'string'}},
18265 'required': ['Tag', 'Batch'],
18267 'MetricBatchParams': {'additionalProperties': False,
18268 'properties': {'Batches': {'items': {'$ref': '#/definitions/MetricBatchParam'},
18270 'required': ['Batches'],
18272 'ModelConfigResult': {'additionalProperties': False,
18273 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
18274 'type': 'object'}},
18275 'type': 'object'}},
18276 'required': ['Config'],
18278 'ModelResult': {'additionalProperties': False,
18279 'properties': {'Error': {'$ref': '#/definitions/Error'},
18280 'Name': {'type': 'string'},
18281 'UUID': {'type': 'string'}},
18282 'required': ['Error', 'Name', 'UUID'],
18284 'NetworkConfig': {'additionalProperties': False,
18285 'properties': {'Address': {'type': 'string'},
18286 'CIDR': {'type': 'string'},
18287 'ConfigType': {'type': 'string'},
18288 'DNSSearchDomains': {'items': {'type': 'string'},
18290 'DNSServers': {'items': {'type': 'string'},
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',
18312 'ProviderSubnetId',
18314 'ProviderAddressId',
18318 'ParentInterfaceName',
18322 'NotifyWatchResult': {'additionalProperties': False,
18323 'properties': {'Error': {'$ref': '#/definitions/Error'},
18324 'NotifyWatcherId': {'type': 'string'}},
18325 'required': ['NotifyWatcherId', 'Error'],
18327 'NotifyWatchResults': {'additionalProperties': False,
18328 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
18330 'required': ['Results'],
18332 'PortRange': {'additionalProperties': False,
18333 'properties': {'FromPort': {'type': 'integer'},
18334 'Protocol': {'type': 'string'},
18335 'ToPort': {'type': 'integer'}},
18336 'required': ['FromPort', 'ToPort', 'Protocol'],
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',
18352 'RelationIds': {'additionalProperties': False,
18353 'properties': {'RelationIds': {'items': {'type': 'integer'},
18355 'required': ['RelationIds'],
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',
18369 'RelationResults': {'additionalProperties': False,
18370 'properties': {'Results': {'items': {'$ref': '#/definitions/RelationResult'},
18372 'required': ['Results'],
18374 'RelationUnit': {'additionalProperties': False,
18375 'properties': {'Relation': {'type': 'string'},
18376 'Unit': {'type': 'string'}},
18377 'required': ['Relation', 'Unit'],
18379 'RelationUnitPair': {'additionalProperties': False,
18380 'properties': {'LocalUnit': {'type': 'string'},
18381 'Relation': {'type': 'string'},
18382 'RemoteUnit': {'type': 'string'}},
18383 'required': ['Relation',
18387 'RelationUnitPairs': {'additionalProperties': False,
18388 'properties': {'RelationUnitPairs': {'items': {'$ref': '#/definitions/RelationUnitPair'},
18390 'required': ['RelationUnitPairs'],
18392 'RelationUnitSettings': {'additionalProperties': False,
18393 'properties': {'Relation': {'type': 'string'},
18394 'Settings': {'patternProperties': {'.*': {'type': 'string'}},
18396 'Unit': {'type': 'string'}},
18397 'required': ['Relation',
18401 'RelationUnits': {'additionalProperties': False,
18402 'properties': {'RelationUnits': {'items': {'$ref': '#/definitions/RelationUnit'},
18404 'required': ['RelationUnits'],
18406 'RelationUnitsChange': {'additionalProperties': False,
18407 'properties': {'Changed': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitSettings'}},
18409 'Departed': {'items': {'type': 'string'},
18411 'required': ['Changed', 'Departed'],
18413 'RelationUnitsSettings': {'additionalProperties': False,
18414 'properties': {'RelationUnits': {'items': {'$ref': '#/definitions/RelationUnitSettings'},
18416 'required': ['RelationUnits'],
18418 'RelationUnitsWatchResult': {'additionalProperties': False,
18419 'properties': {'Changes': {'$ref': '#/definitions/RelationUnitsChange'},
18420 'Error': {'$ref': '#/definitions/Error'},
18421 'RelationUnitsWatcherId': {'type': 'string'}},
18422 'required': ['RelationUnitsWatcherId',
18426 'RelationUnitsWatchResults': {'additionalProperties': False,
18427 'properties': {'Results': {'items': {'$ref': '#/definitions/RelationUnitsWatchResult'},
18429 'required': ['Results'],
18431 'ResolvedModeResult': {'additionalProperties': False,
18432 'properties': {'Error': {'$ref': '#/definitions/Error'},
18433 'Mode': {'type': 'string'}},
18434 'required': ['Error', 'Mode'],
18436 'ResolvedModeResults': {'additionalProperties': False,
18437 'properties': {'Results': {'items': {'$ref': '#/definitions/ResolvedModeResult'},
18439 'required': ['Results'],
18441 'SetStatus': {'additionalProperties': False,
18442 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
18444 'required': ['Entities'],
18446 'SettingsResult': {'additionalProperties': False,
18447 'properties': {'Error': {'$ref': '#/definitions/Error'},
18448 'Settings': {'patternProperties': {'.*': {'type': 'string'}},
18449 'type': 'object'}},
18450 'required': ['Error', 'Settings'],
18452 'SettingsResults': {'additionalProperties': False,
18453 'properties': {'Results': {'items': {'$ref': '#/definitions/SettingsResult'},
18455 'required': ['Results'],
18457 'StatusResult': {'additionalProperties': False,
18458 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
18459 'type': 'object'}},
18461 'Error': {'$ref': '#/definitions/Error'},
18462 'Id': {'type': 'string'},
18463 'Info': {'type': 'string'},
18464 'Life': {'type': 'string'},
18465 'Since': {'format': 'date-time',
18467 'Status': {'type': 'string'}},
18468 'required': ['Error',
18476 'StatusResults': {'additionalProperties': False,
18477 'properties': {'Results': {'items': {'$ref': '#/definitions/StatusResult'},
18479 'required': ['Results'],
18481 'StorageAddParams': {'additionalProperties': False,
18482 'properties': {'StorageName': {'type': 'string'},
18483 'storage': {'$ref': '#/definitions/StorageConstraints'},
18484 'unit': {'type': 'string'}},
18485 'required': ['unit',
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',
18503 'StorageAttachmentId': {'additionalProperties': False,
18504 'properties': {'storagetag': {'type': 'string'},
18505 'unittag': {'type': 'string'}},
18506 'required': ['storagetag', 'unittag'],
18508 'StorageAttachmentIds': {'additionalProperties': False,
18509 'properties': {'ids': {'items': {'$ref': '#/definitions/StorageAttachmentId'},
18511 'required': ['ids'],
18513 'StorageAttachmentIdsResult': {'additionalProperties': False,
18514 'properties': {'error': {'$ref': '#/definitions/Error'},
18515 'result': {'$ref': '#/definitions/StorageAttachmentIds'}},
18516 'required': ['result'],
18518 'StorageAttachmentIdsResults': {'additionalProperties': False,
18519 'properties': {'results': {'items': {'$ref': '#/definitions/StorageAttachmentIdsResult'},
18522 'StorageAttachmentResult': {'additionalProperties': False,
18523 'properties': {'error': {'$ref': '#/definitions/Error'},
18524 'result': {'$ref': '#/definitions/StorageAttachment'}},
18525 'required': ['result'],
18527 'StorageAttachmentResults': {'additionalProperties': False,
18528 'properties': {'results': {'items': {'$ref': '#/definitions/StorageAttachmentResult'},
18531 'StorageConstraints': {'additionalProperties': False,
18532 'properties': {'Count': {'type': 'integer'},
18533 'Pool': {'type': 'string'},
18534 'Size': {'type': 'integer'}},
18535 'required': ['Pool', 'Size', 'Count'],
18537 'StoragesAddParams': {'additionalProperties': False,
18538 'properties': {'storages': {'items': {'$ref': '#/definitions/StorageAddParams'},
18540 'required': ['storages'],
18542 'StringBoolResult': {'additionalProperties': False,
18543 'properties': {'Error': {'$ref': '#/definitions/Error'},
18544 'Ok': {'type': 'boolean'},
18545 'Result': {'type': 'string'}},
18546 'required': ['Error', 'Result', 'Ok'],
18548 'StringBoolResults': {'additionalProperties': False,
18549 'properties': {'Results': {'items': {'$ref': '#/definitions/StringBoolResult'},
18551 'required': ['Results'],
18553 'StringResult': {'additionalProperties': False,
18554 'properties': {'Error': {'$ref': '#/definitions/Error'},
18555 'Result': {'type': 'string'}},
18556 'required': ['Error', 'Result'],
18558 'StringResults': {'additionalProperties': False,
18559 'properties': {'Results': {'items': {'$ref': '#/definitions/StringResult'},
18561 'required': ['Results'],
18563 'StringsResult': {'additionalProperties': False,
18564 'properties': {'Error': {'$ref': '#/definitions/Error'},
18565 'Result': {'items': {'type': 'string'},
18567 'required': ['Error', 'Result'],
18569 'StringsResults': {'additionalProperties': False,
18570 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsResult'},
18572 'required': ['Results'],
18574 'StringsWatchResult': {'additionalProperties': False,
18575 'properties': {'Changes': {'items': {'type': 'string'},
18577 'Error': {'$ref': '#/definitions/Error'},
18578 'StringsWatcherId': {'type': 'string'}},
18579 'required': ['StringsWatcherId',
18583 'StringsWatchResults': {'additionalProperties': False,
18584 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
18586 'required': ['Results'],
18588 'UnitNetworkConfig': {'additionalProperties': False,
18589 'properties': {'BindingName': {'type': 'string'},
18590 'UnitTag': {'type': 'string'}},
18591 'required': ['UnitTag', 'BindingName'],
18593 'UnitNetworkConfigResult': {'additionalProperties': False,
18594 'properties': {'Error': {'$ref': '#/definitions/Error'},
18595 'Info': {'items': {'$ref': '#/definitions/NetworkConfig'},
18597 'required': ['Error', 'Info'],
18599 'UnitNetworkConfigResults': {'additionalProperties': False,
18600 'properties': {'Results': {'items': {'$ref': '#/definitions/UnitNetworkConfigResult'},
18602 'required': ['Results'],
18604 'UnitSettings': {'additionalProperties': False,
18605 'properties': {'Version': {'type': 'integer'}},
18606 'required': ['Version'],
18608 'UnitsNetworkConfig': {'additionalProperties': False,
18609 'properties': {'Args': {'items': {'$ref': '#/definitions/UnitNetworkConfig'},
18611 'required': ['Args'],
18613 'caveat': {'additionalProperties': False,
18614 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
18615 'location': {'$ref': '#/definitions/packet'},
18616 'verificationId': {'$ref': '#/definitions/packet'}},
18617 'required': ['location',
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'}},
18629 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
18631 'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18632 'Result': {'$ref': '#/definitions/ActionResults'}},
18634 'AddMetricBatches': {'properties': {'Params': {'$ref': '#/definitions/MetricBatchParams'},
18635 'Result': {'$ref': '#/definitions/ErrorResults'}},
18637 'AddUnitStorage': {'properties': {'Params': {'$ref': '#/definitions/StoragesAddParams'},
18638 'Result': {'$ref': '#/definitions/ErrorResults'}},
18640 'AllMachinePorts': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18641 'Result': {'$ref': '#/definitions/MachinePortsResults'}},
18643 'ApplicationOwner': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18644 'Result': {'$ref': '#/definitions/StringResults'}},
18646 'ApplicationStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18647 'Result': {'$ref': '#/definitions/ApplicationStatusResults'}},
18649 'AssignedMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18650 'Result': {'$ref': '#/definitions/StringResults'}},
18652 'AvailabilityZone': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18653 'Result': {'$ref': '#/definitions/StringResults'}},
18655 'BeginActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18656 'Result': {'$ref': '#/definitions/ErrorResults'}},
18658 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
18660 'CharmArchiveSha256': {'properties': {'Params': {'$ref': '#/definitions/CharmURLs'},
18661 'Result': {'$ref': '#/definitions/StringResults'}},
18663 'CharmModifiedVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18664 'Result': {'$ref': '#/definitions/IntResults'}},
18666 'CharmURL': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18667 'Result': {'$ref': '#/definitions/StringBoolResults'}},
18669 'ClearResolved': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18670 'Result': {'$ref': '#/definitions/ErrorResults'}},
18672 'ClosePorts': {'properties': {'Params': {'$ref': '#/definitions/EntitiesPortRanges'},
18673 'Result': {'$ref': '#/definitions/ErrorResults'}},
18675 'ConfigSettings': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18676 'Result': {'$ref': '#/definitions/ConfigSettingsResults'}},
18678 'CurrentModel': {'properties': {'Result': {'$ref': '#/definitions/ModelResult'}},
18680 'Destroy': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18681 'Result': {'$ref': '#/definitions/ErrorResults'}},
18683 'DestroyAllSubordinates': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18684 'Result': {'$ref': '#/definitions/ErrorResults'}},
18686 'DestroyUnitStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18687 'Result': {'$ref': '#/definitions/ErrorResults'}},
18689 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18690 'Result': {'$ref': '#/definitions/ErrorResults'}},
18692 'EnterScope': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
18693 'Result': {'$ref': '#/definitions/ErrorResults'}},
18695 'FinishActions': {'properties': {'Params': {'$ref': '#/definitions/ActionExecutionResults'},
18696 'Result': {'$ref': '#/definitions/ErrorResults'}},
18698 'GetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18699 'Result': {'$ref': '#/definitions/MeterStatusResults'}},
18701 'GetPrincipal': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18702 'Result': {'$ref': '#/definitions/StringBoolResults'}},
18704 'HasSubordinates': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18705 'Result': {'$ref': '#/definitions/BoolResults'}},
18707 'JoinedRelations': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18708 'Result': {'$ref': '#/definitions/StringsResults'}},
18710 'LeaveScope': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
18711 'Result': {'$ref': '#/definitions/ErrorResults'}},
18713 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18714 'Result': {'$ref': '#/definitions/LifeResults'}},
18716 'Merge': {'properties': {'Params': {'$ref': '#/definitions/MergeLeadershipSettingsBulkParams'},
18717 'Result': {'$ref': '#/definitions/ErrorResults'}},
18719 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
18721 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
18723 'NetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/UnitsNetworkConfig'},
18724 'Result': {'$ref': '#/definitions/UnitNetworkConfigResults'}},
18726 'OpenPorts': {'properties': {'Params': {'$ref': '#/definitions/EntitiesPortRanges'},
18727 'Result': {'$ref': '#/definitions/ErrorResults'}},
18729 'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18730 'Result': {'$ref': '#/definitions/StringResults'}},
18732 'ProviderType': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
18734 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18735 'Result': {'$ref': '#/definitions/StringResults'}},
18737 'Read': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18738 'Result': {'$ref': '#/definitions/GetLeadershipSettingsBulkResults'}},
18740 'ReadRemoteSettings': {'properties': {'Params': {'$ref': '#/definitions/RelationUnitPairs'},
18741 'Result': {'$ref': '#/definitions/SettingsResults'}},
18743 'ReadSettings': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
18744 'Result': {'$ref': '#/definitions/SettingsResults'}},
18746 'Relation': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
18747 'Result': {'$ref': '#/definitions/RelationResults'}},
18749 'RelationById': {'properties': {'Params': {'$ref': '#/definitions/RelationIds'},
18750 'Result': {'$ref': '#/definitions/RelationResults'}},
18752 'RemoveStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
18753 'Result': {'$ref': '#/definitions/ErrorResults'}},
18755 'RequestReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18756 'Result': {'$ref': '#/definitions/ErrorResults'}},
18758 'Resolved': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18759 'Result': {'$ref': '#/definitions/ResolvedModeResults'}},
18761 'SetAgentStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
18762 'Result': {'$ref': '#/definitions/ErrorResults'}},
18764 'SetApplicationStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
18765 'Result': {'$ref': '#/definitions/ErrorResults'}},
18767 'SetCharmURL': {'properties': {'Params': {'$ref': '#/definitions/EntitiesCharmURL'},
18768 'Result': {'$ref': '#/definitions/ErrorResults'}},
18770 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
18771 'Result': {'$ref': '#/definitions/ErrorResults'}},
18773 'SetUnitStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
18774 'Result': {'$ref': '#/definitions/ErrorResults'}},
18776 'StorageAttachmentLife': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
18777 'Result': {'$ref': '#/definitions/LifeResults'}},
18779 'StorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
18780 'Result': {'$ref': '#/definitions/StorageAttachmentResults'}},
18782 'UnitStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18783 'Result': {'$ref': '#/definitions/StatusResults'}},
18785 'UnitStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18786 'Result': {'$ref': '#/definitions/StorageAttachmentIdsResults'}},
18788 'UpdateSettings': {'properties': {'Params': {'$ref': '#/definitions/RelationUnitsSettings'},
18789 'Result': {'$ref': '#/definitions/ErrorResults'}},
18791 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18792 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
18794 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
18796 'WatchActionNotifications': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18797 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
18799 'WatchApplicationRelations': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18800 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
18802 'WatchConfigSettings': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18803 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
18805 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
18807 'WatchLeadershipSettings': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18808 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
18810 'WatchMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18811 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
18813 'WatchRelationUnits': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
18814 'Result': {'$ref': '#/definitions/RelationUnitsWatchResults'}},
18816 'WatchStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
18817 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
18819 'WatchUnitAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18820 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
18822 'WatchUnitStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18823 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
18824 'type': 'object'}},
18828 @ReturnMapping(StringsResult
)
18829 async def APIAddresses(self
):
18832 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[str]]
18834 # map input types to rpc msg
18836 msg
= dict(Type
='Uniter', Request
='APIAddresses', Version
=4, Params
=params
)
18838 reply
= await self
.rpc(msg
)
18843 @ReturnMapping(APIHostPortsResult
)
18844 async def APIHostPorts(self
):
18847 Returns -> typing.Sequence[~HostPort]
18849 # map input types to rpc msg
18851 msg
= dict(Type
='Uniter', Request
='APIHostPorts', Version
=4, Params
=params
)
18853 reply
= await self
.rpc(msg
)
18858 @ReturnMapping(ActionResults
)
18859 async def Actions(self
, entities
):
18861 entities : typing.Sequence[~Entity]
18862 Returns -> typing.Sequence[~ActionResult]
18864 # map input types to rpc msg
18866 msg
= dict(Type
='Uniter', Request
='Actions', Version
=4, Params
=params
)
18867 params
['Entities'] = entities
18868 reply
= await self
.rpc(msg
)
18873 @ReturnMapping(ErrorResults
)
18874 async def AddMetricBatches(self
, batches
):
18876 batches : typing.Sequence[~MetricBatchParam]
18877 Returns -> typing.Sequence[~ErrorResult]
18879 # map input types to rpc msg
18881 msg
= dict(Type
='Uniter', Request
='AddMetricBatches', Version
=4, Params
=params
)
18882 params
['Batches'] = batches
18883 reply
= await self
.rpc(msg
)
18888 @ReturnMapping(ErrorResults
)
18889 async def AddUnitStorage(self
, storages
):
18891 storages : typing.Sequence[~StorageAddParams]
18892 Returns -> typing.Sequence[~ErrorResult]
18894 # map input types to rpc msg
18896 msg
= dict(Type
='Uniter', Request
='AddUnitStorage', Version
=4, Params
=params
)
18897 params
['storages'] = storages
18898 reply
= await self
.rpc(msg
)
18903 @ReturnMapping(MachinePortsResults
)
18904 async def AllMachinePorts(self
, entities
):
18906 entities : typing.Sequence[~Entity]
18907 Returns -> typing.Sequence[~MachinePortsResult]
18909 # map input types to rpc msg
18911 msg
= dict(Type
='Uniter', Request
='AllMachinePorts', Version
=4, Params
=params
)
18912 params
['Entities'] = entities
18913 reply
= await self
.rpc(msg
)
18918 @ReturnMapping(StringResults
)
18919 async def ApplicationOwner(self
, entities
):
18921 entities : typing.Sequence[~Entity]
18922 Returns -> typing.Sequence[~StringResult]
18924 # map input types to rpc msg
18926 msg
= dict(Type
='Uniter', Request
='ApplicationOwner', Version
=4, Params
=params
)
18927 params
['Entities'] = entities
18928 reply
= await self
.rpc(msg
)
18933 @ReturnMapping(ApplicationStatusResults
)
18934 async def ApplicationStatus(self
, entities
):
18936 entities : typing.Sequence[~Entity]
18937 Returns -> typing.Sequence[~ApplicationStatusResult]
18939 # map input types to rpc msg
18941 msg
= dict(Type
='Uniter', Request
='ApplicationStatus', Version
=4, Params
=params
)
18942 params
['Entities'] = entities
18943 reply
= await self
.rpc(msg
)
18948 @ReturnMapping(StringResults
)
18949 async def AssignedMachine(self
, entities
):
18951 entities : typing.Sequence[~Entity]
18952 Returns -> typing.Sequence[~StringResult]
18954 # map input types to rpc msg
18956 msg
= dict(Type
='Uniter', Request
='AssignedMachine', Version
=4, Params
=params
)
18957 params
['Entities'] = entities
18958 reply
= await self
.rpc(msg
)
18963 @ReturnMapping(StringResults
)
18964 async def AvailabilityZone(self
, entities
):
18966 entities : typing.Sequence[~Entity]
18967 Returns -> typing.Sequence[~StringResult]
18969 # map input types to rpc msg
18971 msg
= dict(Type
='Uniter', Request
='AvailabilityZone', Version
=4, Params
=params
)
18972 params
['Entities'] = entities
18973 reply
= await self
.rpc(msg
)
18978 @ReturnMapping(ErrorResults
)
18979 async def BeginActions(self
, entities
):
18981 entities : typing.Sequence[~Entity]
18982 Returns -> typing.Sequence[~ErrorResult]
18984 # map input types to rpc msg
18986 msg
= dict(Type
='Uniter', Request
='BeginActions', Version
=4, Params
=params
)
18987 params
['Entities'] = entities
18988 reply
= await self
.rpc(msg
)
18993 @ReturnMapping(BytesResult
)
18994 async def CACert(self
):
18997 Returns -> typing.Sequence[int]
18999 # map input types to rpc msg
19001 msg
= dict(Type
='Uniter', Request
='CACert', Version
=4, Params
=params
)
19003 reply
= await self
.rpc(msg
)
19008 @ReturnMapping(StringResults
)
19009 async def CharmArchiveSha256(self
, urls
):
19011 urls : typing.Sequence[~CharmURL]
19012 Returns -> typing.Sequence[~StringResult]
19014 # map input types to rpc msg
19016 msg
= dict(Type
='Uniter', Request
='CharmArchiveSha256', Version
=4, Params
=params
)
19017 params
['URLs'] = urls
19018 reply
= await self
.rpc(msg
)
19023 @ReturnMapping(IntResults
)
19024 async def CharmModifiedVersion(self
, entities
):
19026 entities : typing.Sequence[~Entity]
19027 Returns -> typing.Sequence[~IntResult]
19029 # map input types to rpc msg
19031 msg
= dict(Type
='Uniter', Request
='CharmModifiedVersion', Version
=4, Params
=params
)
19032 params
['Entities'] = entities
19033 reply
= await self
.rpc(msg
)
19038 @ReturnMapping(StringBoolResults
)
19039 async def CharmURL(self
, entities
):
19041 entities : typing.Sequence[~Entity]
19042 Returns -> typing.Sequence[~StringBoolResult]
19044 # map input types to rpc msg
19046 msg
= dict(Type
='Uniter', Request
='CharmURL', Version
=4, Params
=params
)
19047 params
['Entities'] = entities
19048 reply
= await self
.rpc(msg
)
19053 @ReturnMapping(ErrorResults
)
19054 async def ClearResolved(self
, entities
):
19056 entities : typing.Sequence[~Entity]
19057 Returns -> typing.Sequence[~ErrorResult]
19059 # map input types to rpc msg
19061 msg
= dict(Type
='Uniter', Request
='ClearResolved', Version
=4, Params
=params
)
19062 params
['Entities'] = entities
19063 reply
= await self
.rpc(msg
)
19068 @ReturnMapping(ErrorResults
)
19069 async def ClosePorts(self
, entities
):
19071 entities : typing.Sequence[~EntityPortRange]
19072 Returns -> typing.Sequence[~ErrorResult]
19074 # map input types to rpc msg
19076 msg
= dict(Type
='Uniter', Request
='ClosePorts', Version
=4, Params
=params
)
19077 params
['Entities'] = entities
19078 reply
= await self
.rpc(msg
)
19083 @ReturnMapping(ConfigSettingsResults
)
19084 async def ConfigSettings(self
, entities
):
19086 entities : typing.Sequence[~Entity]
19087 Returns -> typing.Sequence[~ConfigSettingsResult]
19089 # map input types to rpc msg
19091 msg
= dict(Type
='Uniter', Request
='ConfigSettings', Version
=4, Params
=params
)
19092 params
['Entities'] = entities
19093 reply
= await self
.rpc(msg
)
19098 @ReturnMapping(ModelResult
)
19099 async def CurrentModel(self
):
19102 Returns -> typing.Union[_ForwardRef('Error'), str]
19104 # map input types to rpc msg
19106 msg
= dict(Type
='Uniter', Request
='CurrentModel', Version
=4, Params
=params
)
19108 reply
= await self
.rpc(msg
)
19113 @ReturnMapping(ErrorResults
)
19114 async def Destroy(self
, entities
):
19116 entities : typing.Sequence[~Entity]
19117 Returns -> typing.Sequence[~ErrorResult]
19119 # map input types to rpc msg
19121 msg
= dict(Type
='Uniter', Request
='Destroy', Version
=4, Params
=params
)
19122 params
['Entities'] = entities
19123 reply
= await self
.rpc(msg
)
19128 @ReturnMapping(ErrorResults
)
19129 async def DestroyAllSubordinates(self
, entities
):
19131 entities : typing.Sequence[~Entity]
19132 Returns -> typing.Sequence[~ErrorResult]
19134 # map input types to rpc msg
19136 msg
= dict(Type
='Uniter', Request
='DestroyAllSubordinates', Version
=4, Params
=params
)
19137 params
['Entities'] = entities
19138 reply
= await self
.rpc(msg
)
19143 @ReturnMapping(ErrorResults
)
19144 async def DestroyUnitStorageAttachments(self
, entities
):
19146 entities : typing.Sequence[~Entity]
19147 Returns -> typing.Sequence[~ErrorResult]
19149 # map input types to rpc msg
19151 msg
= dict(Type
='Uniter', Request
='DestroyUnitStorageAttachments', Version
=4, Params
=params
)
19152 params
['Entities'] = entities
19153 reply
= await self
.rpc(msg
)
19158 @ReturnMapping(ErrorResults
)
19159 async def EnsureDead(self
, entities
):
19161 entities : typing.Sequence[~Entity]
19162 Returns -> typing.Sequence[~ErrorResult]
19164 # map input types to rpc msg
19166 msg
= dict(Type
='Uniter', Request
='EnsureDead', Version
=4, Params
=params
)
19167 params
['Entities'] = entities
19168 reply
= await self
.rpc(msg
)
19173 @ReturnMapping(ErrorResults
)
19174 async def EnterScope(self
, relationunits
):
19176 relationunits : typing.Sequence[~RelationUnit]
19177 Returns -> typing.Sequence[~ErrorResult]
19179 # map input types to rpc msg
19181 msg
= dict(Type
='Uniter', Request
='EnterScope', Version
=4, Params
=params
)
19182 params
['RelationUnits'] = relationunits
19183 reply
= await self
.rpc(msg
)
19188 @ReturnMapping(ErrorResults
)
19189 async def FinishActions(self
, results
):
19191 results : typing.Sequence[~ActionExecutionResult]
19192 Returns -> typing.Sequence[~ErrorResult]
19194 # map input types to rpc msg
19196 msg
= dict(Type
='Uniter', Request
='FinishActions', Version
=4, Params
=params
)
19197 params
['results'] = results
19198 reply
= await self
.rpc(msg
)
19203 @ReturnMapping(MeterStatusResults
)
19204 async def GetMeterStatus(self
, entities
):
19206 entities : typing.Sequence[~Entity]
19207 Returns -> typing.Sequence[~MeterStatusResult]
19209 # map input types to rpc msg
19211 msg
= dict(Type
='Uniter', Request
='GetMeterStatus', Version
=4, Params
=params
)
19212 params
['Entities'] = entities
19213 reply
= await self
.rpc(msg
)
19218 @ReturnMapping(StringBoolResults
)
19219 async def GetPrincipal(self
, entities
):
19221 entities : typing.Sequence[~Entity]
19222 Returns -> typing.Sequence[~StringBoolResult]
19224 # map input types to rpc msg
19226 msg
= dict(Type
='Uniter', Request
='GetPrincipal', Version
=4, Params
=params
)
19227 params
['Entities'] = entities
19228 reply
= await self
.rpc(msg
)
19233 @ReturnMapping(BoolResults
)
19234 async def HasSubordinates(self
, entities
):
19236 entities : typing.Sequence[~Entity]
19237 Returns -> typing.Sequence[~BoolResult]
19239 # map input types to rpc msg
19241 msg
= dict(Type
='Uniter', Request
='HasSubordinates', Version
=4, Params
=params
)
19242 params
['Entities'] = entities
19243 reply
= await self
.rpc(msg
)
19248 @ReturnMapping(StringsResults
)
19249 async def JoinedRelations(self
, entities
):
19251 entities : typing.Sequence[~Entity]
19252 Returns -> typing.Sequence[~StringsResult]
19254 # map input types to rpc msg
19256 msg
= dict(Type
='Uniter', Request
='JoinedRelations', Version
=4, Params
=params
)
19257 params
['Entities'] = entities
19258 reply
= await self
.rpc(msg
)
19263 @ReturnMapping(ErrorResults
)
19264 async def LeaveScope(self
, relationunits
):
19266 relationunits : typing.Sequence[~RelationUnit]
19267 Returns -> typing.Sequence[~ErrorResult]
19269 # map input types to rpc msg
19271 msg
= dict(Type
='Uniter', Request
='LeaveScope', Version
=4, Params
=params
)
19272 params
['RelationUnits'] = relationunits
19273 reply
= await self
.rpc(msg
)
19278 @ReturnMapping(LifeResults
)
19279 async def Life(self
, entities
):
19281 entities : typing.Sequence[~Entity]
19282 Returns -> typing.Sequence[~LifeResult]
19284 # map input types to rpc msg
19286 msg
= dict(Type
='Uniter', Request
='Life', Version
=4, Params
=params
)
19287 params
['Entities'] = entities
19288 reply
= await self
.rpc(msg
)
19293 @ReturnMapping(ErrorResults
)
19294 async def Merge(self
, params
):
19296 params : typing.Sequence[~MergeLeadershipSettingsParam]
19297 Returns -> typing.Sequence[~ErrorResult]
19299 # map input types to rpc msg
19301 msg
= dict(Type
='Uniter', Request
='Merge', Version
=4, Params
=params
)
19302 params
['Params'] = params
19303 reply
= await self
.rpc(msg
)
19308 @ReturnMapping(ModelConfigResult
)
19309 async def ModelConfig(self
):
19312 Returns -> typing.Mapping[str, typing.Any]
19314 # map input types to rpc msg
19316 msg
= dict(Type
='Uniter', Request
='ModelConfig', Version
=4, Params
=params
)
19318 reply
= await self
.rpc(msg
)
19323 @ReturnMapping(StringResult
)
19324 async def ModelUUID(self
):
19327 Returns -> typing.Union[_ForwardRef('Error'), str]
19329 # map input types to rpc msg
19331 msg
= dict(Type
='Uniter', Request
='ModelUUID', Version
=4, Params
=params
)
19333 reply
= await self
.rpc(msg
)
19338 @ReturnMapping(UnitNetworkConfigResults
)
19339 async def NetworkConfig(self
, args
):
19341 args : typing.Sequence[~UnitNetworkConfig]
19342 Returns -> typing.Sequence[~UnitNetworkConfigResult]
19344 # map input types to rpc msg
19346 msg
= dict(Type
='Uniter', Request
='NetworkConfig', Version
=4, Params
=params
)
19347 params
['Args'] = args
19348 reply
= await self
.rpc(msg
)
19353 @ReturnMapping(ErrorResults
)
19354 async def OpenPorts(self
, entities
):
19356 entities : typing.Sequence[~EntityPortRange]
19357 Returns -> typing.Sequence[~ErrorResult]
19359 # map input types to rpc msg
19361 msg
= dict(Type
='Uniter', Request
='OpenPorts', Version
=4, Params
=params
)
19362 params
['Entities'] = entities
19363 reply
= await self
.rpc(msg
)
19368 @ReturnMapping(StringResults
)
19369 async def PrivateAddress(self
, entities
):
19371 entities : typing.Sequence[~Entity]
19372 Returns -> typing.Sequence[~StringResult]
19374 # map input types to rpc msg
19376 msg
= dict(Type
='Uniter', Request
='PrivateAddress', Version
=4, Params
=params
)
19377 params
['Entities'] = entities
19378 reply
= await self
.rpc(msg
)
19383 @ReturnMapping(StringResult
)
19384 async def ProviderType(self
):
19387 Returns -> typing.Union[_ForwardRef('Error'), str]
19389 # map input types to rpc msg
19391 msg
= dict(Type
='Uniter', Request
='ProviderType', Version
=4, Params
=params
)
19393 reply
= await self
.rpc(msg
)
19398 @ReturnMapping(StringResults
)
19399 async def PublicAddress(self
, entities
):
19401 entities : typing.Sequence[~Entity]
19402 Returns -> typing.Sequence[~StringResult]
19404 # map input types to rpc msg
19406 msg
= dict(Type
='Uniter', Request
='PublicAddress', Version
=4, Params
=params
)
19407 params
['Entities'] = entities
19408 reply
= await self
.rpc(msg
)
19413 @ReturnMapping(GetLeadershipSettingsBulkResults
)
19414 async def Read(self
, entities
):
19416 entities : typing.Sequence[~Entity]
19417 Returns -> typing.Sequence[~GetLeadershipSettingsResult]
19419 # map input types to rpc msg
19421 msg
= dict(Type
='Uniter', Request
='Read', Version
=4, Params
=params
)
19422 params
['Entities'] = entities
19423 reply
= await self
.rpc(msg
)
19428 @ReturnMapping(SettingsResults
)
19429 async def ReadRemoteSettings(self
, relationunitpairs
):
19431 relationunitpairs : typing.Sequence[~RelationUnitPair]
19432 Returns -> typing.Sequence[~SettingsResult]
19434 # map input types to rpc msg
19436 msg
= dict(Type
='Uniter', Request
='ReadRemoteSettings', Version
=4, Params
=params
)
19437 params
['RelationUnitPairs'] = relationunitpairs
19438 reply
= await self
.rpc(msg
)
19443 @ReturnMapping(SettingsResults
)
19444 async def ReadSettings(self
, relationunits
):
19446 relationunits : typing.Sequence[~RelationUnit]
19447 Returns -> typing.Sequence[~SettingsResult]
19449 # map input types to rpc msg
19451 msg
= dict(Type
='Uniter', Request
='ReadSettings', Version
=4, Params
=params
)
19452 params
['RelationUnits'] = relationunits
19453 reply
= await self
.rpc(msg
)
19458 @ReturnMapping(RelationResults
)
19459 async def Relation(self
, relationunits
):
19461 relationunits : typing.Sequence[~RelationUnit]
19462 Returns -> typing.Sequence[~RelationResult]
19464 # map input types to rpc msg
19466 msg
= dict(Type
='Uniter', Request
='Relation', Version
=4, Params
=params
)
19467 params
['RelationUnits'] = relationunits
19468 reply
= await self
.rpc(msg
)
19473 @ReturnMapping(RelationResults
)
19474 async def RelationById(self
, relationids
):
19476 relationids : typing.Sequence[int]
19477 Returns -> typing.Sequence[~RelationResult]
19479 # map input types to rpc msg
19481 msg
= dict(Type
='Uniter', Request
='RelationById', Version
=4, Params
=params
)
19482 params
['RelationIds'] = relationids
19483 reply
= await self
.rpc(msg
)
19488 @ReturnMapping(ErrorResults
)
19489 async def RemoveStorageAttachments(self
, ids
):
19491 ids : typing.Sequence[~StorageAttachmentId]
19492 Returns -> typing.Sequence[~ErrorResult]
19494 # map input types to rpc msg
19496 msg
= dict(Type
='Uniter', Request
='RemoveStorageAttachments', Version
=4, Params
=params
)
19497 params
['ids'] = ids
19498 reply
= await self
.rpc(msg
)
19503 @ReturnMapping(ErrorResults
)
19504 async def RequestReboot(self
, entities
):
19506 entities : typing.Sequence[~Entity]
19507 Returns -> typing.Sequence[~ErrorResult]
19509 # map input types to rpc msg
19511 msg
= dict(Type
='Uniter', Request
='RequestReboot', Version
=4, Params
=params
)
19512 params
['Entities'] = entities
19513 reply
= await self
.rpc(msg
)
19518 @ReturnMapping(ResolvedModeResults
)
19519 async def Resolved(self
, entities
):
19521 entities : typing.Sequence[~Entity]
19522 Returns -> typing.Sequence[~ResolvedModeResult]
19524 # map input types to rpc msg
19526 msg
= dict(Type
='Uniter', Request
='Resolved', Version
=4, Params
=params
)
19527 params
['Entities'] = entities
19528 reply
= await self
.rpc(msg
)
19533 @ReturnMapping(ErrorResults
)
19534 async def SetAgentStatus(self
, entities
):
19536 entities : typing.Sequence[~EntityStatusArgs]
19537 Returns -> typing.Sequence[~ErrorResult]
19539 # map input types to rpc msg
19541 msg
= dict(Type
='Uniter', Request
='SetAgentStatus', Version
=4, Params
=params
)
19542 params
['Entities'] = entities
19543 reply
= await self
.rpc(msg
)
19548 @ReturnMapping(ErrorResults
)
19549 async def SetApplicationStatus(self
, entities
):
19551 entities : typing.Sequence[~EntityStatusArgs]
19552 Returns -> typing.Sequence[~ErrorResult]
19554 # map input types to rpc msg
19556 msg
= dict(Type
='Uniter', Request
='SetApplicationStatus', Version
=4, Params
=params
)
19557 params
['Entities'] = entities
19558 reply
= await self
.rpc(msg
)
19563 @ReturnMapping(ErrorResults
)
19564 async def SetCharmURL(self
, entities
):
19566 entities : typing.Sequence[~EntityCharmURL]
19567 Returns -> typing.Sequence[~ErrorResult]
19569 # map input types to rpc msg
19571 msg
= dict(Type
='Uniter', Request
='SetCharmURL', Version
=4, Params
=params
)
19572 params
['Entities'] = entities
19573 reply
= await self
.rpc(msg
)
19578 @ReturnMapping(ErrorResults
)
19579 async def SetStatus(self
, entities
):
19581 entities : typing.Sequence[~EntityStatusArgs]
19582 Returns -> typing.Sequence[~ErrorResult]
19584 # map input types to rpc msg
19586 msg
= dict(Type
='Uniter', Request
='SetStatus', Version
=4, Params
=params
)
19587 params
['Entities'] = entities
19588 reply
= await self
.rpc(msg
)
19593 @ReturnMapping(ErrorResults
)
19594 async def SetUnitStatus(self
, entities
):
19596 entities : typing.Sequence[~EntityStatusArgs]
19597 Returns -> typing.Sequence[~ErrorResult]
19599 # map input types to rpc msg
19601 msg
= dict(Type
='Uniter', Request
='SetUnitStatus', Version
=4, Params
=params
)
19602 params
['Entities'] = entities
19603 reply
= await self
.rpc(msg
)
19608 @ReturnMapping(LifeResults
)
19609 async def StorageAttachmentLife(self
, ids
):
19611 ids : typing.Sequence[~StorageAttachmentId]
19612 Returns -> typing.Sequence[~LifeResult]
19614 # map input types to rpc msg
19616 msg
= dict(Type
='Uniter', Request
='StorageAttachmentLife', Version
=4, Params
=params
)
19617 params
['ids'] = ids
19618 reply
= await self
.rpc(msg
)
19623 @ReturnMapping(StorageAttachmentResults
)
19624 async def StorageAttachments(self
, ids
):
19626 ids : typing.Sequence[~StorageAttachmentId]
19627 Returns -> typing.Sequence[~StorageAttachmentResult]
19629 # map input types to rpc msg
19631 msg
= dict(Type
='Uniter', Request
='StorageAttachments', Version
=4, Params
=params
)
19632 params
['ids'] = ids
19633 reply
= await self
.rpc(msg
)
19638 @ReturnMapping(StatusResults
)
19639 async def UnitStatus(self
, entities
):
19641 entities : typing.Sequence[~Entity]
19642 Returns -> typing.Sequence[~StatusResult]
19644 # map input types to rpc msg
19646 msg
= dict(Type
='Uniter', Request
='UnitStatus', Version
=4, Params
=params
)
19647 params
['Entities'] = entities
19648 reply
= await self
.rpc(msg
)
19653 @ReturnMapping(StorageAttachmentIdsResults
)
19654 async def UnitStorageAttachments(self
, entities
):
19656 entities : typing.Sequence[~Entity]
19657 Returns -> typing.Sequence[~StorageAttachmentIdsResult]
19659 # map input types to rpc msg
19661 msg
= dict(Type
='Uniter', Request
='UnitStorageAttachments', Version
=4, Params
=params
)
19662 params
['Entities'] = entities
19663 reply
= await self
.rpc(msg
)
19668 @ReturnMapping(ErrorResults
)
19669 async def UpdateSettings(self
, relationunits
):
19671 relationunits : typing.Sequence[~RelationUnitSettings]
19672 Returns -> typing.Sequence[~ErrorResult]
19674 # map input types to rpc msg
19676 msg
= dict(Type
='Uniter', Request
='UpdateSettings', Version
=4, Params
=params
)
19677 params
['RelationUnits'] = relationunits
19678 reply
= await self
.rpc(msg
)
19683 @ReturnMapping(NotifyWatchResults
)
19684 async def Watch(self
, entities
):
19686 entities : typing.Sequence[~Entity]
19687 Returns -> typing.Sequence[~NotifyWatchResult]
19689 # map input types to rpc msg
19691 msg
= dict(Type
='Uniter', Request
='Watch', Version
=4, Params
=params
)
19692 params
['Entities'] = entities
19693 reply
= await self
.rpc(msg
)
19698 @ReturnMapping(NotifyWatchResult
)
19699 async def WatchAPIHostPorts(self
):
19702 Returns -> typing.Union[_ForwardRef('Error'), str]
19704 # map input types to rpc msg
19706 msg
= dict(Type
='Uniter', Request
='WatchAPIHostPorts', Version
=4, Params
=params
)
19708 reply
= await self
.rpc(msg
)
19713 @ReturnMapping(StringsWatchResults
)
19714 async def WatchActionNotifications(self
, entities
):
19716 entities : typing.Sequence[~Entity]
19717 Returns -> typing.Sequence[~StringsWatchResult]
19719 # map input types to rpc msg
19721 msg
= dict(Type
='Uniter', Request
='WatchActionNotifications', Version
=4, Params
=params
)
19722 params
['Entities'] = entities
19723 reply
= await self
.rpc(msg
)
19728 @ReturnMapping(StringsWatchResults
)
19729 async def WatchApplicationRelations(self
, entities
):
19731 entities : typing.Sequence[~Entity]
19732 Returns -> typing.Sequence[~StringsWatchResult]
19734 # map input types to rpc msg
19736 msg
= dict(Type
='Uniter', Request
='WatchApplicationRelations', Version
=4, Params
=params
)
19737 params
['Entities'] = entities
19738 reply
= await self
.rpc(msg
)
19743 @ReturnMapping(NotifyWatchResults
)
19744 async def WatchConfigSettings(self
, entities
):
19746 entities : typing.Sequence[~Entity]
19747 Returns -> typing.Sequence[~NotifyWatchResult]
19749 # map input types to rpc msg
19751 msg
= dict(Type
='Uniter', Request
='WatchConfigSettings', Version
=4, Params
=params
)
19752 params
['Entities'] = entities
19753 reply
= await self
.rpc(msg
)
19758 @ReturnMapping(NotifyWatchResult
)
19759 async def WatchForModelConfigChanges(self
):
19762 Returns -> typing.Union[_ForwardRef('Error'), str]
19764 # map input types to rpc msg
19766 msg
= dict(Type
='Uniter', Request
='WatchForModelConfigChanges', Version
=4, Params
=params
)
19768 reply
= await self
.rpc(msg
)
19773 @ReturnMapping(NotifyWatchResults
)
19774 async def WatchLeadershipSettings(self
, entities
):
19776 entities : typing.Sequence[~Entity]
19777 Returns -> typing.Sequence[~NotifyWatchResult]
19779 # map input types to rpc msg
19781 msg
= dict(Type
='Uniter', Request
='WatchLeadershipSettings', Version
=4, Params
=params
)
19782 params
['Entities'] = entities
19783 reply
= await self
.rpc(msg
)
19788 @ReturnMapping(NotifyWatchResults
)
19789 async def WatchMeterStatus(self
, entities
):
19791 entities : typing.Sequence[~Entity]
19792 Returns -> typing.Sequence[~NotifyWatchResult]
19794 # map input types to rpc msg
19796 msg
= dict(Type
='Uniter', Request
='WatchMeterStatus', Version
=4, Params
=params
)
19797 params
['Entities'] = entities
19798 reply
= await self
.rpc(msg
)
19803 @ReturnMapping(RelationUnitsWatchResults
)
19804 async def WatchRelationUnits(self
, relationunits
):
19806 relationunits : typing.Sequence[~RelationUnit]
19807 Returns -> typing.Sequence[~RelationUnitsWatchResult]
19809 # map input types to rpc msg
19811 msg
= dict(Type
='Uniter', Request
='WatchRelationUnits', Version
=4, Params
=params
)
19812 params
['RelationUnits'] = relationunits
19813 reply
= await self
.rpc(msg
)
19818 @ReturnMapping(NotifyWatchResults
)
19819 async def WatchStorageAttachments(self
, ids
):
19821 ids : typing.Sequence[~StorageAttachmentId]
19822 Returns -> typing.Sequence[~NotifyWatchResult]
19824 # map input types to rpc msg
19826 msg
= dict(Type
='Uniter', Request
='WatchStorageAttachments', Version
=4, Params
=params
)
19827 params
['ids'] = ids
19828 reply
= await self
.rpc(msg
)
19833 @ReturnMapping(NotifyWatchResults
)
19834 async def WatchUnitAddresses(self
, entities
):
19836 entities : typing.Sequence[~Entity]
19837 Returns -> typing.Sequence[~NotifyWatchResult]
19839 # map input types to rpc msg
19841 msg
= dict(Type
='Uniter', Request
='WatchUnitAddresses', Version
=4, Params
=params
)
19842 params
['Entities'] = entities
19843 reply
= await self
.rpc(msg
)
19848 @ReturnMapping(StringsWatchResults
)
19849 async def WatchUnitStorageAttachments(self
, entities
):
19851 entities : typing.Sequence[~Entity]
19852 Returns -> typing.Sequence[~StringsWatchResult]
19854 # map input types to rpc msg
19856 msg
= dict(Type
='Uniter', Request
='WatchUnitStorageAttachments', Version
=4, Params
=params
)
19857 params
['Entities'] = entities
19858 reply
= await self
.rpc(msg
)
19862 class Upgrader(Type
):
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'],
19871 'Entities': {'additionalProperties': False,
19872 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
19874 'required': ['Entities'],
19876 'EntitiesVersion': {'additionalProperties': False,
19877 'properties': {'AgentTools': {'items': {'$ref': '#/definitions/EntityVersion'},
19879 'required': ['AgentTools'],
19881 'Entity': {'additionalProperties': False,
19882 'properties': {'Tag': {'type': 'string'}},
19883 'required': ['Tag'],
19885 'EntityVersion': {'additionalProperties': False,
19886 'properties': {'Tag': {'type': 'string'},
19887 'Tools': {'$ref': '#/definitions/Version'}},
19888 'required': ['Tag', 'Tools'],
19890 'Error': {'additionalProperties': False,
19891 'properties': {'Code': {'type': 'string'},
19892 'Info': {'$ref': '#/definitions/ErrorInfo'},
19893 'Message': {'type': 'string'}},
19894 'required': ['Message', 'Code'],
19896 'ErrorInfo': {'additionalProperties': False,
19897 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
19898 'MacaroonPath': {'type': 'string'}},
19900 'ErrorResult': {'additionalProperties': False,
19901 'properties': {'Error': {'$ref': '#/definitions/Error'}},
19902 'required': ['Error'],
19904 'ErrorResults': {'additionalProperties': False,
19905 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
19907 'required': ['Results'],
19909 'Macaroon': {'additionalProperties': False,
19910 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
19912 'data': {'items': {'type': 'integer'},
19914 'id': {'$ref': '#/definitions/packet'},
19915 'location': {'$ref': '#/definitions/packet'},
19916 'sig': {'items': {'type': 'integer'},
19918 'required': ['data',
19924 'NotifyWatchResult': {'additionalProperties': False,
19925 'properties': {'Error': {'$ref': '#/definitions/Error'},
19926 'NotifyWatcherId': {'type': 'string'}},
19927 'required': ['NotifyWatcherId', 'Error'],
19929 'NotifyWatchResults': {'additionalProperties': False,
19930 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
19932 'required': ['Results'],
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',
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'],
19953 'ToolsResult': {'additionalProperties': False,
19954 'properties': {'DisableSSLHostnameVerification': {'type': 'boolean'},
19955 'Error': {'$ref': '#/definitions/Error'},
19956 'ToolsList': {'items': {'$ref': '#/definitions/Tools'},
19958 'required': ['ToolsList',
19959 'DisableSSLHostnameVerification',
19962 'ToolsResults': {'additionalProperties': False,
19963 'properties': {'Results': {'items': {'$ref': '#/definitions/ToolsResult'},
19965 'required': ['Results'],
19967 'Version': {'additionalProperties': False,
19968 'properties': {'Version': {'$ref': '#/definitions/Binary'}},
19969 'required': ['Version'],
19971 'VersionResult': {'additionalProperties': False,
19972 'properties': {'Error': {'$ref': '#/definitions/Error'},
19973 'Version': {'$ref': '#/definitions/Number'}},
19974 'required': ['Version', 'Error'],
19976 'VersionResults': {'additionalProperties': False,
19977 'properties': {'Results': {'items': {'$ref': '#/definitions/VersionResult'},
19979 'required': ['Results'],
19981 'caveat': {'additionalProperties': False,
19982 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
19983 'location': {'$ref': '#/definitions/packet'},
19984 'verificationId': {'$ref': '#/definitions/packet'}},
19985 'required': ['location',
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'}},
19998 'SetTools': {'properties': {'Params': {'$ref': '#/definitions/EntitiesVersion'},
19999 'Result': {'$ref': '#/definitions/ErrorResults'}},
20001 'Tools': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
20002 'Result': {'$ref': '#/definitions/ToolsResults'}},
20004 'WatchAPIVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
20005 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
20006 'type': 'object'}},
20010 @ReturnMapping(VersionResults
)
20011 async def DesiredVersion(self
, entities
):
20013 entities : typing.Sequence[~Entity]
20014 Returns -> typing.Sequence[~VersionResult]
20016 # map input types to rpc msg
20018 msg
= dict(Type
='Upgrader', Request
='DesiredVersion', Version
=1, Params
=params
)
20019 params
['Entities'] = entities
20020 reply
= await self
.rpc(msg
)
20025 @ReturnMapping(ErrorResults
)
20026 async def SetTools(self
, agenttools
):
20028 agenttools : typing.Sequence[~EntityVersion]
20029 Returns -> typing.Sequence[~ErrorResult]
20031 # map input types to rpc msg
20033 msg
= dict(Type
='Upgrader', Request
='SetTools', Version
=1, Params
=params
)
20034 params
['AgentTools'] = agenttools
20035 reply
= await self
.rpc(msg
)
20040 @ReturnMapping(ToolsResults
)
20041 async def Tools(self
, entities
):
20043 entities : typing.Sequence[~Entity]
20044 Returns -> typing.Sequence[~ToolsResult]
20046 # map input types to rpc msg
20048 msg
= dict(Type
='Upgrader', Request
='Tools', Version
=1, Params
=params
)
20049 params
['Entities'] = entities
20050 reply
= await self
.rpc(msg
)
20055 @ReturnMapping(NotifyWatchResults
)
20056 async def WatchAPIVersion(self
, entities
):
20058 entities : typing.Sequence[~Entity]
20059 Returns -> typing.Sequence[~NotifyWatchResult]
20061 # map input types to rpc msg
20063 msg
= dict(Type
='Upgrader', Request
='WatchAPIVersion', Version
=1, Params
=params
)
20064 params
['Entities'] = entities
20065 reply
= await self
.rpc(msg
)
20069 class UserManager(Type
):
20070 name
= 'UserManager'
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'},
20078 'username': {'type': 'string'}},
20079 'required': ['username',
20081 'shared-model-tags'],
20083 'AddUserResult': {'additionalProperties': False,
20084 'properties': {'error': {'$ref': '#/definitions/Error'},
20085 'secret-key': {'items': {'type': 'integer'},
20087 'tag': {'type': 'string'}},
20089 'AddUserResults': {'additionalProperties': False,
20090 'properties': {'results': {'items': {'$ref': '#/definitions/AddUserResult'},
20092 'required': ['results'],
20094 'AddUsers': {'additionalProperties': False,
20095 'properties': {'users': {'items': {'$ref': '#/definitions/AddUser'},
20097 'required': ['users'],
20099 'Entities': {'additionalProperties': False,
20100 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
20102 'required': ['Entities'],
20104 'Entity': {'additionalProperties': False,
20105 'properties': {'Tag': {'type': 'string'}},
20106 'required': ['Tag'],
20108 'EntityPassword': {'additionalProperties': False,
20109 'properties': {'Password': {'type': 'string'},
20110 'Tag': {'type': 'string'}},
20111 'required': ['Tag', 'Password'],
20113 'EntityPasswords': {'additionalProperties': False,
20114 'properties': {'Changes': {'items': {'$ref': '#/definitions/EntityPassword'},
20116 'required': ['Changes'],
20118 'Error': {'additionalProperties': False,
20119 'properties': {'Code': {'type': 'string'},
20120 'Info': {'$ref': '#/definitions/ErrorInfo'},
20121 'Message': {'type': 'string'}},
20122 'required': ['Message', 'Code'],
20124 'ErrorInfo': {'additionalProperties': False,
20125 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
20126 'MacaroonPath': {'type': 'string'}},
20128 'ErrorResult': {'additionalProperties': False,
20129 'properties': {'Error': {'$ref': '#/definitions/Error'}},
20130 'required': ['Error'],
20132 'ErrorResults': {'additionalProperties': False,
20133 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
20135 'required': ['Results'],
20137 'Macaroon': {'additionalProperties': False,
20138 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
20140 'data': {'items': {'type': 'integer'},
20142 'id': {'$ref': '#/definitions/packet'},
20143 'location': {'$ref': '#/definitions/packet'},
20144 'sig': {'items': {'type': 'integer'},
20146 'required': ['data',
20152 'MacaroonResult': {'additionalProperties': False,
20153 'properties': {'error': {'$ref': '#/definitions/Error'},
20154 'result': {'$ref': '#/definitions/Macaroon'}},
20156 'MacaroonResults': {'additionalProperties': False,
20157 'properties': {'results': {'items': {'$ref': '#/definitions/MacaroonResult'},
20159 'required': ['results'],
20161 'UserInfo': {'additionalProperties': False,
20162 'properties': {'created-by': {'type': 'string'},
20163 'date-created': {'format': 'date-time',
20165 'disabled': {'type': 'boolean'},
20166 'display-name': {'type': 'string'},
20167 'last-connection': {'format': 'date-time',
20169 'username': {'type': 'string'}},
20170 'required': ['username',
20176 'UserInfoRequest': {'additionalProperties': False,
20177 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
20179 'include-disabled': {'type': 'boolean'}},
20180 'required': ['entities',
20181 'include-disabled'],
20183 'UserInfoResult': {'additionalProperties': False,
20184 'properties': {'error': {'$ref': '#/definitions/Error'},
20185 'result': {'$ref': '#/definitions/UserInfo'}},
20187 'UserInfoResults': {'additionalProperties': False,
20188 'properties': {'results': {'items': {'$ref': '#/definitions/UserInfoResult'},
20190 'required': ['results'],
20192 'caveat': {'additionalProperties': False,
20193 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
20194 'location': {'$ref': '#/definitions/packet'},
20195 'verificationId': {'$ref': '#/definitions/packet'}},
20196 'required': ['location',
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'}},
20209 'CreateLocalLoginMacaroon': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
20210 'Result': {'$ref': '#/definitions/MacaroonResults'}},
20212 'DisableUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
20213 'Result': {'$ref': '#/definitions/ErrorResults'}},
20215 'EnableUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
20216 'Result': {'$ref': '#/definitions/ErrorResults'}},
20218 'SetPassword': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
20219 'Result': {'$ref': '#/definitions/ErrorResults'}},
20221 'UserInfo': {'properties': {'Params': {'$ref': '#/definitions/UserInfoRequest'},
20222 'Result': {'$ref': '#/definitions/UserInfoResults'}},
20223 'type': 'object'}},
20227 @ReturnMapping(AddUserResults
)
20228 async def AddUser(self
, users
):
20230 users : typing.Sequence[~AddUser]
20231 Returns -> typing.Sequence[~AddUserResult]
20233 # map input types to rpc msg
20235 msg
= dict(Type
='UserManager', Request
='AddUser', Version
=1, Params
=params
)
20236 params
['users'] = users
20237 reply
= await self
.rpc(msg
)
20242 @ReturnMapping(MacaroonResults
)
20243 async def CreateLocalLoginMacaroon(self
, entities
):
20245 entities : typing.Sequence[~Entity]
20246 Returns -> typing.Sequence[~MacaroonResult]
20248 # map input types to rpc msg
20250 msg
= dict(Type
='UserManager', Request
='CreateLocalLoginMacaroon', Version
=1, Params
=params
)
20251 params
['Entities'] = entities
20252 reply
= await self
.rpc(msg
)
20257 @ReturnMapping(ErrorResults
)
20258 async def DisableUser(self
, entities
):
20260 entities : typing.Sequence[~Entity]
20261 Returns -> typing.Sequence[~ErrorResult]
20263 # map input types to rpc msg
20265 msg
= dict(Type
='UserManager', Request
='DisableUser', Version
=1, Params
=params
)
20266 params
['Entities'] = entities
20267 reply
= await self
.rpc(msg
)
20272 @ReturnMapping(ErrorResults
)
20273 async def EnableUser(self
, entities
):
20275 entities : typing.Sequence[~Entity]
20276 Returns -> typing.Sequence[~ErrorResult]
20278 # map input types to rpc msg
20280 msg
= dict(Type
='UserManager', Request
='EnableUser', Version
=1, Params
=params
)
20281 params
['Entities'] = entities
20282 reply
= await self
.rpc(msg
)
20287 @ReturnMapping(ErrorResults
)
20288 async def SetPassword(self
, changes
):
20290 changes : typing.Sequence[~EntityPassword]
20291 Returns -> typing.Sequence[~ErrorResult]
20293 # map input types to rpc msg
20295 msg
= dict(Type
='UserManager', Request
='SetPassword', Version
=1, Params
=params
)
20296 params
['Changes'] = changes
20297 reply
= await self
.rpc(msg
)
20302 @ReturnMapping(UserInfoResults
)
20303 async def UserInfo(self
, entities
, include_disabled
):
20305 entities : typing.Sequence[~Entity]
20306 include_disabled : bool
20307 Returns -> typing.Sequence[~UserInfoResult]
20309 # map input types to rpc msg
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
)
20318 class VolumeAttachmentsWatcher(Type
):
20319 name
= 'VolumeAttachmentsWatcher'
20321 schema
= {'definitions': {'Error': {'additionalProperties': False,
20322 'properties': {'Code': {'type': 'string'},
20323 'Info': {'$ref': '#/definitions/ErrorInfo'},
20324 'Message': {'type': 'string'}},
20325 'required': ['Message', 'Code'],
20327 'ErrorInfo': {'additionalProperties': False,
20328 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
20329 'MacaroonPath': {'type': 'string'}},
20331 'Macaroon': {'additionalProperties': False,
20332 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
20334 'data': {'items': {'type': 'integer'},
20336 'id': {'$ref': '#/definitions/packet'},
20337 'location': {'$ref': '#/definitions/packet'},
20338 'sig': {'items': {'type': 'integer'},
20340 'required': ['data',
20346 'MachineStorageId': {'additionalProperties': False,
20347 'properties': {'attachmenttag': {'type': 'string'},
20348 'machinetag': {'type': 'string'}},
20349 'required': ['machinetag',
20352 'MachineStorageIdsWatchResult': {'additionalProperties': False,
20353 'properties': {'Changes': {'items': {'$ref': '#/definitions/MachineStorageId'},
20355 'Error': {'$ref': '#/definitions/Error'},
20356 'MachineStorageIdsWatcherId': {'type': 'string'}},
20357 'required': ['MachineStorageIdsWatcherId',
20361 'caveat': {'additionalProperties': False,
20362 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
20363 'location': {'$ref': '#/definitions/packet'},
20364 'verificationId': {'$ref': '#/definitions/packet'}},
20365 'required': ['location',
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'}},
20377 'Stop': {'type': 'object'}},
20381 @ReturnMapping(MachineStorageIdsWatchResult
)
20382 async def Next(self
):
20385 Returns -> typing.Union[typing.Sequence[~MachineStorageId], _ForwardRef('Error')]
20387 # map input types to rpc msg
20389 msg
= dict(Type
='VolumeAttachmentsWatcher', Request
='Next', Version
=2, Params
=params
)
20391 reply
= await self
.rpc(msg
)
20396 @ReturnMapping(None)
20397 async def Stop(self
):
20402 # map input types to rpc msg
20404 msg
= dict(Type
='VolumeAttachmentsWatcher', Request
='Stop', Version
=2, Params
=params
)
20406 reply
= await self
.rpc(msg
)