1 # DO NOT CHANGE THIS FILE! This file is auto-generated by facade.py.
2 # Changes will be overwritten/lost when the file is regenerated.
4 from juju
.client
.facade
import Type
, ReturnMapping
8 _toSchema
= {'name': 'name', 'receiver': 'receiver', 'parameters': 'parameters', 'tag': 'tag'}
9 _toPy
= {'name': 'name', 'receiver': 'receiver', 'parameters': 'parameters', 'tag': 'tag'}
10 def __init__(self
, name
=None, parameters
=None, receiver
=None, tag
=None):
13 parameters : typing.Mapping[str, typing.Any]
18 self
.parameters
= parameters
19 self
.receiver
= receiver
23 class ActionResult(Type
):
24 _toSchema
= {'started': 'started', 'error': 'error', 'action': 'action', 'enqueued': 'enqueued', 'status': 'status', 'completed': 'completed', 'message': 'message', 'output': 'output'}
25 _toPy
= {'started': 'started', 'error': 'error', 'action': 'action', 'enqueued': 'enqueued', 'status': 'status', 'completed': 'completed', 'message': 'message', 'output': 'output'}
26 def __init__(self
, action
=None, completed
=None, enqueued
=None, error
=None, message
=None, output
=None, started
=None, status
=None):
33 output : typing.Mapping[str, typing.Any]
37 self
.action
= Action
.from_json(action
) if action
else None
38 self
.completed
= completed
39 self
.enqueued
= enqueued
40 self
.error
= Error
.from_json(error
) if error
else None
41 self
.message
= message
43 self
.started
= started
47 class ActionResults(Type
):
48 _toSchema
= {'results': 'results'}
49 _toPy
= {'results': 'results'}
50 def __init__(self
, results
=None):
52 results : typing.Sequence[~ActionResult]
54 self
.results
= [ActionResult
.from_json(o
) for o
in results
or []]
57 class ActionSpec(Type
):
58 _toSchema
= {'params': 'params', 'description': 'description'}
59 _toPy
= {'params': 'params', 'description': 'description'}
60 def __init__(self
, description
=None, params
=None):
63 params : typing.Mapping[str, typing.Any]
65 self
.description
= description
70 _toSchema
= {'actions': 'actions'}
71 _toPy
= {'actions': 'actions'}
72 def __init__(self
, actions
=None):
74 actions : typing.Sequence[~Action]
76 self
.actions
= [Action
.from_json(o
) for o
in actions
or []]
79 class ActionsByName(Type
):
80 _toSchema
= {'name': 'name', 'error': 'error', 'actions': 'actions'}
81 _toPy
= {'name': 'name', 'error': 'error', 'actions': 'actions'}
82 def __init__(self
, actions
=None, error
=None, name
=None):
84 actions : typing.Sequence[~ActionResult]
88 self
.actions
= [ActionResult
.from_json(o
) for o
in actions
or []]
89 self
.error
= Error
.from_json(error
) if error
else None
93 class ActionsByNames(Type
):
94 _toSchema
= {'actions': 'actions'}
95 _toPy
= {'actions': 'actions'}
96 def __init__(self
, actions
=None):
98 actions : typing.Sequence[~ActionsByName]
100 self
.actions
= [ActionsByName
.from_json(o
) for o
in actions
or []]
103 class ActionsByReceiver(Type
):
104 _toSchema
= {'error': 'error', 'receiver': 'receiver', 'actions': 'actions'}
105 _toPy
= {'error': 'error', 'receiver': 'receiver', 'actions': 'actions'}
106 def __init__(self
, actions
=None, error
=None, receiver
=None):
108 actions : typing.Sequence[~ActionResult]
112 self
.actions
= [ActionResult
.from_json(o
) for o
in actions
or []]
113 self
.error
= Error
.from_json(error
) if error
else None
114 self
.receiver
= receiver
117 class ActionsByReceivers(Type
):
118 _toSchema
= {'actions': 'actions'}
119 _toPy
= {'actions': 'actions'}
120 def __init__(self
, actions
=None):
122 actions : typing.Sequence[~ActionsByReceiver]
124 self
.actions
= [ActionsByReceiver
.from_json(o
) for o
in actions
or []]
127 class ApplicationCharmActionsResult(Type
):
128 _toSchema
= {'error': 'error', 'actions': 'actions', 'application_tag': 'application-tag'}
129 _toPy
= {'error': 'error', 'actions': 'actions', 'application-tag': 'application_tag'}
130 def __init__(self
, actions
=None, application_tag
=None, error
=None):
132 actions : typing.Mapping[str, ~ActionSpec]
133 application_tag : str
136 self
.actions
= {k
: ActionSpec
.from_json(v
) for k
, v
in (actions
or dict()).items()}
137 self
.application_tag
= application_tag
138 self
.error
= Error
.from_json(error
) if error
else None
141 class ApplicationsCharmActionsResults(Type
):
142 _toSchema
= {'results': 'results'}
143 _toPy
= {'results': 'results'}
144 def __init__(self
, results
=None):
146 results : typing.Sequence[~ApplicationCharmActionsResult]
148 self
.results
= [ApplicationCharmActionsResult
.from_json(o
) for o
in results
or []]
151 class Entities(Type
):
152 _toSchema
= {'entities': 'entities'}
153 _toPy
= {'entities': 'entities'}
154 def __init__(self
, entities
=None):
156 entities : typing.Sequence[~Entity]
158 self
.entities
= [Entity
.from_json(o
) for o
in entities
or []]
162 _toSchema
= {'tag': 'tag'}
163 _toPy
= {'tag': 'tag'}
164 def __init__(self
, tag
=None):
172 _toSchema
= {'code': 'code', 'info': 'info', 'message': 'message'}
173 _toPy
= {'code': 'code', 'info': 'info', 'message': 'message'}
174 def __init__(self
, code
=None, info
=None, message
=None):
181 self
.info
= ErrorInfo
.from_json(info
) if info
else None
182 self
.message
= message
185 class ErrorInfo(Type
):
186 _toSchema
= {'macaroon_path': 'macaroon-path', 'macaroon': 'macaroon'}
187 _toPy
= {'macaroon-path': 'macaroon_path', 'macaroon': 'macaroon'}
188 def __init__(self
, macaroon
=None, macaroon_path
=None):
193 self
.macaroon
= Macaroon
.from_json(macaroon
) if macaroon
else None
194 self
.macaroon_path
= macaroon_path
197 class FindActionsByNames(Type
):
198 _toSchema
= {'names': 'names'}
199 _toPy
= {'names': 'names'}
200 def __init__(self
, names
=None):
202 names : typing.Sequence[str]
207 class FindTags(Type
):
208 _toSchema
= {'prefixes': 'prefixes'}
209 _toPy
= {'prefixes': 'prefixes'}
210 def __init__(self
, prefixes
=None):
212 prefixes : typing.Sequence[str]
214 self
.prefixes
= prefixes
217 class FindTagsResults(Type
):
218 _toSchema
= {'matches': 'matches'}
219 _toPy
= {'matches': 'matches'}
220 def __init__(self
, matches
=None):
222 matches : typing.Sequence[~Entity]
224 self
.matches
= [Entity
.from_json(o
) for o
in matches
or []]
227 class Macaroon(Type
):
237 class RunParams(Type
):
238 _toSchema
= {'machines': 'machines', 'units': 'units', 'commands': 'commands', 'timeout': 'timeout', 'applications': 'applications'}
239 _toPy
= {'machines': 'machines', 'units': 'units', 'commands': 'commands', 'timeout': 'timeout', 'applications': 'applications'}
240 def __init__(self
, applications
=None, commands
=None, machines
=None, timeout
=None, units
=None):
242 applications : typing.Sequence[str]
244 machines : typing.Sequence[str]
246 units : typing.Sequence[str]
248 self
.applications
= applications
249 self
.commands
= commands
250 self
.machines
= machines
251 self
.timeout
= timeout
255 class AgentGetEntitiesResult(Type
):
256 _toSchema
= {'jobs': 'jobs', 'error': 'error', 'life': 'life', 'container_type': 'container-type'}
257 _toPy
= {'jobs': 'jobs', 'error': 'error', 'life': 'life', 'container-type': 'container_type'}
258 def __init__(self
, container_type
=None, error
=None, jobs
=None, life
=None):
262 jobs : typing.Sequence[str]
265 self
.container_type
= container_type
266 self
.error
= Error
.from_json(error
) if error
else None
271 class AgentGetEntitiesResults(Type
):
272 _toSchema
= {'entities': 'entities'}
273 _toPy
= {'entities': 'entities'}
274 def __init__(self
, entities
=None):
276 entities : typing.Sequence[~AgentGetEntitiesResult]
278 self
.entities
= [AgentGetEntitiesResult
.from_json(o
) for o
in entities
or []]
281 class ControllerConfigResult(Type
):
282 _toSchema
= {'config': 'config'}
283 _toPy
= {'config': 'config'}
284 def __init__(self
, config
=None):
286 config : typing.Mapping[str, typing.Any]
291 class EntityPassword(Type
):
292 _toSchema
= {'password': 'password', 'tag': 'tag'}
293 _toPy
= {'password': 'password', 'tag': 'tag'}
294 def __init__(self
, password
=None, tag
=None):
299 self
.password
= password
303 class EntityPasswords(Type
):
304 _toSchema
= {'changes': 'changes'}
305 _toPy
= {'changes': 'changes'}
306 def __init__(self
, changes
=None):
308 changes : typing.Sequence[~EntityPassword]
310 self
.changes
= [EntityPassword
.from_json(o
) for o
in changes
or []]
313 class ErrorResult(Type
):
314 _toSchema
= {'code': 'code', 'info': 'info', 'message': 'message'}
315 _toPy
= {'code': 'code', 'info': 'info', 'message': 'message'}
316 def __init__(self
, code
=None, info
=None, message
=None):
323 self
.info
= ErrorInfo
.from_json(info
) if info
else None
324 self
.message
= message
327 class ErrorResults(Type
):
328 _toSchema
= {'results': 'results'}
329 _toPy
= {'results': 'results'}
330 def __init__(self
, results
=None):
332 results : typing.Sequence[~ErrorResult]
334 self
.results
= [ErrorResult
.from_json(o
) for o
in results
or []]
337 class IsMasterResult(Type
):
338 _toSchema
= {'master': 'master'}
339 _toPy
= {'master': 'master'}
340 def __init__(self
, master
=None):
347 class ModelConfigResult(Type
):
348 _toSchema
= {'config': 'config'}
349 _toPy
= {'config': 'config'}
350 def __init__(self
, config
=None):
352 config : typing.Mapping[str, typing.Any]
357 class NotifyWatchResult(Type
):
358 _toSchema
= {'error': 'error', 'notifywatcherid': 'NotifyWatcherId'}
359 _toPy
= {'error': 'error', 'NotifyWatcherId': 'notifywatcherid'}
360 def __init__(self
, notifywatcherid
=None, error
=None):
362 notifywatcherid : str
365 self
.notifywatcherid
= notifywatcherid
366 self
.error
= Error
.from_json(error
) if error
else None
369 class StateServingInfo(Type
):
370 _toSchema
= {'private_key': 'private-key', 'cert': 'cert', 'shared_secret': 'shared-secret', 'api_port': 'api-port', 'state_port': 'state-port', 'system_identity': 'system-identity', 'ca_private_key': 'ca-private-key'}
371 _toPy
= {'api-port': 'api_port', 'cert': 'cert', 'shared-secret': 'shared_secret', 'ca-private-key': 'ca_private_key', 'state-port': 'state_port', 'system-identity': 'system_identity', 'private-key': 'private_key'}
372 def __init__(self
, api_port
=None, ca_private_key
=None, cert
=None, private_key
=None, shared_secret
=None, state_port
=None, system_identity
=None):
380 system_identity : str
382 self
.api_port
= api_port
383 self
.ca_private_key
= ca_private_key
385 self
.private_key
= private_key
386 self
.shared_secret
= shared_secret
387 self
.state_port
= state_port
388 self
.system_identity
= system_identity
391 class AllWatcherNextResults(Type
):
392 _toSchema
= {'deltas': 'deltas'}
393 _toPy
= {'deltas': 'deltas'}
394 def __init__(self
, deltas
=None):
396 deltas : typing.Sequence[~Delta]
398 self
.deltas
= [Delta
.from_json(o
) for o
in deltas
or []]
402 _toSchema
= {'removed': 'removed', 'entity': 'entity'}
403 _toPy
= {'removed': 'removed', 'entity': 'entity'}
404 def __init__(self
, entity
=None, removed
=None):
406 entity : typing.Mapping[str, typing.Any]
410 self
.removed
= removed
413 class AnnotationsGetResult(Type
):
414 _toSchema
= {'error': 'error', 'annotations': 'annotations', 'entity': 'entity'}
415 _toPy
= {'error': 'error', 'annotations': 'annotations', 'entity': 'entity'}
416 def __init__(self
, annotations
=None, entity
=None, error
=None):
418 annotations : typing.Mapping[str, str]
422 self
.annotations
= annotations
424 self
.error
= ErrorResult
.from_json(error
) if error
else None
427 class AnnotationsGetResults(Type
):
428 _toSchema
= {'results': 'results'}
429 _toPy
= {'results': 'results'}
430 def __init__(self
, results
=None):
432 results : typing.Sequence[~AnnotationsGetResult]
434 self
.results
= [AnnotationsGetResult
.from_json(o
) for o
in results
or []]
437 class AnnotationsSet(Type
):
438 _toSchema
= {'annotations': 'annotations'}
439 _toPy
= {'annotations': 'annotations'}
440 def __init__(self
, annotations
=None):
442 annotations : typing.Sequence[~EntityAnnotations]
444 self
.annotations
= [EntityAnnotations
.from_json(o
) for o
in annotations
or []]
447 class EntityAnnotations(Type
):
448 _toSchema
= {'annotations': 'annotations', 'entity': 'entity'}
449 _toPy
= {'annotations': 'annotations', 'entity': 'entity'}
450 def __init__(self
, annotations
=None, entity
=None):
452 annotations : typing.Mapping[str, str]
455 self
.annotations
= annotations
459 class AddApplicationUnits(Type
):
460 _toSchema
= {'num_units': 'num-units', 'placement': 'placement', 'application': 'application'}
461 _toPy
= {'num-units': 'num_units', 'placement': 'placement', 'application': 'application'}
462 def __init__(self
, application
=None, num_units
=None, placement
=None):
466 placement : typing.Sequence[~Placement]
468 self
.application
= application
469 self
.num_units
= num_units
470 self
.placement
= [Placement
.from_json(o
) for o
in placement
or []]
473 class AddApplicationUnitsResults(Type
):
474 _toSchema
= {'units': 'units'}
475 _toPy
= {'units': 'units'}
476 def __init__(self
, units
=None):
478 units : typing.Sequence[str]
483 class AddRelation(Type
):
484 _toSchema
= {'endpoints': 'endpoints'}
485 _toPy
= {'endpoints': 'endpoints'}
486 def __init__(self
, endpoints
=None):
488 endpoints : typing.Sequence[str]
490 self
.endpoints
= endpoints
493 class AddRelationResults(Type
):
494 _toSchema
= {'endpoints': 'endpoints'}
495 _toPy
= {'endpoints': 'endpoints'}
496 def __init__(self
, endpoints
=None):
498 endpoints : typing.Mapping[str, ~CharmRelation]
500 self
.endpoints
= {k
: CharmRelation
.from_json(v
) for k
, v
in (endpoints
or dict()).items()}
503 class ApplicationCharmRelations(Type
):
504 _toSchema
= {'application': 'application'}
505 _toPy
= {'application': 'application'}
506 def __init__(self
, application
=None):
510 self
.application
= application
513 class ApplicationCharmRelationsResults(Type
):
514 _toSchema
= {'charm_relations': 'charm-relations'}
515 _toPy
= {'charm-relations': 'charm_relations'}
516 def __init__(self
, charm_relations
=None):
518 charm_relations : typing.Sequence[str]
520 self
.charm_relations
= charm_relations
523 class ApplicationDeploy(Type
):
524 _toSchema
= {'placement': 'placement', 'charm_url': 'charm-url', 'series': 'series', 'config_yaml': 'config-yaml', 'storage': 'storage', 'channel': 'channel', 'application': 'application', 'config': 'config', 'constraints': 'constraints', 'num_units': 'num-units', 'resources': 'resources', 'endpoint_bindings': 'endpoint-bindings'}
525 _toPy
= {'placement': 'placement', 'endpoint-bindings': 'endpoint_bindings', 'num-units': 'num_units', 'series': 'series', 'storage': 'storage', 'channel': 'channel', 'application': 'application', 'charm-url': 'charm_url', 'constraints': 'constraints', 'config-yaml': 'config_yaml', 'resources': 'resources', 'config': 'config'}
526 def __init__(self
, application
=None, channel
=None, charm_url
=None, config
=None, config_yaml
=None, constraints
=None, endpoint_bindings
=None, num_units
=None, placement
=None, resources
=None, series
=None, storage
=None):
531 config : typing.Mapping[str, str]
534 endpoint_bindings : typing.Mapping[str, str]
536 placement : typing.Sequence[~Placement]
537 resources : typing.Mapping[str, str]
539 storage : typing.Mapping[str, ~Constraints]
541 self
.application
= application
542 self
.channel
= channel
543 self
.charm_url
= charm_url
545 self
.config_yaml
= config_yaml
546 self
.constraints
= Value
.from_json(constraints
) if constraints
else None
547 self
.endpoint_bindings
= endpoint_bindings
548 self
.num_units
= num_units
549 self
.placement
= [Placement
.from_json(o
) for o
in placement
or []]
550 self
.resources
= resources
552 self
.storage
= {k
: Constraints
.from_json(v
) for k
, v
in (storage
or dict()).items()}
555 class ApplicationDestroy(Type
):
556 _toSchema
= {'application': 'application'}
557 _toPy
= {'application': 'application'}
558 def __init__(self
, application
=None):
562 self
.application
= application
565 class ApplicationExpose(Type
):
566 _toSchema
= {'application': 'application'}
567 _toPy
= {'application': 'application'}
568 def __init__(self
, application
=None):
572 self
.application
= application
575 class ApplicationGet(Type
):
576 _toSchema
= {'application': 'application'}
577 _toPy
= {'application': 'application'}
578 def __init__(self
, application
=None):
582 self
.application
= application
585 class ApplicationGetResults(Type
):
586 _toSchema
= {'application': 'application', 'config': 'config', 'constraints': 'constraints', 'charm': 'charm'}
587 _toPy
= {'application': 'application', 'config': 'config', 'constraints': 'constraints', 'charm': 'charm'}
588 def __init__(self
, application
=None, charm
=None, config
=None, constraints
=None):
592 config : typing.Mapping[str, typing.Any]
595 self
.application
= application
598 self
.constraints
= Value
.from_json(constraints
) if constraints
else None
601 class ApplicationMetricCredential(Type
):
602 _toSchema
= {'metrics_credentials': 'metrics-credentials', 'application': 'application'}
603 _toPy
= {'application': 'application', 'metrics-credentials': 'metrics_credentials'}
604 def __init__(self
, application
=None, metrics_credentials
=None):
607 metrics_credentials : typing.Sequence[int]
609 self
.application
= application
610 self
.metrics_credentials
= metrics_credentials
613 class ApplicationMetricCredentials(Type
):
614 _toSchema
= {'creds': 'creds'}
615 _toPy
= {'creds': 'creds'}
616 def __init__(self
, creds
=None):
618 creds : typing.Sequence[~ApplicationMetricCredential]
620 self
.creds
= [ApplicationMetricCredential
.from_json(o
) for o
in creds
or []]
623 class ApplicationSet(Type
):
624 _toSchema
= {'options': 'options', 'application': 'application'}
625 _toPy
= {'options': 'options', 'application': 'application'}
626 def __init__(self
, application
=None, options
=None):
629 options : typing.Mapping[str, str]
631 self
.application
= application
632 self
.options
= options
635 class ApplicationSetCharm(Type
):
636 _toSchema
= {'channel': 'channel', 'force_series': 'force-series', 'application': 'application', 'charm_url': 'charm-url', 'resource_ids': 'resource-ids', 'force_units': 'force-units'}
637 _toPy
= {'channel': 'channel', 'force-units': 'force_units', 'application': 'application', 'charm-url': 'charm_url', 'resource-ids': 'resource_ids', 'force-series': 'force_series'}
638 def __init__(self
, application
=None, channel
=None, charm_url
=None, force_series
=None, force_units
=None, resource_ids
=None):
645 resource_ids : typing.Mapping[str, str]
647 self
.application
= application
648 self
.channel
= channel
649 self
.charm_url
= charm_url
650 self
.force_series
= force_series
651 self
.force_units
= force_units
652 self
.resource_ids
= resource_ids
655 class ApplicationUnexpose(Type
):
656 _toSchema
= {'application': 'application'}
657 _toPy
= {'application': 'application'}
658 def __init__(self
, application
=None):
662 self
.application
= application
665 class ApplicationUnset(Type
):
666 _toSchema
= {'options': 'options', 'application': 'application'}
667 _toPy
= {'options': 'options', 'application': 'application'}
668 def __init__(self
, application
=None, options
=None):
671 options : typing.Sequence[str]
673 self
.application
= application
674 self
.options
= options
677 class ApplicationUpdate(Type
):
678 _toSchema
= {'force_series': 'force-series', 'application': 'application', 'charm_url': 'charm-url', 'constraints': 'constraints', 'min_units': 'min-units', 'settings': 'settings', 'settings_yaml': 'settings-yaml', 'force_charm_url': 'force-charm-url'}
679 _toPy
= {'min-units': 'min_units', 'force-charm-url': 'force_charm_url', 'charm-url': 'charm_url', 'constraints': 'constraints', 'settings-yaml': 'settings_yaml', 'application': 'application', 'settings': 'settings', 'force-series': 'force_series'}
680 def __init__(self
, application
=None, charm_url
=None, constraints
=None, force_charm_url
=None, force_series
=None, min_units
=None, settings
=None, settings_yaml
=None):
685 force_charm_url : bool
688 settings : typing.Mapping[str, str]
691 self
.application
= application
692 self
.charm_url
= charm_url
693 self
.constraints
= Value
.from_json(constraints
) if constraints
else None
694 self
.force_charm_url
= force_charm_url
695 self
.force_series
= force_series
696 self
.min_units
= min_units
697 self
.settings
= settings
698 self
.settings_yaml
= settings_yaml
701 class ApplicationsDeploy(Type
):
702 _toSchema
= {'applications': 'applications'}
703 _toPy
= {'applications': 'applications'}
704 def __init__(self
, applications
=None):
706 applications : typing.Sequence[~ApplicationDeploy]
708 self
.applications
= [ApplicationDeploy
.from_json(o
) for o
in applications
or []]
711 class CharmRelation(Type
):
712 _toSchema
= {'name': 'name', 'limit': 'limit', 'scope': 'scope', 'interface': 'interface', 'optional': 'optional', 'role': 'role'}
713 _toPy
= {'name': 'name', 'limit': 'limit', 'scope': 'scope', 'interface': 'interface', 'optional': 'optional', 'role': 'role'}
714 def __init__(self
, interface
=None, limit
=None, name
=None, optional
=None, role
=None, scope
=None):
723 self
.interface
= interface
726 self
.optional
= optional
731 class Constraints(Type
):
732 _toSchema
= {'size': 'Size', 'count': 'Count', 'pool': 'Pool'}
733 _toPy
= {'Pool': 'pool', 'Size': 'size', 'Count': 'count'}
734 def __init__(self
, count
=None, pool
=None, size
=None):
745 class DestroyApplicationUnits(Type
):
746 _toSchema
= {'unit_names': 'unit-names'}
747 _toPy
= {'unit-names': 'unit_names'}
748 def __init__(self
, unit_names
=None):
750 unit_names : typing.Sequence[str]
752 self
.unit_names
= unit_names
755 class DestroyRelation(Type
):
756 _toSchema
= {'endpoints': 'endpoints'}
757 _toPy
= {'endpoints': 'endpoints'}
758 def __init__(self
, endpoints
=None):
760 endpoints : typing.Sequence[str]
762 self
.endpoints
= endpoints
765 class GetApplicationConstraints(Type
):
766 _toSchema
= {'application': 'application'}
767 _toPy
= {'application': 'application'}
768 def __init__(self
, application
=None):
772 self
.application
= application
775 class GetConstraintsResults(Type
):
776 _toSchema
= {'tags': 'tags', 'cpu_cores': 'cpu-cores', 'arch': 'arch', 'container': 'container', 'root_disk': 'root-disk', 'mem': 'mem', 'cpu_power': 'cpu-power', 'instance_type': 'instance-type', 'spaces': 'spaces', 'virt_type': 'virt-type'}
777 _toPy
= {'instance-type': 'instance_type', 'cpu-cores': 'cpu_cores', 'tags': 'tags', 'arch': 'arch', 'container': 'container', 'mem': 'mem', 'root-disk': 'root_disk', 'spaces': 'spaces', 'cpu-power': 'cpu_power', 'virt-type': 'virt_type'}
778 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):
787 spaces : typing.Sequence[str]
788 tags : typing.Sequence[str]
792 self
.container
= container
793 self
.cpu_cores
= cpu_cores
794 self
.cpu_power
= cpu_power
795 self
.instance_type
= instance_type
797 self
.root_disk
= root_disk
800 self
.virt_type
= virt_type
803 class Placement(Type
):
804 _toSchema
= {'scope': 'scope', 'directive': 'directive'}
805 _toPy
= {'scope': 'scope', 'directive': 'directive'}
806 def __init__(self
, directive
=None, scope
=None):
811 self
.directive
= directive
815 class SetConstraints(Type
):
816 _toSchema
= {'application': 'application', 'constraints': 'constraints'}
817 _toPy
= {'application': 'application', 'constraints': 'constraints'}
818 def __init__(self
, application
=None, constraints
=None):
823 self
.application
= application
824 self
.constraints
= Value
.from_json(constraints
) if constraints
else None
827 class StringResult(Type
):
828 _toSchema
= {'error': 'error', 'result': 'result'}
829 _toPy
= {'error': 'error', 'result': 'result'}
830 def __init__(self
, error
=None, result
=None):
835 self
.error
= Error
.from_json(error
) if error
else None
840 _toSchema
= {'tags': 'tags', 'cpu_cores': 'cpu-cores', 'arch': 'arch', 'container': 'container', 'root_disk': 'root-disk', 'mem': 'mem', 'cpu_power': 'cpu-power', 'instance_type': 'instance-type', 'spaces': 'spaces', 'virt_type': 'virt-type'}
841 _toPy
= {'instance-type': 'instance_type', 'cpu-cores': 'cpu_cores', 'tags': 'tags', 'arch': 'arch', 'container': 'container', 'mem': 'mem', 'root-disk': 'root_disk', 'spaces': 'spaces', 'cpu-power': 'cpu_power', 'virt-type': 'virt_type'}
842 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):
851 spaces : typing.Sequence[str]
852 tags : typing.Sequence[str]
856 self
.container
= container
857 self
.cpu_cores
= cpu_cores
858 self
.cpu_power
= cpu_power
859 self
.instance_type
= instance_type
861 self
.root_disk
= root_disk
864 self
.virt_type
= virt_type
867 class StringsWatchResult(Type
):
868 _toSchema
= {'error': 'error', 'changes': 'changes', 'watcher_id': 'watcher-id'}
869 _toPy
= {'error': 'error', 'changes': 'changes', 'watcher-id': 'watcher_id'}
870 def __init__(self
, changes
=None, error
=None, watcher_id
=None):
872 changes : typing.Sequence[str]
876 self
.changes
= changes
877 self
.error
= Error
.from_json(error
) if error
else None
878 self
.watcher_id
= watcher_id
881 class BackupsCreateArgs(Type
):
882 _toSchema
= {'notes': 'notes'}
883 _toPy
= {'notes': 'notes'}
884 def __init__(self
, notes
=None):
891 class BackupsInfoArgs(Type
):
892 _toSchema
= {'id_': 'id'}
893 _toPy
= {'id': 'id_'}
894 def __init__(self
, id_
=None):
901 class BackupsListArgs(Type
):
911 class BackupsListResult(Type
):
912 _toSchema
= {'list_': 'list'}
913 _toPy
= {'list': 'list_'}
914 def __init__(self
, list_
=None):
916 list_ : typing.Sequence[~BackupsMetadataResult]
918 self
.list_
= [BackupsMetadataResult
.from_json(o
) for o
in list_
or []]
921 class BackupsMetadataResult(Type
):
922 _toSchema
= {'version': 'version', 'id_': 'id', 'checksum': 'checksum', 'checksum_format': 'checksum-format', 'machine': 'machine', 'notes': 'notes', 'series': 'series', 'stored': 'stored', 'finished': 'finished', 'started': 'started', 'model': 'model', 'hostname': 'hostname', 'size': 'size', 'ca_cert': 'ca-cert', 'ca_private_key': 'ca-private-key'}
923 _toPy
= {'ca-private-key': 'ca_private_key', 'checksum': 'checksum', 'machine': 'machine', 'id': 'id_', 'notes': 'notes', 'series': 'series', 'checksum-format': 'checksum_format', 'ca-cert': 'ca_cert', 'finished': 'finished', 'started': 'started', 'stored': 'stored', 'model': 'model', 'hostname': 'hostname', 'size': 'size', 'version': 'version'}
924 def __init__(self
, ca_cert
=None, ca_private_key
=None, checksum
=None, checksum_format
=None, finished
=None, hostname
=None, id_
=None, machine
=None, model
=None, notes
=None, series
=None, size
=None, started
=None, stored
=None, version
=None):
929 checksum_format : str
942 self
.ca_cert
= ca_cert
943 self
.ca_private_key
= ca_private_key
944 self
.checksum
= checksum
945 self
.checksum_format
= checksum_format
946 self
.finished
= finished
947 self
.hostname
= hostname
949 self
.machine
= machine
954 self
.started
= started
956 self
.version
= Number
.from_json(version
) if version
else None
959 class BackupsRemoveArgs(Type
):
960 _toSchema
= {'id_': 'id'}
961 _toPy
= {'id': 'id_'}
962 def __init__(self
, id_
=None):
970 _toSchema
= {'patch': 'Patch', 'tag': 'Tag', 'major': 'Major', 'build': 'Build', 'minor': 'Minor'}
971 _toPy
= {'Patch': 'patch', 'Major': 'major', 'Tag': 'tag', 'Minor': 'minor', 'Build': 'build'}
972 def __init__(self
, build
=None, major
=None, minor
=None, patch
=None, tag
=None):
987 class RestoreArgs(Type
):
988 _toSchema
= {'backup_id': 'backup-id'}
989 _toPy
= {'backup-id': 'backup_id'}
990 def __init__(self
, backup_id
=None):
994 self
.backup_id
= backup_id
998 _toSchema
= {'id_': 'id', 'tag': 'tag', 'message': 'message', 'type_': 'type'}
999 _toPy
= {'type': 'type_', 'id': 'id_', 'tag': 'tag', 'message': 'message'}
1000 def __init__(self
, id_
=None, message
=None, tag
=None, type_
=None):
1008 self
.message
= message
1013 class BlockResult(Type
):
1014 _toSchema
= {'error': 'error', 'result': 'result'}
1015 _toPy
= {'error': 'error', 'result': 'result'}
1016 def __init__(self
, error
=None, result
=None):
1021 self
.error
= Error
.from_json(error
) if error
else None
1022 self
.result
= Block
.from_json(result
) if result
else None
1025 class BlockResults(Type
):
1026 _toSchema
= {'results': 'results'}
1027 _toPy
= {'results': 'results'}
1028 def __init__(self
, results
=None):
1030 results : typing.Sequence[~BlockResult]
1032 self
.results
= [BlockResult
.from_json(o
) for o
in results
or []]
1035 class BlockSwitchParams(Type
):
1036 _toSchema
= {'type_': 'type', 'message': 'message'}
1037 _toPy
= {'type': 'type_', 'message': 'message'}
1038 def __init__(self
, message
=None, type_
=None):
1043 self
.message
= message
1047 class CharmActionSpec(Type
):
1048 _toSchema
= {'params': 'params', 'description': 'description'}
1049 _toPy
= {'params': 'params', 'description': 'description'}
1050 def __init__(self
, description
=None, params
=None):
1053 params : typing.Mapping[str, typing.Any]
1055 self
.description
= description
1056 self
.params
= params
1059 class CharmActions(Type
):
1060 _toSchema
= {'specs': 'specs'}
1061 _toPy
= {'specs': 'specs'}
1062 def __init__(self
, specs
=None):
1064 specs : typing.Mapping[str, ~CharmActionSpec]
1066 self
.specs
= {k
: CharmActionSpec
.from_json(v
) for k
, v
in (specs
or dict()).items()}
1069 class CharmInfo(Type
):
1070 _toSchema
= {'metrics': 'metrics', 'actions': 'actions', 'config': 'config', 'url': 'url', 'revision': 'revision', 'meta': 'meta'}
1071 _toPy
= {'metrics': 'metrics', 'actions': 'actions', 'config': 'config', 'url': 'url', 'revision': 'revision', 'meta': 'meta'}
1072 def __init__(self
, actions
=None, config
=None, meta
=None, metrics
=None, revision
=None, url
=None):
1074 actions : CharmActions
1075 config : typing.Mapping[str, ~CharmOption]
1077 metrics : CharmMetrics
1081 self
.actions
= CharmActions
.from_json(actions
) if actions
else None
1082 self
.config
= {k
: CharmOption
.from_json(v
) for k
, v
in (config
or dict()).items()}
1083 self
.meta
= CharmMeta
.from_json(meta
) if meta
else None
1084 self
.metrics
= CharmMetrics
.from_json(metrics
) if metrics
else None
1085 self
.revision
= revision
1089 class CharmMeta(Type
):
1090 _toSchema
= {'name': 'name', 'tags': 'tags', 'subordinate': 'subordinate', 'series': 'series', 'provides': 'provides', 'peers': 'peers', 'storage': 'storage', 'terms': 'terms', 'categories': 'categories', 'description': 'description', 'min_juju_version': 'min-juju-version', 'summary': 'summary', 'resources': 'resources', 'extra_bindings': 'extra-bindings', 'requires': 'requires', 'payload_classes': 'payload-classes'}
1091 _toPy
= {'name': 'name', 'payload-classes': 'payload_classes', 'tags': 'tags', 'min-juju-version': 'min_juju_version', 'subordinate': 'subordinate', 'series': 'series', 'provides': 'provides', 'peers': 'peers', 'storage': 'storage', 'terms': 'terms', 'extra-bindings': 'extra_bindings', 'categories': 'categories', 'description': 'description', 'summary': 'summary', 'resources': 'resources', 'requires': 'requires'}
1092 def __init__(self
, categories
=None, description
=None, extra_bindings
=None, min_juju_version
=None, name
=None, payload_classes
=None, peers
=None, provides
=None, requires
=None, resources
=None, series
=None, storage
=None, subordinate
=None, summary
=None, tags
=None, terms
=None):
1094 categories : typing.Sequence[str]
1096 extra_bindings : typing.Mapping[str, str]
1097 min_juju_version : str
1099 payload_classes : typing.Mapping[str, ~CharmPayloadClass]
1100 peers : typing.Mapping[str, ~CharmRelation]
1101 provides : typing.Mapping[str, ~CharmRelation]
1102 requires : typing.Mapping[str, ~CharmRelation]
1103 resources : typing.Mapping[str, ~CharmResourceMeta]
1104 series : typing.Sequence[str]
1105 storage : typing.Mapping[str, ~CharmStorage]
1108 tags : typing.Sequence[str]
1109 terms : typing.Sequence[str]
1111 self
.categories
= categories
1112 self
.description
= description
1113 self
.extra_bindings
= extra_bindings
1114 self
.min_juju_version
= min_juju_version
1116 self
.payload_classes
= {k
: CharmPayloadClass
.from_json(v
) for k
, v
in (payload_classes
or dict()).items()}
1117 self
.peers
= {k
: CharmRelation
.from_json(v
) for k
, v
in (peers
or dict()).items()}
1118 self
.provides
= {k
: CharmRelation
.from_json(v
) for k
, v
in (provides
or dict()).items()}
1119 self
.requires
= {k
: CharmRelation
.from_json(v
) for k
, v
in (requires
or dict()).items()}
1120 self
.resources
= {k
: CharmResourceMeta
.from_json(v
) for k
, v
in (resources
or dict()).items()}
1121 self
.series
= series
1122 self
.storage
= {k
: CharmStorage
.from_json(v
) for k
, v
in (storage
or dict()).items()}
1123 self
.subordinate
= subordinate
1124 self
.summary
= summary
1129 class CharmMetric(Type
):
1130 _toSchema
= {'description': 'description', 'type_': 'type'}
1131 _toPy
= {'type': 'type_', 'description': 'description'}
1132 def __init__(self
, description
=None, type_
=None):
1137 self
.description
= description
1141 class CharmMetrics(Type
):
1142 _toSchema
= {'metrics': 'metrics'}
1143 _toPy
= {'metrics': 'metrics'}
1144 def __init__(self
, metrics
=None):
1146 metrics : typing.Mapping[str, ~CharmMetric]
1148 self
.metrics
= {k
: CharmMetric
.from_json(v
) for k
, v
in (metrics
or dict()).items()}
1151 class CharmOption(Type
):
1152 _toSchema
= {'default': 'default', 'description': 'description', 'type_': 'type'}
1153 _toPy
= {'type': 'type_', 'default': 'default', 'description': 'description'}
1154 def __init__(self
, default
=None, description
=None, type_
=None):
1156 default : typing.Mapping[str, typing.Any]
1160 self
.default
= default
1161 self
.description
= description
1165 class CharmPayloadClass(Type
):
1166 _toSchema
= {'name': 'name', 'type_': 'type'}
1167 _toPy
= {'name': 'name', 'type': 'type_'}
1168 def __init__(self
, name
=None, type_
=None):
1177 class CharmResourceMeta(Type
):
1178 _toSchema
= {'name': 'name', 'path': 'path', 'description': 'description', 'type_': 'type'}
1179 _toPy
= {'name': 'name', 'type': 'type_', 'path': 'path', 'description': 'description'}
1180 def __init__(self
, description
=None, name
=None, path
=None, type_
=None):
1187 self
.description
= description
1193 class CharmStorage(Type
):
1194 _toSchema
= {'name': 'name', 'location': 'location', 'count_max': 'count-max', 'description': 'description', 'read_only': 'read-only', 'properties': 'properties', 'shared': 'shared', 'count_min': 'count-min', 'minimum_size': 'minimum-size', 'type_': 'type'}
1195 _toPy
= {'name': 'name', 'location': 'location', 'count-min': 'count_min', 'description': 'description', 'properties': 'properties', 'type': 'type_', 'read-only': 'read_only', 'count-max': 'count_max', 'shared': 'shared', 'minimum-size': 'minimum_size'}
1196 def __init__(self
, count_max
=None, count_min
=None, description
=None, location
=None, minimum_size
=None, name
=None, properties
=None, read_only
=None, shared
=None, type_
=None):
1204 properties : typing.Sequence[str]
1209 self
.count_max
= count_max
1210 self
.count_min
= count_min
1211 self
.description
= description
1212 self
.location
= location
1213 self
.minimum_size
= minimum_size
1215 self
.properties
= properties
1216 self
.read_only
= read_only
1217 self
.shared
= shared
1221 class CharmURL(Type
):
1222 _toSchema
= {'url': 'url'}
1223 _toPy
= {'url': 'url'}
1224 def __init__(self
, url
=None):
1231 class CharmsList(Type
):
1232 _toSchema
= {'names': 'names'}
1233 _toPy
= {'names': 'names'}
1234 def __init__(self
, names
=None):
1236 names : typing.Sequence[str]
1241 class CharmsListResult(Type
):
1242 _toSchema
= {'charm_urls': 'charm-urls'}
1243 _toPy
= {'charm-urls': 'charm_urls'}
1244 def __init__(self
, charm_urls
=None):
1246 charm_urls : typing.Sequence[str]
1248 self
.charm_urls
= charm_urls
1251 class IsMeteredResult(Type
):
1252 _toSchema
= {'metered': 'metered'}
1253 _toPy
= {'metered': 'metered'}
1254 def __init__(self
, metered
=None):
1258 self
.metered
= metered
1261 class APIHostPortsResult(Type
):
1262 _toSchema
= {'servers': 'servers'}
1263 _toPy
= {'servers': 'servers'}
1264 def __init__(self
, servers
=None):
1266 servers : typing.Sequence[~HostPort]
1268 self
.servers
= [HostPort
.from_json(o
) for o
in servers
or []]
1271 class AddCharm(Type
):
1272 _toSchema
= {'channel': 'channel', 'url': 'url'}
1273 _toPy
= {'channel': 'channel', 'url': 'url'}
1274 def __init__(self
, channel
=None, url
=None):
1279 self
.channel
= channel
1283 class AddCharmWithAuthorization(Type
):
1284 _toSchema
= {'channel': 'channel', 'url': 'url', 'macaroon': 'macaroon'}
1285 _toPy
= {'channel': 'channel', 'url': 'url', 'macaroon': 'macaroon'}
1286 def __init__(self
, channel
=None, macaroon
=None, url
=None):
1292 self
.channel
= channel
1293 self
.macaroon
= Macaroon
.from_json(macaroon
) if macaroon
else None
1297 class AddMachineParams(Type
):
1298 _toSchema
= {'jobs': 'jobs', 'placement': 'placement', 'disks': 'disks', 'instance_id': 'instance-id', 'constraints': 'constraints', 'hardware_characteristics': 'hardware-characteristics', 'parent_id': 'parent-id', 'nonce': 'nonce', 'container_type': 'container-type', 'addresses': 'addresses', 'series': 'series'}
1299 _toPy
= {'jobs': 'jobs', 'constraints': 'constraints', 'disks': 'disks', 'hardware-characteristics': 'hardware_characteristics', 'container-type': 'container_type', 'placement': 'placement', 'parent-id': 'parent_id', 'instance-id': 'instance_id', 'nonce': 'nonce', 'addresses': 'addresses', 'series': 'series'}
1300 def __init__(self
, addresses
=None, constraints
=None, container_type
=None, disks
=None, hardware_characteristics
=None, instance_id
=None, jobs
=None, nonce
=None, parent_id
=None, placement
=None, series
=None):
1302 addresses : typing.Sequence[~Address]
1304 container_type : str
1305 disks : typing.Sequence[~Constraints]
1306 hardware_characteristics : HardwareCharacteristics
1308 jobs : typing.Sequence[str]
1311 placement : Placement
1314 self
.addresses
= [Address
.from_json(o
) for o
in addresses
or []]
1315 self
.constraints
= Value
.from_json(constraints
) if constraints
else None
1316 self
.container_type
= container_type
1317 self
.disks
= [Constraints
.from_json(o
) for o
in disks
or []]
1318 self
.hardware_characteristics
= HardwareCharacteristics
.from_json(hardware_characteristics
) if hardware_characteristics
else None
1319 self
.instance_id
= instance_id
1322 self
.parent_id
= parent_id
1323 self
.placement
= Placement
.from_json(placement
) if placement
else None
1324 self
.series
= series
1327 class AddMachines(Type
):
1328 _toSchema
= {'params': 'params'}
1329 _toPy
= {'params': 'params'}
1330 def __init__(self
, params
=None):
1332 params : typing.Sequence[~AddMachineParams]
1334 self
.params
= [AddMachineParams
.from_json(o
) for o
in params
or []]
1337 class AddMachinesResult(Type
):
1338 _toSchema
= {'error': 'error', 'machine': 'machine'}
1339 _toPy
= {'error': 'error', 'machine': 'machine'}
1340 def __init__(self
, error
=None, machine
=None):
1345 self
.error
= Error
.from_json(error
) if error
else None
1346 self
.machine
= machine
1349 class AddMachinesResults(Type
):
1350 _toSchema
= {'machines': 'machines'}
1351 _toPy
= {'machines': 'machines'}
1352 def __init__(self
, machines
=None):
1354 machines : typing.Sequence[~AddMachinesResult]
1356 self
.machines
= [AddMachinesResult
.from_json(o
) for o
in machines
or []]
1359 class Address(Type
):
1360 _toSchema
= {'scope': 'scope', 'type_': 'type', 'value': 'value', 'space_name': 'space-name'}
1361 _toPy
= {'type': 'type_', 'scope': 'scope', 'value': 'value', 'space-name': 'space_name'}
1362 def __init__(self
, scope
=None, space_name
=None, type_
=None, value
=None):
1370 self
.space_name
= space_name
1375 class AgentVersionResult(Type
):
1376 _toSchema
= {'patch': 'Patch', 'tag': 'Tag', 'major': 'Major', 'build': 'Build', 'minor': 'Minor'}
1377 _toPy
= {'Patch': 'patch', 'Major': 'major', 'Tag': 'tag', 'Minor': 'minor', 'Build': 'build'}
1378 def __init__(self
, build
=None, major
=None, minor
=None, patch
=None, tag
=None):
1393 class AllWatcherId(Type
):
1394 _toSchema
= {'watcher_id': 'watcher-id'}
1395 _toPy
= {'watcher-id': 'watcher_id'}
1396 def __init__(self
, watcher_id
=None):
1400 self
.watcher_id
= watcher_id
1403 class ApplicationStatus(Type
):
1404 _toSchema
= {'status': 'status', 'subordinate_to': 'subordinate-to', 'err': 'err', 'series': 'series', 'life': 'life', 'can_upgrade_to': 'can-upgrade-to', 'meter_statuses': 'meter-statuses', 'units': 'units', 'workload_version': 'workload-version', 'exposed': 'exposed', 'relations': 'relations', 'charm': 'charm'}
1405 _toPy
= {'status': 'status', 'can-upgrade-to': 'can_upgrade_to', 'err': 'err', 'series': 'series', 'life': 'life', 'exposed': 'exposed', 'subordinate-to': 'subordinate_to', 'units': 'units', 'workload-version': 'workload_version', 'meter-statuses': 'meter_statuses', 'relations': 'relations', 'charm': 'charm'}
1406 def __init__(self
, can_upgrade_to
=None, charm
=None, err
=None, exposed
=None, life
=None, meter_statuses
=None, relations
=None, series
=None, status
=None, subordinate_to
=None, units
=None, workload_version
=None):
1408 can_upgrade_to : str
1410 err : typing.Mapping[str, typing.Any]
1413 meter_statuses : typing.Mapping[str, ~MeterStatus]
1414 relations : typing.Sequence[str]
1416 status : DetailedStatus
1417 subordinate_to : typing.Sequence[str]
1418 units : typing.Mapping[str, ~UnitStatus]
1419 workload_version : str
1421 self
.can_upgrade_to
= can_upgrade_to
1424 self
.exposed
= exposed
1426 self
.meter_statuses
= {k
: MeterStatus
.from_json(v
) for k
, v
in (meter_statuses
or dict()).items()}
1427 self
.relations
= relations
1428 self
.series
= series
1429 self
.status
= DetailedStatus
.from_json(status
) if status
else None
1430 self
.subordinate_to
= subordinate_to
1431 self
.units
= {k
: UnitStatus
.from_json(v
) for k
, v
in (units
or dict()).items()}
1432 self
.workload_version
= workload_version
1436 _toSchema
= {'series': 'Series', 'arch': 'Arch', 'number': 'Number'}
1437 _toPy
= {'Number': 'number', 'Arch': 'arch', 'Series': 'series'}
1438 def __init__(self
, arch
=None, number
=None, series
=None):
1445 self
.number
= Number
.from_json(number
) if number
else None
1446 self
.series
= series
1449 class BundleChangesChange(Type
):
1450 _toSchema
= {'args': 'args', 'id_': 'id', 'requires': 'requires', 'method': 'method'}
1451 _toPy
= {'args': 'args', 'requires': 'requires', 'id': 'id_', 'method': 'method'}
1452 def __init__(self
, args
=None, id_
=None, method
=None, requires
=None):
1454 args : typing.Sequence[typing.Any]
1457 requires : typing.Sequence[str]
1461 self
.method
= method
1462 self
.requires
= requires
1465 class ConfigValue(Type
):
1466 _toSchema
= {'source': 'source', 'value': 'value'}
1467 _toPy
= {'source': 'source', 'value': 'value'}
1468 def __init__(self
, source
=None, value
=None):
1471 value : typing.Mapping[str, typing.Any]
1473 self
.source
= source
1477 class DestroyMachines(Type
):
1478 _toSchema
= {'force': 'force', 'machine_names': 'machine-names'}
1479 _toPy
= {'force': 'force', 'machine-names': 'machine_names'}
1480 def __init__(self
, force
=None, machine_names
=None):
1483 machine_names : typing.Sequence[str]
1486 self
.machine_names
= machine_names
1489 class DetailedStatus(Type
):
1490 _toSchema
= {'status': 'status', 'info': 'info', 'err': 'err', 'kind': 'kind', 'since': 'since', 'life': 'life', 'data': 'data', 'version': 'version'}
1491 _toPy
= {'status': 'status', 'info': 'info', 'err': 'err', 'kind': 'kind', 'since': 'since', 'life': 'life', 'data': 'data', 'version': 'version'}
1492 def __init__(self
, data
=None, err
=None, info
=None, kind
=None, life
=None, since
=None, status
=None, version
=None):
1494 data : typing.Mapping[str, typing.Any]
1495 err : typing.Mapping[str, typing.Any]
1509 self
.status
= status
1510 self
.version
= version
1513 class EndpointStatus(Type
):
1514 _toSchema
= {'name': 'name', 'role': 'role', 'subordinate': 'subordinate', 'application': 'application'}
1515 _toPy
= {'name': 'name', 'role': 'role', 'subordinate': 'subordinate', 'application': 'application'}
1516 def __init__(self
, application
=None, name
=None, role
=None, subordinate
=None):
1523 self
.application
= application
1526 self
.subordinate
= subordinate
1529 class EntityStatus(Type
):
1530 _toSchema
= {'status': 'status', 'info': 'info', 'data': 'data', 'since': 'since'}
1531 _toPy
= {'status': 'status', 'info': 'info', 'data': 'data', 'since': 'since'}
1532 def __init__(self
, data
=None, info
=None, since
=None, status
=None):
1534 data : typing.Mapping[str, typing.Any]
1542 self
.status
= status
1545 class FindToolsParams(Type
):
1546 _toSchema
= {'number': 'number', 'arch': 'arch', 'major': 'major', 'series': 'series', 'minor': 'minor'}
1547 _toPy
= {'number': 'number', 'arch': 'arch', 'major': 'major', 'series': 'series', 'minor': 'minor'}
1548 def __init__(self
, arch
=None, major
=None, minor
=None, number
=None, series
=None):
1559 self
.number
= Number
.from_json(number
) if number
else None
1560 self
.series
= series
1563 class FindToolsResult(Type
):
1564 _toSchema
= {'error': 'error', 'list_': 'list'}
1565 _toPy
= {'error': 'error', 'list': 'list_'}
1566 def __init__(self
, error
=None, list_
=None):
1569 list_ : typing.Sequence[~Tools]
1571 self
.error
= Error
.from_json(error
) if error
else None
1572 self
.list_
= [Tools
.from_json(o
) for o
in list_
or []]
1575 class FullStatus(Type
):
1576 _toSchema
= {'machines': 'machines', 'model': 'model', 'relations': 'relations', 'applications': 'applications'}
1577 _toPy
= {'machines': 'machines', 'model': 'model', 'relations': 'relations', 'applications': 'applications'}
1578 def __init__(self
, applications
=None, machines
=None, model
=None, relations
=None):
1580 applications : typing.Mapping[str, ~ApplicationStatus]
1581 machines : typing.Mapping[str, ~MachineStatus]
1582 model : ModelStatusInfo
1583 relations : typing.Sequence[~RelationStatus]
1585 self
.applications
= {k
: ApplicationStatus
.from_json(v
) for k
, v
in (applications
or dict()).items()}
1586 self
.machines
= {k
: MachineStatus
.from_json(v
) for k
, v
in (machines
or dict()).items()}
1587 self
.model
= ModelStatusInfo
.from_json(model
) if model
else None
1588 self
.relations
= [RelationStatus
.from_json(o
) for o
in relations
or []]
1591 class GetBundleChangesParams(Type
):
1592 _toSchema
= {'yaml': 'yaml'}
1593 _toPy
= {'yaml': 'yaml'}
1594 def __init__(self
, yaml
=None):
1601 class GetBundleChangesResults(Type
):
1602 _toSchema
= {'changes': 'changes', 'errors': 'errors'}
1603 _toPy
= {'changes': 'changes', 'errors': 'errors'}
1604 def __init__(self
, changes
=None, errors
=None):
1606 changes : typing.Sequence[~BundleChangesChange]
1607 errors : typing.Sequence[str]
1609 self
.changes
= [BundleChangesChange
.from_json(o
) for o
in changes
or []]
1610 self
.errors
= errors
1613 class HardwareCharacteristics(Type
):
1614 _toSchema
= {'tags': 'tags', 'cpu_cores': 'cpu-cores', 'arch': 'arch', 'root_disk': 'root-disk', 'mem': 'mem', 'cpu_power': 'cpu-power', 'availability_zone': 'availability-zone'}
1615 _toPy
= {'cpu-cores': 'cpu_cores', 'tags': 'tags', 'arch': 'arch', 'mem': 'mem', 'root-disk': 'root_disk', 'availability-zone': 'availability_zone', 'cpu-power': 'cpu_power'}
1616 def __init__(self
, arch
=None, availability_zone
=None, cpu_cores
=None, cpu_power
=None, mem
=None, root_disk
=None, tags
=None):
1619 availability_zone : str
1624 tags : typing.Sequence[str]
1627 self
.availability_zone
= availability_zone
1628 self
.cpu_cores
= cpu_cores
1629 self
.cpu_power
= cpu_power
1631 self
.root_disk
= root_disk
1635 class History(Type
):
1636 _toSchema
= {'error': 'error', 'statuses': 'statuses'}
1637 _toPy
= {'error': 'error', 'statuses': 'statuses'}
1638 def __init__(self
, error
=None, statuses
=None):
1641 statuses : typing.Sequence[~DetailedStatus]
1643 self
.error
= Error
.from_json(error
) if error
else None
1644 self
.statuses
= [DetailedStatus
.from_json(o
) for o
in statuses
or []]
1647 class HostPort(Type
):
1648 _toSchema
= {'address': 'Address', 'port': 'port'}
1649 _toPy
= {'Address': 'address', 'port': 'port'}
1650 def __init__(self
, address
=None, port
=None):
1655 self
.address
= Address
.from_json(address
) if address
else None
1659 class MachineStatus(Type
):
1660 _toSchema
= {'jobs': 'jobs', 'id_': 'id', 'instance_status': 'instance-status', 'instance_id': 'instance-id', 'series': 'series', 'has_vote': 'has-vote', 'hardware': 'hardware', 'agent_status': 'agent-status', 'dns_name': 'dns-name', 'containers': 'containers', 'wants_vote': 'wants-vote'}
1661 _toPy
= {'has-vote': 'has_vote', 'jobs': 'jobs', 'wants-vote': 'wants_vote', 'instance-status': 'instance_status', 'id': 'id_', 'hardware': 'hardware', 'agent-status': 'agent_status', 'instance-id': 'instance_id', 'dns-name': 'dns_name', 'containers': 'containers', 'series': 'series'}
1662 def __init__(self
, agent_status
=None, containers
=None, dns_name
=None, hardware
=None, has_vote
=None, id_
=None, instance_id
=None, instance_status
=None, jobs
=None, series
=None, wants_vote
=None):
1664 agent_status : DetailedStatus
1665 containers : typing.Mapping[str, ~MachineStatus]
1671 instance_status : DetailedStatus
1672 jobs : typing.Sequence[str]
1676 self
.agent_status
= DetailedStatus
.from_json(agent_status
) if agent_status
else None
1677 self
.containers
= {k
: MachineStatus
.from_json(v
) for k
, v
in (containers
or dict()).items()}
1678 self
.dns_name
= dns_name
1679 self
.hardware
= hardware
1680 self
.has_vote
= has_vote
1682 self
.instance_id
= instance_id
1683 self
.instance_status
= DetailedStatus
.from_json(instance_status
) if instance_status
else None
1685 self
.series
= series
1686 self
.wants_vote
= wants_vote
1689 class MeterStatus(Type
):
1690 _toSchema
= {'message': 'message', 'color': 'color'}
1691 _toPy
= {'message': 'message', 'color': 'color'}
1692 def __init__(self
, color
=None, message
=None):
1698 self
.message
= message
1701 class ModelConfigResults(Type
):
1702 _toSchema
= {'config': 'config'}
1703 _toPy
= {'config': 'config'}
1704 def __init__(self
, config
=None):
1706 config : typing.Mapping[str, ~ConfigValue]
1708 self
.config
= {k
: ConfigValue
.from_json(v
) for k
, v
in (config
or dict()).items()}
1711 class ModelInfo(Type
):
1712 _toSchema
= {'name': 'name', 'status': 'status', 'provider_type': 'provider-type', 'uuid': 'uuid', 'cloud': 'cloud', 'controller_uuid': 'controller-uuid', 'life': 'life', 'cloud_region': 'cloud-region', 'users': 'users', 'cloud_credential': 'cloud-credential', 'owner_tag': 'owner-tag', 'default_series': 'default-series'}
1713 _toPy
= {'name': 'name', 'status': 'status', 'users': 'users', 'cloud': 'cloud', 'provider-type': 'provider_type', 'uuid': 'uuid', 'controller-uuid': 'controller_uuid', 'owner-tag': 'owner_tag', 'cloud-credential': 'cloud_credential', 'default-series': 'default_series', 'life': 'life', 'cloud-region': 'cloud_region'}
1714 def __init__(self
, cloud
=None, cloud_credential
=None, cloud_region
=None, controller_uuid
=None, default_series
=None, life
=None, name
=None, owner_tag
=None, provider_type
=None, status
=None, users
=None, uuid
=None):
1717 cloud_credential : str
1719 controller_uuid : str
1720 default_series : str
1725 status : EntityStatus
1726 users : typing.Sequence[~ModelUserInfo]
1730 self
.cloud_credential
= cloud_credential
1731 self
.cloud_region
= cloud_region
1732 self
.controller_uuid
= controller_uuid
1733 self
.default_series
= default_series
1736 self
.owner_tag
= owner_tag
1737 self
.provider_type
= provider_type
1738 self
.status
= EntityStatus
.from_json(status
) if status
else None
1739 self
.users
= [ModelUserInfo
.from_json(o
) for o
in users
or []]
1743 class ModelSet(Type
):
1744 _toSchema
= {'config': 'config'}
1745 _toPy
= {'config': 'config'}
1746 def __init__(self
, config
=None):
1748 config : typing.Mapping[str, typing.Any]
1750 self
.config
= config
1753 class ModelStatusInfo(Type
):
1754 _toSchema
= {'name': 'name', 'version': 'version', 'region': 'region', 'cloud': 'cloud', 'available_version': 'available-version'}
1755 _toPy
= {'name': 'name', 'available-version': 'available_version', 'region': 'region', 'cloud': 'cloud', 'version': 'version'}
1756 def __init__(self
, available_version
=None, cloud
=None, name
=None, region
=None, version
=None):
1758 available_version : str
1764 self
.available_version
= available_version
1767 self
.region
= region
1768 self
.version
= version
1771 class ModelUnset(Type
):
1772 _toSchema
= {'keys': 'keys'}
1773 _toPy
= {'keys': 'keys'}
1774 def __init__(self
, keys
=None):
1776 keys : typing.Sequence[str]
1781 class ModelUserInfo(Type
):
1782 _toSchema
= {'access': 'access', 'display_name': 'display-name', 'last_connection': 'last-connection', 'user': 'user'}
1783 _toPy
= {'access': 'access', 'user': 'user', 'display-name': 'display_name', 'last-connection': 'last_connection'}
1784 def __init__(self
, access
=None, display_name
=None, last_connection
=None, user
=None):
1788 last_connection : str
1791 self
.access
= access
1792 self
.display_name
= display_name
1793 self
.last_connection
= last_connection
1797 class ModelUserInfoResult(Type
):
1798 _toSchema
= {'error': 'error', 'result': 'result'}
1799 _toPy
= {'error': 'error', 'result': 'result'}
1800 def __init__(self
, error
=None, result
=None):
1803 result : ModelUserInfo
1805 self
.error
= Error
.from_json(error
) if error
else None
1806 self
.result
= ModelUserInfo
.from_json(result
) if result
else None
1809 class ModelUserInfoResults(Type
):
1810 _toSchema
= {'results': 'results'}
1811 _toPy
= {'results': 'results'}
1812 def __init__(self
, results
=None):
1814 results : typing.Sequence[~ModelUserInfoResult]
1816 self
.results
= [ModelUserInfoResult
.from_json(o
) for o
in results
or []]
1819 class PrivateAddress(Type
):
1820 _toSchema
= {'target': 'target'}
1821 _toPy
= {'target': 'target'}
1822 def __init__(self
, target
=None):
1826 self
.target
= target
1829 class PrivateAddressResults(Type
):
1830 _toSchema
= {'private_address': 'private-address'}
1831 _toPy
= {'private-address': 'private_address'}
1832 def __init__(self
, private_address
=None):
1834 private_address : str
1836 self
.private_address
= private_address
1839 class ProvisioningScriptParams(Type
):
1840 _toSchema
= {'nonce': 'nonce', 'disable_package_commands': 'disable-package-commands', 'machine_id': 'machine-id', 'data_dir': 'data-dir'}
1841 _toPy
= {'machine-id': 'machine_id', 'nonce': 'nonce', 'disable-package-commands': 'disable_package_commands', 'data-dir': 'data_dir'}
1842 def __init__(self
, data_dir
=None, disable_package_commands
=None, machine_id
=None, nonce
=None):
1845 disable_package_commands : bool
1849 self
.data_dir
= data_dir
1850 self
.disable_package_commands
= disable_package_commands
1851 self
.machine_id
= machine_id
1855 class ProvisioningScriptResult(Type
):
1856 _toSchema
= {'script': 'script'}
1857 _toPy
= {'script': 'script'}
1858 def __init__(self
, script
=None):
1862 self
.script
= script
1865 class PublicAddress(Type
):
1866 _toSchema
= {'target': 'target'}
1867 _toPy
= {'target': 'target'}
1868 def __init__(self
, target
=None):
1872 self
.target
= target
1875 class PublicAddressResults(Type
):
1876 _toSchema
= {'public_address': 'public-address'}
1877 _toPy
= {'public-address': 'public_address'}
1878 def __init__(self
, public_address
=None):
1880 public_address : str
1882 self
.public_address
= public_address
1885 class RelationStatus(Type
):
1886 _toSchema
= {'id_': 'id', 'key': 'key', 'endpoints': 'endpoints', 'interface': 'interface', 'scope': 'scope'}
1887 _toPy
= {'id': 'id_', 'key': 'key', 'endpoints': 'endpoints', 'interface': 'interface', 'scope': 'scope'}
1888 def __init__(self
, endpoints
=None, id_
=None, interface
=None, key
=None, scope
=None):
1890 endpoints : typing.Sequence[~EndpointStatus]
1896 self
.endpoints
= [EndpointStatus
.from_json(o
) for o
in endpoints
or []]
1898 self
.interface
= interface
1903 class ResolveCharmResult(Type
):
1904 _toSchema
= {'error': 'error', 'url': 'url'}
1905 _toPy
= {'error': 'error', 'url': 'url'}
1906 def __init__(self
, error
=None, url
=None):
1915 class ResolveCharmResults(Type
):
1916 _toSchema
= {'urls': 'urls'}
1917 _toPy
= {'urls': 'urls'}
1918 def __init__(self
, urls
=None):
1920 urls : typing.Sequence[~ResolveCharmResult]
1922 self
.urls
= [ResolveCharmResult
.from_json(o
) for o
in urls
or []]
1925 class ResolveCharms(Type
):
1926 _toSchema
= {'references': 'references'}
1927 _toPy
= {'references': 'references'}
1928 def __init__(self
, references
=None):
1930 references : typing.Sequence[str]
1932 self
.references
= references
1935 class Resolved(Type
):
1936 _toSchema
= {'unit_name': 'unit-name', 'retry': 'retry'}
1937 _toPy
= {'unit-name': 'unit_name', 'retry': 'retry'}
1938 def __init__(self
, retry
=None, unit_name
=None):
1944 self
.unit_name
= unit_name
1947 class SetModelAgentVersion(Type
):
1948 _toSchema
= {'patch': 'Patch', 'tag': 'Tag', 'major': 'Major', 'build': 'Build', 'minor': 'Minor'}
1949 _toPy
= {'Patch': 'patch', 'Major': 'major', 'Tag': 'tag', 'Minor': 'minor', 'Build': 'build'}
1950 def __init__(self
, build
=None, major
=None, minor
=None, patch
=None, tag
=None):
1965 class StatusHistoryFilter(Type
):
1966 _toSchema
= {'size': 'size', 'delta': 'delta', 'date': 'date'}
1967 _toPy
= {'size': 'size', 'delta': 'delta', 'date': 'date'}
1968 def __init__(self
, date
=None, delta
=None, size
=None):
1979 class StatusHistoryRequest(Type
):
1980 _toSchema
= {'size': 'size', 'historykind': 'historyKind', 'tag': 'tag', 'filter_': 'filter'}
1981 _toPy
= {'historyKind': 'historykind', 'tag': 'tag', 'size': 'size', 'filter': 'filter_'}
1982 def __init__(self
, filter_
=None, historykind
=None, size
=None, tag
=None):
1984 filter_ : StatusHistoryFilter
1989 self
.filter_
= StatusHistoryFilter
.from_json(filter_
) if filter_
else None
1990 self
.historykind
= historykind
1995 class StatusHistoryRequests(Type
):
1996 _toSchema
= {'requests': 'requests'}
1997 _toPy
= {'requests': 'requests'}
1998 def __init__(self
, requests
=None):
2000 requests : typing.Sequence[~StatusHistoryRequest]
2002 self
.requests
= [StatusHistoryRequest
.from_json(o
) for o
in requests
or []]
2005 class StatusHistoryResult(Type
):
2006 _toSchema
= {'error': 'error', 'history': 'history'}
2007 _toPy
= {'error': 'error', 'history': 'history'}
2008 def __init__(self
, error
=None, history
=None):
2013 self
.error
= Error
.from_json(error
) if error
else None
2014 self
.history
= History
.from_json(history
) if history
else None
2017 class StatusHistoryResults(Type
):
2018 _toSchema
= {'results': 'results'}
2019 _toPy
= {'results': 'results'}
2020 def __init__(self
, results
=None):
2022 results : typing.Sequence[~StatusHistoryResult]
2024 self
.results
= [StatusHistoryResult
.from_json(o
) for o
in results
or []]
2027 class StatusParams(Type
):
2028 _toSchema
= {'patterns': 'patterns'}
2029 _toPy
= {'patterns': 'patterns'}
2030 def __init__(self
, patterns
=None):
2032 patterns : typing.Sequence[str]
2034 self
.patterns
= patterns
2038 _toSchema
= {'sha256': 'sha256', 'size': 'size', 'url': 'url', 'version': 'version'}
2039 _toPy
= {'sha256': 'sha256', 'size': 'size', 'url': 'url', 'version': 'version'}
2040 def __init__(self
, sha256
=None, size
=None, url
=None, version
=None):
2047 self
.sha256
= sha256
2050 self
.version
= Binary
.from_json(version
) if version
else None
2053 class UnitStatus(Type
):
2054 _toSchema
= {'workload_status': 'workload-status', 'workload_version': 'workload-version', 'machine': 'machine', 'opened_ports': 'opened-ports', 'public_address': 'public-address', 'agent_status': 'agent-status', 'subordinates': 'subordinates', 'charm': 'charm'}
2055 _toPy
= {'opened-ports': 'opened_ports', 'machine': 'machine', 'subordinates': 'subordinates', 'agent-status': 'agent_status', 'workload-version': 'workload_version', 'workload-status': 'workload_status', 'public-address': 'public_address', 'charm': 'charm'}
2056 def __init__(self
, agent_status
=None, charm
=None, machine
=None, opened_ports
=None, public_address
=None, subordinates
=None, workload_status
=None, workload_version
=None):
2058 agent_status : DetailedStatus
2061 opened_ports : typing.Sequence[str]
2062 public_address : str
2063 subordinates : typing.Mapping[str, ~UnitStatus]
2064 workload_status : DetailedStatus
2065 workload_version : str
2067 self
.agent_status
= DetailedStatus
.from_json(agent_status
) if agent_status
else None
2069 self
.machine
= machine
2070 self
.opened_ports
= opened_ports
2071 self
.public_address
= public_address
2072 self
.subordinates
= {k
: UnitStatus
.from_json(v
) for k
, v
in (subordinates
or dict()).items()}
2073 self
.workload_status
= DetailedStatus
.from_json(workload_status
) if workload_status
else None
2074 self
.workload_version
= workload_version
2078 _toSchema
= {'auth_types': 'auth-types', 'regions': 'regions', 'type_': 'type', 'endpoint': 'endpoint'}
2079 _toPy
= {'type': 'type_', 'regions': 'regions', 'auth-types': 'auth_types', 'endpoint': 'endpoint'}
2080 def __init__(self
, auth_types
=None, endpoint
=None, regions
=None, type_
=None):
2082 auth_types : typing.Sequence[str]
2084 regions : typing.Sequence[~CloudRegion]
2087 self
.auth_types
= auth_types
2088 self
.endpoint
= endpoint
2089 self
.regions
= [CloudRegion
.from_json(o
) for o
in regions
or []]
2093 class CloudCredential(Type
):
2094 _toSchema
= {'auth_type': 'auth-type', 'attrs': 'attrs'}
2095 _toPy
= {'auth-type': 'auth_type', 'attrs': 'attrs'}
2096 def __init__(self
, attrs
=None, auth_type
=None):
2098 attrs : typing.Mapping[str, str]
2102 self
.auth_type
= auth_type
2105 class CloudCredentialsResult(Type
):
2106 _toSchema
= {'credentials': 'credentials', 'error': 'error'}
2107 _toPy
= {'credentials': 'credentials', 'error': 'error'}
2108 def __init__(self
, credentials
=None, error
=None):
2110 credentials : typing.Mapping[str, ~CloudCredential]
2113 self
.credentials
= {k
: CloudCredential
.from_json(v
) for k
, v
in (credentials
or dict()).items()}
2114 self
.error
= Error
.from_json(error
) if error
else None
2117 class CloudCredentialsResults(Type
):
2118 _toSchema
= {'results': 'results'}
2119 _toPy
= {'results': 'results'}
2120 def __init__(self
, results
=None):
2122 results : typing.Sequence[~CloudCredentialsResult]
2124 self
.results
= [CloudCredentialsResult
.from_json(o
) for o
in results
or []]
2127 class CloudDefaults(Type
):
2128 _toSchema
= {'region': 'region', 'credential': 'credential', 'cloud_tag': 'cloud-tag'}
2129 _toPy
= {'region': 'region', 'credential': 'credential', 'cloud-tag': 'cloud_tag'}
2130 def __init__(self
, cloud_tag
=None, credential
=None, region
=None):
2136 self
.cloud_tag
= cloud_tag
2137 self
.credential
= credential
2138 self
.region
= region
2141 class CloudDefaultsResult(Type
):
2142 _toSchema
= {'error': 'error', 'result': 'result'}
2143 _toPy
= {'error': 'error', 'result': 'result'}
2144 def __init__(self
, error
=None, result
=None):
2147 result : CloudDefaults
2149 self
.error
= Error
.from_json(error
) if error
else None
2150 self
.result
= CloudDefaults
.from_json(result
) if result
else None
2153 class CloudDefaultsResults(Type
):
2154 _toSchema
= {'results': 'results'}
2155 _toPy
= {'results': 'results'}
2156 def __init__(self
, results
=None):
2158 results : typing.Sequence[~CloudDefaultsResult]
2160 self
.results
= [CloudDefaultsResult
.from_json(o
) for o
in results
or []]
2163 class CloudRegion(Type
):
2164 _toSchema
= {'name': 'name', 'endpoint': 'endpoint'}
2165 _toPy
= {'name': 'name', 'endpoint': 'endpoint'}
2166 def __init__(self
, endpoint
=None, name
=None):
2171 self
.endpoint
= endpoint
2175 class CloudResult(Type
):
2176 _toSchema
= {'error': 'error', 'cloud': 'cloud'}
2177 _toPy
= {'error': 'error', 'cloud': 'cloud'}
2178 def __init__(self
, cloud
=None, error
=None):
2183 self
.cloud
= Cloud
.from_json(cloud
) if cloud
else None
2184 self
.error
= Error
.from_json(error
) if error
else None
2187 class CloudResults(Type
):
2188 _toSchema
= {'results': 'results'}
2189 _toPy
= {'results': 'results'}
2190 def __init__(self
, results
=None):
2192 results : typing.Sequence[~CloudResult]
2194 self
.results
= [CloudResult
.from_json(o
) for o
in results
or []]
2197 class UserCloud(Type
):
2198 _toSchema
= {'user_tag': 'user-tag', 'cloud_tag': 'cloud-tag'}
2199 _toPy
= {'user-tag': 'user_tag', 'cloud-tag': 'cloud_tag'}
2200 def __init__(self
, cloud_tag
=None, user_tag
=None):
2205 self
.cloud_tag
= cloud_tag
2206 self
.user_tag
= user_tag
2209 class UserCloudCredentials(Type
):
2210 _toSchema
= {'credentials': 'credentials', 'user_tag': 'user-tag', 'cloud_tag': 'cloud-tag'}
2211 _toPy
= {'credentials': 'credentials', 'user-tag': 'user_tag', 'cloud-tag': 'cloud_tag'}
2212 def __init__(self
, cloud_tag
=None, credentials
=None, user_tag
=None):
2215 credentials : typing.Mapping[str, ~CloudCredential]
2218 self
.cloud_tag
= cloud_tag
2219 self
.credentials
= {k
: CloudCredential
.from_json(v
) for k
, v
in (credentials
or dict()).items()}
2220 self
.user_tag
= user_tag
2223 class UserClouds(Type
):
2224 _toSchema
= {'user_clouds': 'user-clouds'}
2225 _toPy
= {'user-clouds': 'user_clouds'}
2226 def __init__(self
, user_clouds
=None):
2228 user_clouds : typing.Sequence[~UserCloud]
2230 self
.user_clouds
= [UserCloud
.from_json(o
) for o
in user_clouds
or []]
2233 class UsersCloudCredentials(Type
):
2234 _toSchema
= {'users': 'users'}
2235 _toPy
= {'users': 'users'}
2236 def __init__(self
, users
=None):
2238 users : typing.Sequence[~UserCloudCredentials]
2240 self
.users
= [UserCloudCredentials
.from_json(o
) for o
in users
or []]
2243 class DestroyControllerArgs(Type
):
2244 _toSchema
= {'destroy_models': 'destroy-models'}
2245 _toPy
= {'destroy-models': 'destroy_models'}
2246 def __init__(self
, destroy_models
=None):
2248 destroy_models : bool
2250 self
.destroy_models
= destroy_models
2253 class InitiateModelMigrationArgs(Type
):
2254 _toSchema
= {'specs': 'specs'}
2255 _toPy
= {'specs': 'specs'}
2256 def __init__(self
, specs
=None):
2258 specs : typing.Sequence[~ModelMigrationSpec]
2260 self
.specs
= [ModelMigrationSpec
.from_json(o
) for o
in specs
or []]
2263 class InitiateModelMigrationResult(Type
):
2264 _toSchema
= {'error': 'error', 'model_tag': 'model-tag', 'id_': 'id'}
2265 _toPy
= {'error': 'error', 'id': 'id_', 'model-tag': 'model_tag'}
2266 def __init__(self
, error
=None, id_
=None, model_tag
=None):
2272 self
.error
= Error
.from_json(error
) if error
else None
2274 self
.model_tag
= model_tag
2277 class InitiateModelMigrationResults(Type
):
2278 _toSchema
= {'results': 'results'}
2279 _toPy
= {'results': 'results'}
2280 def __init__(self
, results
=None):
2282 results : typing.Sequence[~InitiateModelMigrationResult]
2284 self
.results
= [InitiateModelMigrationResult
.from_json(o
) for o
in results
or []]
2288 _toSchema
= {'name': 'name', 'uuid': 'uuid', 'owner_tag': 'owner-tag'}
2289 _toPy
= {'name': 'name', 'uuid': 'uuid', 'owner-tag': 'owner_tag'}
2290 def __init__(self
, name
=None, owner_tag
=None, uuid
=None):
2297 self
.owner_tag
= owner_tag
2301 class ModelBlockInfo(Type
):
2302 _toSchema
= {'name': 'name', 'model_uuid': 'model-uuid', 'owner_tag': 'owner-tag', 'blocks': 'blocks'}
2303 _toPy
= {'name': 'name', 'owner-tag': 'owner_tag', 'blocks': 'blocks', 'model-uuid': 'model_uuid'}
2304 def __init__(self
, blocks
=None, model_uuid
=None, name
=None, owner_tag
=None):
2306 blocks : typing.Sequence[str]
2311 self
.blocks
= blocks
2312 self
.model_uuid
= model_uuid
2314 self
.owner_tag
= owner_tag
2317 class ModelBlockInfoList(Type
):
2318 _toSchema
= {'models': 'models'}
2319 _toPy
= {'models': 'models'}
2320 def __init__(self
, models
=None):
2322 models : typing.Sequence[~ModelBlockInfo]
2324 self
.models
= [ModelBlockInfo
.from_json(o
) for o
in models
or []]
2327 class ModelMigrationSpec(Type
):
2328 _toSchema
= {'target_info': 'target-info', 'model_tag': 'model-tag'}
2329 _toPy
= {'model-tag': 'model_tag', 'target-info': 'target_info'}
2330 def __init__(self
, model_tag
=None, target_info
=None):
2333 target_info : ModelMigrationTargetInfo
2335 self
.model_tag
= model_tag
2336 self
.target_info
= ModelMigrationTargetInfo
.from_json(target_info
) if target_info
else None
2339 class ModelMigrationTargetInfo(Type
):
2340 _toSchema
= {'controller_tag': 'controller-tag', 'auth_tag': 'auth-tag', 'password': 'password', 'ca_cert': 'ca-cert', 'addrs': 'addrs'}
2341 _toPy
= {'password': 'password', 'auth-tag': 'auth_tag', 'ca-cert': 'ca_cert', 'addrs': 'addrs', 'controller-tag': 'controller_tag'}
2342 def __init__(self
, addrs
=None, auth_tag
=None, ca_cert
=None, controller_tag
=None, password
=None):
2344 addrs : typing.Sequence[str]
2347 controller_tag : str
2351 self
.auth_tag
= auth_tag
2352 self
.ca_cert
= ca_cert
2353 self
.controller_tag
= controller_tag
2354 self
.password
= password
2357 class ModelStatus(Type
):
2358 _toSchema
= {'hosted_machine_count': 'hosted-machine-count', 'life': 'life', 'application_count': 'application-count', 'model_tag': 'model-tag', 'owner_tag': 'owner-tag'}
2359 _toPy
= {'model-tag': 'model_tag', 'life': 'life', 'hosted-machine-count': 'hosted_machine_count', 'owner-tag': 'owner_tag', 'application-count': 'application_count'}
2360 def __init__(self
, application_count
=None, hosted_machine_count
=None, life
=None, model_tag
=None, owner_tag
=None):
2362 application_count : int
2363 hosted_machine_count : int
2368 self
.application_count
= application_count
2369 self
.hosted_machine_count
= hosted_machine_count
2371 self
.model_tag
= model_tag
2372 self
.owner_tag
= owner_tag
2375 class ModelStatusResults(Type
):
2376 _toSchema
= {'models': 'models'}
2377 _toPy
= {'models': 'models'}
2378 def __init__(self
, models
=None):
2380 models : typing.Sequence[~ModelStatus]
2382 self
.models
= [ModelStatus
.from_json(o
) for o
in models
or []]
2385 class RemoveBlocksArgs(Type
):
2386 _toSchema
= {'all_': 'all'}
2387 _toPy
= {'all': 'all_'}
2388 def __init__(self
, all_
=None):
2395 class UserModel(Type
):
2396 _toSchema
= {'last_connection': 'last-connection', 'model': 'model'}
2397 _toPy
= {'model': 'model', 'last-connection': 'last_connection'}
2398 def __init__(self
, last_connection
=None, model
=None):
2400 last_connection : str
2403 self
.last_connection
= last_connection
2404 self
.model
= Model
.from_json(model
) if model
else None
2407 class UserModelList(Type
):
2408 _toSchema
= {'user_models': 'user-models'}
2409 _toPy
= {'user-models': 'user_models'}
2410 def __init__(self
, user_models
=None):
2412 user_models : typing.Sequence[~UserModel]
2414 self
.user_models
= [UserModel
.from_json(o
) for o
in user_models
or []]
2417 class BytesResult(Type
):
2418 _toSchema
= {'result': 'result'}
2419 _toPy
= {'result': 'result'}
2420 def __init__(self
, result
=None):
2422 result : typing.Sequence[int]
2424 self
.result
= result
2427 class DeployerConnectionValues(Type
):
2428 _toSchema
= {'api_addresses': 'api-addresses', 'state_addresses': 'state-addresses'}
2429 _toPy
= {'state-addresses': 'state_addresses', 'api-addresses': 'api_addresses'}
2430 def __init__(self
, api_addresses
=None, state_addresses
=None):
2432 api_addresses : typing.Sequence[str]
2433 state_addresses : typing.Sequence[str]
2435 self
.api_addresses
= api_addresses
2436 self
.state_addresses
= state_addresses
2439 class LifeResult(Type
):
2440 _toSchema
= {'error': 'error', 'life': 'life'}
2441 _toPy
= {'error': 'error', 'life': 'life'}
2442 def __init__(self
, error
=None, life
=None):
2447 self
.error
= Error
.from_json(error
) if error
else None
2451 class LifeResults(Type
):
2452 _toSchema
= {'results': 'results'}
2453 _toPy
= {'results': 'results'}
2454 def __init__(self
, results
=None):
2456 results : typing.Sequence[~LifeResult]
2458 self
.results
= [LifeResult
.from_json(o
) for o
in results
or []]
2461 class StringsResult(Type
):
2462 _toSchema
= {'error': 'error', 'result': 'result'}
2463 _toPy
= {'error': 'error', 'result': 'result'}
2464 def __init__(self
, error
=None, result
=None):
2467 result : typing.Sequence[str]
2469 self
.error
= Error
.from_json(error
) if error
else None
2470 self
.result
= result
2473 class StringsWatchResults(Type
):
2474 _toSchema
= {'results': 'results'}
2475 _toPy
= {'results': 'results'}
2476 def __init__(self
, results
=None):
2478 results : typing.Sequence[~StringsWatchResult]
2480 self
.results
= [StringsWatchResult
.from_json(o
) for o
in results
or []]
2483 class AddSubnetParams(Type
):
2484 _toSchema
= {'space_tag': 'space-tag', 'subnet_provider_id': 'subnet-provider-id', 'subnet_tag': 'subnet-tag', 'zones': 'zones'}
2485 _toPy
= {'space-tag': 'space_tag', 'subnet-tag': 'subnet_tag', 'subnet-provider-id': 'subnet_provider_id', 'zones': 'zones'}
2486 def __init__(self
, space_tag
=None, subnet_provider_id
=None, subnet_tag
=None, zones
=None):
2489 subnet_provider_id : str
2491 zones : typing.Sequence[str]
2493 self
.space_tag
= space_tag
2494 self
.subnet_provider_id
= subnet_provider_id
2495 self
.subnet_tag
= subnet_tag
2499 class AddSubnetsParams(Type
):
2500 _toSchema
= {'subnets': 'subnets'}
2501 _toPy
= {'subnets': 'subnets'}
2502 def __init__(self
, subnets
=None):
2504 subnets : typing.Sequence[~AddSubnetParams]
2506 self
.subnets
= [AddSubnetParams
.from_json(o
) for o
in subnets
or []]
2509 class CreateSpaceParams(Type
):
2510 _toSchema
= {'space_tag': 'space-tag', 'public': 'public', 'provider_id': 'provider-id', 'subnet_tags': 'subnet-tags'}
2511 _toPy
= {'space-tag': 'space_tag', 'provider-id': 'provider_id', 'subnet-tags': 'subnet_tags', 'public': 'public'}
2512 def __init__(self
, provider_id
=None, public
=None, space_tag
=None, subnet_tags
=None):
2517 subnet_tags : typing.Sequence[str]
2519 self
.provider_id
= provider_id
2520 self
.public
= public
2521 self
.space_tag
= space_tag
2522 self
.subnet_tags
= subnet_tags
2525 class CreateSpacesParams(Type
):
2526 _toSchema
= {'spaces': 'spaces'}
2527 _toPy
= {'spaces': 'spaces'}
2528 def __init__(self
, spaces
=None):
2530 spaces : typing.Sequence[~CreateSpaceParams]
2532 self
.spaces
= [CreateSpaceParams
.from_json(o
) for o
in spaces
or []]
2535 class DiscoverSpacesResults(Type
):
2536 _toSchema
= {'results': 'results'}
2537 _toPy
= {'results': 'results'}
2538 def __init__(self
, results
=None):
2540 results : typing.Sequence[~ProviderSpace]
2542 self
.results
= [ProviderSpace
.from_json(o
) for o
in results
or []]
2545 class ListSubnetsResults(Type
):
2546 _toSchema
= {'results': 'results'}
2547 _toPy
= {'results': 'results'}
2548 def __init__(self
, results
=None):
2550 results : typing.Sequence[~Subnet]
2552 self
.results
= [Subnet
.from_json(o
) for o
in results
or []]
2555 class ProviderSpace(Type
):
2556 _toSchema
= {'name': 'name', 'error': 'error', 'subnets': 'subnets', 'provider_id': 'provider-id'}
2557 _toPy
= {'name': 'name', 'error': 'error', 'subnets': 'subnets', 'provider-id': 'provider_id'}
2558 def __init__(self
, error
=None, name
=None, provider_id
=None, subnets
=None):
2563 subnets : typing.Sequence[~Subnet]
2565 self
.error
= Error
.from_json(error
) if error
else None
2567 self
.provider_id
= provider_id
2568 self
.subnets
= [Subnet
.from_json(o
) for o
in subnets
or []]
2572 _toSchema
= {'status': 'status', 'vlan_tag': 'vlan-tag', 'cidr': 'cidr', 'provider_id': 'provider-id', 'life': 'life', 'space_tag': 'space-tag', 'zones': 'zones'}
2573 _toPy
= {'space-tag': 'space_tag', 'status': 'status', 'cidr': 'cidr', 'vlan-tag': 'vlan_tag', 'provider-id': 'provider_id', 'life': 'life', 'zones': 'zones'}
2574 def __init__(self
, cidr
=None, life
=None, provider_id
=None, space_tag
=None, status
=None, vlan_tag
=None, zones
=None):
2582 zones : typing.Sequence[str]
2586 self
.provider_id
= provider_id
2587 self
.space_tag
= space_tag
2588 self
.status
= status
2589 self
.vlan_tag
= vlan_tag
2593 class SubnetsFilters(Type
):
2594 _toSchema
= {'space_tag': 'space-tag', 'zone': 'zone'}
2595 _toPy
= {'space-tag': 'space_tag', 'zone': 'zone'}
2596 def __init__(self
, space_tag
=None, zone
=None):
2601 self
.space_tag
= space_tag
2605 class BlockDevice(Type
):
2606 _toSchema
= {'devicelinks': 'DeviceLinks', 'filesystemtype': 'FilesystemType', 'inuse': 'InUse', 'devicename': 'DeviceName', 'hardwareid': 'HardwareId', 'label': 'Label', 'uuid': 'UUID', 'size': 'Size', 'mountpoint': 'MountPoint', 'busaddress': 'BusAddress'}
2607 _toPy
= {'UUID': 'uuid', 'BusAddress': 'busaddress', 'HardwareId': 'hardwareid', 'DeviceName': 'devicename', 'DeviceLinks': 'devicelinks', 'InUse': 'inuse', 'MountPoint': 'mountpoint', 'Label': 'label', 'FilesystemType': 'filesystemtype', 'Size': 'size'}
2608 def __init__(self
, busaddress
=None, devicelinks
=None, devicename
=None, filesystemtype
=None, hardwareid
=None, inuse
=None, label
=None, mountpoint
=None, size
=None, uuid
=None):
2611 devicelinks : typing.Sequence[str]
2613 filesystemtype : str
2621 self
.busaddress
= busaddress
2622 self
.devicelinks
= devicelinks
2623 self
.devicename
= devicename
2624 self
.filesystemtype
= filesystemtype
2625 self
.hardwareid
= hardwareid
2628 self
.mountpoint
= mountpoint
2633 class MachineBlockDevices(Type
):
2634 _toSchema
= {'block_devices': 'block-devices', 'machine': 'machine'}
2635 _toPy
= {'machine': 'machine', 'block-devices': 'block_devices'}
2636 def __init__(self
, block_devices
=None, machine
=None):
2638 block_devices : typing.Sequence[~BlockDevice]
2641 self
.block_devices
= [BlockDevice
.from_json(o
) for o
in block_devices
or []]
2642 self
.machine
= machine
2645 class SetMachineBlockDevices(Type
):
2646 _toSchema
= {'machine_block_devices': 'machine-block-devices'}
2647 _toPy
= {'machine-block-devices': 'machine_block_devices'}
2648 def __init__(self
, machine_block_devices
=None):
2650 machine_block_devices : typing.Sequence[~MachineBlockDevices]
2652 self
.machine_block_devices
= [MachineBlockDevices
.from_json(o
) for o
in machine_block_devices
or []]
2655 class EntitiesWatchResult(Type
):
2656 _toSchema
= {'error': 'error', 'changes': 'changes', 'watcher_id': 'watcher-id'}
2657 _toPy
= {'error': 'error', 'changes': 'changes', 'watcher-id': 'watcher_id'}
2658 def __init__(self
, changes
=None, error
=None, watcher_id
=None):
2660 changes : typing.Sequence[str]
2664 self
.changes
= changes
2665 self
.error
= Error
.from_json(error
) if error
else None
2666 self
.watcher_id
= watcher_id
2669 class MachineStorageId(Type
):
2670 _toSchema
= {'attachment_tag': 'attachment-tag', 'machine_tag': 'machine-tag'}
2671 _toPy
= {'machine-tag': 'machine_tag', 'attachment-tag': 'attachment_tag'}
2672 def __init__(self
, attachment_tag
=None, machine_tag
=None):
2674 attachment_tag : str
2677 self
.attachment_tag
= attachment_tag
2678 self
.machine_tag
= machine_tag
2681 class MachineStorageIdsWatchResult(Type
):
2682 _toSchema
= {'error': 'error', 'changes': 'changes', 'watcher_id': 'watcher-id'}
2683 _toPy
= {'error': 'error', 'changes': 'changes', 'watcher-id': 'watcher_id'}
2684 def __init__(self
, changes
=None, error
=None, watcher_id
=None):
2686 changes : typing.Sequence[~MachineStorageId]
2690 self
.changes
= [MachineStorageId
.from_json(o
) for o
in changes
or []]
2691 self
.error
= Error
.from_json(error
) if error
else None
2692 self
.watcher_id
= watcher_id
2695 class BoolResult(Type
):
2696 _toSchema
= {'error': 'error', 'result': 'result'}
2697 _toPy
= {'error': 'error', 'result': 'result'}
2698 def __init__(self
, error
=None, result
=None):
2703 self
.error
= Error
.from_json(error
) if error
else None
2704 self
.result
= result
2707 class BoolResults(Type
):
2708 _toSchema
= {'results': 'results'}
2709 _toPy
= {'results': 'results'}
2710 def __init__(self
, results
=None):
2712 results : typing.Sequence[~BoolResult]
2714 self
.results
= [BoolResult
.from_json(o
) for o
in results
or []]
2717 class MachinePortRange(Type
):
2718 _toSchema
= {'unit_tag': 'unit-tag', 'relation_tag': 'relation-tag', 'port_range': 'port-range'}
2719 _toPy
= {'unit-tag': 'unit_tag', 'port-range': 'port_range', 'relation-tag': 'relation_tag'}
2720 def __init__(self
, port_range
=None, relation_tag
=None, unit_tag
=None):
2722 port_range : PortRange
2726 self
.port_range
= PortRange
.from_json(port_range
) if port_range
else None
2727 self
.relation_tag
= relation_tag
2728 self
.unit_tag
= unit_tag
2731 class MachinePorts(Type
):
2732 _toSchema
= {'machine_tag': 'machine-tag', 'subnet_tag': 'subnet-tag'}
2733 _toPy
= {'machine-tag': 'machine_tag', 'subnet-tag': 'subnet_tag'}
2734 def __init__(self
, machine_tag
=None, subnet_tag
=None):
2739 self
.machine_tag
= machine_tag
2740 self
.subnet_tag
= subnet_tag
2743 class MachinePortsParams(Type
):
2744 _toSchema
= {'params': 'params'}
2745 _toPy
= {'params': 'params'}
2746 def __init__(self
, params
=None):
2748 params : typing.Sequence[~MachinePorts]
2750 self
.params
= [MachinePorts
.from_json(o
) for o
in params
or []]
2753 class MachinePortsResult(Type
):
2754 _toSchema
= {'error': 'error', 'ports': 'ports'}
2755 _toPy
= {'error': 'error', 'ports': 'ports'}
2756 def __init__(self
, error
=None, ports
=None):
2759 ports : typing.Sequence[~MachinePortRange]
2761 self
.error
= Error
.from_json(error
) if error
else None
2762 self
.ports
= [MachinePortRange
.from_json(o
) for o
in ports
or []]
2765 class MachinePortsResults(Type
):
2766 _toSchema
= {'results': 'results'}
2767 _toPy
= {'results': 'results'}
2768 def __init__(self
, results
=None):
2770 results : typing.Sequence[~MachinePortsResult]
2772 self
.results
= [MachinePortsResult
.from_json(o
) for o
in results
or []]
2775 class NotifyWatchResults(Type
):
2776 _toSchema
= {'results': 'results'}
2777 _toPy
= {'results': 'results'}
2778 def __init__(self
, results
=None):
2780 results : typing.Sequence[~NotifyWatchResult]
2782 self
.results
= [NotifyWatchResult
.from_json(o
) for o
in results
or []]
2785 class PortRange(Type
):
2786 _toSchema
= {'from_port': 'from-port', 'to_port': 'to-port', 'protocol': 'protocol'}
2787 _toPy
= {'to-port': 'to_port', 'protocol': 'protocol', 'from-port': 'from_port'}
2788 def __init__(self
, from_port
=None, protocol
=None, to_port
=None):
2794 self
.from_port
= from_port
2795 self
.protocol
= protocol
2796 self
.to_port
= to_port
2799 class StringResults(Type
):
2800 _toSchema
= {'results': 'results'}
2801 _toPy
= {'results': 'results'}
2802 def __init__(self
, results
=None):
2804 results : typing.Sequence[~StringResult]
2806 self
.results
= [StringResult
.from_json(o
) for o
in results
or []]
2809 class StringsResults(Type
):
2810 _toSchema
= {'results': 'results'}
2811 _toPy
= {'results': 'results'}
2812 def __init__(self
, results
=None):
2814 results : typing.Sequence[~StringsResult]
2816 self
.results
= [StringsResult
.from_json(o
) for o
in results
or []]
2819 class ControllersChangeResult(Type
):
2820 _toSchema
= {'error': 'error', 'result': 'result'}
2821 _toPy
= {'error': 'error', 'result': 'result'}
2822 def __init__(self
, error
=None, result
=None):
2825 result : ControllersChanges
2827 self
.error
= Error
.from_json(error
) if error
else None
2828 self
.result
= ControllersChanges
.from_json(result
) if result
else None
2831 class ControllersChangeResults(Type
):
2832 _toSchema
= {'results': 'results'}
2833 _toPy
= {'results': 'results'}
2834 def __init__(self
, results
=None):
2836 results : typing.Sequence[~ControllersChangeResult]
2838 self
.results
= [ControllersChangeResult
.from_json(o
) for o
in results
or []]
2841 class ControllersChanges(Type
):
2842 _toSchema
= {'removed': 'removed', 'maintained': 'maintained', 'promoted': 'promoted', 'added': 'added', 'converted': 'converted', 'demoted': 'demoted'}
2843 _toPy
= {'removed': 'removed', 'maintained': 'maintained', 'promoted': 'promoted', 'added': 'added', 'converted': 'converted', 'demoted': 'demoted'}
2844 def __init__(self
, added
=None, converted
=None, demoted
=None, maintained
=None, promoted
=None, removed
=None):
2846 added : typing.Sequence[str]
2847 converted : typing.Sequence[str]
2848 demoted : typing.Sequence[str]
2849 maintained : typing.Sequence[str]
2850 promoted : typing.Sequence[str]
2851 removed : typing.Sequence[str]
2854 self
.converted
= converted
2855 self
.demoted
= demoted
2856 self
.maintained
= maintained
2857 self
.promoted
= promoted
2858 self
.removed
= removed
2861 class ControllersSpec(Type
):
2862 _toSchema
= {'placement': 'placement', 'num_controllers': 'num-controllers', 'model_tag': 'model-tag', 'constraints': 'constraints', 'series': 'series'}
2863 _toPy
= {'model-tag': 'model_tag', 'num-controllers': 'num_controllers', 'series': 'series', 'constraints': 'constraints', 'placement': 'placement'}
2864 def __init__(self
, constraints
=None, model_tag
=None, num_controllers
=None, placement
=None, series
=None):
2868 num_controllers : int
2869 placement : typing.Sequence[str]
2872 self
.constraints
= Value
.from_json(constraints
) if constraints
else None
2873 self
.model_tag
= model_tag
2874 self
.num_controllers
= num_controllers
2875 self
.placement
= placement
2876 self
.series
= series
2879 class ControllersSpecs(Type
):
2880 _toSchema
= {'specs': 'specs'}
2881 _toPy
= {'specs': 'specs'}
2882 def __init__(self
, specs
=None):
2884 specs : typing.Sequence[~ControllersSpec]
2886 self
.specs
= [ControllersSpec
.from_json(o
) for o
in specs
or []]
2889 class HAMember(Type
):
2890 _toSchema
= {'series': 'series', 'tag': 'tag', 'public_address': 'public-address'}
2891 _toPy
= {'series': 'series', 'tag': 'tag', 'public-address': 'public_address'}
2892 def __init__(self
, public_address
=None, series
=None, tag
=None):
2894 public_address : Address
2898 self
.public_address
= Address
.from_json(public_address
) if public_address
else None
2899 self
.series
= series
2904 _toSchema
= {'address': 'Address', 'hidden': 'Hidden', 'tags': 'Tags', 'arbiter': 'Arbiter', 'buildindexes': 'BuildIndexes', 'id_': 'Id', 'priority': 'Priority', 'votes': 'Votes', 'slavedelay': 'SlaveDelay'}
2905 _toPy
= {'SlaveDelay': 'slavedelay', 'Hidden': 'hidden', 'Address': 'address', 'Priority': 'priority', 'Votes': 'votes', 'Tags': 'tags', 'Arbiter': 'arbiter', 'BuildIndexes': 'buildindexes', 'Id': 'id_'}
2906 def __init__(self
, address
=None, arbiter
=None, buildindexes
=None, hidden
=None, id_
=None, priority
=None, slavedelay
=None, tags
=None, votes
=None):
2915 tags : typing.Mapping[str, str]
2918 self
.address
= address
2919 self
.arbiter
= arbiter
2920 self
.buildindexes
= buildindexes
2921 self
.hidden
= hidden
2923 self
.priority
= priority
2924 self
.slavedelay
= slavedelay
2929 class MongoUpgradeResults(Type
):
2930 _toSchema
= {'rs_members': 'rs-members', 'master': 'master', 'ha_members': 'ha-members'}
2931 _toPy
= {'rs-members': 'rs_members', 'master': 'master', 'ha-members': 'ha_members'}
2932 def __init__(self
, ha_members
=None, master
=None, rs_members
=None):
2934 ha_members : typing.Sequence[~HAMember]
2936 rs_members : typing.Sequence[~Member]
2938 self
.ha_members
= [HAMember
.from_json(o
) for o
in ha_members
or []]
2939 self
.master
= HAMember
.from_json(master
) if master
else None
2940 self
.rs_members
= [Member
.from_json(o
) for o
in rs_members
or []]
2943 class ResumeReplicationParams(Type
):
2944 _toSchema
= {'members': 'members'}
2945 _toPy
= {'members': 'members'}
2946 def __init__(self
, members
=None):
2948 members : typing.Sequence[~Member]
2950 self
.members
= [Member
.from_json(o
) for o
in members
or []]
2953 class UpgradeMongoParams(Type
):
2954 _toSchema
= {'patch': 'Patch', 'storageengine': 'StorageEngine', 'major': 'Major', 'minor': 'Minor'}
2955 _toPy
= {'Patch': 'patch', 'StorageEngine': 'storageengine', 'Major': 'major', 'Minor': 'minor'}
2956 def __init__(self
, major
=None, minor
=None, patch
=None, storageengine
=None):
2966 self
.storageengine
= storageengine
2969 class Version(Type
):
2970 _toSchema
= {'patch': 'Patch', 'storageengine': 'StorageEngine', 'major': 'Major', 'minor': 'Minor'}
2971 _toPy
= {'Patch': 'patch', 'StorageEngine': 'storageengine', 'Major': 'major', 'Minor': 'minor'}
2972 def __init__(self
, major
=None, minor
=None, patch
=None, storageengine
=None):
2982 self
.storageengine
= storageengine
2985 class SSHHostKeySet(Type
):
2986 _toSchema
= {'entity_keys': 'entity-keys'}
2987 _toPy
= {'entity-keys': 'entity_keys'}
2988 def __init__(self
, entity_keys
=None):
2990 entity_keys : typing.Sequence[~SSHHostKeys]
2992 self
.entity_keys
= [SSHHostKeys
.from_json(o
) for o
in entity_keys
or []]
2995 class SSHHostKeys(Type
):
2996 _toSchema
= {'public_keys': 'public-keys', 'tag': 'tag'}
2997 _toPy
= {'tag': 'tag', 'public-keys': 'public_keys'}
2998 def __init__(self
, public_keys
=None, tag
=None):
3000 public_keys : typing.Sequence[str]
3003 self
.public_keys
= public_keys
3007 class ImageFilterParams(Type
):
3008 _toSchema
= {'images': 'images'}
3009 _toPy
= {'images': 'images'}
3010 def __init__(self
, images
=None):
3012 images : typing.Sequence[~ImageSpec]
3014 self
.images
= [ImageSpec
.from_json(o
) for o
in images
or []]
3017 class ImageMetadata(Type
):
3018 _toSchema
= {'created': 'created', 'kind': 'kind', 'url': 'url', 'arch': 'arch', 'series': 'series'}
3019 _toPy
= {'created': 'created', 'kind': 'kind', 'url': 'url', 'arch': 'arch', 'series': 'series'}
3020 def __init__(self
, arch
=None, created
=None, kind
=None, series
=None, url
=None):
3029 self
.created
= created
3031 self
.series
= series
3035 class ImageSpec(Type
):
3036 _toSchema
= {'series': 'series', 'kind': 'kind', 'arch': 'arch'}
3037 _toPy
= {'series': 'series', 'kind': 'kind', 'arch': 'arch'}
3038 def __init__(self
, arch
=None, kind
=None, series
=None):
3046 self
.series
= series
3049 class ListImageResult(Type
):
3050 _toSchema
= {'result': 'result'}
3051 _toPy
= {'result': 'result'}
3052 def __init__(self
, result
=None):
3054 result : typing.Sequence[~ImageMetadata]
3056 self
.result
= [ImageMetadata
.from_json(o
) for o
in result
or []]
3059 class CloudImageMetadata(Type
):
3060 _toSchema
= {'root_storage_type': 'root-storage-type', 'root_storage_size': 'root-storage-size', 'arch': 'arch', 'version': 'version', 'series': 'series', 'image_id': 'image-id', 'priority': 'priority', 'source': 'source', 'region': 'region', 'virt_type': 'virt-type', 'stream': 'stream'}
3061 _toPy
= {'version': 'version', 'stream': 'stream', 'source': 'source', 'arch': 'arch', 'virt-type': 'virt_type', 'priority': 'priority', 'image-id': 'image_id', 'root-storage-size': 'root_storage_size', 'region': 'region', 'series': 'series', 'root-storage-type': 'root_storage_type'}
3062 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):
3068 root_storage_size : int
3069 root_storage_type : str
3077 self
.image_id
= image_id
3078 self
.priority
= priority
3079 self
.region
= region
3080 self
.root_storage_size
= root_storage_size
3081 self
.root_storage_type
= root_storage_type
3082 self
.series
= series
3083 self
.source
= source
3084 self
.stream
= stream
3085 self
.version
= version
3086 self
.virt_type
= virt_type
3089 class CloudImageMetadataList(Type
):
3090 _toSchema
= {'metadata': 'metadata'}
3091 _toPy
= {'metadata': 'metadata'}
3092 def __init__(self
, metadata
=None):
3094 metadata : typing.Sequence[~CloudImageMetadata]
3096 self
.metadata
= [CloudImageMetadata
.from_json(o
) for o
in metadata
or []]
3099 class ImageMetadataFilter(Type
):
3100 _toSchema
= {'root_storage_type': 'root-storage-type', 'arches': 'arches', 'region': 'region', 'stream': 'stream', 'series': 'series', 'virt_type': 'virt-type'}
3101 _toPy
= {'arches': 'arches', 'region': 'region', 'virt-type': 'virt_type', 'stream': 'stream', 'series': 'series', 'root-storage-type': 'root_storage_type'}
3102 def __init__(self
, arches
=None, region
=None, root_storage_type
=None, series
=None, stream
=None, virt_type
=None):
3104 arches : typing.Sequence[str]
3106 root_storage_type : str
3107 series : typing.Sequence[str]
3111 self
.arches
= arches
3112 self
.region
= region
3113 self
.root_storage_type
= root_storage_type
3114 self
.series
= series
3115 self
.stream
= stream
3116 self
.virt_type
= virt_type
3119 class ListCloudImageMetadataResult(Type
):
3120 _toSchema
= {'result': 'result'}
3121 _toPy
= {'result': 'result'}
3122 def __init__(self
, result
=None):
3124 result : typing.Sequence[~CloudImageMetadata]
3126 self
.result
= [CloudImageMetadata
.from_json(o
) for o
in result
or []]
3129 class MetadataImageIds(Type
):
3130 _toSchema
= {'image_ids': 'image-ids'}
3131 _toPy
= {'image-ids': 'image_ids'}
3132 def __init__(self
, image_ids
=None):
3134 image_ids : typing.Sequence[str]
3136 self
.image_ids
= image_ids
3139 class MetadataSaveParams(Type
):
3140 _toSchema
= {'metadata': 'metadata'}
3141 _toPy
= {'metadata': 'metadata'}
3142 def __init__(self
, metadata
=None):
3144 metadata : typing.Sequence[~CloudImageMetadataList]
3146 self
.metadata
= [CloudImageMetadataList
.from_json(o
) for o
in metadata
or []]
3149 class EntityStatusArgs(Type
):
3150 _toSchema
= {'status': 'status', 'info': 'info', 'tag': 'tag', 'data': 'data'}
3151 _toPy
= {'status': 'status', 'info': 'info', 'tag': 'tag', 'data': 'data'}
3152 def __init__(self
, data
=None, info
=None, status
=None, tag
=None):
3154 data : typing.Mapping[str, typing.Any]
3161 self
.status
= status
3165 class MachineAddresses(Type
):
3166 _toSchema
= {'tag': 'tag', 'addresses': 'addresses'}
3167 _toPy
= {'tag': 'tag', 'addresses': 'addresses'}
3168 def __init__(self
, addresses
=None, tag
=None):
3170 addresses : typing.Sequence[~Address]
3173 self
.addresses
= [Address
.from_json(o
) for o
in addresses
or []]
3177 class MachineAddressesResult(Type
):
3178 _toSchema
= {'error': 'error', 'addresses': 'addresses'}
3179 _toPy
= {'error': 'error', 'addresses': 'addresses'}
3180 def __init__(self
, addresses
=None, error
=None):
3182 addresses : typing.Sequence[~Address]
3185 self
.addresses
= [Address
.from_json(o
) for o
in addresses
or []]
3186 self
.error
= Error
.from_json(error
) if error
else None
3189 class MachineAddressesResults(Type
):
3190 _toSchema
= {'results': 'results'}
3191 _toPy
= {'results': 'results'}
3192 def __init__(self
, results
=None):
3194 results : typing.Sequence[~MachineAddressesResult]
3196 self
.results
= [MachineAddressesResult
.from_json(o
) for o
in results
or []]
3199 class SetMachinesAddresses(Type
):
3200 _toSchema
= {'machine_addresses': 'machine-addresses'}
3201 _toPy
= {'machine-addresses': 'machine_addresses'}
3202 def __init__(self
, machine_addresses
=None):
3204 machine_addresses : typing.Sequence[~MachineAddresses]
3206 self
.machine_addresses
= [MachineAddresses
.from_json(o
) for o
in machine_addresses
or []]
3209 class SetStatus(Type
):
3210 _toSchema
= {'entities': 'entities'}
3211 _toPy
= {'entities': 'entities'}
3212 def __init__(self
, entities
=None):
3214 entities : typing.Sequence[~EntityStatusArgs]
3216 self
.entities
= [EntityStatusArgs
.from_json(o
) for o
in entities
or []]
3219 class StatusResult(Type
):
3220 _toSchema
= {'status': 'status', 'error': 'error', 'info': 'info', 'id_': 'id', 'life': 'life', 'since': 'since', 'data': 'data'}
3221 _toPy
= {'status': 'status', 'error': 'error', 'info': 'info', 'since': 'since', 'life': 'life', 'id': 'id_', 'data': 'data'}
3222 def __init__(self
, data
=None, error
=None, id_
=None, info
=None, life
=None, since
=None, status
=None):
3224 data : typing.Mapping[str, typing.Any]
3233 self
.error
= Error
.from_json(error
) if error
else None
3238 self
.status
= status
3241 class StatusResults(Type
):
3242 _toSchema
= {'results': 'results'}
3243 _toPy
= {'results': 'results'}
3244 def __init__(self
, results
=None):
3246 results : typing.Sequence[~StatusResult]
3248 self
.results
= [StatusResult
.from_json(o
) for o
in results
or []]
3251 class ListSSHKeys(Type
):
3252 _toSchema
= {'entities': 'entities', 'mode': 'mode'}
3253 _toPy
= {'entities': 'entities', 'mode': 'mode'}
3254 def __init__(self
, entities
=None, mode
=None):
3259 self
.entities
= Entities
.from_json(entities
) if entities
else None
3263 class ModifyUserSSHKeys(Type
):
3264 _toSchema
= {'ssh_keys': 'ssh-keys', 'user': 'user'}
3265 _toPy
= {'user': 'user', 'ssh-keys': 'ssh_keys'}
3266 def __init__(self
, ssh_keys
=None, user
=None):
3268 ssh_keys : typing.Sequence[str]
3271 self
.ssh_keys
= ssh_keys
3275 class ApplicationTag(Type
):
3276 _toSchema
= {'name': 'Name'}
3277 _toPy
= {'Name': 'name'}
3278 def __init__(self
, name
=None):
3285 class ClaimLeadershipBulkParams(Type
):
3286 _toSchema
= {'params': 'params'}
3287 _toPy
= {'params': 'params'}
3288 def __init__(self
, params
=None):
3290 params : typing.Sequence[~ClaimLeadershipParams]
3292 self
.params
= [ClaimLeadershipParams
.from_json(o
) for o
in params
or []]
3295 class ClaimLeadershipBulkResults(Type
):
3296 _toSchema
= {'results': 'results'}
3297 _toPy
= {'results': 'results'}
3298 def __init__(self
, results
=None):
3300 results : typing.Sequence[~ErrorResult]
3302 self
.results
= [ErrorResult
.from_json(o
) for o
in results
or []]
3305 class ClaimLeadershipParams(Type
):
3306 _toSchema
= {'unit_tag': 'unit-tag', 'duration': 'duration', 'application_tag': 'application-tag'}
3307 _toPy
= {'unit-tag': 'unit_tag', 'duration': 'duration', 'application-tag': 'application_tag'}
3308 def __init__(self
, application_tag
=None, duration
=None, unit_tag
=None):
3310 application_tag : str
3314 self
.application_tag
= application_tag
3315 self
.duration
= duration
3316 self
.unit_tag
= unit_tag
3319 class LogForwardingGetLastSentParams(Type
):
3320 _toSchema
= {'ids': 'ids'}
3321 _toPy
= {'ids': 'ids'}
3322 def __init__(self
, ids
=None):
3324 ids : typing.Sequence[~LogForwardingID]
3326 self
.ids
= [LogForwardingID
.from_json(o
) for o
in ids
or []]
3329 class LogForwardingGetLastSentResult(Type
):
3330 _toSchema
= {'record_id': 'record-id', 'err': 'err'}
3331 _toPy
= {'record-id': 'record_id', 'err': 'err'}
3332 def __init__(self
, err
=None, record_id
=None):
3337 self
.err
= Error
.from_json(err
) if err
else None
3338 self
.record_id
= record_id
3341 class LogForwardingGetLastSentResults(Type
):
3342 _toSchema
= {'results': 'results'}
3343 _toPy
= {'results': 'results'}
3344 def __init__(self
, results
=None):
3346 results : typing.Sequence[~LogForwardingGetLastSentResult]
3348 self
.results
= [LogForwardingGetLastSentResult
.from_json(o
) for o
in results
or []]
3351 class LogForwardingID(Type
):
3352 _toSchema
= {'sink': 'sink', 'model': 'model'}
3353 _toPy
= {'sink': 'sink', 'model': 'model'}
3354 def __init__(self
, model
=None, sink
=None):
3363 class LogForwardingSetLastSentParam(Type
):
3364 _toSchema
= {'record_id': 'record-id', 'logforwardingid': 'LogForwardingID'}
3365 _toPy
= {'record-id': 'record_id', 'LogForwardingID': 'logforwardingid'}
3366 def __init__(self
, logforwardingid
=None, record_id
=None):
3368 logforwardingid : LogForwardingID
3371 self
.logforwardingid
= LogForwardingID
.from_json(logforwardingid
) if logforwardingid
else None
3372 self
.record_id
= record_id
3375 class LogForwardingSetLastSentParams(Type
):
3376 _toSchema
= {'params': 'params'}
3377 _toPy
= {'params': 'params'}
3378 def __init__(self
, params
=None):
3380 params : typing.Sequence[~LogForwardingSetLastSentParam]
3382 self
.params
= [LogForwardingSetLastSentParam
.from_json(o
) for o
in params
or []]
3385 class ActionExecutionResult(Type
):
3386 _toSchema
= {'status': 'status', 'action_tag': 'action-tag', 'results': 'results', 'message': 'message'}
3387 _toPy
= {'status': 'status', 'results': 'results', 'message': 'message', 'action-tag': 'action_tag'}
3388 def __init__(self
, action_tag
=None, message
=None, results
=None, status
=None):
3392 results : typing.Mapping[str, typing.Any]
3395 self
.action_tag
= action_tag
3396 self
.message
= message
3397 self
.results
= results
3398 self
.status
= status
3401 class ActionExecutionResults(Type
):
3402 _toSchema
= {'results': 'results'}
3403 _toPy
= {'results': 'results'}
3404 def __init__(self
, results
=None):
3406 results : typing.Sequence[~ActionExecutionResult]
3408 self
.results
= [ActionExecutionResult
.from_json(o
) for o
in results
or []]
3411 class JobsResult(Type
):
3412 _toSchema
= {'jobs': 'jobs', 'error': 'error'}
3413 _toPy
= {'jobs': 'jobs', 'error': 'error'}
3414 def __init__(self
, error
=None, jobs
=None):
3417 jobs : typing.Sequence[str]
3419 self
.error
= Error
.from_json(error
) if error
else None
3423 class JobsResults(Type
):
3424 _toSchema
= {'results': 'results'}
3425 _toPy
= {'results': 'results'}
3426 def __init__(self
, results
=None):
3428 results : typing.Sequence[~JobsResult]
3430 self
.results
= [JobsResult
.from_json(o
) for o
in results
or []]
3433 class NetworkConfig(Type
):
3434 _toSchema
= {'vlan_tag': 'vlan-tag', 'address': 'address', 'provider_space_id': 'provider-space-id', 'no_auto_start': 'no-auto-start', 'config_type': 'config-type', 'interface_name': 'interface-name', 'parent_interface_name': 'parent-interface-name', 'provider_vlan_id': 'provider-vlan-id', 'provider_address_id': 'provider-address-id', 'device_index': 'device-index', 'mac_address': 'mac-address', 'provider_id': 'provider-id', 'cidr': 'cidr', 'mtu': 'mtu', 'dns_search_domains': 'dns-search-domains', 'interface_type': 'interface-type', 'provider_subnet_id': 'provider-subnet-id', 'gateway_address': 'gateway-address', 'disabled': 'disabled', 'dns_servers': 'dns-servers'}
3435 _toPy
= {'address': 'address', 'device-index': 'device_index', 'provider-vlan-id': 'provider_vlan_id', 'provider-space-id': 'provider_space_id', 'vlan-tag': 'vlan_tag', 'mac-address': 'mac_address', 'provider-id': 'provider_id', 'provider-subnet-id': 'provider_subnet_id', 'provider-address-id': 'provider_address_id', 'no-auto-start': 'no_auto_start', 'interface-name': 'interface_name', 'mtu': 'mtu', 'dns-search-domains': 'dns_search_domains', 'interface-type': 'interface_type', 'cidr': 'cidr', 'dns-servers': 'dns_servers', 'config-type': 'config_type', 'gateway-address': 'gateway_address', 'parent-interface-name': 'parent_interface_name', 'disabled': 'disabled'}
3436 def __init__(self
, address
=None, cidr
=None, config_type
=None, device_index
=None, disabled
=None, dns_search_domains
=None, dns_servers
=None, gateway_address
=None, interface_name
=None, interface_type
=None, mac_address
=None, mtu
=None, no_auto_start
=None, parent_interface_name
=None, provider_address_id
=None, provider_id
=None, provider_space_id
=None, provider_subnet_id
=None, provider_vlan_id
=None, vlan_tag
=None):
3443 dns_search_domains : typing.Sequence[str]
3444 dns_servers : typing.Sequence[str]
3445 gateway_address : str
3446 interface_name : str
3447 interface_type : str
3450 no_auto_start : bool
3451 parent_interface_name : str
3452 provider_address_id : str
3454 provider_space_id : str
3455 provider_subnet_id : str
3456 provider_vlan_id : str
3459 self
.address
= address
3461 self
.config_type
= config_type
3462 self
.device_index
= device_index
3463 self
.disabled
= disabled
3464 self
.dns_search_domains
= dns_search_domains
3465 self
.dns_servers
= dns_servers
3466 self
.gateway_address
= gateway_address
3467 self
.interface_name
= interface_name
3468 self
.interface_type
= interface_type
3469 self
.mac_address
= mac_address
3471 self
.no_auto_start
= no_auto_start
3472 self
.parent_interface_name
= parent_interface_name
3473 self
.provider_address_id
= provider_address_id
3474 self
.provider_id
= provider_id
3475 self
.provider_space_id
= provider_space_id
3476 self
.provider_subnet_id
= provider_subnet_id
3477 self
.provider_vlan_id
= provider_vlan_id
3478 self
.vlan_tag
= vlan_tag
3481 class SetMachineNetworkConfig(Type
):
3482 _toSchema
= {'config': 'config', 'tag': 'tag'}
3483 _toPy
= {'config': 'config', 'tag': 'tag'}
3484 def __init__(self
, config
=None, tag
=None):
3486 config : typing.Sequence[~NetworkConfig]
3489 self
.config
= [NetworkConfig
.from_json(o
) for o
in config
or []]
3493 class MeterStatusResult(Type
):
3494 _toSchema
= {'code': 'code', 'error': 'error', 'info': 'info'}
3495 _toPy
= {'code': 'code', 'error': 'error', 'info': 'info'}
3496 def __init__(self
, code
=None, error
=None, info
=None):
3503 self
.error
= Error
.from_json(error
) if error
else None
3507 class MeterStatusResults(Type
):
3508 _toSchema
= {'results': 'results'}
3509 _toPy
= {'results': 'results'}
3510 def __init__(self
, results
=None):
3512 results : typing.Sequence[~MeterStatusResult]
3514 self
.results
= [MeterStatusResult
.from_json(o
) for o
in results
or []]
3518 _toSchema
= {'key': 'key', 'time': 'time', 'value': 'value'}
3519 _toPy
= {'key': 'key', 'time': 'time', 'value': 'value'}
3520 def __init__(self
, key
=None, time
=None, value
=None):
3531 class MetricBatch(Type
):
3532 _toSchema
= {'created': 'created', 'uuid': 'uuid', 'charm_url': 'charm-url', 'metrics': 'metrics'}
3533 _toPy
= {'created': 'created', 'uuid': 'uuid', 'charm-url': 'charm_url', 'metrics': 'metrics'}
3534 def __init__(self
, charm_url
=None, created
=None, metrics
=None, uuid
=None):
3538 metrics : typing.Sequence[~Metric]
3541 self
.charm_url
= charm_url
3542 self
.created
= created
3543 self
.metrics
= [Metric
.from_json(o
) for o
in metrics
or []]
3547 class MetricBatchParam(Type
):
3548 _toSchema
= {'batch': 'batch', 'tag': 'tag'}
3549 _toPy
= {'batch': 'batch', 'tag': 'tag'}
3550 def __init__(self
, batch
=None, tag
=None):
3555 self
.batch
= MetricBatch
.from_json(batch
) if batch
else None
3559 class MetricBatchParams(Type
):
3560 _toSchema
= {'batches': 'batches'}
3561 _toPy
= {'batches': 'batches'}
3562 def __init__(self
, batches
=None):
3564 batches : typing.Sequence[~MetricBatchParam]
3566 self
.batches
= [MetricBatchParam
.from_json(o
) for o
in batches
or []]
3569 class EntityMetrics(Type
):
3570 _toSchema
= {'error': 'error', 'metrics': 'metrics'}
3571 _toPy
= {'error': 'error', 'metrics': 'metrics'}
3572 def __init__(self
, error
=None, metrics
=None):
3575 metrics : typing.Sequence[~MetricResult]
3577 self
.error
= Error
.from_json(error
) if error
else None
3578 self
.metrics
= [MetricResult
.from_json(o
) for o
in metrics
or []]
3581 class MeterStatusParam(Type
):
3582 _toSchema
= {'code': 'code', 'info': 'info', 'tag': 'tag'}
3583 _toPy
= {'code': 'code', 'info': 'info', 'tag': 'tag'}
3584 def __init__(self
, code
=None, info
=None, tag
=None):
3595 class MeterStatusParams(Type
):
3596 _toSchema
= {'statues': 'statues'}
3597 _toPy
= {'statues': 'statues'}
3598 def __init__(self
, statues
=None):
3600 statues : typing.Sequence[~MeterStatusParam]
3602 self
.statues
= [MeterStatusParam
.from_json(o
) for o
in statues
or []]
3605 class MetricResult(Type
):
3606 _toSchema
= {'key': 'key', 'time': 'time', 'value': 'value'}
3607 _toPy
= {'key': 'key', 'time': 'time', 'value': 'value'}
3608 def __init__(self
, key
=None, time
=None, value
=None):
3619 class MetricResults(Type
):
3620 _toSchema
= {'results': 'results'}
3621 _toPy
= {'results': 'results'}
3622 def __init__(self
, results
=None):
3624 results : typing.Sequence[~EntityMetrics]
3626 self
.results
= [EntityMetrics
.from_json(o
) for o
in results
or []]
3629 class PhaseResult(Type
):
3630 _toSchema
= {'error': 'error', 'phase': 'phase'}
3631 _toPy
= {'error': 'error', 'phase': 'phase'}
3632 def __init__(self
, error
=None, phase
=None):
3637 self
.error
= Error
.from_json(error
) if error
else None
3641 class PhaseResults(Type
):
3642 _toSchema
= {'results': 'results'}
3643 _toPy
= {'results': 'results'}
3644 def __init__(self
, results
=None):
3646 results : typing.Sequence[~PhaseResult]
3648 self
.results
= [PhaseResult
.from_json(o
) for o
in results
or []]
3651 class FullMigrationStatus(Type
):
3652 _toSchema
= {'phase': 'phase', 'spec': 'spec', 'attempt': 'attempt'}
3653 _toPy
= {'phase': 'phase', 'spec': 'spec', 'attempt': 'attempt'}
3654 def __init__(self
, attempt
=None, phase
=None, spec
=None):
3658 spec : ModelMigrationSpec
3660 self
.attempt
= attempt
3662 self
.spec
= ModelMigrationSpec
.from_json(spec
) if spec
else None
3665 class SerializedModel(Type
):
3666 _toSchema
= {'bytes_': 'bytes'}
3667 _toPy
= {'bytes': 'bytes_'}
3668 def __init__(self
, bytes_
=None):
3670 bytes_ : typing.Sequence[int]
3672 self
.bytes_
= bytes_
3675 class SetMigrationPhaseArgs(Type
):
3676 _toSchema
= {'phase': 'phase'}
3677 _toPy
= {'phase': 'phase'}
3678 def __init__(self
, phase
=None):
3685 class MigrationStatus(Type
):
3686 _toSchema
= {'target_ca_cert': 'target-ca-cert', 'source_ca_cert': 'source-ca-cert', 'phase': 'phase', 'source_api_addrs': 'source-api-addrs', 'target_api_addrs': 'target-api-addrs', 'attempt': 'attempt'}
3687 _toPy
= {'phase': 'phase', 'source-ca-cert': 'source_ca_cert', 'source-api-addrs': 'source_api_addrs', 'target-api-addrs': 'target_api_addrs', 'target-ca-cert': 'target_ca_cert', 'attempt': 'attempt'}
3688 def __init__(self
, attempt
=None, phase
=None, source_api_addrs
=None, source_ca_cert
=None, target_api_addrs
=None, target_ca_cert
=None):
3692 source_api_addrs : typing.Sequence[str]
3693 source_ca_cert : str
3694 target_api_addrs : typing.Sequence[str]
3695 target_ca_cert : str
3697 self
.attempt
= attempt
3699 self
.source_api_addrs
= source_api_addrs
3700 self
.source_ca_cert
= source_ca_cert
3701 self
.target_api_addrs
= target_api_addrs
3702 self
.target_ca_cert
= target_ca_cert
3705 class ModelArgs(Type
):
3706 _toSchema
= {'model_tag': 'model-tag'}
3707 _toPy
= {'model-tag': 'model_tag'}
3708 def __init__(self
, model_tag
=None):
3712 self
.model_tag
= model_tag
3715 class ModelCreateArgs(Type
):
3716 _toSchema
= {'name': 'name', 'region': 'region', 'owner_tag': 'owner-tag', 'credential': 'credential', 'config': 'config'}
3717 _toPy
= {'name': 'name', 'region': 'region', 'owner-tag': 'owner_tag', 'credential': 'credential', 'config': 'config'}
3718 def __init__(self
, config
=None, credential
=None, name
=None, owner_tag
=None, region
=None):
3720 config : typing.Mapping[str, typing.Any]
3726 self
.config
= config
3727 self
.credential
= credential
3729 self
.owner_tag
= owner_tag
3730 self
.region
= region
3733 class ModelInfoResult(Type
):
3734 _toSchema
= {'error': 'error', 'result': 'result'}
3735 _toPy
= {'error': 'error', 'result': 'result'}
3736 def __init__(self
, error
=None, result
=None):
3741 self
.error
= Error
.from_json(error
) if error
else None
3742 self
.result
= ModelInfo
.from_json(result
) if result
else None
3745 class ModelInfoResults(Type
):
3746 _toSchema
= {'results': 'results'}
3747 _toPy
= {'results': 'results'}
3748 def __init__(self
, results
=None):
3750 results : typing.Sequence[~ModelInfoResult]
3752 self
.results
= [ModelInfoResult
.from_json(o
) for o
in results
or []]
3755 class ModifyModelAccess(Type
):
3756 _toSchema
= {'access': 'access', 'user_tag': 'user-tag', 'model_tag': 'model-tag', 'action': 'action'}
3757 _toPy
= {'access': 'access', 'model-tag': 'model_tag', 'action': 'action', 'user-tag': 'user_tag'}
3758 def __init__(self
, access
=None, action
=None, model_tag
=None, user_tag
=None):
3765 self
.access
= access
3766 self
.action
= action
3767 self
.model_tag
= model_tag
3768 self
.user_tag
= user_tag
3771 class ModifyModelAccessRequest(Type
):
3772 _toSchema
= {'changes': 'changes'}
3773 _toPy
= {'changes': 'changes'}
3774 def __init__(self
, changes
=None):
3776 changes : typing.Sequence[~ModifyModelAccess]
3778 self
.changes
= [ModifyModelAccess
.from_json(o
) for o
in changes
or []]
3781 class ConstraintsResult(Type
):
3782 _toSchema
= {'error': 'error', 'constraints': 'constraints'}
3783 _toPy
= {'error': 'error', 'constraints': 'constraints'}
3784 def __init__(self
, constraints
=None, error
=None):
3789 self
.constraints
= Value
.from_json(constraints
) if constraints
else None
3790 self
.error
= Error
.from_json(error
) if error
else None
3793 class ConstraintsResults(Type
):
3794 _toSchema
= {'results': 'results'}
3795 _toPy
= {'results': 'results'}
3796 def __init__(self
, results
=None):
3798 results : typing.Sequence[~ConstraintsResult]
3800 self
.results
= [ConstraintsResult
.from_json(o
) for o
in results
or []]
3803 class ContainerConfig(Type
):
3804 _toSchema
= {'apt_proxy': 'apt-proxy', 'updatebehavior': 'UpdateBehavior', 'proxy': 'proxy', 'provider_type': 'provider-type', 'apt_mirror': 'apt-mirror', 'ssl_hostname_verification': 'ssl-hostname-verification', 'authorized_keys': 'authorized-keys'}
3805 _toPy
= {'proxy': 'proxy', 'UpdateBehavior': 'updatebehavior', 'provider-type': 'provider_type', 'authorized-keys': 'authorized_keys', 'ssl-hostname-verification': 'ssl_hostname_verification', 'apt-proxy': 'apt_proxy', 'apt-mirror': 'apt_mirror'}
3806 def __init__(self
, updatebehavior
=None, apt_mirror
=None, apt_proxy
=None, authorized_keys
=None, provider_type
=None, proxy
=None, ssl_hostname_verification
=None):
3808 updatebehavior : UpdateBehavior
3810 apt_proxy : Settings
3811 authorized_keys : str
3814 ssl_hostname_verification : bool
3816 self
.updatebehavior
= UpdateBehavior
.from_json(updatebehavior
) if updatebehavior
else None
3817 self
.apt_mirror
= apt_mirror
3818 self
.apt_proxy
= Settings
.from_json(apt_proxy
) if apt_proxy
else None
3819 self
.authorized_keys
= authorized_keys
3820 self
.provider_type
= provider_type
3821 self
.proxy
= Settings
.from_json(proxy
) if proxy
else None
3822 self
.ssl_hostname_verification
= ssl_hostname_verification
3825 class ContainerManagerConfig(Type
):
3826 _toSchema
= {'config': 'config'}
3827 _toPy
= {'config': 'config'}
3828 def __init__(self
, config
=None):
3830 config : typing.Mapping[str, str]
3832 self
.config
= config
3835 class ContainerManagerConfigParams(Type
):
3836 _toSchema
= {'type_': 'type'}
3837 _toPy
= {'type': 'type_'}
3838 def __init__(self
, type_
=None):
3845 class DistributionGroupResult(Type
):
3846 _toSchema
= {'error': 'error', 'result': 'result'}
3847 _toPy
= {'error': 'error', 'result': 'result'}
3848 def __init__(self
, error
=None, result
=None):
3851 result : typing.Sequence[str]
3853 self
.error
= Error
.from_json(error
) if error
else None
3854 self
.result
= result
3857 class DistributionGroupResults(Type
):
3858 _toSchema
= {'results': 'results'}
3859 _toPy
= {'results': 'results'}
3860 def __init__(self
, results
=None):
3862 results : typing.Sequence[~DistributionGroupResult]
3864 self
.results
= [DistributionGroupResult
.from_json(o
) for o
in results
or []]
3867 class InstanceInfo(Type
):
3868 _toSchema
= {'network_config': 'network-config', 'volume_attachments': 'volume-attachments', 'nonce': 'nonce', 'tag': 'tag', 'characteristics': 'characteristics', 'volumes': 'volumes', 'instance_id': 'instance-id'}
3869 _toPy
= {'nonce': 'nonce', 'tag': 'tag', 'network-config': 'network_config', 'characteristics': 'characteristics', 'instance-id': 'instance_id', 'volume-attachments': 'volume_attachments', 'volumes': 'volumes'}
3870 def __init__(self
, characteristics
=None, instance_id
=None, network_config
=None, nonce
=None, tag
=None, volume_attachments
=None, volumes
=None):
3872 characteristics : HardwareCharacteristics
3874 network_config : typing.Sequence[~NetworkConfig]
3877 volume_attachments : typing.Mapping[str, ~VolumeAttachmentInfo]
3878 volumes : typing.Sequence[~Volume]
3880 self
.characteristics
= HardwareCharacteristics
.from_json(characteristics
) if characteristics
else None
3881 self
.instance_id
= instance_id
3882 self
.network_config
= [NetworkConfig
.from_json(o
) for o
in network_config
or []]
3885 self
.volume_attachments
= {k
: VolumeAttachmentInfo
.from_json(v
) for k
, v
in (volume_attachments
or dict()).items()}
3886 self
.volumes
= [Volume
.from_json(o
) for o
in volumes
or []]
3889 class InstancesInfo(Type
):
3890 _toSchema
= {'machines': 'machines'}
3891 _toPy
= {'machines': 'machines'}
3892 def __init__(self
, machines
=None):
3894 machines : typing.Sequence[~InstanceInfo]
3896 self
.machines
= [InstanceInfo
.from_json(o
) for o
in machines
or []]
3899 class MachineContainers(Type
):
3900 _toSchema
= {'machine_tag': 'machine-tag', 'container_types': 'container-types'}
3901 _toPy
= {'machine-tag': 'machine_tag', 'container-types': 'container_types'}
3902 def __init__(self
, container_types
=None, machine_tag
=None):
3904 container_types : typing.Sequence[str]
3907 self
.container_types
= container_types
3908 self
.machine_tag
= machine_tag
3911 class MachineContainersParams(Type
):
3912 _toSchema
= {'params': 'params'}
3913 _toPy
= {'params': 'params'}
3914 def __init__(self
, params
=None):
3916 params : typing.Sequence[~MachineContainers]
3918 self
.params
= [MachineContainers
.from_json(o
) for o
in params
or []]
3921 class MachineNetworkConfigResult(Type
):
3922 _toSchema
= {'error': 'error', 'info': 'info'}
3923 _toPy
= {'error': 'error', 'info': 'info'}
3924 def __init__(self
, error
=None, info
=None):
3927 info : typing.Sequence[~NetworkConfig]
3929 self
.error
= Error
.from_json(error
) if error
else None
3930 self
.info
= [NetworkConfig
.from_json(o
) for o
in info
or []]
3933 class MachineNetworkConfigResults(Type
):
3934 _toSchema
= {'results': 'results'}
3935 _toPy
= {'results': 'results'}
3936 def __init__(self
, results
=None):
3938 results : typing.Sequence[~MachineNetworkConfigResult]
3940 self
.results
= [MachineNetworkConfigResult
.from_json(o
) for o
in results
or []]
3943 class ProvisioningInfo(Type
):
3944 _toSchema
= {'image_metadata': 'image-metadata', 'jobs': 'jobs', 'tags': 'tags', 'constraints': 'constraints', 'placement': 'placement', 'volumes': 'volumes', 'series': 'series', 'subnets_to_zones': 'subnets-to-zones', 'controller_config': 'controller-config', 'endpoint_bindings': 'endpoint-bindings'}
3945 _toPy
= {'jobs': 'jobs', 'placement': 'placement', 'tags': 'tags', 'subnets-to-zones': 'subnets_to_zones', 'constraints': 'constraints', 'endpoint-bindings': 'endpoint_bindings', 'image-metadata': 'image_metadata', 'controller-config': 'controller_config', 'series': 'series', 'volumes': 'volumes'}
3946 def __init__(self
, constraints
=None, controller_config
=None, endpoint_bindings
=None, image_metadata
=None, jobs
=None, placement
=None, series
=None, subnets_to_zones
=None, tags
=None, volumes
=None):
3949 controller_config : typing.Mapping[str, typing.Any]
3950 endpoint_bindings : typing.Mapping[str, str]
3951 image_metadata : typing.Sequence[~CloudImageMetadata]
3952 jobs : typing.Sequence[str]
3955 subnets_to_zones : typing.Sequence[str]
3956 tags : typing.Mapping[str, str]
3957 volumes : typing.Sequence[~VolumeParams]
3959 self
.constraints
= Value
.from_json(constraints
) if constraints
else None
3960 self
.controller_config
= controller_config
3961 self
.endpoint_bindings
= endpoint_bindings
3962 self
.image_metadata
= [CloudImageMetadata
.from_json(o
) for o
in image_metadata
or []]
3964 self
.placement
= placement
3965 self
.series
= series
3966 self
.subnets_to_zones
= subnets_to_zones
3968 self
.volumes
= [VolumeParams
.from_json(o
) for o
in volumes
or []]
3971 class ProvisioningInfoResult(Type
):
3972 _toSchema
= {'error': 'error', 'result': 'result'}
3973 _toPy
= {'error': 'error', 'result': 'result'}
3974 def __init__(self
, error
=None, result
=None):
3977 result : ProvisioningInfo
3979 self
.error
= Error
.from_json(error
) if error
else None
3980 self
.result
= ProvisioningInfo
.from_json(result
) if result
else None
3983 class ProvisioningInfoResults(Type
):
3984 _toSchema
= {'results': 'results'}
3985 _toPy
= {'results': 'results'}
3986 def __init__(self
, results
=None):
3988 results : typing.Sequence[~ProvisioningInfoResult]
3990 self
.results
= [ProvisioningInfoResult
.from_json(o
) for o
in results
or []]
3993 class Settings(Type
):
3994 _toSchema
= {'ftp': 'Ftp', 'https': 'Https', 'http': 'Http', 'noproxy': 'NoProxy'}
3995 _toPy
= {'Ftp': 'ftp', 'Http': 'http', 'Https': 'https', 'NoProxy': 'noproxy'}
3996 def __init__(self
, ftp
=None, http
=None, https
=None, noproxy
=None):
4006 self
.noproxy
= noproxy
4009 class ToolsResult(Type
):
4010 _toSchema
= {'tools': 'tools', 'disable_ssl_hostname_verification': 'disable-ssl-hostname-verification', 'error': 'error'}
4011 _toPy
= {'disable-ssl-hostname-verification': 'disable_ssl_hostname_verification', 'error': 'error', 'tools': 'tools'}
4012 def __init__(self
, disable_ssl_hostname_verification
=None, error
=None, tools
=None):
4014 disable_ssl_hostname_verification : bool
4016 tools : typing.Sequence[~Tools]
4018 self
.disable_ssl_hostname_verification
= disable_ssl_hostname_verification
4019 self
.error
= Error
.from_json(error
) if error
else None
4020 self
.tools
= [Tools
.from_json(o
) for o
in tools
or []]
4023 class ToolsResults(Type
):
4024 _toSchema
= {'results': 'results'}
4025 _toPy
= {'results': 'results'}
4026 def __init__(self
, results
=None):
4028 results : typing.Sequence[~ToolsResult]
4030 self
.results
= [ToolsResult
.from_json(o
) for o
in results
or []]
4033 class UpdateBehavior(Type
):
4034 _toSchema
= {'enable_os_upgrade': 'enable-os-upgrade', 'enable_os_refresh_update': 'enable-os-refresh-update'}
4035 _toPy
= {'enable-os-upgrade': 'enable_os_upgrade', 'enable-os-refresh-update': 'enable_os_refresh_update'}
4036 def __init__(self
, enable_os_refresh_update
=None, enable_os_upgrade
=None):
4038 enable_os_refresh_update : bool
4039 enable_os_upgrade : bool
4041 self
.enable_os_refresh_update
= enable_os_refresh_update
4042 self
.enable_os_upgrade
= enable_os_upgrade
4046 _toSchema
= {'info': 'info', 'volume_tag': 'volume-tag'}
4047 _toPy
= {'volume-tag': 'volume_tag', 'info': 'info'}
4048 def __init__(self
, info
=None, volume_tag
=None):
4053 self
.info
= VolumeInfo
.from_json(info
) if info
else None
4054 self
.volume_tag
= volume_tag
4057 class VolumeAttachmentInfo(Type
):
4058 _toSchema
= {'bus_address': 'bus-address', 'device_link': 'device-link', 'read_only': 'read-only', 'device_name': 'device-name'}
4059 _toPy
= {'device-link': 'device_link', 'bus-address': 'bus_address', 'device-name': 'device_name', 'read-only': 'read_only'}
4060 def __init__(self
, bus_address
=None, device_link
=None, device_name
=None, read_only
=None):
4067 self
.bus_address
= bus_address
4068 self
.device_link
= device_link
4069 self
.device_name
= device_name
4070 self
.read_only
= read_only
4073 class VolumeAttachmentParams(Type
):
4074 _toSchema
= {'volume_id': 'volume-id', 'machine_tag': 'machine-tag', 'instance_id': 'instance-id', 'provider': 'provider', 'volume_tag': 'volume-tag', 'read_only': 'read-only'}
4075 _toPy
= {'machine-tag': 'machine_tag', 'volume-tag': 'volume_tag', 'volume-id': 'volume_id', 'provider': 'provider', 'read-only': 'read_only', 'instance-id': 'instance_id'}
4076 def __init__(self
, instance_id
=None, machine_tag
=None, provider
=None, read_only
=None, volume_id
=None, volume_tag
=None):
4085 self
.instance_id
= instance_id
4086 self
.machine_tag
= machine_tag
4087 self
.provider
= provider
4088 self
.read_only
= read_only
4089 self
.volume_id
= volume_id
4090 self
.volume_tag
= volume_tag
4093 class VolumeInfo(Type
):
4094 _toSchema
= {'volume_id': 'volume-id', 'persistent': 'persistent', 'size': 'size', 'hardware_id': 'hardware-id'}
4095 _toPy
= {'hardware-id': 'hardware_id', 'persistent': 'persistent', 'size': 'size', 'volume-id': 'volume_id'}
4096 def __init__(self
, hardware_id
=None, persistent
=None, size
=None, volume_id
=None):
4103 self
.hardware_id
= hardware_id
4104 self
.persistent
= persistent
4106 self
.volume_id
= volume_id
4109 class VolumeParams(Type
):
4110 _toSchema
= {'tags': 'tags', 'provider': 'provider', 'size': 'size', 'attachment': 'attachment', 'attributes': 'attributes', 'volume_tag': 'volume-tag'}
4111 _toPy
= {'volume-tag': 'volume_tag', 'tags': 'tags', 'provider': 'provider', 'size': 'size', 'attachment': 'attachment', 'attributes': 'attributes'}
4112 def __init__(self
, attachment
=None, attributes
=None, provider
=None, size
=None, tags
=None, volume_tag
=None):
4114 attachment : VolumeAttachmentParams
4115 attributes : typing.Mapping[str, typing.Any]
4118 tags : typing.Mapping[str, str]
4121 self
.attachment
= VolumeAttachmentParams
.from_json(attachment
) if attachment
else None
4122 self
.attributes
= attributes
4123 self
.provider
= provider
4126 self
.volume_tag
= volume_tag
4129 class WatchContainer(Type
):
4130 _toSchema
= {'machine_tag': 'machine-tag', 'container_type': 'container-type'}
4131 _toPy
= {'machine-tag': 'machine_tag', 'container-type': 'container_type'}
4132 def __init__(self
, container_type
=None, machine_tag
=None):
4134 container_type : str
4137 self
.container_type
= container_type
4138 self
.machine_tag
= machine_tag
4141 class WatchContainers(Type
):
4142 _toSchema
= {'params': 'params'}
4143 _toPy
= {'params': 'params'}
4144 def __init__(self
, params
=None):
4146 params : typing.Sequence[~WatchContainer]
4148 self
.params
= [WatchContainer
.from_json(o
) for o
in params
or []]
4151 class ProxyConfig(Type
):
4152 _toSchema
= {'ftp': 'ftp', 'no_proxy': 'no-proxy', 'https': 'https', 'http': 'http'}
4153 _toPy
= {'ftp': 'ftp', 'no-proxy': 'no_proxy', 'https': 'https', 'http': 'http'}
4154 def __init__(self
, ftp
=None, http
=None, https
=None, no_proxy
=None):
4164 self
.no_proxy
= no_proxy
4167 class ProxyConfigResult(Type
):
4168 _toSchema
= {'error': 'error', 'proxy_settings': 'proxy-settings', 'apt_proxy_settings': 'apt-proxy-settings'}
4169 _toPy
= {'proxy-settings': 'proxy_settings', 'error': 'error', 'apt-proxy-settings': 'apt_proxy_settings'}
4170 def __init__(self
, apt_proxy_settings
=None, error
=None, proxy_settings
=None):
4172 apt_proxy_settings : ProxyConfig
4174 proxy_settings : ProxyConfig
4176 self
.apt_proxy_settings
= ProxyConfig
.from_json(apt_proxy_settings
) if apt_proxy_settings
else None
4177 self
.error
= Error
.from_json(error
) if error
else None
4178 self
.proxy_settings
= ProxyConfig
.from_json(proxy_settings
) if proxy_settings
else None
4181 class ProxyConfigResults(Type
):
4182 _toSchema
= {'results': 'results'}
4183 _toPy
= {'results': 'results'}
4184 def __init__(self
, results
=None):
4186 results : typing.Sequence[~ProxyConfigResult]
4188 self
.results
= [ProxyConfigResult
.from_json(o
) for o
in results
or []]
4191 class RebootActionResult(Type
):
4192 _toSchema
= {'error': 'error', 'result': 'result'}
4193 _toPy
= {'error': 'error', 'result': 'result'}
4194 def __init__(self
, error
=None, result
=None):
4199 self
.error
= Error
.from_json(error
) if error
else None
4200 self
.result
= result
4203 class RebootActionResults(Type
):
4204 _toSchema
= {'results': 'results'}
4205 _toPy
= {'results': 'results'}
4206 def __init__(self
, results
=None):
4208 results : typing.Sequence[~RebootActionResult]
4210 self
.results
= [RebootActionResult
.from_json(o
) for o
in results
or []]
4213 class RelationUnitsChange(Type
):
4214 _toSchema
= {'changed': 'changed', 'departed': 'departed'}
4215 _toPy
= {'changed': 'changed', 'departed': 'departed'}
4216 def __init__(self
, changed
=None, departed
=None):
4218 changed : typing.Mapping[str, ~UnitSettings]
4219 departed : typing.Sequence[str]
4221 self
.changed
= {k
: UnitSettings
.from_json(v
) for k
, v
in (changed
or dict()).items()}
4222 self
.departed
= departed
4225 class RelationUnitsWatchResult(Type
):
4226 _toSchema
= {'error': 'error', 'changes': 'changes', 'watcher_id': 'watcher-id'}
4227 _toPy
= {'error': 'error', 'changes': 'changes', 'watcher-id': 'watcher_id'}
4228 def __init__(self
, changes
=None, error
=None, watcher_id
=None):
4230 changes : RelationUnitsChange
4234 self
.changes
= RelationUnitsChange
.from_json(changes
) if changes
else None
4235 self
.error
= Error
.from_json(error
) if error
else None
4236 self
.watcher_id
= watcher_id
4239 class UnitSettings(Type
):
4240 _toSchema
= {'version': 'version'}
4241 _toPy
= {'version': 'version'}
4242 def __init__(self
, version
=None):
4246 self
.version
= version
4249 class RetryStrategy(Type
):
4250 _toSchema
= {'min_retry_time': 'min-retry-time', 'should_retry': 'should-retry', 'retry_time_factor': 'retry-time-factor', 'max_retry_time': 'max-retry-time', 'jitter_retry_time': 'jitter-retry-time'}
4251 _toPy
= {'retry-time-factor': 'retry_time_factor', 'min-retry-time': 'min_retry_time', 'jitter-retry-time': 'jitter_retry_time', 'should-retry': 'should_retry', 'max-retry-time': 'max_retry_time'}
4252 def __init__(self
, jitter_retry_time
=None, max_retry_time
=None, min_retry_time
=None, retry_time_factor
=None, should_retry
=None):
4254 jitter_retry_time : bool
4255 max_retry_time : int
4256 min_retry_time : int
4257 retry_time_factor : int
4260 self
.jitter_retry_time
= jitter_retry_time
4261 self
.max_retry_time
= max_retry_time
4262 self
.min_retry_time
= min_retry_time
4263 self
.retry_time_factor
= retry_time_factor
4264 self
.should_retry
= should_retry
4267 class RetryStrategyResult(Type
):
4268 _toSchema
= {'error': 'error', 'result': 'result'}
4269 _toPy
= {'error': 'error', 'result': 'result'}
4270 def __init__(self
, error
=None, result
=None):
4273 result : RetryStrategy
4275 self
.error
= Error
.from_json(error
) if error
else None
4276 self
.result
= RetryStrategy
.from_json(result
) if result
else None
4279 class RetryStrategyResults(Type
):
4280 _toSchema
= {'results': 'results'}
4281 _toPy
= {'results': 'results'}
4282 def __init__(self
, results
=None):
4284 results : typing.Sequence[~RetryStrategyResult]
4286 self
.results
= [RetryStrategyResult
.from_json(o
) for o
in results
or []]
4289 class SSHAddressResult(Type
):
4290 _toSchema
= {'address': 'address', 'error': 'error'}
4291 _toPy
= {'address': 'address', 'error': 'error'}
4292 def __init__(self
, address
=None, error
=None):
4297 self
.address
= address
4298 self
.error
= Error
.from_json(error
) if error
else None
4301 class SSHAddressResults(Type
):
4302 _toSchema
= {'results': 'results'}
4303 _toPy
= {'results': 'results'}
4304 def __init__(self
, results
=None):
4306 results : typing.Sequence[~SSHAddressResult]
4308 self
.results
= [SSHAddressResult
.from_json(o
) for o
in results
or []]
4311 class SSHProxyResult(Type
):
4312 _toSchema
= {'use_proxy': 'use-proxy'}
4313 _toPy
= {'use-proxy': 'use_proxy'}
4314 def __init__(self
, use_proxy
=None):
4318 self
.use_proxy
= use_proxy
4321 class SSHPublicKeysResult(Type
):
4322 _toSchema
= {'error': 'error', 'public_keys': 'public-keys'}
4323 _toPy
= {'error': 'error', 'public-keys': 'public_keys'}
4324 def __init__(self
, error
=None, public_keys
=None):
4327 public_keys : typing.Sequence[str]
4329 self
.error
= Error
.from_json(error
) if error
else None
4330 self
.public_keys
= public_keys
4333 class SSHPublicKeysResults(Type
):
4334 _toSchema
= {'results': 'results'}
4335 _toPy
= {'results': 'results'}
4336 def __init__(self
, results
=None):
4338 results : typing.Sequence[~SSHPublicKeysResult]
4340 self
.results
= [SSHPublicKeysResult
.from_json(o
) for o
in results
or []]
4343 class SingularClaim(Type
):
4344 _toSchema
= {'model_tag': 'model-tag', 'duration': 'duration', 'controller_tag': 'controller-tag'}
4345 _toPy
= {'model-tag': 'model_tag', 'duration': 'duration', 'controller-tag': 'controller_tag'}
4346 def __init__(self
, controller_tag
=None, duration
=None, model_tag
=None):
4348 controller_tag : str
4352 self
.controller_tag
= controller_tag
4353 self
.duration
= duration
4354 self
.model_tag
= model_tag
4357 class SingularClaims(Type
):
4358 _toSchema
= {'claims': 'claims'}
4359 _toPy
= {'claims': 'claims'}
4360 def __init__(self
, claims
=None):
4362 claims : typing.Sequence[~SingularClaim]
4364 self
.claims
= [SingularClaim
.from_json(o
) for o
in claims
or []]
4367 class ListSpacesResults(Type
):
4368 _toSchema
= {'results': 'results'}
4369 _toPy
= {'results': 'results'}
4370 def __init__(self
, results
=None):
4372 results : typing.Sequence[~Space]
4374 self
.results
= [Space
.from_json(o
) for o
in results
or []]
4378 _toSchema
= {'name': 'name', 'error': 'error', 'subnets': 'subnets'}
4379 _toPy
= {'name': 'name', 'error': 'error', 'subnets': 'subnets'}
4380 def __init__(self
, error
=None, name
=None, subnets
=None):
4384 subnets : typing.Sequence[~Subnet]
4386 self
.error
= Error
.from_json(error
) if error
else None
4388 self
.subnets
= [Subnet
.from_json(o
) for o
in subnets
or []]
4391 class StatusHistoryPruneArgs(Type
):
4392 _toSchema
= {'max_history_mb': 'max-history-mb', 'max_history_time': 'max-history-time'}
4393 _toPy
= {'max-history-mb': 'max_history_mb', 'max-history-time': 'max_history_time'}
4394 def __init__(self
, max_history_mb
=None, max_history_time
=None):
4396 max_history_mb : int
4397 max_history_time : int
4399 self
.max_history_mb
= max_history_mb
4400 self
.max_history_time
= max_history_time
4403 class FilesystemAttachmentInfo(Type
):
4404 _toSchema
= {'mount_point': 'mount-point', 'read_only': 'read-only'}
4405 _toPy
= {'read-only': 'read_only', 'mount-point': 'mount_point'}
4406 def __init__(self
, mount_point
=None, read_only
=None):
4411 self
.mount_point
= mount_point
4412 self
.read_only
= read_only
4415 class FilesystemDetails(Type
):
4416 _toSchema
= {'status': 'status', 'filesystem_tag': 'filesystem-tag', 'info': 'info', 'storage': 'storage', 'machine_attachments': 'machine-attachments', 'volume_tag': 'volume-tag'}
4417 _toPy
= {'status': 'status', 'volume-tag': 'volume_tag', 'info': 'info', 'filesystem-tag': 'filesystem_tag', 'machine-attachments': 'machine_attachments', 'storage': 'storage'}
4418 def __init__(self
, filesystem_tag
=None, info
=None, machine_attachments
=None, status
=None, storage
=None, volume_tag
=None):
4420 filesystem_tag : str
4421 info : FilesystemInfo
4422 machine_attachments : typing.Mapping[str, ~FilesystemAttachmentInfo]
4423 status : EntityStatus
4424 storage : StorageDetails
4427 self
.filesystem_tag
= filesystem_tag
4428 self
.info
= FilesystemInfo
.from_json(info
) if info
else None
4429 self
.machine_attachments
= {k
: FilesystemAttachmentInfo
.from_json(v
) for k
, v
in (machine_attachments
or dict()).items()}
4430 self
.status
= EntityStatus
.from_json(status
) if status
else None
4431 self
.storage
= StorageDetails
.from_json(storage
) if storage
else None
4432 self
.volume_tag
= volume_tag
4435 class FilesystemDetailsListResult(Type
):
4436 _toSchema
= {'error': 'error', 'result': 'result'}
4437 _toPy
= {'error': 'error', 'result': 'result'}
4438 def __init__(self
, error
=None, result
=None):
4441 result : typing.Sequence[~FilesystemDetails]
4443 self
.error
= Error
.from_json(error
) if error
else None
4444 self
.result
= [FilesystemDetails
.from_json(o
) for o
in result
or []]
4447 class FilesystemDetailsListResults(Type
):
4448 _toSchema
= {'results': 'results'}
4449 _toPy
= {'results': 'results'}
4450 def __init__(self
, results
=None):
4452 results : typing.Sequence[~FilesystemDetailsListResult]
4454 self
.results
= [FilesystemDetailsListResult
.from_json(o
) for o
in results
or []]
4457 class FilesystemFilter(Type
):
4458 _toSchema
= {'machines': 'machines'}
4459 _toPy
= {'machines': 'machines'}
4460 def __init__(self
, machines
=None):
4462 machines : typing.Sequence[str]
4464 self
.machines
= machines
4467 class FilesystemFilters(Type
):
4468 _toSchema
= {'filters': 'filters'}
4469 _toPy
= {'filters': 'filters'}
4470 def __init__(self
, filters
=None):
4472 filters : typing.Sequence[~FilesystemFilter]
4474 self
.filters
= [FilesystemFilter
.from_json(o
) for o
in filters
or []]
4477 class FilesystemInfo(Type
):
4478 _toSchema
= {'filesystem_id': 'filesystem-id', 'size': 'size'}
4479 _toPy
= {'filesystem-id': 'filesystem_id', 'size': 'size'}
4480 def __init__(self
, filesystem_id
=None, size
=None):
4485 self
.filesystem_id
= filesystem_id
4489 class StorageAddParams(Type
):
4490 _toSchema
= {'name': 'name', 'unit': 'unit', 'storage': 'storage'}
4491 _toPy
= {'name': 'name', 'unit': 'unit', 'storage': 'storage'}
4492 def __init__(self
, name
=None, storage
=None, unit
=None):
4495 storage : StorageConstraints
4499 self
.storage
= StorageConstraints
.from_json(storage
) if storage
else None
4503 class StorageAttachmentDetails(Type
):
4504 _toSchema
= {'storage_tag': 'storage-tag', 'location': 'location', 'unit_tag': 'unit-tag', 'machine_tag': 'machine-tag'}
4505 _toPy
= {'machine-tag': 'machine_tag', 'location': 'location', 'storage-tag': 'storage_tag', 'unit-tag': 'unit_tag'}
4506 def __init__(self
, location
=None, machine_tag
=None, storage_tag
=None, unit_tag
=None):
4513 self
.location
= location
4514 self
.machine_tag
= machine_tag
4515 self
.storage_tag
= storage_tag
4516 self
.unit_tag
= unit_tag
4519 class StorageConstraints(Type
):
4520 _toSchema
= {'size': 'size', 'count': 'count', 'pool': 'pool'}
4521 _toPy
= {'size': 'size', 'count': 'count', 'pool': 'pool'}
4522 def __init__(self
, count
=None, pool
=None, size
=None):
4533 class StorageDetails(Type
):
4534 _toSchema
= {'status': 'status', 'persistent': 'persistent', 'storage_tag': 'storage-tag', 'kind': 'kind', 'owner_tag': 'owner-tag', 'attachments': 'attachments'}
4535 _toPy
= {'status': 'status', 'persistent': 'persistent', 'storage-tag': 'storage_tag', 'kind': 'kind', 'owner-tag': 'owner_tag', 'attachments': 'attachments'}
4536 def __init__(self
, attachments
=None, kind
=None, owner_tag
=None, persistent
=None, status
=None, storage_tag
=None):
4538 attachments : typing.Mapping[str, ~StorageAttachmentDetails]
4542 status : EntityStatus
4545 self
.attachments
= {k
: StorageAttachmentDetails
.from_json(v
) for k
, v
in (attachments
or dict()).items()}
4547 self
.owner_tag
= owner_tag
4548 self
.persistent
= persistent
4549 self
.status
= EntityStatus
.from_json(status
) if status
else None
4550 self
.storage_tag
= storage_tag
4553 class StorageDetailsListResult(Type
):
4554 _toSchema
= {'error': 'error', 'result': 'result'}
4555 _toPy
= {'error': 'error', 'result': 'result'}
4556 def __init__(self
, error
=None, result
=None):
4559 result : typing.Sequence[~StorageDetails]
4561 self
.error
= Error
.from_json(error
) if error
else None
4562 self
.result
= [StorageDetails
.from_json(o
) for o
in result
or []]
4565 class StorageDetailsListResults(Type
):
4566 _toSchema
= {'results': 'results'}
4567 _toPy
= {'results': 'results'}
4568 def __init__(self
, results
=None):
4570 results : typing.Sequence[~StorageDetailsListResult]
4572 self
.results
= [StorageDetailsListResult
.from_json(o
) for o
in results
or []]
4575 class StorageDetailsResult(Type
):
4576 _toSchema
= {'error': 'error', 'result': 'result'}
4577 _toPy
= {'error': 'error', 'result': 'result'}
4578 def __init__(self
, error
=None, result
=None):
4581 result : StorageDetails
4583 self
.error
= Error
.from_json(error
) if error
else None
4584 self
.result
= StorageDetails
.from_json(result
) if result
else None
4587 class StorageDetailsResults(Type
):
4588 _toSchema
= {'results': 'results'}
4589 _toPy
= {'results': 'results'}
4590 def __init__(self
, results
=None):
4592 results : typing.Sequence[~StorageDetailsResult]
4594 self
.results
= [StorageDetailsResult
.from_json(o
) for o
in results
or []]
4597 class StorageFilter(Type
):
4607 class StorageFilters(Type
):
4608 _toSchema
= {'filters': 'filters'}
4609 _toPy
= {'filters': 'filters'}
4610 def __init__(self
, filters
=None):
4612 filters : typing.Sequence[~StorageFilter]
4614 self
.filters
= [StorageFilter
.from_json(o
) for o
in filters
or []]
4617 class StoragePool(Type
):
4618 _toSchema
= {'name': 'name', 'provider': 'provider', 'attrs': 'attrs'}
4619 _toPy
= {'name': 'name', 'provider': 'provider', 'attrs': 'attrs'}
4620 def __init__(self
, attrs
=None, name
=None, provider
=None):
4622 attrs : typing.Mapping[str, typing.Any]
4628 self
.provider
= provider
4631 class StoragePoolFilter(Type
):
4632 _toSchema
= {'names': 'names', 'providers': 'providers'}
4633 _toPy
= {'names': 'names', 'providers': 'providers'}
4634 def __init__(self
, names
=None, providers
=None):
4636 names : typing.Sequence[str]
4637 providers : typing.Sequence[str]
4640 self
.providers
= providers
4643 class StoragePoolFilters(Type
):
4644 _toSchema
= {'filters': 'filters'}
4645 _toPy
= {'filters': 'filters'}
4646 def __init__(self
, filters
=None):
4648 filters : typing.Sequence[~StoragePoolFilter]
4650 self
.filters
= [StoragePoolFilter
.from_json(o
) for o
in filters
or []]
4653 class StoragePoolsResult(Type
):
4654 _toSchema
= {'error': 'error', 'storage_pools': 'storage-pools'}
4655 _toPy
= {'error': 'error', 'storage-pools': 'storage_pools'}
4656 def __init__(self
, error
=None, storage_pools
=None):
4659 storage_pools : typing.Sequence[~StoragePool]
4661 self
.error
= Error
.from_json(error
) if error
else None
4662 self
.storage_pools
= [StoragePool
.from_json(o
) for o
in storage_pools
or []]
4665 class StoragePoolsResults(Type
):
4666 _toSchema
= {'results': 'results'}
4667 _toPy
= {'results': 'results'}
4668 def __init__(self
, results
=None):
4670 results : typing.Sequence[~StoragePoolsResult]
4672 self
.results
= [StoragePoolsResult
.from_json(o
) for o
in results
or []]
4675 class StoragesAddParams(Type
):
4676 _toSchema
= {'storages': 'storages'}
4677 _toPy
= {'storages': 'storages'}
4678 def __init__(self
, storages
=None):
4680 storages : typing.Sequence[~StorageAddParams]
4682 self
.storages
= [StorageAddParams
.from_json(o
) for o
in storages
or []]
4685 class VolumeDetails(Type
):
4686 _toSchema
= {'status': 'status', 'storage': 'storage', 'info': 'info', 'machine_attachments': 'machine-attachments', 'volume_tag': 'volume-tag'}
4687 _toPy
= {'status': 'status', 'volume-tag': 'volume_tag', 'info': 'info', 'storage': 'storage', 'machine-attachments': 'machine_attachments'}
4688 def __init__(self
, info
=None, machine_attachments
=None, status
=None, storage
=None, volume_tag
=None):
4691 machine_attachments : typing.Mapping[str, ~VolumeAttachmentInfo]
4692 status : EntityStatus
4693 storage : StorageDetails
4696 self
.info
= VolumeInfo
.from_json(info
) if info
else None
4697 self
.machine_attachments
= {k
: VolumeAttachmentInfo
.from_json(v
) for k
, v
in (machine_attachments
or dict()).items()}
4698 self
.status
= EntityStatus
.from_json(status
) if status
else None
4699 self
.storage
= StorageDetails
.from_json(storage
) if storage
else None
4700 self
.volume_tag
= volume_tag
4703 class VolumeDetailsListResult(Type
):
4704 _toSchema
= {'error': 'error', 'result': 'result'}
4705 _toPy
= {'error': 'error', 'result': 'result'}
4706 def __init__(self
, error
=None, result
=None):
4709 result : typing.Sequence[~VolumeDetails]
4711 self
.error
= Error
.from_json(error
) if error
else None
4712 self
.result
= [VolumeDetails
.from_json(o
) for o
in result
or []]
4715 class VolumeDetailsListResults(Type
):
4716 _toSchema
= {'results': 'results'}
4717 _toPy
= {'results': 'results'}
4718 def __init__(self
, results
=None):
4720 results : typing.Sequence[~VolumeDetailsListResult]
4722 self
.results
= [VolumeDetailsListResult
.from_json(o
) for o
in results
or []]
4725 class VolumeFilter(Type
):
4726 _toSchema
= {'machines': 'machines'}
4727 _toPy
= {'machines': 'machines'}
4728 def __init__(self
, machines
=None):
4730 machines : typing.Sequence[str]
4732 self
.machines
= machines
4735 class VolumeFilters(Type
):
4736 _toSchema
= {'filters': 'filters'}
4737 _toPy
= {'filters': 'filters'}
4738 def __init__(self
, filters
=None):
4740 filters : typing.Sequence[~VolumeFilter]
4742 self
.filters
= [VolumeFilter
.from_json(o
) for o
in filters
or []]
4745 class BlockDeviceResult(Type
):
4746 _toSchema
= {'error': 'error', 'result': 'result'}
4747 _toPy
= {'error': 'error', 'result': 'result'}
4748 def __init__(self
, error
=None, result
=None):
4751 result : BlockDevice
4753 self
.error
= Error
.from_json(error
) if error
else None
4754 self
.result
= BlockDevice
.from_json(result
) if result
else None
4757 class BlockDeviceResults(Type
):
4758 _toSchema
= {'results': 'results'}
4759 _toPy
= {'results': 'results'}
4760 def __init__(self
, results
=None):
4762 results : typing.Sequence[~BlockDeviceResult]
4764 self
.results
= [BlockDeviceResult
.from_json(o
) for o
in results
or []]
4767 class Filesystem(Type
):
4768 _toSchema
= {'filesystem_tag': 'filesystem-tag', 'info': 'info', 'volume_tag': 'volume-tag'}
4769 _toPy
= {'volume-tag': 'volume_tag', 'info': 'info', 'filesystem-tag': 'filesystem_tag'}
4770 def __init__(self
, filesystem_tag
=None, info
=None, volume_tag
=None):
4772 filesystem_tag : str
4773 info : FilesystemInfo
4776 self
.filesystem_tag
= filesystem_tag
4777 self
.info
= FilesystemInfo
.from_json(info
) if info
else None
4778 self
.volume_tag
= volume_tag
4781 class FilesystemAttachment(Type
):
4782 _toSchema
= {'filesystem_tag': 'filesystem-tag', 'info': 'info', 'machine_tag': 'machine-tag'}
4783 _toPy
= {'machine-tag': 'machine_tag', 'info': 'info', 'filesystem-tag': 'filesystem_tag'}
4784 def __init__(self
, filesystem_tag
=None, info
=None, machine_tag
=None):
4786 filesystem_tag : str
4787 info : FilesystemAttachmentInfo
4790 self
.filesystem_tag
= filesystem_tag
4791 self
.info
= FilesystemAttachmentInfo
.from_json(info
) if info
else None
4792 self
.machine_tag
= machine_tag
4795 class FilesystemAttachmentParams(Type
):
4796 _toSchema
= {'mount_point': 'mount-point', 'filesystem_tag': 'filesystem-tag', 'machine_tag': 'machine-tag', 'instance_id': 'instance-id', 'provider': 'provider', 'filesystem_id': 'filesystem-id', 'read_only': 'read-only'}
4797 _toPy
= {'machine-tag': 'machine_tag', 'filesystem-id': 'filesystem_id', 'provider': 'provider', 'filesystem-tag': 'filesystem_tag', 'mount-point': 'mount_point', 'instance-id': 'instance_id', 'read-only': 'read_only'}
4798 def __init__(self
, filesystem_id
=None, filesystem_tag
=None, instance_id
=None, machine_tag
=None, mount_point
=None, provider
=None, read_only
=None):
4801 filesystem_tag : str
4808 self
.filesystem_id
= filesystem_id
4809 self
.filesystem_tag
= filesystem_tag
4810 self
.instance_id
= instance_id
4811 self
.machine_tag
= machine_tag
4812 self
.mount_point
= mount_point
4813 self
.provider
= provider
4814 self
.read_only
= read_only
4817 class FilesystemAttachmentParamsResult(Type
):
4818 _toSchema
= {'error': 'error', 'result': 'result'}
4819 _toPy
= {'error': 'error', 'result': 'result'}
4820 def __init__(self
, error
=None, result
=None):
4823 result : FilesystemAttachmentParams
4825 self
.error
= Error
.from_json(error
) if error
else None
4826 self
.result
= FilesystemAttachmentParams
.from_json(result
) if result
else None
4829 class FilesystemAttachmentParamsResults(Type
):
4830 _toSchema
= {'results': 'results'}
4831 _toPy
= {'results': 'results'}
4832 def __init__(self
, results
=None):
4834 results : typing.Sequence[~FilesystemAttachmentParamsResult]
4836 self
.results
= [FilesystemAttachmentParamsResult
.from_json(o
) for o
in results
or []]
4839 class FilesystemAttachmentResult(Type
):
4840 _toSchema
= {'error': 'error', 'result': 'result'}
4841 _toPy
= {'error': 'error', 'result': 'result'}
4842 def __init__(self
, error
=None, result
=None):
4845 result : FilesystemAttachment
4847 self
.error
= Error
.from_json(error
) if error
else None
4848 self
.result
= FilesystemAttachment
.from_json(result
) if result
else None
4851 class FilesystemAttachmentResults(Type
):
4852 _toSchema
= {'results': 'results'}
4853 _toPy
= {'results': 'results'}
4854 def __init__(self
, results
=None):
4856 results : typing.Sequence[~FilesystemAttachmentResult]
4858 self
.results
= [FilesystemAttachmentResult
.from_json(o
) for o
in results
or []]
4861 class FilesystemAttachments(Type
):
4862 _toSchema
= {'filesystem_attachments': 'filesystem-attachments'}
4863 _toPy
= {'filesystem-attachments': 'filesystem_attachments'}
4864 def __init__(self
, filesystem_attachments
=None):
4866 filesystem_attachments : typing.Sequence[~FilesystemAttachment]
4868 self
.filesystem_attachments
= [FilesystemAttachment
.from_json(o
) for o
in filesystem_attachments
or []]
4871 class FilesystemParams(Type
):
4872 _toSchema
= {'filesystem_tag': 'filesystem-tag', 'tags': 'tags', 'provider': 'provider', 'size': 'size', 'attachment': 'attachment', 'attributes': 'attributes', 'volume_tag': 'volume-tag'}
4873 _toPy
= {'volume-tag': 'volume_tag', 'tags': 'tags', 'filesystem-tag': 'filesystem_tag', 'provider': 'provider', 'size': 'size', 'attachment': 'attachment', 'attributes': 'attributes'}
4874 def __init__(self
, attachment
=None, attributes
=None, filesystem_tag
=None, provider
=None, size
=None, tags
=None, volume_tag
=None):
4876 attachment : FilesystemAttachmentParams
4877 attributes : typing.Mapping[str, typing.Any]
4878 filesystem_tag : str
4881 tags : typing.Mapping[str, str]
4884 self
.attachment
= FilesystemAttachmentParams
.from_json(attachment
) if attachment
else None
4885 self
.attributes
= attributes
4886 self
.filesystem_tag
= filesystem_tag
4887 self
.provider
= provider
4890 self
.volume_tag
= volume_tag
4893 class FilesystemParamsResult(Type
):
4894 _toSchema
= {'error': 'error', 'result': 'result'}
4895 _toPy
= {'error': 'error', 'result': 'result'}
4896 def __init__(self
, error
=None, result
=None):
4899 result : FilesystemParams
4901 self
.error
= Error
.from_json(error
) if error
else None
4902 self
.result
= FilesystemParams
.from_json(result
) if result
else None
4905 class FilesystemParamsResults(Type
):
4906 _toSchema
= {'results': 'results'}
4907 _toPy
= {'results': 'results'}
4908 def __init__(self
, results
=None):
4910 results : typing.Sequence[~FilesystemParamsResult]
4912 self
.results
= [FilesystemParamsResult
.from_json(o
) for o
in results
or []]
4915 class FilesystemResult(Type
):
4916 _toSchema
= {'error': 'error', 'result': 'result'}
4917 _toPy
= {'error': 'error', 'result': 'result'}
4918 def __init__(self
, error
=None, result
=None):
4923 self
.error
= Error
.from_json(error
) if error
else None
4924 self
.result
= Filesystem
.from_json(result
) if result
else None
4927 class FilesystemResults(Type
):
4928 _toSchema
= {'results': 'results'}
4929 _toPy
= {'results': 'results'}
4930 def __init__(self
, results
=None):
4932 results : typing.Sequence[~FilesystemResult]
4934 self
.results
= [FilesystemResult
.from_json(o
) for o
in results
or []]
4937 class Filesystems(Type
):
4938 _toSchema
= {'filesystems': 'filesystems'}
4939 _toPy
= {'filesystems': 'filesystems'}
4940 def __init__(self
, filesystems
=None):
4942 filesystems : typing.Sequence[~Filesystem]
4944 self
.filesystems
= [Filesystem
.from_json(o
) for o
in filesystems
or []]
4947 class MachineStorageIds(Type
):
4948 _toSchema
= {'ids': 'ids'}
4949 _toPy
= {'ids': 'ids'}
4950 def __init__(self
, ids
=None):
4952 ids : typing.Sequence[~MachineStorageId]
4954 self
.ids
= [MachineStorageId
.from_json(o
) for o
in ids
or []]
4957 class MachineStorageIdsWatchResults(Type
):
4958 _toSchema
= {'results': 'results'}
4959 _toPy
= {'results': 'results'}
4960 def __init__(self
, results
=None):
4962 results : typing.Sequence[~MachineStorageIdsWatchResult]
4964 self
.results
= [MachineStorageIdsWatchResult
.from_json(o
) for o
in results
or []]
4967 class VolumeAttachment(Type
):
4968 _toSchema
= {'info': 'info', 'machine_tag': 'machine-tag', 'volume_tag': 'volume-tag'}
4969 _toPy
= {'machine-tag': 'machine_tag', 'volume-tag': 'volume_tag', 'info': 'info'}
4970 def __init__(self
, info
=None, machine_tag
=None, volume_tag
=None):
4972 info : VolumeAttachmentInfo
4976 self
.info
= VolumeAttachmentInfo
.from_json(info
) if info
else None
4977 self
.machine_tag
= machine_tag
4978 self
.volume_tag
= volume_tag
4981 class VolumeAttachmentParamsResult(Type
):
4982 _toSchema
= {'error': 'error', 'result': 'result'}
4983 _toPy
= {'error': 'error', 'result': 'result'}
4984 def __init__(self
, error
=None, result
=None):
4987 result : VolumeAttachmentParams
4989 self
.error
= Error
.from_json(error
) if error
else None
4990 self
.result
= VolumeAttachmentParams
.from_json(result
) if result
else None
4993 class VolumeAttachmentParamsResults(Type
):
4994 _toSchema
= {'results': 'results'}
4995 _toPy
= {'results': 'results'}
4996 def __init__(self
, results
=None):
4998 results : typing.Sequence[~VolumeAttachmentParamsResult]
5000 self
.results
= [VolumeAttachmentParamsResult
.from_json(o
) for o
in results
or []]
5003 class VolumeAttachmentResult(Type
):
5004 _toSchema
= {'error': 'error', 'result': 'result'}
5005 _toPy
= {'error': 'error', 'result': 'result'}
5006 def __init__(self
, error
=None, result
=None):
5009 result : VolumeAttachment
5011 self
.error
= Error
.from_json(error
) if error
else None
5012 self
.result
= VolumeAttachment
.from_json(result
) if result
else None
5015 class VolumeAttachmentResults(Type
):
5016 _toSchema
= {'results': 'results'}
5017 _toPy
= {'results': 'results'}
5018 def __init__(self
, results
=None):
5020 results : typing.Sequence[~VolumeAttachmentResult]
5022 self
.results
= [VolumeAttachmentResult
.from_json(o
) for o
in results
or []]
5025 class VolumeAttachments(Type
):
5026 _toSchema
= {'volume_attachments': 'volume-attachments'}
5027 _toPy
= {'volume-attachments': 'volume_attachments'}
5028 def __init__(self
, volume_attachments
=None):
5030 volume_attachments : typing.Sequence[~VolumeAttachment]
5032 self
.volume_attachments
= [VolumeAttachment
.from_json(o
) for o
in volume_attachments
or []]
5035 class VolumeParamsResult(Type
):
5036 _toSchema
= {'error': 'error', 'result': 'result'}
5037 _toPy
= {'error': 'error', 'result': 'result'}
5038 def __init__(self
, error
=None, result
=None):
5041 result : VolumeParams
5043 self
.error
= Error
.from_json(error
) if error
else None
5044 self
.result
= VolumeParams
.from_json(result
) if result
else None
5047 class VolumeParamsResults(Type
):
5048 _toSchema
= {'results': 'results'}
5049 _toPy
= {'results': 'results'}
5050 def __init__(self
, results
=None):
5052 results : typing.Sequence[~VolumeParamsResult]
5054 self
.results
= [VolumeParamsResult
.from_json(o
) for o
in results
or []]
5057 class VolumeResult(Type
):
5058 _toSchema
= {'error': 'error', 'result': 'result'}
5059 _toPy
= {'error': 'error', 'result': 'result'}
5060 def __init__(self
, error
=None, result
=None):
5065 self
.error
= Error
.from_json(error
) if error
else None
5066 self
.result
= Volume
.from_json(result
) if result
else None
5069 class VolumeResults(Type
):
5070 _toSchema
= {'results': 'results'}
5071 _toPy
= {'results': 'results'}
5072 def __init__(self
, results
=None):
5074 results : typing.Sequence[~VolumeResult]
5076 self
.results
= [VolumeResult
.from_json(o
) for o
in results
or []]
5079 class Volumes(Type
):
5080 _toSchema
= {'volumes': 'volumes'}
5081 _toPy
= {'volumes': 'volumes'}
5082 def __init__(self
, volumes
=None):
5084 volumes : typing.Sequence[~Volume]
5086 self
.volumes
= [Volume
.from_json(o
) for o
in volumes
or []]
5089 class SpaceResult(Type
):
5090 _toSchema
= {'error': 'error', 'tag': 'tag'}
5091 _toPy
= {'error': 'error', 'tag': 'tag'}
5092 def __init__(self
, error
=None, tag
=None):
5097 self
.error
= Error
.from_json(error
) if error
else None
5101 class SpaceResults(Type
):
5102 _toSchema
= {'results': 'results'}
5103 _toPy
= {'results': 'results'}
5104 def __init__(self
, results
=None):
5106 results : typing.Sequence[~SpaceResult]
5108 self
.results
= [SpaceResult
.from_json(o
) for o
in results
or []]
5111 class ZoneResult(Type
):
5112 _toSchema
= {'name': 'name', 'available': 'available', 'error': 'error'}
5113 _toPy
= {'name': 'name', 'available': 'available', 'error': 'error'}
5114 def __init__(self
, available
=None, error
=None, name
=None):
5120 self
.available
= available
5121 self
.error
= Error
.from_json(error
) if error
else None
5125 class ZoneResults(Type
):
5126 _toSchema
= {'results': 'results'}
5127 _toPy
= {'results': 'results'}
5128 def __init__(self
, results
=None):
5130 results : typing.Sequence[~ZoneResult]
5132 self
.results
= [ZoneResult
.from_json(o
) for o
in results
or []]
5135 class UndertakerModelInfo(Type
):
5136 _toSchema
= {'name': 'name', 'uuid': 'uuid', 'is_system': 'is-system', 'global_name': 'global-name', 'life': 'life'}
5137 _toPy
= {'name': 'name', 'is-system': 'is_system', 'life': 'life', 'global-name': 'global_name', 'uuid': 'uuid'}
5138 def __init__(self
, global_name
=None, is_system
=None, life
=None, name
=None, uuid
=None):
5146 self
.global_name
= global_name
5147 self
.is_system
= is_system
5153 class UndertakerModelInfoResult(Type
):
5154 _toSchema
= {'error': 'error', 'result': 'result'}
5155 _toPy
= {'error': 'error', 'result': 'result'}
5156 def __init__(self
, error
=None, result
=None):
5159 result : UndertakerModelInfo
5161 self
.error
= Error
.from_json(error
) if error
else None
5162 self
.result
= UndertakerModelInfo
.from_json(result
) if result
else None
5165 class ApplicationStatusResult(Type
):
5166 _toSchema
= {'error': 'error', 'units': 'units', 'application': 'application'}
5167 _toPy
= {'error': 'error', 'units': 'units', 'application': 'application'}
5168 def __init__(self
, application
=None, error
=None, units
=None):
5170 application : StatusResult
5172 units : typing.Mapping[str, ~StatusResult]
5174 self
.application
= StatusResult
.from_json(application
) if application
else None
5175 self
.error
= Error
.from_json(error
) if error
else None
5176 self
.units
= {k
: StatusResult
.from_json(v
) for k
, v
in (units
or dict()).items()}
5179 class ApplicationStatusResults(Type
):
5180 _toSchema
= {'results': 'results'}
5181 _toPy
= {'results': 'results'}
5182 def __init__(self
, results
=None):
5184 results : typing.Sequence[~ApplicationStatusResult]
5186 self
.results
= [ApplicationStatusResult
.from_json(o
) for o
in results
or []]
5189 class CharmURLs(Type
):
5190 _toSchema
= {'urls': 'urls'}
5191 _toPy
= {'urls': 'urls'}
5192 def __init__(self
, urls
=None):
5194 urls : typing.Sequence[~CharmURL]
5196 self
.urls
= [CharmURL
.from_json(o
) for o
in urls
or []]
5199 class ConfigSettingsResult(Type
):
5200 _toSchema
= {'error': 'error', 'settings': 'settings'}
5201 _toPy
= {'error': 'error', 'settings': 'settings'}
5202 def __init__(self
, error
=None, settings
=None):
5205 settings : typing.Mapping[str, typing.Any]
5207 self
.error
= Error
.from_json(error
) if error
else None
5208 self
.settings
= settings
5211 class ConfigSettingsResults(Type
):
5212 _toSchema
= {'results': 'results'}
5213 _toPy
= {'results': 'results'}
5214 def __init__(self
, results
=None):
5216 results : typing.Sequence[~ConfigSettingsResult]
5218 self
.results
= [ConfigSettingsResult
.from_json(o
) for o
in results
or []]
5221 class Endpoint(Type
):
5222 _toSchema
= {'relation': 'relation', 'application_name': 'application-name'}
5223 _toPy
= {'relation': 'relation', 'application-name': 'application_name'}
5224 def __init__(self
, application_name
=None, relation
=None):
5226 application_name : str
5227 relation : CharmRelation
5229 self
.application_name
= application_name
5230 self
.relation
= CharmRelation
.from_json(relation
) if relation
else None
5233 class EntitiesCharmURL(Type
):
5234 _toSchema
= {'entities': 'entities'}
5235 _toPy
= {'entities': 'entities'}
5236 def __init__(self
, entities
=None):
5238 entities : typing.Sequence[~EntityCharmURL]
5240 self
.entities
= [EntityCharmURL
.from_json(o
) for o
in entities
or []]
5243 class EntitiesPortRanges(Type
):
5244 _toSchema
= {'entities': 'entities'}
5245 _toPy
= {'entities': 'entities'}
5246 def __init__(self
, entities
=None):
5248 entities : typing.Sequence[~EntityPortRange]
5250 self
.entities
= [EntityPortRange
.from_json(o
) for o
in entities
or []]
5253 class EntityCharmURL(Type
):
5254 _toSchema
= {'tag': 'tag', 'charm_url': 'charm-url'}
5255 _toPy
= {'charm-url': 'charm_url', 'tag': 'tag'}
5256 def __init__(self
, charm_url
=None, tag
=None):
5261 self
.charm_url
= charm_url
5265 class EntityPortRange(Type
):
5266 _toSchema
= {'from_port': 'from-port', 'to_port': 'to-port', 'tag': 'tag', 'protocol': 'protocol'}
5267 _toPy
= {'to-port': 'to_port', 'protocol': 'protocol', 'tag': 'tag', 'from-port': 'from_port'}
5268 def __init__(self
, from_port
=None, protocol
=None, tag
=None, to_port
=None):
5275 self
.from_port
= from_port
5276 self
.protocol
= protocol
5278 self
.to_port
= to_port
5281 class EntityWorkloadVersion(Type
):
5282 _toSchema
= {'tag': 'tag', 'workload_version': 'workload-version'}
5283 _toPy
= {'tag': 'tag', 'workload-version': 'workload_version'}
5284 def __init__(self
, tag
=None, workload_version
=None):
5287 workload_version : str
5290 self
.workload_version
= workload_version
5293 class EntityWorkloadVersions(Type
):
5294 _toSchema
= {'entities': 'entities'}
5295 _toPy
= {'entities': 'entities'}
5296 def __init__(self
, entities
=None):
5298 entities : typing.Sequence[~EntityWorkloadVersion]
5300 self
.entities
= [EntityWorkloadVersion
.from_json(o
) for o
in entities
or []]
5303 class GetLeadershipSettingsBulkResults(Type
):
5304 _toSchema
= {'results': 'results'}
5305 _toPy
= {'results': 'results'}
5306 def __init__(self
, results
=None):
5308 results : typing.Sequence[~GetLeadershipSettingsResult]
5310 self
.results
= [GetLeadershipSettingsResult
.from_json(o
) for o
in results
or []]
5313 class GetLeadershipSettingsResult(Type
):
5314 _toSchema
= {'error': 'error', 'settings': 'settings'}
5315 _toPy
= {'error': 'error', 'settings': 'settings'}
5316 def __init__(self
, error
=None, settings
=None):
5319 settings : typing.Mapping[str, str]
5321 self
.error
= Error
.from_json(error
) if error
else None
5322 self
.settings
= settings
5325 class IntResult(Type
):
5326 _toSchema
= {'error': 'error', 'result': 'result'}
5327 _toPy
= {'error': 'error', 'result': 'result'}
5328 def __init__(self
, error
=None, result
=None):
5333 self
.error
= Error
.from_json(error
) if error
else None
5334 self
.result
= result
5337 class IntResults(Type
):
5338 _toSchema
= {'results': 'results'}
5339 _toPy
= {'results': 'results'}
5340 def __init__(self
, results
=None):
5342 results : typing.Sequence[~IntResult]
5344 self
.results
= [IntResult
.from_json(o
) for o
in results
or []]
5347 class MergeLeadershipSettingsBulkParams(Type
):
5348 _toSchema
= {'params': 'params'}
5349 _toPy
= {'params': 'params'}
5350 def __init__(self
, params
=None):
5352 params : typing.Sequence[~MergeLeadershipSettingsParam]
5354 self
.params
= [MergeLeadershipSettingsParam
.from_json(o
) for o
in params
or []]
5357 class MergeLeadershipSettingsParam(Type
):
5358 _toSchema
= {'application_tag': 'application-tag', 'settings': 'settings'}
5359 _toPy
= {'settings': 'settings', 'application-tag': 'application_tag'}
5360 def __init__(self
, application_tag
=None, settings
=None):
5362 application_tag : str
5363 settings : typing.Mapping[str, str]
5365 self
.application_tag
= application_tag
5366 self
.settings
= settings
5369 class ModelResult(Type
):
5370 _toSchema
= {'name': 'name', 'error': 'error', 'uuid': 'uuid'}
5371 _toPy
= {'name': 'name', 'error': 'error', 'uuid': 'uuid'}
5372 def __init__(self
, error
=None, name
=None, uuid
=None):
5378 self
.error
= Error
.from_json(error
) if error
else None
5383 class RelationIds(Type
):
5384 _toSchema
= {'relation_ids': 'relation-ids'}
5385 _toPy
= {'relation-ids': 'relation_ids'}
5386 def __init__(self
, relation_ids
=None):
5388 relation_ids : typing.Sequence[int]
5390 self
.relation_ids
= relation_ids
5393 class RelationResult(Type
):
5394 _toSchema
= {'error': 'error', 'life': 'life', 'key': 'key', 'endpoint': 'endpoint', 'id_': 'id'}
5395 _toPy
= {'error': 'error', 'life': 'life', 'key': 'key', 'id': 'id_', 'endpoint': 'endpoint'}
5396 def __init__(self
, endpoint
=None, error
=None, id_
=None, key
=None, life
=None):
5404 self
.endpoint
= Endpoint
.from_json(endpoint
) if endpoint
else None
5405 self
.error
= Error
.from_json(error
) if error
else None
5411 class RelationResults(Type
):
5412 _toSchema
= {'results': 'results'}
5413 _toPy
= {'results': 'results'}
5414 def __init__(self
, results
=None):
5416 results : typing.Sequence[~RelationResult]
5418 self
.results
= [RelationResult
.from_json(o
) for o
in results
or []]
5421 class RelationUnit(Type
):
5422 _toSchema
= {'relation': 'relation', 'unit': 'unit'}
5423 _toPy
= {'relation': 'relation', 'unit': 'unit'}
5424 def __init__(self
, relation
=None, unit
=None):
5429 self
.relation
= relation
5433 class RelationUnitPair(Type
):
5434 _toSchema
= {'remote_unit': 'remote-unit', 'local_unit': 'local-unit', 'relation': 'relation'}
5435 _toPy
= {'relation': 'relation', 'local-unit': 'local_unit', 'remote-unit': 'remote_unit'}
5436 def __init__(self
, local_unit
=None, relation
=None, remote_unit
=None):
5442 self
.local_unit
= local_unit
5443 self
.relation
= relation
5444 self
.remote_unit
= remote_unit
5447 class RelationUnitPairs(Type
):
5448 _toSchema
= {'relation_unit_pairs': 'relation-unit-pairs'}
5449 _toPy
= {'relation-unit-pairs': 'relation_unit_pairs'}
5450 def __init__(self
, relation_unit_pairs
=None):
5452 relation_unit_pairs : typing.Sequence[~RelationUnitPair]
5454 self
.relation_unit_pairs
= [RelationUnitPair
.from_json(o
) for o
in relation_unit_pairs
or []]
5457 class RelationUnitSettings(Type
):
5458 _toSchema
= {'relation': 'relation', 'unit': 'unit', 'settings': 'settings'}
5459 _toPy
= {'relation': 'relation', 'unit': 'unit', 'settings': 'settings'}
5460 def __init__(self
, relation
=None, settings
=None, unit
=None):
5463 settings : typing.Mapping[str, str]
5466 self
.relation
= relation
5467 self
.settings
= settings
5471 class RelationUnits(Type
):
5472 _toSchema
= {'relation_units': 'relation-units'}
5473 _toPy
= {'relation-units': 'relation_units'}
5474 def __init__(self
, relation_units
=None):
5476 relation_units : typing.Sequence[~RelationUnit]
5478 self
.relation_units
= [RelationUnit
.from_json(o
) for o
in relation_units
or []]
5481 class RelationUnitsSettings(Type
):
5482 _toSchema
= {'relation_units': 'relation-units'}
5483 _toPy
= {'relation-units': 'relation_units'}
5484 def __init__(self
, relation_units
=None):
5486 relation_units : typing.Sequence[~RelationUnitSettings]
5488 self
.relation_units
= [RelationUnitSettings
.from_json(o
) for o
in relation_units
or []]
5491 class RelationUnitsWatchResults(Type
):
5492 _toSchema
= {'results': 'results'}
5493 _toPy
= {'results': 'results'}
5494 def __init__(self
, results
=None):
5496 results : typing.Sequence[~RelationUnitsWatchResult]
5498 self
.results
= [RelationUnitsWatchResult
.from_json(o
) for o
in results
or []]
5501 class ResolvedModeResult(Type
):
5502 _toSchema
= {'error': 'error', 'mode': 'mode'}
5503 _toPy
= {'error': 'error', 'mode': 'mode'}
5504 def __init__(self
, error
=None, mode
=None):
5509 self
.error
= Error
.from_json(error
) if error
else None
5513 class ResolvedModeResults(Type
):
5514 _toSchema
= {'results': 'results'}
5515 _toPy
= {'results': 'results'}
5516 def __init__(self
, results
=None):
5518 results : typing.Sequence[~ResolvedModeResult]
5520 self
.results
= [ResolvedModeResult
.from_json(o
) for o
in results
or []]
5523 class SettingsResult(Type
):
5524 _toSchema
= {'error': 'error', 'settings': 'settings'}
5525 _toPy
= {'error': 'error', 'settings': 'settings'}
5526 def __init__(self
, error
=None, settings
=None):
5529 settings : typing.Mapping[str, str]
5531 self
.error
= Error
.from_json(error
) if error
else None
5532 self
.settings
= settings
5535 class SettingsResults(Type
):
5536 _toSchema
= {'results': 'results'}
5537 _toPy
= {'results': 'results'}
5538 def __init__(self
, results
=None):
5540 results : typing.Sequence[~SettingsResult]
5542 self
.results
= [SettingsResult
.from_json(o
) for o
in results
or []]
5545 class StorageAttachment(Type
):
5546 _toSchema
= {'unit_tag': 'unit-tag', 'location': 'location', 'storage_tag': 'storage-tag', 'kind': 'kind', 'owner_tag': 'owner-tag', 'life': 'life'}
5547 _toPy
= {'location': 'location', 'owner-tag': 'owner_tag', 'storage-tag': 'storage_tag', 'unit-tag': 'unit_tag', 'kind': 'kind', 'life': 'life'}
5548 def __init__(self
, kind
=None, life
=None, location
=None, owner_tag
=None, storage_tag
=None, unit_tag
=None):
5559 self
.location
= location
5560 self
.owner_tag
= owner_tag
5561 self
.storage_tag
= storage_tag
5562 self
.unit_tag
= unit_tag
5565 class StorageAttachmentId(Type
):
5566 _toSchema
= {'storage_tag': 'storage-tag', 'unit_tag': 'unit-tag'}
5567 _toPy
= {'unit-tag': 'unit_tag', 'storage-tag': 'storage_tag'}
5568 def __init__(self
, storage_tag
=None, unit_tag
=None):
5573 self
.storage_tag
= storage_tag
5574 self
.unit_tag
= unit_tag
5577 class StorageAttachmentIds(Type
):
5578 _toSchema
= {'ids': 'ids'}
5579 _toPy
= {'ids': 'ids'}
5580 def __init__(self
, ids
=None):
5582 ids : typing.Sequence[~StorageAttachmentId]
5584 self
.ids
= [StorageAttachmentId
.from_json(o
) for o
in ids
or []]
5587 class StorageAttachmentIdsResult(Type
):
5588 _toSchema
= {'error': 'error', 'result': 'result'}
5589 _toPy
= {'error': 'error', 'result': 'result'}
5590 def __init__(self
, error
=None, result
=None):
5593 result : StorageAttachmentIds
5595 self
.error
= Error
.from_json(error
) if error
else None
5596 self
.result
= StorageAttachmentIds
.from_json(result
) if result
else None
5599 class StorageAttachmentIdsResults(Type
):
5600 _toSchema
= {'results': 'results'}
5601 _toPy
= {'results': 'results'}
5602 def __init__(self
, results
=None):
5604 results : typing.Sequence[~StorageAttachmentIdsResult]
5606 self
.results
= [StorageAttachmentIdsResult
.from_json(o
) for o
in results
or []]
5609 class StorageAttachmentResult(Type
):
5610 _toSchema
= {'error': 'error', 'result': 'result'}
5611 _toPy
= {'error': 'error', 'result': 'result'}
5612 def __init__(self
, error
=None, result
=None):
5615 result : StorageAttachment
5617 self
.error
= Error
.from_json(error
) if error
else None
5618 self
.result
= StorageAttachment
.from_json(result
) if result
else None
5621 class StorageAttachmentResults(Type
):
5622 _toSchema
= {'results': 'results'}
5623 _toPy
= {'results': 'results'}
5624 def __init__(self
, results
=None):
5626 results : typing.Sequence[~StorageAttachmentResult]
5628 self
.results
= [StorageAttachmentResult
.from_json(o
) for o
in results
or []]
5631 class StringBoolResult(Type
):
5632 _toSchema
= {'ok': 'ok', 'error': 'error', 'result': 'result'}
5633 _toPy
= {'ok': 'ok', 'error': 'error', 'result': 'result'}
5634 def __init__(self
, error
=None, ok
=None, result
=None):
5640 self
.error
= Error
.from_json(error
) if error
else None
5642 self
.result
= result
5645 class StringBoolResults(Type
):
5646 _toSchema
= {'results': 'results'}
5647 _toPy
= {'results': 'results'}
5648 def __init__(self
, results
=None):
5650 results : typing.Sequence[~StringBoolResult]
5652 self
.results
= [StringBoolResult
.from_json(o
) for o
in results
or []]
5655 class UnitNetworkConfig(Type
):
5656 _toSchema
= {'unit_tag': 'unit-tag', 'binding_name': 'binding-name'}
5657 _toPy
= {'unit-tag': 'unit_tag', 'binding-name': 'binding_name'}
5658 def __init__(self
, binding_name
=None, unit_tag
=None):
5663 self
.binding_name
= binding_name
5664 self
.unit_tag
= unit_tag
5667 class UnitNetworkConfigResult(Type
):
5668 _toSchema
= {'error': 'error', 'info': 'info'}
5669 _toPy
= {'error': 'error', 'info': 'info'}
5670 def __init__(self
, error
=None, info
=None):
5673 info : typing.Sequence[~NetworkConfig]
5675 self
.error
= Error
.from_json(error
) if error
else None
5676 self
.info
= [NetworkConfig
.from_json(o
) for o
in info
or []]
5679 class UnitNetworkConfigResults(Type
):
5680 _toSchema
= {'results': 'results'}
5681 _toPy
= {'results': 'results'}
5682 def __init__(self
, results
=None):
5684 results : typing.Sequence[~UnitNetworkConfigResult]
5686 self
.results
= [UnitNetworkConfigResult
.from_json(o
) for o
in results
or []]
5689 class UnitsNetworkConfig(Type
):
5690 _toSchema
= {'args': 'args'}
5691 _toPy
= {'args': 'args'}
5692 def __init__(self
, args
=None):
5694 args : typing.Sequence[~UnitNetworkConfig]
5696 self
.args
= [UnitNetworkConfig
.from_json(o
) for o
in args
or []]
5699 class EntitiesVersion(Type
):
5700 _toSchema
= {'agent_tools': 'agent-tools'}
5701 _toPy
= {'agent-tools': 'agent_tools'}
5702 def __init__(self
, agent_tools
=None):
5704 agent_tools : typing.Sequence[~EntityVersion]
5706 self
.agent_tools
= [EntityVersion
.from_json(o
) for o
in agent_tools
or []]
5709 class EntityVersion(Type
):
5710 _toSchema
= {'tools': 'tools', 'tag': 'tag'}
5711 _toPy
= {'tools': 'tools', 'tag': 'tag'}
5712 def __init__(self
, tag
=None, tools
=None):
5718 self
.tools
= Version
.from_json(tools
) if tools
else None
5721 class VersionResult(Type
):
5722 _toSchema
= {'error': 'error', 'version': 'version'}
5723 _toPy
= {'error': 'error', 'version': 'version'}
5724 def __init__(self
, error
=None, version
=None):
5729 self
.error
= Error
.from_json(error
) if error
else None
5730 self
.version
= Number
.from_json(version
) if version
else None
5733 class VersionResults(Type
):
5734 _toSchema
= {'results': 'results'}
5735 _toPy
= {'results': 'results'}
5736 def __init__(self
, results
=None):
5738 results : typing.Sequence[~VersionResult]
5740 self
.results
= [VersionResult
.from_json(o
) for o
in results
or []]
5743 class AddUser(Type
):
5744 _toSchema
= {'display_name': 'display-name', 'shared_model_tags': 'shared-model-tags', 'password': 'password', 'model_access_permission': 'model-access-permission', 'username': 'username'}
5745 _toPy
= {'username': 'username', 'display-name': 'display_name', 'password': 'password', 'model-access-permission': 'model_access_permission', 'shared-model-tags': 'shared_model_tags'}
5746 def __init__(self
, display_name
=None, model_access_permission
=None, password
=None, shared_model_tags
=None, username
=None):
5749 model_access_permission : str
5751 shared_model_tags : typing.Sequence[str]
5754 self
.display_name
= display_name
5755 self
.model_access_permission
= model_access_permission
5756 self
.password
= password
5757 self
.shared_model_tags
= shared_model_tags
5758 self
.username
= username
5761 class AddUserResult(Type
):
5762 _toSchema
= {'error': 'error', 'secret_key': 'secret-key', 'tag': 'tag'}
5763 _toPy
= {'error': 'error', 'tag': 'tag', 'secret-key': 'secret_key'}
5764 def __init__(self
, error
=None, secret_key
=None, tag
=None):
5767 secret_key : typing.Sequence[int]
5770 self
.error
= Error
.from_json(error
) if error
else None
5771 self
.secret_key
= secret_key
5775 class AddUserResults(Type
):
5776 _toSchema
= {'results': 'results'}
5777 _toPy
= {'results': 'results'}
5778 def __init__(self
, results
=None):
5780 results : typing.Sequence[~AddUserResult]
5782 self
.results
= [AddUserResult
.from_json(o
) for o
in results
or []]
5785 class AddUsers(Type
):
5786 _toSchema
= {'users': 'users'}
5787 _toPy
= {'users': 'users'}
5788 def __init__(self
, users
=None):
5790 users : typing.Sequence[~AddUser]
5792 self
.users
= [AddUser
.from_json(o
) for o
in users
or []]
5795 class MacaroonResult(Type
):
5796 _toSchema
= {'error': 'error', 'result': 'result'}
5797 _toPy
= {'error': 'error', 'result': 'result'}
5798 def __init__(self
, error
=None, result
=None):
5803 self
.error
= Error
.from_json(error
) if error
else None
5804 self
.result
= Macaroon
.from_json(result
) if result
else None
5807 class MacaroonResults(Type
):
5808 _toSchema
= {'results': 'results'}
5809 _toPy
= {'results': 'results'}
5810 def __init__(self
, results
=None):
5812 results : typing.Sequence[~MacaroonResult]
5814 self
.results
= [MacaroonResult
.from_json(o
) for o
in results
or []]
5817 class UserInfo(Type
):
5818 _toSchema
= {'display_name': 'display-name', 'username': 'username', 'date_created': 'date-created', 'created_by': 'created-by', 'last_connection': 'last-connection', 'disabled': 'disabled'}
5819 _toPy
= {'username': 'username', 'display-name': 'display_name', 'created-by': 'created_by', 'last-connection': 'last_connection', 'disabled': 'disabled', 'date-created': 'date_created'}
5820 def __init__(self
, created_by
=None, date_created
=None, disabled
=None, display_name
=None, last_connection
=None, username
=None):
5826 last_connection : str
5829 self
.created_by
= created_by
5830 self
.date_created
= date_created
5831 self
.disabled
= disabled
5832 self
.display_name
= display_name
5833 self
.last_connection
= last_connection
5834 self
.username
= username
5837 class UserInfoRequest(Type
):
5838 _toSchema
= {'entities': 'entities', 'include_disabled': 'include-disabled'}
5839 _toPy
= {'entities': 'entities', 'include-disabled': 'include_disabled'}
5840 def __init__(self
, entities
=None, include_disabled
=None):
5842 entities : typing.Sequence[~Entity]
5843 include_disabled : bool
5845 self
.entities
= [Entity
.from_json(o
) for o
in entities
or []]
5846 self
.include_disabled
= include_disabled
5849 class UserInfoResult(Type
):
5850 _toSchema
= {'error': 'error', 'result': 'result'}
5851 _toPy
= {'error': 'error', 'result': 'result'}
5852 def __init__(self
, error
=None, result
=None):
5857 self
.error
= Error
.from_json(error
) if error
else None
5858 self
.result
= UserInfo
.from_json(result
) if result
else None
5861 class UserInfoResults(Type
):
5862 _toSchema
= {'results': 'results'}
5863 _toPy
= {'results': 'results'}
5864 def __init__(self
, results
=None):
5866 results : typing.Sequence[~UserInfoResult]
5868 self
.results
= [UserInfoResult
.from_json(o
) for o
in results
or []]
5871 class ActionFacade(Type
):
5874 schema
= {'definitions': {'Action': {'additionalProperties': False,
5875 'properties': {'name': {'type': 'string'},
5876 'parameters': {'patternProperties': {'.*': {'additionalProperties': True,
5879 'receiver': {'type': 'string'},
5880 'tag': {'type': 'string'}},
5881 'required': ['tag', 'receiver', 'name'],
5883 'ActionResult': {'additionalProperties': False,
5884 'properties': {'action': {'$ref': '#/definitions/Action'},
5885 'completed': {'format': 'date-time',
5887 'enqueued': {'format': 'date-time',
5889 'error': {'$ref': '#/definitions/Error'},
5890 'message': {'type': 'string'},
5891 'output': {'patternProperties': {'.*': {'additionalProperties': True,
5894 'started': {'format': 'date-time',
5896 'status': {'type': 'string'}},
5898 'ActionResults': {'additionalProperties': False,
5899 'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'},
5902 'ActionSpec': {'additionalProperties': False,
5903 'properties': {'description': {'type': 'string'},
5904 'params': {'patternProperties': {'.*': {'additionalProperties': True,
5907 'required': ['description', 'params'],
5909 'Actions': {'additionalProperties': False,
5910 'properties': {'actions': {'items': {'$ref': '#/definitions/Action'},
5913 'ActionsByName': {'additionalProperties': False,
5914 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'},
5916 'error': {'$ref': '#/definitions/Error'},
5917 'name': {'type': 'string'}},
5919 'ActionsByNames': {'additionalProperties': False,
5920 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByName'},
5923 'ActionsByReceiver': {'additionalProperties': False,
5924 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'},
5926 'error': {'$ref': '#/definitions/Error'},
5927 'receiver': {'type': 'string'}},
5929 'ActionsByReceivers': {'additionalProperties': False,
5930 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByReceiver'},
5933 'ApplicationCharmActionsResult': {'additionalProperties': False,
5934 'properties': {'actions': {'patternProperties': {'.*': {'$ref': '#/definitions/ActionSpec'}},
5936 'application-tag': {'type': 'string'},
5937 'error': {'$ref': '#/definitions/Error'}},
5939 'ApplicationsCharmActionsResults': {'additionalProperties': False,
5940 'properties': {'results': {'items': {'$ref': '#/definitions/ApplicationCharmActionsResult'},
5943 'Entities': {'additionalProperties': False,
5944 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
5946 'required': ['entities'],
5948 'Entity': {'additionalProperties': False,
5949 'properties': {'tag': {'type': 'string'}},
5950 'required': ['tag'],
5952 'Error': {'additionalProperties': False,
5953 'properties': {'code': {'type': 'string'},
5954 'info': {'$ref': '#/definitions/ErrorInfo'},
5955 'message': {'type': 'string'}},
5956 'required': ['message', 'code'],
5958 'ErrorInfo': {'additionalProperties': False,
5959 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
5960 'macaroon-path': {'type': 'string'}},
5962 'FindActionsByNames': {'additionalProperties': False,
5963 'properties': {'names': {'items': {'type': 'string'},
5966 'FindTags': {'additionalProperties': False,
5967 'properties': {'prefixes': {'items': {'type': 'string'},
5969 'required': ['prefixes'],
5971 'FindTagsResults': {'additionalProperties': False,
5972 'properties': {'matches': {'patternProperties': {'.*': {'items': {'$ref': '#/definitions/Entity'},
5975 'required': ['matches'],
5977 'Macaroon': {'additionalProperties': False, 'type': 'object'},
5978 'RunParams': {'additionalProperties': False,
5979 'properties': {'applications': {'items': {'type': 'string'},
5981 'commands': {'type': 'string'},
5982 'machines': {'items': {'type': 'string'},
5984 'timeout': {'type': 'integer'},
5985 'units': {'items': {'type': 'string'},
5987 'required': ['commands', 'timeout'],
5989 'properties': {'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5990 'Result': {'$ref': '#/definitions/ActionResults'}},
5992 'ApplicationsCharmsActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5993 'Result': {'$ref': '#/definitions/ApplicationsCharmActionsResults'}},
5995 'Cancel': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5996 'Result': {'$ref': '#/definitions/ActionResults'}},
5998 'Enqueue': {'properties': {'Params': {'$ref': '#/definitions/Actions'},
5999 'Result': {'$ref': '#/definitions/ActionResults'}},
6001 'FindActionTagsByPrefix': {'properties': {'Params': {'$ref': '#/definitions/FindTags'},
6002 'Result': {'$ref': '#/definitions/FindTagsResults'}},
6004 'FindActionsByNames': {'properties': {'Params': {'$ref': '#/definitions/FindActionsByNames'},
6005 'Result': {'$ref': '#/definitions/ActionsByNames'}},
6007 'ListAll': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6008 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
6010 'ListCompleted': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6011 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
6013 'ListPending': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6014 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
6016 'ListRunning': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6017 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
6019 'Run': {'properties': {'Params': {'$ref': '#/definitions/RunParams'},
6020 'Result': {'$ref': '#/definitions/ActionResults'}},
6022 'RunOnAllMachines': {'properties': {'Params': {'$ref': '#/definitions/RunParams'},
6023 'Result': {'$ref': '#/definitions/ActionResults'}},
6028 @ReturnMapping(ActionResults
)
6029 async def Actions(self
, entities
):
6031 entities : typing.Sequence[~Entity]
6032 Returns -> typing.Sequence[~ActionResult]
6034 # map input types to rpc msg
6036 msg
= dict(Type
='Action', Request
='Actions', Version
=2, Params
=params
)
6037 params
['entities'] = entities
6038 reply
= await self
.rpc(msg
)
6043 @ReturnMapping(ApplicationsCharmActionsResults
)
6044 async def ApplicationsCharmsActions(self
, entities
):
6046 entities : typing.Sequence[~Entity]
6047 Returns -> typing.Sequence[~ApplicationCharmActionsResult]
6049 # map input types to rpc msg
6051 msg
= dict(Type
='Action', Request
='ApplicationsCharmsActions', Version
=2, Params
=params
)
6052 params
['entities'] = entities
6053 reply
= await self
.rpc(msg
)
6058 @ReturnMapping(ActionResults
)
6059 async def Cancel(self
, entities
):
6061 entities : typing.Sequence[~Entity]
6062 Returns -> typing.Sequence[~ActionResult]
6064 # map input types to rpc msg
6066 msg
= dict(Type
='Action', Request
='Cancel', Version
=2, Params
=params
)
6067 params
['entities'] = entities
6068 reply
= await self
.rpc(msg
)
6073 @ReturnMapping(ActionResults
)
6074 async def Enqueue(self
, actions
):
6076 actions : typing.Sequence[~Action]
6077 Returns -> typing.Sequence[~ActionResult]
6079 # map input types to rpc msg
6081 msg
= dict(Type
='Action', Request
='Enqueue', Version
=2, Params
=params
)
6082 params
['actions'] = actions
6083 reply
= await self
.rpc(msg
)
6088 @ReturnMapping(FindTagsResults
)
6089 async def FindActionTagsByPrefix(self
, prefixes
):
6091 prefixes : typing.Sequence[str]
6092 Returns -> typing.Sequence[~Entity]
6094 # map input types to rpc msg
6096 msg
= dict(Type
='Action', Request
='FindActionTagsByPrefix', Version
=2, Params
=params
)
6097 params
['prefixes'] = prefixes
6098 reply
= await self
.rpc(msg
)
6103 @ReturnMapping(ActionsByNames
)
6104 async def FindActionsByNames(self
, names
):
6106 names : typing.Sequence[str]
6107 Returns -> typing.Sequence[~ActionsByName]
6109 # map input types to rpc msg
6111 msg
= dict(Type
='Action', Request
='FindActionsByNames', Version
=2, Params
=params
)
6112 params
['names'] = names
6113 reply
= await self
.rpc(msg
)
6118 @ReturnMapping(ActionsByReceivers
)
6119 async def ListAll(self
, entities
):
6121 entities : typing.Sequence[~Entity]
6122 Returns -> typing.Sequence[~ActionsByReceiver]
6124 # map input types to rpc msg
6126 msg
= dict(Type
='Action', Request
='ListAll', Version
=2, Params
=params
)
6127 params
['entities'] = entities
6128 reply
= await self
.rpc(msg
)
6133 @ReturnMapping(ActionsByReceivers
)
6134 async def ListCompleted(self
, entities
):
6136 entities : typing.Sequence[~Entity]
6137 Returns -> typing.Sequence[~ActionsByReceiver]
6139 # map input types to rpc msg
6141 msg
= dict(Type
='Action', Request
='ListCompleted', Version
=2, Params
=params
)
6142 params
['entities'] = entities
6143 reply
= await self
.rpc(msg
)
6148 @ReturnMapping(ActionsByReceivers
)
6149 async def ListPending(self
, entities
):
6151 entities : typing.Sequence[~Entity]
6152 Returns -> typing.Sequence[~ActionsByReceiver]
6154 # map input types to rpc msg
6156 msg
= dict(Type
='Action', Request
='ListPending', Version
=2, Params
=params
)
6157 params
['entities'] = entities
6158 reply
= await self
.rpc(msg
)
6163 @ReturnMapping(ActionsByReceivers
)
6164 async def ListRunning(self
, entities
):
6166 entities : typing.Sequence[~Entity]
6167 Returns -> typing.Sequence[~ActionsByReceiver]
6169 # map input types to rpc msg
6171 msg
= dict(Type
='Action', Request
='ListRunning', Version
=2, Params
=params
)
6172 params
['entities'] = entities
6173 reply
= await self
.rpc(msg
)
6178 @ReturnMapping(ActionResults
)
6179 async def Run(self
, applications
, commands
, machines
, timeout
, units
):
6181 applications : typing.Sequence[str]
6183 machines : typing.Sequence[str]
6185 units : typing.Sequence[str]
6186 Returns -> typing.Sequence[~ActionResult]
6188 # map input types to rpc msg
6190 msg
= dict(Type
='Action', Request
='Run', Version
=2, Params
=params
)
6191 params
['applications'] = applications
6192 params
['commands'] = commands
6193 params
['machines'] = machines
6194 params
['timeout'] = timeout
6195 params
['units'] = units
6196 reply
= await self
.rpc(msg
)
6201 @ReturnMapping(ActionResults
)
6202 async def RunOnAllMachines(self
, applications
, commands
, machines
, timeout
, units
):
6204 applications : typing.Sequence[str]
6206 machines : typing.Sequence[str]
6208 units : typing.Sequence[str]
6209 Returns -> typing.Sequence[~ActionResult]
6211 # map input types to rpc msg
6213 msg
= dict(Type
='Action', Request
='RunOnAllMachines', Version
=2, Params
=params
)
6214 params
['applications'] = applications
6215 params
['commands'] = commands
6216 params
['machines'] = machines
6217 params
['timeout'] = timeout
6218 params
['units'] = units
6219 reply
= await self
.rpc(msg
)
6223 class AgentFacade(Type
):
6226 schema
= {'definitions': {'AgentGetEntitiesResult': {'additionalProperties': False,
6227 'properties': {'container-type': {'type': 'string'},
6228 'error': {'$ref': '#/definitions/Error'},
6229 'jobs': {'items': {'type': 'string'},
6231 'life': {'type': 'string'}},
6232 'required': ['life',
6236 'AgentGetEntitiesResults': {'additionalProperties': False,
6237 'properties': {'entities': {'items': {'$ref': '#/definitions/AgentGetEntitiesResult'},
6239 'required': ['entities'],
6241 'ControllerConfigResult': {'additionalProperties': False,
6242 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
6245 'required': ['config'],
6247 'Entities': {'additionalProperties': False,
6248 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
6250 'required': ['entities'],
6252 'Entity': {'additionalProperties': False,
6253 'properties': {'tag': {'type': 'string'}},
6254 'required': ['tag'],
6256 'EntityPassword': {'additionalProperties': False,
6257 'properties': {'password': {'type': 'string'},
6258 'tag': {'type': 'string'}},
6259 'required': ['tag', 'password'],
6261 'EntityPasswords': {'additionalProperties': False,
6262 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'},
6264 'required': ['changes'],
6266 'Error': {'additionalProperties': False,
6267 'properties': {'code': {'type': 'string'},
6268 'info': {'$ref': '#/definitions/ErrorInfo'},
6269 'message': {'type': 'string'}},
6270 'required': ['message', 'code'],
6272 'ErrorInfo': {'additionalProperties': False,
6273 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
6274 'macaroon-path': {'type': 'string'}},
6276 'ErrorResult': {'additionalProperties': False,
6277 'properties': {'error': {'$ref': '#/definitions/Error'}},
6279 'ErrorResults': {'additionalProperties': False,
6280 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
6282 'required': ['results'],
6284 'IsMasterResult': {'additionalProperties': False,
6285 'properties': {'master': {'type': 'boolean'}},
6286 'required': ['master'],
6288 'Macaroon': {'additionalProperties': False, 'type': 'object'},
6289 'ModelConfigResult': {'additionalProperties': False,
6290 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
6293 'required': ['config'],
6295 'NotifyWatchResult': {'additionalProperties': False,
6296 'properties': {'NotifyWatcherId': {'type': 'string'},
6297 'error': {'$ref': '#/definitions/Error'}},
6298 'required': ['NotifyWatcherId'],
6300 'StateServingInfo': {'additionalProperties': False,
6301 'properties': {'api-port': {'type': 'integer'},
6302 'ca-private-key': {'type': 'string'},
6303 'cert': {'type': 'string'},
6304 'private-key': {'type': 'string'},
6305 'shared-secret': {'type': 'string'},
6306 'state-port': {'type': 'integer'},
6307 'system-identity': {'type': 'string'}},
6308 'required': ['api-port',
6316 'properties': {'ClearReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6317 'Result': {'$ref': '#/definitions/ErrorResults'}},
6319 'ControllerConfig': {'properties': {'Result': {'$ref': '#/definitions/ControllerConfigResult'}},
6321 'GetEntities': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6322 'Result': {'$ref': '#/definitions/AgentGetEntitiesResults'}},
6324 'IsMaster': {'properties': {'Result': {'$ref': '#/definitions/IsMasterResult'}},
6326 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
6328 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
6329 'Result': {'$ref': '#/definitions/ErrorResults'}},
6331 'StateServingInfo': {'properties': {'Result': {'$ref': '#/definitions/StateServingInfo'}},
6333 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
6338 @ReturnMapping(ErrorResults
)
6339 async def ClearReboot(self
, entities
):
6341 entities : typing.Sequence[~Entity]
6342 Returns -> typing.Sequence[~ErrorResult]
6344 # map input types to rpc msg
6346 msg
= dict(Type
='Agent', Request
='ClearReboot', Version
=2, Params
=params
)
6347 params
['entities'] = entities
6348 reply
= await self
.rpc(msg
)
6353 @ReturnMapping(ControllerConfigResult
)
6354 async def ControllerConfig(self
):
6357 Returns -> typing.Mapping[str, typing.Any]
6359 # map input types to rpc msg
6361 msg
= dict(Type
='Agent', Request
='ControllerConfig', Version
=2, Params
=params
)
6363 reply
= await self
.rpc(msg
)
6368 @ReturnMapping(AgentGetEntitiesResults
)
6369 async def GetEntities(self
, entities
):
6371 entities : typing.Sequence[~Entity]
6372 Returns -> typing.Sequence[~AgentGetEntitiesResult]
6374 # map input types to rpc msg
6376 msg
= dict(Type
='Agent', Request
='GetEntities', Version
=2, Params
=params
)
6377 params
['entities'] = entities
6378 reply
= await self
.rpc(msg
)
6383 @ReturnMapping(IsMasterResult
)
6384 async def IsMaster(self
):
6389 # map input types to rpc msg
6391 msg
= dict(Type
='Agent', Request
='IsMaster', Version
=2, Params
=params
)
6393 reply
= await self
.rpc(msg
)
6398 @ReturnMapping(ModelConfigResult
)
6399 async def ModelConfig(self
):
6402 Returns -> typing.Mapping[str, typing.Any]
6404 # map input types to rpc msg
6406 msg
= dict(Type
='Agent', Request
='ModelConfig', Version
=2, Params
=params
)
6408 reply
= await self
.rpc(msg
)
6413 @ReturnMapping(ErrorResults
)
6414 async def SetPasswords(self
, changes
):
6416 changes : typing.Sequence[~EntityPassword]
6417 Returns -> typing.Sequence[~ErrorResult]
6419 # map input types to rpc msg
6421 msg
= dict(Type
='Agent', Request
='SetPasswords', Version
=2, Params
=params
)
6422 params
['changes'] = changes
6423 reply
= await self
.rpc(msg
)
6428 @ReturnMapping(StateServingInfo
)
6429 async def StateServingInfo(self
):
6432 Returns -> typing.Union[int, str]
6434 # map input types to rpc msg
6436 msg
= dict(Type
='Agent', Request
='StateServingInfo', Version
=2, Params
=params
)
6438 reply
= await self
.rpc(msg
)
6443 @ReturnMapping(NotifyWatchResult
)
6444 async def WatchForModelConfigChanges(self
):
6447 Returns -> typing.Union[str, _ForwardRef('Error')]
6449 # map input types to rpc msg
6451 msg
= dict(Type
='Agent', Request
='WatchForModelConfigChanges', Version
=2, Params
=params
)
6453 reply
= await self
.rpc(msg
)
6457 class AgentToolsFacade(Type
):
6460 schema
= {'properties': {'UpdateToolsAvailable': {'type': 'object'}}, 'type': 'object'}
6463 @ReturnMapping(None)
6464 async def UpdateToolsAvailable(self
):
6469 # map input types to rpc msg
6471 msg
= dict(Type
='AgentTools', Request
='UpdateToolsAvailable', Version
=1, Params
=params
)
6473 reply
= await self
.rpc(msg
)
6477 class AllModelWatcherFacade(Type
):
6478 name
= 'AllModelWatcher'
6480 schema
= {'definitions': {'AllWatcherNextResults': {'additionalProperties': False,
6481 'properties': {'deltas': {'items': {'$ref': '#/definitions/Delta'},
6483 'required': ['deltas'],
6485 'Delta': {'additionalProperties': False,
6486 'properties': {'entity': {'additionalProperties': True,
6488 'removed': {'type': 'boolean'}},
6489 'required': ['removed', 'entity'],
6491 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherNextResults'}},
6493 'Stop': {'type': 'object'}},
6497 @ReturnMapping(AllWatcherNextResults
)
6498 async def Next(self
):
6501 Returns -> typing.Sequence[~Delta]
6503 # map input types to rpc msg
6505 msg
= dict(Type
='AllModelWatcher', Request
='Next', Version
=2, Params
=params
)
6507 reply
= await self
.rpc(msg
)
6512 @ReturnMapping(None)
6513 async def Stop(self
):
6518 # map input types to rpc msg
6520 msg
= dict(Type
='AllModelWatcher', Request
='Stop', Version
=2, Params
=params
)
6522 reply
= await self
.rpc(msg
)
6526 class AllWatcherFacade(Type
):
6529 schema
= {'definitions': {'AllWatcherNextResults': {'additionalProperties': False,
6530 'properties': {'deltas': {'items': {'$ref': '#/definitions/Delta'},
6532 'required': ['deltas'],
6534 'Delta': {'additionalProperties': False,
6535 'properties': {'entity': {'additionalProperties': True,
6537 'removed': {'type': 'boolean'}},
6538 'required': ['removed', 'entity'],
6540 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherNextResults'}},
6542 'Stop': {'type': 'object'}},
6546 @ReturnMapping(AllWatcherNextResults
)
6547 async def Next(self
):
6550 Returns -> typing.Sequence[~Delta]
6552 # map input types to rpc msg
6554 msg
= dict(Type
='AllWatcher', Request
='Next', Version
=1, Params
=params
)
6556 reply
= await self
.rpc(msg
)
6561 @ReturnMapping(None)
6562 async def Stop(self
):
6567 # map input types to rpc msg
6569 msg
= dict(Type
='AllWatcher', Request
='Stop', Version
=1, Params
=params
)
6571 reply
= await self
.rpc(msg
)
6575 class AnnotationsFacade(Type
):
6576 name
= 'Annotations'
6578 schema
= {'definitions': {'AnnotationsGetResult': {'additionalProperties': False,
6579 'properties': {'annotations': {'patternProperties': {'.*': {'type': 'string'}},
6581 'entity': {'type': 'string'},
6582 'error': {'$ref': '#/definitions/ErrorResult'}},
6583 'required': ['entity', 'annotations'],
6585 'AnnotationsGetResults': {'additionalProperties': False,
6586 'properties': {'results': {'items': {'$ref': '#/definitions/AnnotationsGetResult'},
6588 'required': ['results'],
6590 'AnnotationsSet': {'additionalProperties': False,
6591 'properties': {'annotations': {'items': {'$ref': '#/definitions/EntityAnnotations'},
6593 'required': ['annotations'],
6595 'Entities': {'additionalProperties': False,
6596 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
6598 'required': ['entities'],
6600 'Entity': {'additionalProperties': False,
6601 'properties': {'tag': {'type': 'string'}},
6602 'required': ['tag'],
6604 'EntityAnnotations': {'additionalProperties': False,
6605 'properties': {'annotations': {'patternProperties': {'.*': {'type': 'string'}},
6607 'entity': {'type': 'string'}},
6608 'required': ['entity', 'annotations'],
6610 'Error': {'additionalProperties': False,
6611 'properties': {'code': {'type': 'string'},
6612 'info': {'$ref': '#/definitions/ErrorInfo'},
6613 'message': {'type': 'string'}},
6614 'required': ['message', 'code'],
6616 'ErrorInfo': {'additionalProperties': False,
6617 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
6618 'macaroon-path': {'type': 'string'}},
6620 'ErrorResult': {'additionalProperties': False,
6621 'properties': {'error': {'$ref': '#/definitions/Error'}},
6623 'ErrorResults': {'additionalProperties': False,
6624 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
6626 'required': ['results'],
6628 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
6629 'properties': {'Get': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6630 'Result': {'$ref': '#/definitions/AnnotationsGetResults'}},
6632 'Set': {'properties': {'Params': {'$ref': '#/definitions/AnnotationsSet'},
6633 'Result': {'$ref': '#/definitions/ErrorResults'}},
6638 @ReturnMapping(AnnotationsGetResults
)
6639 async def Get(self
, entities
):
6641 entities : typing.Sequence[~Entity]
6642 Returns -> typing.Sequence[~AnnotationsGetResult]
6644 # map input types to rpc msg
6646 msg
= dict(Type
='Annotations', Request
='Get', Version
=2, Params
=params
)
6647 params
['entities'] = entities
6648 reply
= await self
.rpc(msg
)
6653 @ReturnMapping(ErrorResults
)
6654 async def Set(self
, annotations
):
6656 annotations : typing.Sequence[~EntityAnnotations]
6657 Returns -> typing.Sequence[~ErrorResult]
6659 # map input types to rpc msg
6661 msg
= dict(Type
='Annotations', Request
='Set', Version
=2, Params
=params
)
6662 params
['annotations'] = annotations
6663 reply
= await self
.rpc(msg
)
6667 class ApplicationFacade(Type
):
6668 name
= 'Application'
6670 schema
= {'definitions': {'AddApplicationUnits': {'additionalProperties': False,
6671 'properties': {'application': {'type': 'string'},
6672 'num-units': {'type': 'integer'},
6673 'placement': {'items': {'$ref': '#/definitions/Placement'},
6675 'required': ['application',
6679 'AddApplicationUnitsResults': {'additionalProperties': False,
6680 'properties': {'units': {'items': {'type': 'string'},
6682 'required': ['units'],
6684 'AddRelation': {'additionalProperties': False,
6685 'properties': {'endpoints': {'items': {'type': 'string'},
6687 'required': ['endpoints'],
6689 'AddRelationResults': {'additionalProperties': False,
6690 'properties': {'endpoints': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}},
6692 'required': ['endpoints'],
6694 'ApplicationCharmRelations': {'additionalProperties': False,
6695 'properties': {'application': {'type': 'string'}},
6696 'required': ['application'],
6698 'ApplicationCharmRelationsResults': {'additionalProperties': False,
6699 'properties': {'charm-relations': {'items': {'type': 'string'},
6701 'required': ['charm-relations'],
6703 'ApplicationDeploy': {'additionalProperties': False,
6704 'properties': {'application': {'type': 'string'},
6705 'channel': {'type': 'string'},
6706 'charm-url': {'type': 'string'},
6707 'config': {'patternProperties': {'.*': {'type': 'string'}},
6709 'config-yaml': {'type': 'string'},
6710 'constraints': {'$ref': '#/definitions/Value'},
6711 'endpoint-bindings': {'patternProperties': {'.*': {'type': 'string'}},
6713 'num-units': {'type': 'integer'},
6714 'placement': {'items': {'$ref': '#/definitions/Placement'},
6716 'resources': {'patternProperties': {'.*': {'type': 'string'}},
6718 'series': {'type': 'string'},
6719 'storage': {'patternProperties': {'.*': {'$ref': '#/definitions/Constraints'}},
6721 'required': ['application',
6729 'ApplicationDestroy': {'additionalProperties': False,
6730 'properties': {'application': {'type': 'string'}},
6731 'required': ['application'],
6733 'ApplicationExpose': {'additionalProperties': False,
6734 'properties': {'application': {'type': 'string'}},
6735 'required': ['application'],
6737 'ApplicationGet': {'additionalProperties': False,
6738 'properties': {'application': {'type': 'string'}},
6739 'required': ['application'],
6741 'ApplicationGetResults': {'additionalProperties': False,
6742 'properties': {'application': {'type': 'string'},
6743 'charm': {'type': 'string'},
6744 'config': {'patternProperties': {'.*': {'additionalProperties': True,
6747 'constraints': {'$ref': '#/definitions/Value'}},
6748 'required': ['application',
6753 'ApplicationMetricCredential': {'additionalProperties': False,
6754 'properties': {'application': {'type': 'string'},
6755 'metrics-credentials': {'items': {'type': 'integer'},
6757 'required': ['application',
6758 'metrics-credentials'],
6760 'ApplicationMetricCredentials': {'additionalProperties': False,
6761 'properties': {'creds': {'items': {'$ref': '#/definitions/ApplicationMetricCredential'},
6763 'required': ['creds'],
6765 'ApplicationSet': {'additionalProperties': False,
6766 'properties': {'application': {'type': 'string'},
6767 'options': {'patternProperties': {'.*': {'type': 'string'}},
6769 'required': ['application', 'options'],
6771 'ApplicationSetCharm': {'additionalProperties': False,
6772 'properties': {'application': {'type': 'string'},
6773 'channel': {'type': 'string'},
6774 'charm-url': {'type': 'string'},
6775 'force-series': {'type': 'boolean'},
6776 'force-units': {'type': 'boolean'},
6777 'resource-ids': {'patternProperties': {'.*': {'type': 'string'}},
6779 'required': ['application',
6785 'ApplicationUnexpose': {'additionalProperties': False,
6786 'properties': {'application': {'type': 'string'}},
6787 'required': ['application'],
6789 'ApplicationUnset': {'additionalProperties': False,
6790 'properties': {'application': {'type': 'string'},
6791 'options': {'items': {'type': 'string'},
6793 'required': ['application', 'options'],
6795 'ApplicationUpdate': {'additionalProperties': False,
6796 'properties': {'application': {'type': 'string'},
6797 'charm-url': {'type': 'string'},
6798 'constraints': {'$ref': '#/definitions/Value'},
6799 'force-charm-url': {'type': 'boolean'},
6800 'force-series': {'type': 'boolean'},
6801 'min-units': {'type': 'integer'},
6802 'settings': {'patternProperties': {'.*': {'type': 'string'}},
6804 'settings-yaml': {'type': 'string'}},
6805 'required': ['application',
6811 'ApplicationsDeploy': {'additionalProperties': False,
6812 'properties': {'applications': {'items': {'$ref': '#/definitions/ApplicationDeploy'},
6814 'required': ['applications'],
6816 'CharmRelation': {'additionalProperties': False,
6817 'properties': {'interface': {'type': 'string'},
6818 'limit': {'type': 'integer'},
6819 'name': {'type': 'string'},
6820 'optional': {'type': 'boolean'},
6821 'role': {'type': 'string'},
6822 'scope': {'type': 'string'}},
6823 'required': ['name',
6830 'Constraints': {'additionalProperties': False,
6831 'properties': {'Count': {'type': 'integer'},
6832 'Pool': {'type': 'string'},
6833 'Size': {'type': 'integer'}},
6834 'required': ['Pool', 'Size', 'Count'],
6836 'DestroyApplicationUnits': {'additionalProperties': False,
6837 'properties': {'unit-names': {'items': {'type': 'string'},
6839 'required': ['unit-names'],
6841 'DestroyRelation': {'additionalProperties': False,
6842 'properties': {'endpoints': {'items': {'type': 'string'},
6844 'required': ['endpoints'],
6846 'Error': {'additionalProperties': False,
6847 'properties': {'code': {'type': 'string'},
6848 'info': {'$ref': '#/definitions/ErrorInfo'},
6849 'message': {'type': 'string'}},
6850 'required': ['message', 'code'],
6852 'ErrorInfo': {'additionalProperties': False,
6853 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
6854 'macaroon-path': {'type': 'string'}},
6856 'ErrorResult': {'additionalProperties': False,
6857 'properties': {'error': {'$ref': '#/definitions/Error'}},
6859 'ErrorResults': {'additionalProperties': False,
6860 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
6862 'required': ['results'],
6864 'GetApplicationConstraints': {'additionalProperties': False,
6865 'properties': {'application': {'type': 'string'}},
6866 'required': ['application'],
6868 'GetConstraintsResults': {'additionalProperties': False,
6869 'properties': {'constraints': {'$ref': '#/definitions/Value'}},
6870 'required': ['constraints'],
6872 'Macaroon': {'additionalProperties': False, 'type': 'object'},
6873 'Placement': {'additionalProperties': False,
6874 'properties': {'directive': {'type': 'string'},
6875 'scope': {'type': 'string'}},
6876 'required': ['scope', 'directive'],
6878 'SetConstraints': {'additionalProperties': False,
6879 'properties': {'application': {'type': 'string'},
6880 'constraints': {'$ref': '#/definitions/Value'}},
6881 'required': ['application', 'constraints'],
6883 'StringResult': {'additionalProperties': False,
6884 'properties': {'error': {'$ref': '#/definitions/Error'},
6885 'result': {'type': 'string'}},
6886 'required': ['result'],
6888 'Value': {'additionalProperties': False,
6889 'properties': {'arch': {'type': 'string'},
6890 'container': {'type': 'string'},
6891 'cpu-cores': {'type': 'integer'},
6892 'cpu-power': {'type': 'integer'},
6893 'instance-type': {'type': 'string'},
6894 'mem': {'type': 'integer'},
6895 'root-disk': {'type': 'integer'},
6896 'spaces': {'items': {'type': 'string'},
6898 'tags': {'items': {'type': 'string'},
6900 'virt-type': {'type': 'string'}},
6902 'properties': {'AddRelation': {'properties': {'Params': {'$ref': '#/definitions/AddRelation'},
6903 'Result': {'$ref': '#/definitions/AddRelationResults'}},
6905 'AddUnits': {'properties': {'Params': {'$ref': '#/definitions/AddApplicationUnits'},
6906 'Result': {'$ref': '#/definitions/AddApplicationUnitsResults'}},
6908 'CharmRelations': {'properties': {'Params': {'$ref': '#/definitions/ApplicationCharmRelations'},
6909 'Result': {'$ref': '#/definitions/ApplicationCharmRelationsResults'}},
6911 'Deploy': {'properties': {'Params': {'$ref': '#/definitions/ApplicationsDeploy'},
6912 'Result': {'$ref': '#/definitions/ErrorResults'}},
6914 'Destroy': {'properties': {'Params': {'$ref': '#/definitions/ApplicationDestroy'}},
6916 'DestroyRelation': {'properties': {'Params': {'$ref': '#/definitions/DestroyRelation'}},
6918 'DestroyUnits': {'properties': {'Params': {'$ref': '#/definitions/DestroyApplicationUnits'}},
6920 'Expose': {'properties': {'Params': {'$ref': '#/definitions/ApplicationExpose'}},
6922 'Get': {'properties': {'Params': {'$ref': '#/definitions/ApplicationGet'},
6923 'Result': {'$ref': '#/definitions/ApplicationGetResults'}},
6925 'GetCharmURL': {'properties': {'Params': {'$ref': '#/definitions/ApplicationGet'},
6926 'Result': {'$ref': '#/definitions/StringResult'}},
6928 'GetConstraints': {'properties': {'Params': {'$ref': '#/definitions/GetApplicationConstraints'},
6929 'Result': {'$ref': '#/definitions/GetConstraintsResults'}},
6931 'Set': {'properties': {'Params': {'$ref': '#/definitions/ApplicationSet'}},
6933 'SetCharm': {'properties': {'Params': {'$ref': '#/definitions/ApplicationSetCharm'}},
6935 'SetConstraints': {'properties': {'Params': {'$ref': '#/definitions/SetConstraints'}},
6937 'SetMetricCredentials': {'properties': {'Params': {'$ref': '#/definitions/ApplicationMetricCredentials'},
6938 'Result': {'$ref': '#/definitions/ErrorResults'}},
6940 'Unexpose': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUnexpose'}},
6942 'Unset': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUnset'}},
6944 'Update': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUpdate'}},
6949 @ReturnMapping(AddRelationResults
)
6950 async def AddRelation(self
, endpoints
):
6952 endpoints : typing.Sequence[str]
6953 Returns -> typing.Mapping[str, ~CharmRelation]
6955 # map input types to rpc msg
6957 msg
= dict(Type
='Application', Request
='AddRelation', Version
=1, Params
=params
)
6958 params
['endpoints'] = endpoints
6959 reply
= await self
.rpc(msg
)
6964 @ReturnMapping(AddApplicationUnitsResults
)
6965 async def AddUnits(self
, application
, num_units
, placement
):
6969 placement : typing.Sequence[~Placement]
6970 Returns -> typing.Sequence[str]
6972 # map input types to rpc msg
6974 msg
= dict(Type
='Application', Request
='AddUnits', Version
=1, Params
=params
)
6975 params
['application'] = application
6976 params
['num-units'] = num_units
6977 params
['placement'] = placement
6978 reply
= await self
.rpc(msg
)
6983 @ReturnMapping(ApplicationCharmRelationsResults
)
6984 async def CharmRelations(self
, application
):
6987 Returns -> typing.Sequence[str]
6989 # map input types to rpc msg
6991 msg
= dict(Type
='Application', Request
='CharmRelations', Version
=1, Params
=params
)
6992 params
['application'] = application
6993 reply
= await self
.rpc(msg
)
6998 @ReturnMapping(ErrorResults
)
6999 async def Deploy(self
, applications
):
7001 applications : typing.Sequence[~ApplicationDeploy]
7002 Returns -> typing.Sequence[~ErrorResult]
7004 # map input types to rpc msg
7006 msg
= dict(Type
='Application', Request
='Deploy', Version
=1, Params
=params
)
7007 params
['applications'] = applications
7008 reply
= await self
.rpc(msg
)
7013 @ReturnMapping(None)
7014 async def Destroy(self
, application
):
7019 # map input types to rpc msg
7021 msg
= dict(Type
='Application', Request
='Destroy', Version
=1, Params
=params
)
7022 params
['application'] = application
7023 reply
= await self
.rpc(msg
)
7028 @ReturnMapping(None)
7029 async def DestroyRelation(self
, endpoints
):
7031 endpoints : typing.Sequence[str]
7034 # map input types to rpc msg
7036 msg
= dict(Type
='Application', Request
='DestroyRelation', Version
=1, Params
=params
)
7037 params
['endpoints'] = endpoints
7038 reply
= await self
.rpc(msg
)
7043 @ReturnMapping(None)
7044 async def DestroyUnits(self
, unit_names
):
7046 unit_names : typing.Sequence[str]
7049 # map input types to rpc msg
7051 msg
= dict(Type
='Application', Request
='DestroyUnits', Version
=1, Params
=params
)
7052 params
['unit-names'] = unit_names
7053 reply
= await self
.rpc(msg
)
7058 @ReturnMapping(None)
7059 async def Expose(self
, application
):
7064 # map input types to rpc msg
7066 msg
= dict(Type
='Application', Request
='Expose', Version
=1, Params
=params
)
7067 params
['application'] = application
7068 reply
= await self
.rpc(msg
)
7073 @ReturnMapping(ApplicationGetResults
)
7074 async def Get(self
, application
):
7077 Returns -> typing.Union[str, typing.Mapping[str, typing.Any], _ForwardRef('Value')]
7079 # map input types to rpc msg
7081 msg
= dict(Type
='Application', Request
='Get', Version
=1, Params
=params
)
7082 params
['application'] = application
7083 reply
= await self
.rpc(msg
)
7088 @ReturnMapping(StringResult
)
7089 async def GetCharmURL(self
, application
):
7092 Returns -> typing.Union[_ForwardRef('Error'), str]
7094 # map input types to rpc msg
7096 msg
= dict(Type
='Application', Request
='GetCharmURL', Version
=1, Params
=params
)
7097 params
['application'] = application
7098 reply
= await self
.rpc(msg
)
7103 @ReturnMapping(GetConstraintsResults
)
7104 async def GetConstraints(self
, application
):
7109 # map input types to rpc msg
7111 msg
= dict(Type
='Application', Request
='GetConstraints', Version
=1, Params
=params
)
7112 params
['application'] = application
7113 reply
= await self
.rpc(msg
)
7118 @ReturnMapping(None)
7119 async def Set(self
, application
, options
):
7122 options : typing.Mapping[str, str]
7125 # map input types to rpc msg
7127 msg
= dict(Type
='Application', Request
='Set', Version
=1, Params
=params
)
7128 params
['application'] = application
7129 params
['options'] = options
7130 reply
= await self
.rpc(msg
)
7135 @ReturnMapping(None)
7136 async def SetCharm(self
, application
, channel
, charm_url
, force_series
, force_units
, resource_ids
):
7143 resource_ids : typing.Mapping[str, str]
7146 # map input types to rpc msg
7148 msg
= dict(Type
='Application', Request
='SetCharm', Version
=1, Params
=params
)
7149 params
['application'] = application
7150 params
['channel'] = channel
7151 params
['charm-url'] = charm_url
7152 params
['force-series'] = force_series
7153 params
['force-units'] = force_units
7154 params
['resource-ids'] = resource_ids
7155 reply
= await self
.rpc(msg
)
7160 @ReturnMapping(None)
7161 async def SetConstraints(self
, application
, constraints
):
7167 # map input types to rpc msg
7169 msg
= dict(Type
='Application', Request
='SetConstraints', Version
=1, Params
=params
)
7170 params
['application'] = application
7171 params
['constraints'] = constraints
7172 reply
= await self
.rpc(msg
)
7177 @ReturnMapping(ErrorResults
)
7178 async def SetMetricCredentials(self
, creds
):
7180 creds : typing.Sequence[~ApplicationMetricCredential]
7181 Returns -> typing.Sequence[~ErrorResult]
7183 # map input types to rpc msg
7185 msg
= dict(Type
='Application', Request
='SetMetricCredentials', Version
=1, Params
=params
)
7186 params
['creds'] = creds
7187 reply
= await self
.rpc(msg
)
7192 @ReturnMapping(None)
7193 async def Unexpose(self
, application
):
7198 # map input types to rpc msg
7200 msg
= dict(Type
='Application', Request
='Unexpose', Version
=1, Params
=params
)
7201 params
['application'] = application
7202 reply
= await self
.rpc(msg
)
7207 @ReturnMapping(None)
7208 async def Unset(self
, application
, options
):
7211 options : typing.Sequence[str]
7214 # map input types to rpc msg
7216 msg
= dict(Type
='Application', Request
='Unset', Version
=1, Params
=params
)
7217 params
['application'] = application
7218 params
['options'] = options
7219 reply
= await self
.rpc(msg
)
7224 @ReturnMapping(None)
7225 async def Update(self
, application
, charm_url
, constraints
, force_charm_url
, force_series
, min_units
, settings
, settings_yaml
):
7230 force_charm_url : bool
7233 settings : typing.Mapping[str, str]
7237 # map input types to rpc msg
7239 msg
= dict(Type
='Application', Request
='Update', Version
=1, Params
=params
)
7240 params
['application'] = application
7241 params
['charm-url'] = charm_url
7242 params
['constraints'] = constraints
7243 params
['force-charm-url'] = force_charm_url
7244 params
['force-series'] = force_series
7245 params
['min-units'] = min_units
7246 params
['settings'] = settings
7247 params
['settings-yaml'] = settings_yaml
7248 reply
= await self
.rpc(msg
)
7252 class ApplicationScalerFacade(Type
):
7253 name
= 'ApplicationScaler'
7255 schema
= {'definitions': {'Entities': {'additionalProperties': False,
7256 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
7258 'required': ['entities'],
7260 'Entity': {'additionalProperties': False,
7261 'properties': {'tag': {'type': 'string'}},
7262 'required': ['tag'],
7264 'Error': {'additionalProperties': False,
7265 'properties': {'code': {'type': 'string'},
7266 'info': {'$ref': '#/definitions/ErrorInfo'},
7267 'message': {'type': 'string'}},
7268 'required': ['message', 'code'],
7270 'ErrorInfo': {'additionalProperties': False,
7271 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
7272 'macaroon-path': {'type': 'string'}},
7274 'ErrorResult': {'additionalProperties': False,
7275 'properties': {'error': {'$ref': '#/definitions/Error'}},
7277 'ErrorResults': {'additionalProperties': False,
7278 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
7280 'required': ['results'],
7282 'Macaroon': {'additionalProperties': False, 'type': 'object'},
7283 'StringsWatchResult': {'additionalProperties': False,
7284 'properties': {'changes': {'items': {'type': 'string'},
7286 'error': {'$ref': '#/definitions/Error'},
7287 'watcher-id': {'type': 'string'}},
7288 'required': ['watcher-id'],
7290 'properties': {'Rescale': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
7291 'Result': {'$ref': '#/definitions/ErrorResults'}},
7293 'Watch': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
7298 @ReturnMapping(ErrorResults
)
7299 async def Rescale(self
, entities
):
7301 entities : typing.Sequence[~Entity]
7302 Returns -> typing.Sequence[~ErrorResult]
7304 # map input types to rpc msg
7306 msg
= dict(Type
='ApplicationScaler', Request
='Rescale', Version
=1, Params
=params
)
7307 params
['entities'] = entities
7308 reply
= await self
.rpc(msg
)
7313 @ReturnMapping(StringsWatchResult
)
7314 async def Watch(self
):
7317 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')]
7319 # map input types to rpc msg
7321 msg
= dict(Type
='ApplicationScaler', Request
='Watch', Version
=1, Params
=params
)
7323 reply
= await self
.rpc(msg
)
7327 class BackupsFacade(Type
):
7330 schema
= {'definitions': {'BackupsCreateArgs': {'additionalProperties': False,
7331 'properties': {'notes': {'type': 'string'}},
7332 'required': ['notes'],
7334 'BackupsInfoArgs': {'additionalProperties': False,
7335 'properties': {'id': {'type': 'string'}},
7338 'BackupsListArgs': {'additionalProperties': False,
7340 'BackupsListResult': {'additionalProperties': False,
7341 'properties': {'list': {'items': {'$ref': '#/definitions/BackupsMetadataResult'},
7343 'required': ['list'],
7345 'BackupsMetadataResult': {'additionalProperties': False,
7346 'properties': {'ca-cert': {'type': 'string'},
7347 'ca-private-key': {'type': 'string'},
7348 'checksum': {'type': 'string'},
7349 'checksum-format': {'type': 'string'},
7350 'finished': {'format': 'date-time',
7352 'hostname': {'type': 'string'},
7353 'id': {'type': 'string'},
7354 'machine': {'type': 'string'},
7355 'model': {'type': 'string'},
7356 'notes': {'type': 'string'},
7357 'series': {'type': 'string'},
7358 'size': {'type': 'integer'},
7359 'started': {'format': 'date-time',
7361 'stored': {'format': 'date-time',
7363 'version': {'$ref': '#/definitions/Number'}},
7380 'BackupsRemoveArgs': {'additionalProperties': False,
7381 'properties': {'id': {'type': 'string'}},
7384 'Number': {'additionalProperties': False,
7385 'properties': {'Build': {'type': 'integer'},
7386 'Major': {'type': 'integer'},
7387 'Minor': {'type': 'integer'},
7388 'Patch': {'type': 'integer'},
7389 'Tag': {'type': 'string'}},
7390 'required': ['Major',
7396 'RestoreArgs': {'additionalProperties': False,
7397 'properties': {'backup-id': {'type': 'string'}},
7398 'required': ['backup-id'],
7400 'properties': {'Create': {'properties': {'Params': {'$ref': '#/definitions/BackupsCreateArgs'},
7401 'Result': {'$ref': '#/definitions/BackupsMetadataResult'}},
7403 'FinishRestore': {'type': 'object'},
7404 'Info': {'properties': {'Params': {'$ref': '#/definitions/BackupsInfoArgs'},
7405 'Result': {'$ref': '#/definitions/BackupsMetadataResult'}},
7407 'List': {'properties': {'Params': {'$ref': '#/definitions/BackupsListArgs'},
7408 'Result': {'$ref': '#/definitions/BackupsListResult'}},
7410 'PrepareRestore': {'type': 'object'},
7411 'Remove': {'properties': {'Params': {'$ref': '#/definitions/BackupsRemoveArgs'}},
7413 'Restore': {'properties': {'Params': {'$ref': '#/definitions/RestoreArgs'}},
7418 @ReturnMapping(BackupsMetadataResult
)
7419 async def Create(self
, notes
):
7422 Returns -> typing.Union[str, int, _ForwardRef('Number')]
7424 # map input types to rpc msg
7426 msg
= dict(Type
='Backups', Request
='Create', Version
=1, Params
=params
)
7427 params
['notes'] = notes
7428 reply
= await self
.rpc(msg
)
7433 @ReturnMapping(None)
7434 async def FinishRestore(self
):
7439 # map input types to rpc msg
7441 msg
= dict(Type
='Backups', Request
='FinishRestore', Version
=1, Params
=params
)
7443 reply
= await self
.rpc(msg
)
7448 @ReturnMapping(BackupsMetadataResult
)
7449 async def Info(self
, id_
):
7452 Returns -> typing.Union[str, int, _ForwardRef('Number')]
7454 # map input types to rpc msg
7456 msg
= dict(Type
='Backups', Request
='Info', Version
=1, Params
=params
)
7458 reply
= await self
.rpc(msg
)
7463 @ReturnMapping(BackupsListResult
)
7464 async def List(self
):
7467 Returns -> typing.Sequence[~BackupsMetadataResult]
7469 # map input types to rpc msg
7471 msg
= dict(Type
='Backups', Request
='List', Version
=1, Params
=params
)
7473 reply
= await self
.rpc(msg
)
7478 @ReturnMapping(None)
7479 async def PrepareRestore(self
):
7484 # map input types to rpc msg
7486 msg
= dict(Type
='Backups', Request
='PrepareRestore', Version
=1, Params
=params
)
7488 reply
= await self
.rpc(msg
)
7493 @ReturnMapping(None)
7494 async def Remove(self
, id_
):
7499 # map input types to rpc msg
7501 msg
= dict(Type
='Backups', Request
='Remove', Version
=1, Params
=params
)
7503 reply
= await self
.rpc(msg
)
7508 @ReturnMapping(None)
7509 async def Restore(self
, backup_id
):
7514 # map input types to rpc msg
7516 msg
= dict(Type
='Backups', Request
='Restore', Version
=1, Params
=params
)
7517 params
['backup-id'] = backup_id
7518 reply
= await self
.rpc(msg
)
7522 class BlockFacade(Type
):
7525 schema
= {'definitions': {'Block': {'additionalProperties': False,
7526 'properties': {'id': {'type': 'string'},
7527 'message': {'type': 'string'},
7528 'tag': {'type': 'string'},
7529 'type': {'type': 'string'}},
7530 'required': ['id', 'tag', 'type'],
7532 'BlockResult': {'additionalProperties': False,
7533 'properties': {'error': {'$ref': '#/definitions/Error'},
7534 'result': {'$ref': '#/definitions/Block'}},
7535 'required': ['result'],
7537 'BlockResults': {'additionalProperties': False,
7538 'properties': {'results': {'items': {'$ref': '#/definitions/BlockResult'},
7541 'BlockSwitchParams': {'additionalProperties': False,
7542 'properties': {'message': {'type': 'string'},
7543 'type': {'type': 'string'}},
7544 'required': ['type'],
7546 'Error': {'additionalProperties': False,
7547 'properties': {'code': {'type': 'string'},
7548 'info': {'$ref': '#/definitions/ErrorInfo'},
7549 'message': {'type': 'string'}},
7550 'required': ['message', 'code'],
7552 'ErrorInfo': {'additionalProperties': False,
7553 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
7554 'macaroon-path': {'type': 'string'}},
7556 'ErrorResult': {'additionalProperties': False,
7557 'properties': {'error': {'$ref': '#/definitions/Error'}},
7559 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
7560 'properties': {'List': {'properties': {'Result': {'$ref': '#/definitions/BlockResults'}},
7562 'SwitchBlockOff': {'properties': {'Params': {'$ref': '#/definitions/BlockSwitchParams'},
7563 'Result': {'$ref': '#/definitions/ErrorResult'}},
7565 'SwitchBlockOn': {'properties': {'Params': {'$ref': '#/definitions/BlockSwitchParams'},
7566 'Result': {'$ref': '#/definitions/ErrorResult'}},
7571 @ReturnMapping(BlockResults
)
7572 async def List(self
):
7575 Returns -> typing.Sequence[~BlockResult]
7577 # map input types to rpc msg
7579 msg
= dict(Type
='Block', Request
='List', Version
=2, Params
=params
)
7581 reply
= await self
.rpc(msg
)
7586 @ReturnMapping(ErrorResult
)
7587 async def SwitchBlockOff(self
, message
, type_
):
7593 # map input types to rpc msg
7595 msg
= dict(Type
='Block', Request
='SwitchBlockOff', Version
=2, Params
=params
)
7596 params
['message'] = message
7597 params
['type'] = type_
7598 reply
= await self
.rpc(msg
)
7603 @ReturnMapping(ErrorResult
)
7604 async def SwitchBlockOn(self
, message
, type_
):
7610 # map input types to rpc msg
7612 msg
= dict(Type
='Block', Request
='SwitchBlockOn', Version
=2, Params
=params
)
7613 params
['message'] = message
7614 params
['type'] = type_
7615 reply
= await self
.rpc(msg
)
7619 class CharmRevisionUpdaterFacade(Type
):
7620 name
= 'CharmRevisionUpdater'
7622 schema
= {'definitions': {'Error': {'additionalProperties': False,
7623 'properties': {'code': {'type': 'string'},
7624 'info': {'$ref': '#/definitions/ErrorInfo'},
7625 'message': {'type': 'string'}},
7626 'required': ['message', 'code'],
7628 'ErrorInfo': {'additionalProperties': False,
7629 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
7630 'macaroon-path': {'type': 'string'}},
7632 'ErrorResult': {'additionalProperties': False,
7633 'properties': {'error': {'$ref': '#/definitions/Error'}},
7635 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
7636 'properties': {'UpdateLatestRevisions': {'properties': {'Result': {'$ref': '#/definitions/ErrorResult'}},
7641 @ReturnMapping(ErrorResult
)
7642 async def UpdateLatestRevisions(self
):
7647 # map input types to rpc msg
7649 msg
= dict(Type
='CharmRevisionUpdater', Request
='UpdateLatestRevisions', Version
=2, Params
=params
)
7651 reply
= await self
.rpc(msg
)
7655 class CharmsFacade(Type
):
7658 schema
= {'definitions': {'CharmActionSpec': {'additionalProperties': False,
7659 'properties': {'description': {'type': 'string'},
7660 'params': {'patternProperties': {'.*': {'additionalProperties': True,
7663 'required': ['description', 'params'],
7665 'CharmActions': {'additionalProperties': False,
7666 'properties': {'specs': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmActionSpec'}},
7669 'CharmInfo': {'additionalProperties': False,
7670 'properties': {'actions': {'$ref': '#/definitions/CharmActions'},
7671 'config': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmOption'}},
7673 'meta': {'$ref': '#/definitions/CharmMeta'},
7674 'metrics': {'$ref': '#/definitions/CharmMetrics'},
7675 'revision': {'type': 'integer'},
7676 'url': {'type': 'string'}},
7677 'required': ['revision', 'url', 'config'],
7679 'CharmMeta': {'additionalProperties': False,
7680 'properties': {'categories': {'items': {'type': 'string'},
7682 'description': {'type': 'string'},
7683 'extra-bindings': {'patternProperties': {'.*': {'type': 'string'}},
7685 'min-juju-version': {'type': 'string'},
7686 'name': {'type': 'string'},
7687 'payload-classes': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmPayloadClass'}},
7689 'peers': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}},
7691 'provides': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}},
7693 'requires': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}},
7695 'resources': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmResourceMeta'}},
7697 'series': {'items': {'type': 'string'},
7699 'storage': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmStorage'}},
7701 'subordinate': {'type': 'boolean'},
7702 'summary': {'type': 'string'},
7703 'tags': {'items': {'type': 'string'},
7705 'terms': {'items': {'type': 'string'},
7707 'required': ['name',
7712 'CharmMetric': {'additionalProperties': False,
7713 'properties': {'description': {'type': 'string'},
7714 'type': {'type': 'string'}},
7715 'required': ['type', 'description'],
7717 'CharmMetrics': {'additionalProperties': False,
7718 'properties': {'metrics': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmMetric'}},
7720 'required': ['metrics'],
7722 'CharmOption': {'additionalProperties': False,
7723 'properties': {'default': {'additionalProperties': True,
7725 'description': {'type': 'string'},
7726 'type': {'type': 'string'}},
7727 'required': ['type'],
7729 'CharmPayloadClass': {'additionalProperties': False,
7730 'properties': {'name': {'type': 'string'},
7731 'type': {'type': 'string'}},
7732 'required': ['name', 'type'],
7734 'CharmRelation': {'additionalProperties': False,
7735 'properties': {'interface': {'type': 'string'},
7736 'limit': {'type': 'integer'},
7737 'name': {'type': 'string'},
7738 'optional': {'type': 'boolean'},
7739 'role': {'type': 'string'},
7740 'scope': {'type': 'string'}},
7741 'required': ['name',
7748 'CharmResourceMeta': {'additionalProperties': False,
7749 'properties': {'description': {'type': 'string'},
7750 'name': {'type': 'string'},
7751 'path': {'type': 'string'},
7752 'type': {'type': 'string'}},
7753 'required': ['name',
7758 'CharmStorage': {'additionalProperties': False,
7759 'properties': {'count-max': {'type': 'integer'},
7760 'count-min': {'type': 'integer'},
7761 'description': {'type': 'string'},
7762 'location': {'type': 'string'},
7763 'minimum-size': {'type': 'integer'},
7764 'name': {'type': 'string'},
7765 'properties': {'items': {'type': 'string'},
7767 'read-only': {'type': 'boolean'},
7768 'shared': {'type': 'boolean'},
7769 'type': {'type': 'string'}},
7770 'required': ['name',
7779 'CharmURL': {'additionalProperties': False,
7780 'properties': {'url': {'type': 'string'}},
7781 'required': ['url'],
7783 'CharmsList': {'additionalProperties': False,
7784 'properties': {'names': {'items': {'type': 'string'},
7786 'required': ['names'],
7788 'CharmsListResult': {'additionalProperties': False,
7789 'properties': {'charm-urls': {'items': {'type': 'string'},
7791 'required': ['charm-urls'],
7793 'IsMeteredResult': {'additionalProperties': False,
7794 'properties': {'metered': {'type': 'boolean'}},
7795 'required': ['metered'],
7797 'properties': {'CharmInfo': {'properties': {'Params': {'$ref': '#/definitions/CharmURL'},
7798 'Result': {'$ref': '#/definitions/CharmInfo'}},
7800 'IsMetered': {'properties': {'Params': {'$ref': '#/definitions/CharmURL'},
7801 'Result': {'$ref': '#/definitions/IsMeteredResult'}},
7803 'List': {'properties': {'Params': {'$ref': '#/definitions/CharmsList'},
7804 'Result': {'$ref': '#/definitions/CharmsListResult'}},
7809 @ReturnMapping(CharmInfo
)
7810 async def CharmInfo(self
, url
):
7813 Returns -> typing.Union[_ForwardRef('CharmActions'), typing.Mapping[str, ~CharmOption], _ForwardRef('CharmMeta'), _ForwardRef('CharmMetrics'), int, str]
7815 # map input types to rpc msg
7817 msg
= dict(Type
='Charms', Request
='CharmInfo', Version
=2, Params
=params
)
7819 reply
= await self
.rpc(msg
)
7824 @ReturnMapping(IsMeteredResult
)
7825 async def IsMetered(self
, url
):
7830 # map input types to rpc msg
7832 msg
= dict(Type
='Charms', Request
='IsMetered', Version
=2, Params
=params
)
7834 reply
= await self
.rpc(msg
)
7839 @ReturnMapping(CharmsListResult
)
7840 async def List(self
, names
):
7842 names : typing.Sequence[str]
7843 Returns -> typing.Sequence[str]
7845 # map input types to rpc msg
7847 msg
= dict(Type
='Charms', Request
='List', Version
=2, Params
=params
)
7848 params
['names'] = names
7849 reply
= await self
.rpc(msg
)
7853 class CleanerFacade(Type
):
7856 schema
= {'definitions': {'Error': {'additionalProperties': False,
7857 'properties': {'code': {'type': 'string'},
7858 'info': {'$ref': '#/definitions/ErrorInfo'},
7859 'message': {'type': 'string'}},
7860 'required': ['message', 'code'],
7862 'ErrorInfo': {'additionalProperties': False,
7863 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
7864 'macaroon-path': {'type': 'string'}},
7866 'Macaroon': {'additionalProperties': False, 'type': 'object'},
7867 'NotifyWatchResult': {'additionalProperties': False,
7868 'properties': {'NotifyWatcherId': {'type': 'string'},
7869 'error': {'$ref': '#/definitions/Error'}},
7870 'required': ['NotifyWatcherId'],
7872 'properties': {'Cleanup': {'type': 'object'},
7873 'WatchCleanups': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
7878 @ReturnMapping(None)
7879 async def Cleanup(self
):
7884 # map input types to rpc msg
7886 msg
= dict(Type
='Cleaner', Request
='Cleanup', Version
=2, Params
=params
)
7888 reply
= await self
.rpc(msg
)
7893 @ReturnMapping(NotifyWatchResult
)
7894 async def WatchCleanups(self
):
7897 Returns -> typing.Union[str, _ForwardRef('Error')]
7899 # map input types to rpc msg
7901 msg
= dict(Type
='Cleaner', Request
='WatchCleanups', Version
=2, Params
=params
)
7903 reply
= await self
.rpc(msg
)
7907 class ClientFacade(Type
):
7910 schema
= {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
7911 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
7914 'required': ['servers'],
7916 'AddCharm': {'additionalProperties': False,
7917 'properties': {'channel': {'type': 'string'},
7918 'url': {'type': 'string'}},
7919 'required': ['url', 'channel'],
7921 'AddCharmWithAuthorization': {'additionalProperties': False,
7922 'properties': {'channel': {'type': 'string'},
7923 'macaroon': {'$ref': '#/definitions/Macaroon'},
7924 'url': {'type': 'string'}},
7929 'AddMachineParams': {'additionalProperties': False,
7930 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
7932 'constraints': {'$ref': '#/definitions/Value'},
7933 'container-type': {'type': 'string'},
7934 'disks': {'items': {'$ref': '#/definitions/Constraints'},
7936 'hardware-characteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
7937 'instance-id': {'type': 'string'},
7938 'jobs': {'items': {'type': 'string'},
7940 'nonce': {'type': 'string'},
7941 'parent-id': {'type': 'string'},
7942 'placement': {'$ref': '#/definitions/Placement'},
7943 'series': {'type': 'string'}},
7944 'required': ['series',
7951 'hardware-characteristics',
7954 'AddMachines': {'additionalProperties': False,
7955 'properties': {'params': {'items': {'$ref': '#/definitions/AddMachineParams'},
7957 'required': ['params'],
7959 'AddMachinesResult': {'additionalProperties': False,
7960 'properties': {'error': {'$ref': '#/definitions/Error'},
7961 'machine': {'type': 'string'}},
7962 'required': ['machine'],
7964 'AddMachinesResults': {'additionalProperties': False,
7965 'properties': {'machines': {'items': {'$ref': '#/definitions/AddMachinesResult'},
7967 'required': ['machines'],
7969 'Address': {'additionalProperties': False,
7970 'properties': {'scope': {'type': 'string'},
7971 'space-name': {'type': 'string'},
7972 'type': {'type': 'string'},
7973 'value': {'type': 'string'}},
7974 'required': ['value', 'type', 'scope'],
7976 'AgentVersionResult': {'additionalProperties': False,
7977 'properties': {'version': {'$ref': '#/definitions/Number'}},
7978 'required': ['version'],
7980 'AllWatcherId': {'additionalProperties': False,
7981 'properties': {'watcher-id': {'type': 'string'}},
7982 'required': ['watcher-id'],
7984 'ApplicationStatus': {'additionalProperties': False,
7985 'properties': {'can-upgrade-to': {'type': 'string'},
7986 'charm': {'type': 'string'},
7987 'err': {'additionalProperties': True,
7989 'exposed': {'type': 'boolean'},
7990 'life': {'type': 'string'},
7991 'meter-statuses': {'patternProperties': {'.*': {'$ref': '#/definitions/MeterStatus'}},
7993 'relations': {'patternProperties': {'.*': {'items': {'type': 'string'},
7996 'series': {'type': 'string'},
7997 'status': {'$ref': '#/definitions/DetailedStatus'},
7998 'subordinate-to': {'items': {'type': 'string'},
8000 'units': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitStatus'}},
8002 'workload-version': {'type': 'string'}},
8003 'required': ['charm',
8013 'workload-version'],
8015 'Binary': {'additionalProperties': False,
8016 'properties': {'Arch': {'type': 'string'},
8017 'Number': {'$ref': '#/definitions/Number'},
8018 'Series': {'type': 'string'}},
8019 'required': ['Number', 'Series', 'Arch'],
8021 'BundleChangesChange': {'additionalProperties': False,
8022 'properties': {'args': {'items': {'additionalProperties': True,
8025 'id': {'type': 'string'},
8026 'method': {'type': 'string'},
8027 'requires': {'items': {'type': 'string'},
8034 'ConfigValue': {'additionalProperties': False,
8035 'properties': {'source': {'type': 'string'},
8036 'value': {'additionalProperties': True,
8038 'required': ['value', 'source'],
8040 'Constraints': {'additionalProperties': False,
8041 'properties': {'Count': {'type': 'integer'},
8042 'Pool': {'type': 'string'},
8043 'Size': {'type': 'integer'}},
8044 'required': ['Pool', 'Size', 'Count'],
8046 'DestroyMachines': {'additionalProperties': False,
8047 'properties': {'force': {'type': 'boolean'},
8048 'machine-names': {'items': {'type': 'string'},
8050 'required': ['machine-names', 'force'],
8052 'DetailedStatus': {'additionalProperties': False,
8053 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
8056 'err': {'additionalProperties': True,
8058 'info': {'type': 'string'},
8059 'kind': {'type': 'string'},
8060 'life': {'type': 'string'},
8061 'since': {'format': 'date-time',
8063 'status': {'type': 'string'},
8064 'version': {'type': 'string'}},
8065 'required': ['status',
8073 'EndpointStatus': {'additionalProperties': False,
8074 'properties': {'application': {'type': 'string'},
8075 'name': {'type': 'string'},
8076 'role': {'type': 'string'},
8077 'subordinate': {'type': 'boolean'}},
8078 'required': ['application',
8083 'Entities': {'additionalProperties': False,
8084 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
8086 'required': ['entities'],
8088 'Entity': {'additionalProperties': False,
8089 'properties': {'tag': {'type': 'string'}},
8090 'required': ['tag'],
8092 'EntityStatus': {'additionalProperties': False,
8093 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
8096 'info': {'type': 'string'},
8097 'since': {'format': 'date-time',
8099 'status': {'type': 'string'}},
8100 'required': ['status', 'info', 'since'],
8102 'Error': {'additionalProperties': False,
8103 'properties': {'code': {'type': 'string'},
8104 'info': {'$ref': '#/definitions/ErrorInfo'},
8105 'message': {'type': 'string'}},
8106 'required': ['message', 'code'],
8108 'ErrorInfo': {'additionalProperties': False,
8109 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
8110 'macaroon-path': {'type': 'string'}},
8112 'ErrorResult': {'additionalProperties': False,
8113 'properties': {'error': {'$ref': '#/definitions/Error'}},
8115 'ErrorResults': {'additionalProperties': False,
8116 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
8118 'required': ['results'],
8120 'FindToolsParams': {'additionalProperties': False,
8121 'properties': {'arch': {'type': 'string'},
8122 'major': {'type': 'integer'},
8123 'minor': {'type': 'integer'},
8124 'number': {'$ref': '#/definitions/Number'},
8125 'series': {'type': 'string'}},
8126 'required': ['number',
8132 'FindToolsResult': {'additionalProperties': False,
8133 'properties': {'error': {'$ref': '#/definitions/Error'},
8134 'list': {'items': {'$ref': '#/definitions/Tools'},
8136 'required': ['list'],
8138 'FullStatus': {'additionalProperties': False,
8139 'properties': {'applications': {'patternProperties': {'.*': {'$ref': '#/definitions/ApplicationStatus'}},
8141 'machines': {'patternProperties': {'.*': {'$ref': '#/definitions/MachineStatus'}},
8143 'model': {'$ref': '#/definitions/ModelStatusInfo'},
8144 'relations': {'items': {'$ref': '#/definitions/RelationStatus'},
8146 'required': ['model',
8151 'GetBundleChangesParams': {'additionalProperties': False,
8152 'properties': {'yaml': {'type': 'string'}},
8153 'required': ['yaml'],
8155 'GetBundleChangesResults': {'additionalProperties': False,
8156 'properties': {'changes': {'items': {'$ref': '#/definitions/BundleChangesChange'},
8158 'errors': {'items': {'type': 'string'},
8161 'GetConstraintsResults': {'additionalProperties': False,
8162 'properties': {'constraints': {'$ref': '#/definitions/Value'}},
8163 'required': ['constraints'],
8165 'HardwareCharacteristics': {'additionalProperties': False,
8166 'properties': {'arch': {'type': 'string'},
8167 'availability-zone': {'type': 'string'},
8168 'cpu-cores': {'type': 'integer'},
8169 'cpu-power': {'type': 'integer'},
8170 'mem': {'type': 'integer'},
8171 'root-disk': {'type': 'integer'},
8172 'tags': {'items': {'type': 'string'},
8175 'History': {'additionalProperties': False,
8176 'properties': {'error': {'$ref': '#/definitions/Error'},
8177 'statuses': {'items': {'$ref': '#/definitions/DetailedStatus'},
8179 'required': ['statuses'],
8181 'HostPort': {'additionalProperties': False,
8182 'properties': {'Address': {'$ref': '#/definitions/Address'},
8183 'port': {'type': 'integer'}},
8184 'required': ['Address', 'port'],
8186 'Macaroon': {'additionalProperties': False, 'type': 'object'},
8187 'MachineStatus': {'additionalProperties': False,
8188 'properties': {'agent-status': {'$ref': '#/definitions/DetailedStatus'},
8189 'containers': {'patternProperties': {'.*': {'$ref': '#/definitions/MachineStatus'}},
8191 'dns-name': {'type': 'string'},
8192 'hardware': {'type': 'string'},
8193 'has-vote': {'type': 'boolean'},
8194 'id': {'type': 'string'},
8195 'instance-id': {'type': 'string'},
8196 'instance-status': {'$ref': '#/definitions/DetailedStatus'},
8197 'jobs': {'items': {'type': 'string'},
8199 'series': {'type': 'string'},
8200 'wants-vote': {'type': 'boolean'}},
8201 'required': ['agent-status',
8213 'MeterStatus': {'additionalProperties': False,
8214 'properties': {'color': {'type': 'string'},
8215 'message': {'type': 'string'}},
8216 'required': ['color', 'message'],
8218 'ModelConfigResults': {'additionalProperties': False,
8219 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ConfigValue'}},
8221 'required': ['config'],
8223 'ModelInfo': {'additionalProperties': False,
8224 'properties': {'cloud': {'type': 'string'},
8225 'cloud-credential': {'type': 'string'},
8226 'cloud-region': {'type': 'string'},
8227 'controller-uuid': {'type': 'string'},
8228 'default-series': {'type': 'string'},
8229 'life': {'type': 'string'},
8230 'name': {'type': 'string'},
8231 'owner-tag': {'type': 'string'},
8232 'provider-type': {'type': 'string'},
8233 'status': {'$ref': '#/definitions/EntityStatus'},
8234 'users': {'items': {'$ref': '#/definitions/ModelUserInfo'},
8236 'uuid': {'type': 'string'}},
8237 'required': ['name',
8248 'ModelSet': {'additionalProperties': False,
8249 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
8252 'required': ['config'],
8254 'ModelStatusInfo': {'additionalProperties': False,
8255 'properties': {'available-version': {'type': 'string'},
8256 'cloud': {'type': 'string'},
8257 'name': {'type': 'string'},
8258 'region': {'type': 'string'},
8259 'version': {'type': 'string'}},
8260 'required': ['name',
8263 'available-version'],
8265 'ModelUnset': {'additionalProperties': False,
8266 'properties': {'keys': {'items': {'type': 'string'},
8268 'required': ['keys'],
8270 'ModelUserInfo': {'additionalProperties': False,
8271 'properties': {'access': {'type': 'string'},
8272 'display-name': {'type': 'string'},
8273 'last-connection': {'format': 'date-time',
8275 'user': {'type': 'string'}},
8276 'required': ['user',
8281 'ModelUserInfoResult': {'additionalProperties': False,
8282 'properties': {'error': {'$ref': '#/definitions/Error'},
8283 'result': {'$ref': '#/definitions/ModelUserInfo'}},
8285 'ModelUserInfoResults': {'additionalProperties': False,
8286 'properties': {'results': {'items': {'$ref': '#/definitions/ModelUserInfoResult'},
8288 'required': ['results'],
8290 'Number': {'additionalProperties': False,
8291 'properties': {'Build': {'type': 'integer'},
8292 'Major': {'type': 'integer'},
8293 'Minor': {'type': 'integer'},
8294 'Patch': {'type': 'integer'},
8295 'Tag': {'type': 'string'}},
8296 'required': ['Major',
8302 'Placement': {'additionalProperties': False,
8303 'properties': {'directive': {'type': 'string'},
8304 'scope': {'type': 'string'}},
8305 'required': ['scope', 'directive'],
8307 'PrivateAddress': {'additionalProperties': False,
8308 'properties': {'target': {'type': 'string'}},
8309 'required': ['target'],
8311 'PrivateAddressResults': {'additionalProperties': False,
8312 'properties': {'private-address': {'type': 'string'}},
8313 'required': ['private-address'],
8315 'ProvisioningScriptParams': {'additionalProperties': False,
8316 'properties': {'data-dir': {'type': 'string'},
8317 'disable-package-commands': {'type': 'boolean'},
8318 'machine-id': {'type': 'string'},
8319 'nonce': {'type': 'string'}},
8320 'required': ['machine-id',
8323 'disable-package-commands'],
8325 'ProvisioningScriptResult': {'additionalProperties': False,
8326 'properties': {'script': {'type': 'string'}},
8327 'required': ['script'],
8329 'PublicAddress': {'additionalProperties': False,
8330 'properties': {'target': {'type': 'string'}},
8331 'required': ['target'],
8333 'PublicAddressResults': {'additionalProperties': False,
8334 'properties': {'public-address': {'type': 'string'}},
8335 'required': ['public-address'],
8337 'RelationStatus': {'additionalProperties': False,
8338 'properties': {'endpoints': {'items': {'$ref': '#/definitions/EndpointStatus'},
8340 'id': {'type': 'integer'},
8341 'interface': {'type': 'string'},
8342 'key': {'type': 'string'},
8343 'scope': {'type': 'string'}},
8350 'ResolveCharmResult': {'additionalProperties': False,
8351 'properties': {'error': {'type': 'string'},
8352 'url': {'type': 'string'}},
8354 'ResolveCharmResults': {'additionalProperties': False,
8355 'properties': {'urls': {'items': {'$ref': '#/definitions/ResolveCharmResult'},
8357 'required': ['urls'],
8359 'ResolveCharms': {'additionalProperties': False,
8360 'properties': {'references': {'items': {'type': 'string'},
8362 'required': ['references'],
8364 'Resolved': {'additionalProperties': False,
8365 'properties': {'retry': {'type': 'boolean'},
8366 'unit-name': {'type': 'string'}},
8367 'required': ['unit-name', 'retry'],
8369 'SetConstraints': {'additionalProperties': False,
8370 'properties': {'application': {'type': 'string'},
8371 'constraints': {'$ref': '#/definitions/Value'}},
8372 'required': ['application', 'constraints'],
8374 'SetModelAgentVersion': {'additionalProperties': False,
8375 'properties': {'version': {'$ref': '#/definitions/Number'}},
8376 'required': ['version'],
8378 'StatusHistoryFilter': {'additionalProperties': False,
8379 'properties': {'date': {'format': 'date-time',
8381 'delta': {'type': 'integer'},
8382 'size': {'type': 'integer'}},
8383 'required': ['size', 'date', 'delta'],
8385 'StatusHistoryRequest': {'additionalProperties': False,
8386 'properties': {'filter': {'$ref': '#/definitions/StatusHistoryFilter'},
8387 'historyKind': {'type': 'string'},
8388 'size': {'type': 'integer'},
8389 'tag': {'type': 'string'}},
8390 'required': ['historyKind',
8395 'StatusHistoryRequests': {'additionalProperties': False,
8396 'properties': {'requests': {'items': {'$ref': '#/definitions/StatusHistoryRequest'},
8398 'required': ['requests'],
8400 'StatusHistoryResult': {'additionalProperties': False,
8401 'properties': {'error': {'$ref': '#/definitions/Error'},
8402 'history': {'$ref': '#/definitions/History'}},
8403 'required': ['history'],
8405 'StatusHistoryResults': {'additionalProperties': False,
8406 'properties': {'results': {'items': {'$ref': '#/definitions/StatusHistoryResult'},
8408 'required': ['results'],
8410 'StatusParams': {'additionalProperties': False,
8411 'properties': {'patterns': {'items': {'type': 'string'},
8413 'required': ['patterns'],
8415 'Tools': {'additionalProperties': False,
8416 'properties': {'sha256': {'type': 'string'},
8417 'size': {'type': 'integer'},
8418 'url': {'type': 'string'},
8419 'version': {'$ref': '#/definitions/Binary'}},
8420 'required': ['version', 'url', 'size'],
8422 'UnitStatus': {'additionalProperties': False,
8423 'properties': {'agent-status': {'$ref': '#/definitions/DetailedStatus'},
8424 'charm': {'type': 'string'},
8425 'machine': {'type': 'string'},
8426 'opened-ports': {'items': {'type': 'string'},
8428 'public-address': {'type': 'string'},
8429 'subordinates': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitStatus'}},
8431 'workload-status': {'$ref': '#/definitions/DetailedStatus'},
8432 'workload-version': {'type': 'string'}},
8433 'required': ['agent-status',
8442 'Value': {'additionalProperties': False,
8443 'properties': {'arch': {'type': 'string'},
8444 'container': {'type': 'string'},
8445 'cpu-cores': {'type': 'integer'},
8446 'cpu-power': {'type': 'integer'},
8447 'instance-type': {'type': 'string'},
8448 'mem': {'type': 'integer'},
8449 'root-disk': {'type': 'integer'},
8450 'spaces': {'items': {'type': 'string'},
8452 'tags': {'items': {'type': 'string'},
8454 'virt-type': {'type': 'string'}},
8456 'properties': {'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
8458 'AbortCurrentUpgrade': {'type': 'object'},
8459 'AddCharm': {'properties': {'Params': {'$ref': '#/definitions/AddCharm'}},
8461 'AddCharmWithAuthorization': {'properties': {'Params': {'$ref': '#/definitions/AddCharmWithAuthorization'}},
8463 'AddMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
8464 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
8466 'AddMachinesV2': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
8467 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
8469 'AgentVersion': {'properties': {'Result': {'$ref': '#/definitions/AgentVersionResult'}},
8471 'DestroyMachines': {'properties': {'Params': {'$ref': '#/definitions/DestroyMachines'}},
8473 'FindTools': {'properties': {'Params': {'$ref': '#/definitions/FindToolsParams'},
8474 'Result': {'$ref': '#/definitions/FindToolsResult'}},
8476 'FullStatus': {'properties': {'Params': {'$ref': '#/definitions/StatusParams'},
8477 'Result': {'$ref': '#/definitions/FullStatus'}},
8479 'GetBundleChanges': {'properties': {'Params': {'$ref': '#/definitions/GetBundleChangesParams'},
8480 'Result': {'$ref': '#/definitions/GetBundleChangesResults'}},
8482 'GetModelConstraints': {'properties': {'Result': {'$ref': '#/definitions/GetConstraintsResults'}},
8484 'InjectMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
8485 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
8487 'ModelGet': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}},
8489 'ModelInfo': {'properties': {'Result': {'$ref': '#/definitions/ModelInfo'}},
8491 'ModelSet': {'properties': {'Params': {'$ref': '#/definitions/ModelSet'}},
8493 'ModelUnset': {'properties': {'Params': {'$ref': '#/definitions/ModelUnset'}},
8495 'ModelUserInfo': {'properties': {'Result': {'$ref': '#/definitions/ModelUserInfoResults'}},
8497 'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/PrivateAddress'},
8498 'Result': {'$ref': '#/definitions/PrivateAddressResults'}},
8500 'ProvisioningScript': {'properties': {'Params': {'$ref': '#/definitions/ProvisioningScriptParams'},
8501 'Result': {'$ref': '#/definitions/ProvisioningScriptResult'}},
8503 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/PublicAddress'},
8504 'Result': {'$ref': '#/definitions/PublicAddressResults'}},
8506 'ResolveCharms': {'properties': {'Params': {'$ref': '#/definitions/ResolveCharms'},
8507 'Result': {'$ref': '#/definitions/ResolveCharmResults'}},
8509 'Resolved': {'properties': {'Params': {'$ref': '#/definitions/Resolved'}},
8511 'RetryProvisioning': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
8512 'Result': {'$ref': '#/definitions/ErrorResults'}},
8514 'SetModelAgentVersion': {'properties': {'Params': {'$ref': '#/definitions/SetModelAgentVersion'}},
8516 'SetModelConstraints': {'properties': {'Params': {'$ref': '#/definitions/SetConstraints'}},
8518 'StatusHistory': {'properties': {'Params': {'$ref': '#/definitions/StatusHistoryRequests'},
8519 'Result': {'$ref': '#/definitions/StatusHistoryResults'}},
8521 'WatchAll': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherId'}},
8526 @ReturnMapping(APIHostPortsResult
)
8527 async def APIHostPorts(self
):
8530 Returns -> typing.Sequence[~HostPort]
8532 # map input types to rpc msg
8534 msg
= dict(Type
='Client', Request
='APIHostPorts', Version
=1, Params
=params
)
8536 reply
= await self
.rpc(msg
)
8541 @ReturnMapping(None)
8542 async def AbortCurrentUpgrade(self
):
8547 # map input types to rpc msg
8549 msg
= dict(Type
='Client', Request
='AbortCurrentUpgrade', Version
=1, Params
=params
)
8551 reply
= await self
.rpc(msg
)
8556 @ReturnMapping(None)
8557 async def AddCharm(self
, channel
, url
):
8563 # map input types to rpc msg
8565 msg
= dict(Type
='Client', Request
='AddCharm', Version
=1, Params
=params
)
8566 params
['channel'] = channel
8568 reply
= await self
.rpc(msg
)
8573 @ReturnMapping(None)
8574 async def AddCharmWithAuthorization(self
, channel
, macaroon
, url
):
8581 # map input types to rpc msg
8583 msg
= dict(Type
='Client', Request
='AddCharmWithAuthorization', Version
=1, Params
=params
)
8584 params
['channel'] = channel
8585 params
['macaroon'] = macaroon
8587 reply
= await self
.rpc(msg
)
8592 @ReturnMapping(AddMachinesResults
)
8593 async def AddMachines(self
, params
):
8595 params : typing.Sequence[~AddMachineParams]
8596 Returns -> typing.Sequence[~AddMachinesResult]
8598 # map input types to rpc msg
8600 msg
= dict(Type
='Client', Request
='AddMachines', Version
=1, Params
=params
)
8601 params
['params'] = params
8602 reply
= await self
.rpc(msg
)
8607 @ReturnMapping(AddMachinesResults
)
8608 async def AddMachinesV2(self
, params
):
8610 params : typing.Sequence[~AddMachineParams]
8611 Returns -> typing.Sequence[~AddMachinesResult]
8613 # map input types to rpc msg
8615 msg
= dict(Type
='Client', Request
='AddMachinesV2', Version
=1, Params
=params
)
8616 params
['params'] = params
8617 reply
= await self
.rpc(msg
)
8622 @ReturnMapping(AgentVersionResult
)
8623 async def AgentVersion(self
):
8628 # map input types to rpc msg
8630 msg
= dict(Type
='Client', Request
='AgentVersion', Version
=1, Params
=params
)
8632 reply
= await self
.rpc(msg
)
8637 @ReturnMapping(None)
8638 async def DestroyMachines(self
, force
, machine_names
):
8641 machine_names : typing.Sequence[str]
8644 # map input types to rpc msg
8646 msg
= dict(Type
='Client', Request
='DestroyMachines', Version
=1, Params
=params
)
8647 params
['force'] = force
8648 params
['machine-names'] = machine_names
8649 reply
= await self
.rpc(msg
)
8654 @ReturnMapping(FindToolsResult
)
8655 async def FindTools(self
, arch
, major
, minor
, number
, series
):
8662 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[~Tools]]
8664 # map input types to rpc msg
8666 msg
= dict(Type
='Client', Request
='FindTools', Version
=1, Params
=params
)
8667 params
['arch'] = arch
8668 params
['major'] = major
8669 params
['minor'] = minor
8670 params
['number'] = number
8671 params
['series'] = series
8672 reply
= await self
.rpc(msg
)
8677 @ReturnMapping(FullStatus
)
8678 async def FullStatus(self
, patterns
):
8680 patterns : typing.Sequence[str]
8681 Returns -> typing.Union[typing.Mapping[str, ~MachineStatus], _ForwardRef('ModelStatusInfo'), typing.Sequence[~RelationStatus]]
8683 # map input types to rpc msg
8685 msg
= dict(Type
='Client', Request
='FullStatus', Version
=1, Params
=params
)
8686 params
['patterns'] = patterns
8687 reply
= await self
.rpc(msg
)
8692 @ReturnMapping(GetBundleChangesResults
)
8693 async def GetBundleChanges(self
, yaml
):
8696 Returns -> typing.Sequence[~BundleChangesChange]
8698 # map input types to rpc msg
8700 msg
= dict(Type
='Client', Request
='GetBundleChanges', Version
=1, Params
=params
)
8701 params
['yaml'] = yaml
8702 reply
= await self
.rpc(msg
)
8707 @ReturnMapping(GetConstraintsResults
)
8708 async def GetModelConstraints(self
):
8713 # map input types to rpc msg
8715 msg
= dict(Type
='Client', Request
='GetModelConstraints', Version
=1, Params
=params
)
8717 reply
= await self
.rpc(msg
)
8722 @ReturnMapping(AddMachinesResults
)
8723 async def InjectMachines(self
, params
):
8725 params : typing.Sequence[~AddMachineParams]
8726 Returns -> typing.Sequence[~AddMachinesResult]
8728 # map input types to rpc msg
8730 msg
= dict(Type
='Client', Request
='InjectMachines', Version
=1, Params
=params
)
8731 params
['params'] = params
8732 reply
= await self
.rpc(msg
)
8737 @ReturnMapping(ModelConfigResults
)
8738 async def ModelGet(self
):
8741 Returns -> typing.Mapping[str, ~ConfigValue]
8743 # map input types to rpc msg
8745 msg
= dict(Type
='Client', Request
='ModelGet', Version
=1, Params
=params
)
8747 reply
= await self
.rpc(msg
)
8752 @ReturnMapping(ModelInfo
)
8753 async def ModelInfo(self
):
8756 Returns -> typing.Union[_ForwardRef('EntityStatus'), typing.Sequence[~ModelUserInfo]]
8758 # map input types to rpc msg
8760 msg
= dict(Type
='Client', Request
='ModelInfo', Version
=1, Params
=params
)
8762 reply
= await self
.rpc(msg
)
8767 @ReturnMapping(None)
8768 async def ModelSet(self
, config
):
8770 config : typing.Mapping[str, typing.Any]
8773 # map input types to rpc msg
8775 msg
= dict(Type
='Client', Request
='ModelSet', Version
=1, Params
=params
)
8776 params
['config'] = config
8777 reply
= await self
.rpc(msg
)
8782 @ReturnMapping(None)
8783 async def ModelUnset(self
, keys
):
8785 keys : typing.Sequence[str]
8788 # map input types to rpc msg
8790 msg
= dict(Type
='Client', Request
='ModelUnset', Version
=1, Params
=params
)
8791 params
['keys'] = keys
8792 reply
= await self
.rpc(msg
)
8797 @ReturnMapping(ModelUserInfoResults
)
8798 async def ModelUserInfo(self
):
8801 Returns -> typing.Sequence[~ModelUserInfoResult]
8803 # map input types to rpc msg
8805 msg
= dict(Type
='Client', Request
='ModelUserInfo', Version
=1, Params
=params
)
8807 reply
= await self
.rpc(msg
)
8812 @ReturnMapping(PrivateAddressResults
)
8813 async def PrivateAddress(self
, target
):
8818 # map input types to rpc msg
8820 msg
= dict(Type
='Client', Request
='PrivateAddress', Version
=1, Params
=params
)
8821 params
['target'] = target
8822 reply
= await self
.rpc(msg
)
8827 @ReturnMapping(ProvisioningScriptResult
)
8828 async def ProvisioningScript(self
, data_dir
, disable_package_commands
, machine_id
, nonce
):
8831 disable_package_commands : bool
8836 # map input types to rpc msg
8838 msg
= dict(Type
='Client', Request
='ProvisioningScript', Version
=1, Params
=params
)
8839 params
['data-dir'] = data_dir
8840 params
['disable-package-commands'] = disable_package_commands
8841 params
['machine-id'] = machine_id
8842 params
['nonce'] = nonce
8843 reply
= await self
.rpc(msg
)
8848 @ReturnMapping(PublicAddressResults
)
8849 async def PublicAddress(self
, target
):
8854 # map input types to rpc msg
8856 msg
= dict(Type
='Client', Request
='PublicAddress', Version
=1, Params
=params
)
8857 params
['target'] = target
8858 reply
= await self
.rpc(msg
)
8863 @ReturnMapping(ResolveCharmResults
)
8864 async def ResolveCharms(self
, references
):
8866 references : typing.Sequence[str]
8867 Returns -> typing.Sequence[~ResolveCharmResult]
8869 # map input types to rpc msg
8871 msg
= dict(Type
='Client', Request
='ResolveCharms', Version
=1, Params
=params
)
8872 params
['references'] = references
8873 reply
= await self
.rpc(msg
)
8878 @ReturnMapping(None)
8879 async def Resolved(self
, retry
, unit_name
):
8885 # map input types to rpc msg
8887 msg
= dict(Type
='Client', Request
='Resolved', Version
=1, Params
=params
)
8888 params
['retry'] = retry
8889 params
['unit-name'] = unit_name
8890 reply
= await self
.rpc(msg
)
8895 @ReturnMapping(ErrorResults
)
8896 async def RetryProvisioning(self
, entities
):
8898 entities : typing.Sequence[~Entity]
8899 Returns -> typing.Sequence[~ErrorResult]
8901 # map input types to rpc msg
8903 msg
= dict(Type
='Client', Request
='RetryProvisioning', Version
=1, Params
=params
)
8904 params
['entities'] = entities
8905 reply
= await self
.rpc(msg
)
8910 @ReturnMapping(None)
8911 async def SetModelAgentVersion(self
, build
, major
, minor
, patch
, tag
):
8920 # map input types to rpc msg
8922 msg
= dict(Type
='Client', Request
='SetModelAgentVersion', Version
=1, Params
=params
)
8923 params
['Build'] = build
8924 params
['Major'] = major
8925 params
['Minor'] = minor
8926 params
['Patch'] = patch
8928 reply
= await self
.rpc(msg
)
8933 @ReturnMapping(None)
8934 async def SetModelConstraints(self
, application
, constraints
):
8940 # map input types to rpc msg
8942 msg
= dict(Type
='Client', Request
='SetModelConstraints', Version
=1, Params
=params
)
8943 params
['application'] = application
8944 params
['constraints'] = constraints
8945 reply
= await self
.rpc(msg
)
8950 @ReturnMapping(StatusHistoryResults
)
8951 async def StatusHistory(self
, requests
):
8953 requests : typing.Sequence[~StatusHistoryRequest]
8954 Returns -> typing.Sequence[~StatusHistoryResult]
8956 # map input types to rpc msg
8958 msg
= dict(Type
='Client', Request
='StatusHistory', Version
=1, Params
=params
)
8959 params
['requests'] = requests
8960 reply
= await self
.rpc(msg
)
8965 @ReturnMapping(AllWatcherId
)
8966 async def WatchAll(self
):
8971 # map input types to rpc msg
8973 msg
= dict(Type
='Client', Request
='WatchAll', Version
=1, Params
=params
)
8975 reply
= await self
.rpc(msg
)
8979 class CloudFacade(Type
):
8982 schema
= {'definitions': {'Cloud': {'additionalProperties': False,
8983 'properties': {'auth-types': {'items': {'type': 'string'},
8985 'endpoint': {'type': 'string'},
8986 'regions': {'items': {'$ref': '#/definitions/CloudRegion'},
8988 'type': {'type': 'string'}},
8989 'required': ['type'],
8991 'CloudCredential': {'additionalProperties': False,
8992 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}},
8994 'auth-type': {'type': 'string'}},
8995 'required': ['auth-type'],
8997 'CloudCredentialsResult': {'additionalProperties': False,
8998 'properties': {'credentials': {'patternProperties': {'.*': {'$ref': '#/definitions/CloudCredential'}},
9000 'error': {'$ref': '#/definitions/Error'}},
9002 'CloudCredentialsResults': {'additionalProperties': False,
9003 'properties': {'results': {'items': {'$ref': '#/definitions/CloudCredentialsResult'},
9006 'CloudDefaults': {'additionalProperties': False,
9007 'properties': {'cloud-tag': {'type': 'string'},
9008 'credential': {'type': 'string'},
9009 'region': {'type': 'string'}},
9010 'required': ['cloud-tag'],
9012 'CloudDefaultsResult': {'additionalProperties': False,
9013 'properties': {'error': {'$ref': '#/definitions/Error'},
9014 'result': {'$ref': '#/definitions/CloudDefaults'}},
9015 'required': ['error'],
9017 'CloudDefaultsResults': {'additionalProperties': False,
9018 'properties': {'results': {'items': {'$ref': '#/definitions/CloudDefaultsResult'},
9021 'CloudRegion': {'additionalProperties': False,
9022 'properties': {'endpoint': {'type': 'string'},
9023 'name': {'type': 'string'}},
9024 'required': ['name'],
9026 'CloudResult': {'additionalProperties': False,
9027 'properties': {'cloud': {'$ref': '#/definitions/Cloud'},
9028 'error': {'$ref': '#/definitions/Error'}},
9030 'CloudResults': {'additionalProperties': False,
9031 'properties': {'results': {'items': {'$ref': '#/definitions/CloudResult'},
9034 'Entities': {'additionalProperties': False,
9035 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
9037 'required': ['entities'],
9039 'Entity': {'additionalProperties': False,
9040 'properties': {'tag': {'type': 'string'}},
9041 'required': ['tag'],
9043 'Error': {'additionalProperties': False,
9044 'properties': {'code': {'type': 'string'},
9045 'info': {'$ref': '#/definitions/ErrorInfo'},
9046 'message': {'type': 'string'}},
9047 'required': ['message', 'code'],
9049 'ErrorInfo': {'additionalProperties': False,
9050 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
9051 'macaroon-path': {'type': 'string'}},
9053 'ErrorResult': {'additionalProperties': False,
9054 'properties': {'error': {'$ref': '#/definitions/Error'}},
9056 'ErrorResults': {'additionalProperties': False,
9057 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
9059 'required': ['results'],
9061 'Macaroon': {'additionalProperties': False, 'type': 'object'},
9062 'UserCloud': {'additionalProperties': False,
9063 'properties': {'cloud-tag': {'type': 'string'},
9064 'user-tag': {'type': 'string'}},
9065 'required': ['user-tag', 'cloud-tag'],
9067 'UserCloudCredentials': {'additionalProperties': False,
9068 'properties': {'cloud-tag': {'type': 'string'},
9069 'credentials': {'patternProperties': {'.*': {'$ref': '#/definitions/CloudCredential'}},
9071 'user-tag': {'type': 'string'}},
9072 'required': ['user-tag',
9076 'UserClouds': {'additionalProperties': False,
9077 'properties': {'user-clouds': {'items': {'$ref': '#/definitions/UserCloud'},
9080 'UsersCloudCredentials': {'additionalProperties': False,
9081 'properties': {'users': {'items': {'$ref': '#/definitions/UserCloudCredentials'},
9083 'required': ['users'],
9085 'properties': {'Cloud': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9086 'Result': {'$ref': '#/definitions/CloudResults'}},
9088 'CloudDefaults': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9089 'Result': {'$ref': '#/definitions/CloudDefaultsResults'}},
9091 'Credentials': {'properties': {'Params': {'$ref': '#/definitions/UserClouds'},
9092 'Result': {'$ref': '#/definitions/CloudCredentialsResults'}},
9094 'UpdateCredentials': {'properties': {'Params': {'$ref': '#/definitions/UsersCloudCredentials'},
9095 'Result': {'$ref': '#/definitions/ErrorResults'}},
9100 @ReturnMapping(CloudResults
)
9101 async def Cloud(self
, entities
):
9103 entities : typing.Sequence[~Entity]
9104 Returns -> typing.Sequence[~CloudResult]
9106 # map input types to rpc msg
9108 msg
= dict(Type
='Cloud', Request
='Cloud', Version
=1, Params
=params
)
9109 params
['entities'] = entities
9110 reply
= await self
.rpc(msg
)
9115 @ReturnMapping(CloudDefaultsResults
)
9116 async def CloudDefaults(self
, entities
):
9118 entities : typing.Sequence[~Entity]
9119 Returns -> typing.Sequence[~CloudDefaultsResult]
9121 # map input types to rpc msg
9123 msg
= dict(Type
='Cloud', Request
='CloudDefaults', Version
=1, Params
=params
)
9124 params
['entities'] = entities
9125 reply
= await self
.rpc(msg
)
9130 @ReturnMapping(CloudCredentialsResults
)
9131 async def Credentials(self
, user_clouds
):
9133 user_clouds : typing.Sequence[~UserCloud]
9134 Returns -> typing.Sequence[~CloudCredentialsResult]
9136 # map input types to rpc msg
9138 msg
= dict(Type
='Cloud', Request
='Credentials', Version
=1, Params
=params
)
9139 params
['user-clouds'] = user_clouds
9140 reply
= await self
.rpc(msg
)
9145 @ReturnMapping(ErrorResults
)
9146 async def UpdateCredentials(self
, users
):
9148 users : typing.Sequence[~UserCloudCredentials]
9149 Returns -> typing.Sequence[~ErrorResult]
9151 # map input types to rpc msg
9153 msg
= dict(Type
='Cloud', Request
='UpdateCredentials', Version
=1, Params
=params
)
9154 params
['users'] = users
9155 reply
= await self
.rpc(msg
)
9159 class ControllerFacade(Type
):
9162 schema
= {'definitions': {'AllWatcherId': {'additionalProperties': False,
9163 'properties': {'watcher-id': {'type': 'string'}},
9164 'required': ['watcher-id'],
9166 'ConfigValue': {'additionalProperties': False,
9167 'properties': {'source': {'type': 'string'},
9168 'value': {'additionalProperties': True,
9170 'required': ['value', 'source'],
9172 'ControllerConfigResult': {'additionalProperties': False,
9173 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
9176 'required': ['config'],
9178 'DestroyControllerArgs': {'additionalProperties': False,
9179 'properties': {'destroy-models': {'type': 'boolean'}},
9180 'required': ['destroy-models'],
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 'Error': {'additionalProperties': False,
9192 'properties': {'code': {'type': 'string'},
9193 'info': {'$ref': '#/definitions/ErrorInfo'},
9194 'message': {'type': 'string'}},
9195 'required': ['message', 'code'],
9197 'ErrorInfo': {'additionalProperties': False,
9198 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
9199 'macaroon-path': {'type': 'string'}},
9201 'InitiateModelMigrationArgs': {'additionalProperties': False,
9202 'properties': {'specs': {'items': {'$ref': '#/definitions/ModelMigrationSpec'},
9204 'required': ['specs'],
9206 'InitiateModelMigrationResult': {'additionalProperties': False,
9207 'properties': {'error': {'$ref': '#/definitions/Error'},
9208 'id': {'type': 'string'},
9209 'model-tag': {'type': 'string'}},
9210 'required': ['model-tag',
9213 'InitiateModelMigrationResults': {'additionalProperties': False,
9214 'properties': {'results': {'items': {'$ref': '#/definitions/InitiateModelMigrationResult'},
9216 'required': ['results'],
9218 'Macaroon': {'additionalProperties': False, 'type': 'object'},
9219 'Model': {'additionalProperties': False,
9220 'properties': {'name': {'type': 'string'},
9221 'owner-tag': {'type': 'string'},
9222 'uuid': {'type': 'string'}},
9223 'required': ['name', 'uuid', 'owner-tag'],
9225 'ModelBlockInfo': {'additionalProperties': False,
9226 'properties': {'blocks': {'items': {'type': 'string'},
9228 'model-uuid': {'type': 'string'},
9229 'name': {'type': 'string'},
9230 'owner-tag': {'type': 'string'}},
9231 'required': ['name',
9236 'ModelBlockInfoList': {'additionalProperties': False,
9237 'properties': {'models': {'items': {'$ref': '#/definitions/ModelBlockInfo'},
9240 'ModelConfigResults': {'additionalProperties': False,
9241 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ConfigValue'}},
9243 'required': ['config'],
9245 'ModelMigrationSpec': {'additionalProperties': False,
9246 'properties': {'model-tag': {'type': 'string'},
9247 'target-info': {'$ref': '#/definitions/ModelMigrationTargetInfo'}},
9248 'required': ['model-tag',
9251 'ModelMigrationTargetInfo': {'additionalProperties': False,
9252 'properties': {'addrs': {'items': {'type': 'string'},
9254 'auth-tag': {'type': 'string'},
9255 'ca-cert': {'type': 'string'},
9256 'controller-tag': {'type': 'string'},
9257 'password': {'type': 'string'}},
9258 'required': ['controller-tag',
9264 'ModelStatus': {'additionalProperties': False,
9265 'properties': {'application-count': {'type': 'integer'},
9266 'hosted-machine-count': {'type': 'integer'},
9267 'life': {'type': 'string'},
9268 'model-tag': {'type': 'string'},
9269 'owner-tag': {'type': 'string'}},
9270 'required': ['model-tag',
9272 'hosted-machine-count',
9273 'application-count',
9276 'ModelStatusResults': {'additionalProperties': False,
9277 'properties': {'models': {'items': {'$ref': '#/definitions/ModelStatus'},
9279 'required': ['models'],
9281 'RemoveBlocksArgs': {'additionalProperties': False,
9282 'properties': {'all': {'type': 'boolean'}},
9283 'required': ['all'],
9285 'UserModel': {'additionalProperties': False,
9286 'properties': {'last-connection': {'format': 'date-time',
9288 'model': {'$ref': '#/definitions/Model'}},
9289 'required': ['model', 'last-connection'],
9291 'UserModelList': {'additionalProperties': False,
9292 'properties': {'user-models': {'items': {'$ref': '#/definitions/UserModel'},
9294 'required': ['user-models'],
9296 'properties': {'AllModels': {'properties': {'Result': {'$ref': '#/definitions/UserModelList'}},
9298 'ControllerConfig': {'properties': {'Result': {'$ref': '#/definitions/ControllerConfigResult'}},
9300 'DestroyController': {'properties': {'Params': {'$ref': '#/definitions/DestroyControllerArgs'}},
9302 'InitiateModelMigration': {'properties': {'Params': {'$ref': '#/definitions/InitiateModelMigrationArgs'},
9303 'Result': {'$ref': '#/definitions/InitiateModelMigrationResults'}},
9305 'ListBlockedModels': {'properties': {'Result': {'$ref': '#/definitions/ModelBlockInfoList'}},
9307 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}},
9309 'ModelStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9310 'Result': {'$ref': '#/definitions/ModelStatusResults'}},
9312 'RemoveBlocks': {'properties': {'Params': {'$ref': '#/definitions/RemoveBlocksArgs'}},
9314 'WatchAllModels': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherId'}},
9319 @ReturnMapping(UserModelList
)
9320 async def AllModels(self
):
9323 Returns -> typing.Sequence[~UserModel]
9325 # map input types to rpc msg
9327 msg
= dict(Type
='Controller', Request
='AllModels', Version
=3, Params
=params
)
9329 reply
= await self
.rpc(msg
)
9334 @ReturnMapping(ControllerConfigResult
)
9335 async def ControllerConfig(self
):
9338 Returns -> typing.Mapping[str, typing.Any]
9340 # map input types to rpc msg
9342 msg
= dict(Type
='Controller', Request
='ControllerConfig', Version
=3, Params
=params
)
9344 reply
= await self
.rpc(msg
)
9349 @ReturnMapping(None)
9350 async def DestroyController(self
, destroy_models
):
9352 destroy_models : bool
9355 # map input types to rpc msg
9357 msg
= dict(Type
='Controller', Request
='DestroyController', Version
=3, Params
=params
)
9358 params
['destroy-models'] = destroy_models
9359 reply
= await self
.rpc(msg
)
9364 @ReturnMapping(InitiateModelMigrationResults
)
9365 async def InitiateModelMigration(self
, specs
):
9367 specs : typing.Sequence[~ModelMigrationSpec]
9368 Returns -> typing.Sequence[~InitiateModelMigrationResult]
9370 # map input types to rpc msg
9372 msg
= dict(Type
='Controller', Request
='InitiateModelMigration', Version
=3, Params
=params
)
9373 params
['specs'] = specs
9374 reply
= await self
.rpc(msg
)
9379 @ReturnMapping(ModelBlockInfoList
)
9380 async def ListBlockedModels(self
):
9383 Returns -> typing.Sequence[~ModelBlockInfo]
9385 # map input types to rpc msg
9387 msg
= dict(Type
='Controller', Request
='ListBlockedModels', Version
=3, Params
=params
)
9389 reply
= await self
.rpc(msg
)
9394 @ReturnMapping(ModelConfigResults
)
9395 async def ModelConfig(self
):
9398 Returns -> typing.Mapping[str, ~ConfigValue]
9400 # map input types to rpc msg
9402 msg
= dict(Type
='Controller', Request
='ModelConfig', Version
=3, Params
=params
)
9404 reply
= await self
.rpc(msg
)
9409 @ReturnMapping(ModelStatusResults
)
9410 async def ModelStatus(self
, entities
):
9412 entities : typing.Sequence[~Entity]
9413 Returns -> typing.Sequence[~ModelStatus]
9415 # map input types to rpc msg
9417 msg
= dict(Type
='Controller', Request
='ModelStatus', Version
=3, Params
=params
)
9418 params
['entities'] = entities
9419 reply
= await self
.rpc(msg
)
9424 @ReturnMapping(None)
9425 async def RemoveBlocks(self
, all_
):
9430 # map input types to rpc msg
9432 msg
= dict(Type
='Controller', Request
='RemoveBlocks', Version
=3, Params
=params
)
9433 params
['all'] = all_
9434 reply
= await self
.rpc(msg
)
9439 @ReturnMapping(AllWatcherId
)
9440 async def WatchAllModels(self
):
9445 # map input types to rpc msg
9447 msg
= dict(Type
='Controller', Request
='WatchAllModels', Version
=3, Params
=params
)
9449 reply
= await self
.rpc(msg
)
9453 class DeployerFacade(Type
):
9456 schema
= {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
9457 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
9460 'required': ['servers'],
9462 'Address': {'additionalProperties': False,
9463 'properties': {'scope': {'type': 'string'},
9464 'space-name': {'type': 'string'},
9465 'type': {'type': 'string'},
9466 'value': {'type': 'string'}},
9467 'required': ['value', 'type', 'scope'],
9469 'BytesResult': {'additionalProperties': False,
9470 'properties': {'result': {'items': {'type': 'integer'},
9472 'required': ['result'],
9474 'DeployerConnectionValues': {'additionalProperties': False,
9475 'properties': {'api-addresses': {'items': {'type': 'string'},
9477 'state-addresses': {'items': {'type': 'string'},
9479 'required': ['state-addresses',
9482 'Entities': {'additionalProperties': False,
9483 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
9485 'required': ['entities'],
9487 'Entity': {'additionalProperties': False,
9488 'properties': {'tag': {'type': 'string'}},
9489 'required': ['tag'],
9491 'EntityPassword': {'additionalProperties': False,
9492 'properties': {'password': {'type': 'string'},
9493 'tag': {'type': 'string'}},
9494 'required': ['tag', 'password'],
9496 'EntityPasswords': {'additionalProperties': False,
9497 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'},
9499 'required': ['changes'],
9501 'Error': {'additionalProperties': False,
9502 'properties': {'code': {'type': 'string'},
9503 'info': {'$ref': '#/definitions/ErrorInfo'},
9504 'message': {'type': 'string'}},
9505 'required': ['message', 'code'],
9507 'ErrorInfo': {'additionalProperties': False,
9508 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
9509 'macaroon-path': {'type': 'string'}},
9511 'ErrorResult': {'additionalProperties': False,
9512 'properties': {'error': {'$ref': '#/definitions/Error'}},
9514 'ErrorResults': {'additionalProperties': False,
9515 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
9517 'required': ['results'],
9519 'HostPort': {'additionalProperties': False,
9520 'properties': {'Address': {'$ref': '#/definitions/Address'},
9521 'port': {'type': 'integer'}},
9522 'required': ['Address', 'port'],
9524 'LifeResult': {'additionalProperties': False,
9525 'properties': {'error': {'$ref': '#/definitions/Error'},
9526 'life': {'type': 'string'}},
9527 'required': ['life'],
9529 'LifeResults': {'additionalProperties': False,
9530 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
9532 'required': ['results'],
9534 'Macaroon': {'additionalProperties': False, 'type': 'object'},
9535 'NotifyWatchResult': {'additionalProperties': False,
9536 'properties': {'NotifyWatcherId': {'type': 'string'},
9537 'error': {'$ref': '#/definitions/Error'}},
9538 'required': ['NotifyWatcherId'],
9540 'StringResult': {'additionalProperties': False,
9541 'properties': {'error': {'$ref': '#/definitions/Error'},
9542 'result': {'type': 'string'}},
9543 'required': ['result'],
9545 'StringsResult': {'additionalProperties': False,
9546 'properties': {'error': {'$ref': '#/definitions/Error'},
9547 'result': {'items': {'type': 'string'},
9550 'StringsWatchResult': {'additionalProperties': False,
9551 'properties': {'changes': {'items': {'type': 'string'},
9553 'error': {'$ref': '#/definitions/Error'},
9554 'watcher-id': {'type': 'string'}},
9555 'required': ['watcher-id'],
9557 'StringsWatchResults': {'additionalProperties': False,
9558 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
9560 'required': ['results'],
9562 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
9564 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
9566 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
9568 'ConnectionInfo': {'properties': {'Result': {'$ref': '#/definitions/DeployerConnectionValues'}},
9570 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9571 'Result': {'$ref': '#/definitions/LifeResults'}},
9573 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
9575 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9576 'Result': {'$ref': '#/definitions/ErrorResults'}},
9578 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
9579 'Result': {'$ref': '#/definitions/ErrorResults'}},
9581 'StateAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
9583 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
9585 'WatchUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9586 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
9591 @ReturnMapping(StringsResult
)
9592 async def APIAddresses(self
):
9595 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[str]]
9597 # map input types to rpc msg
9599 msg
= dict(Type
='Deployer', Request
='APIAddresses', Version
=1, Params
=params
)
9601 reply
= await self
.rpc(msg
)
9606 @ReturnMapping(APIHostPortsResult
)
9607 async def APIHostPorts(self
):
9610 Returns -> typing.Sequence[~HostPort]
9612 # map input types to rpc msg
9614 msg
= dict(Type
='Deployer', Request
='APIHostPorts', Version
=1, Params
=params
)
9616 reply
= await self
.rpc(msg
)
9621 @ReturnMapping(BytesResult
)
9622 async def CACert(self
):
9625 Returns -> typing.Sequence[int]
9627 # map input types to rpc msg
9629 msg
= dict(Type
='Deployer', Request
='CACert', Version
=1, Params
=params
)
9631 reply
= await self
.rpc(msg
)
9636 @ReturnMapping(DeployerConnectionValues
)
9637 async def ConnectionInfo(self
):
9640 Returns -> typing.Sequence[str]
9642 # map input types to rpc msg
9644 msg
= dict(Type
='Deployer', Request
='ConnectionInfo', Version
=1, Params
=params
)
9646 reply
= await self
.rpc(msg
)
9651 @ReturnMapping(LifeResults
)
9652 async def Life(self
, entities
):
9654 entities : typing.Sequence[~Entity]
9655 Returns -> typing.Sequence[~LifeResult]
9657 # map input types to rpc msg
9659 msg
= dict(Type
='Deployer', Request
='Life', Version
=1, Params
=params
)
9660 params
['entities'] = entities
9661 reply
= await self
.rpc(msg
)
9666 @ReturnMapping(StringResult
)
9667 async def ModelUUID(self
):
9670 Returns -> typing.Union[_ForwardRef('Error'), str]
9672 # map input types to rpc msg
9674 msg
= dict(Type
='Deployer', Request
='ModelUUID', Version
=1, Params
=params
)
9676 reply
= await self
.rpc(msg
)
9681 @ReturnMapping(ErrorResults
)
9682 async def Remove(self
, entities
):
9684 entities : typing.Sequence[~Entity]
9685 Returns -> typing.Sequence[~ErrorResult]
9687 # map input types to rpc msg
9689 msg
= dict(Type
='Deployer', Request
='Remove', Version
=1, Params
=params
)
9690 params
['entities'] = entities
9691 reply
= await self
.rpc(msg
)
9696 @ReturnMapping(ErrorResults
)
9697 async def SetPasswords(self
, changes
):
9699 changes : typing.Sequence[~EntityPassword]
9700 Returns -> typing.Sequence[~ErrorResult]
9702 # map input types to rpc msg
9704 msg
= dict(Type
='Deployer', Request
='SetPasswords', Version
=1, Params
=params
)
9705 params
['changes'] = changes
9706 reply
= await self
.rpc(msg
)
9711 @ReturnMapping(StringsResult
)
9712 async def StateAddresses(self
):
9715 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[str]]
9717 # map input types to rpc msg
9719 msg
= dict(Type
='Deployer', Request
='StateAddresses', Version
=1, Params
=params
)
9721 reply
= await self
.rpc(msg
)
9726 @ReturnMapping(NotifyWatchResult
)
9727 async def WatchAPIHostPorts(self
):
9730 Returns -> typing.Union[str, _ForwardRef('Error')]
9732 # map input types to rpc msg
9734 msg
= dict(Type
='Deployer', Request
='WatchAPIHostPorts', Version
=1, Params
=params
)
9736 reply
= await self
.rpc(msg
)
9741 @ReturnMapping(StringsWatchResults
)
9742 async def WatchUnits(self
, entities
):
9744 entities : typing.Sequence[~Entity]
9745 Returns -> typing.Sequence[~StringsWatchResult]
9747 # map input types to rpc msg
9749 msg
= dict(Type
='Deployer', Request
='WatchUnits', Version
=1, Params
=params
)
9750 params
['entities'] = entities
9751 reply
= await self
.rpc(msg
)
9755 class DiscoverSpacesFacade(Type
):
9756 name
= 'DiscoverSpaces'
9758 schema
= {'definitions': {'AddSubnetParams': {'additionalProperties': False,
9759 'properties': {'space-tag': {'type': 'string'},
9760 'subnet-provider-id': {'type': 'string'},
9761 'subnet-tag': {'type': 'string'},
9762 'zones': {'items': {'type': 'string'},
9764 'required': ['space-tag'],
9766 'AddSubnetsParams': {'additionalProperties': False,
9767 'properties': {'subnets': {'items': {'$ref': '#/definitions/AddSubnetParams'},
9769 'required': ['subnets'],
9771 'CreateSpaceParams': {'additionalProperties': False,
9772 'properties': {'provider-id': {'type': 'string'},
9773 'public': {'type': 'boolean'},
9774 'space-tag': {'type': 'string'},
9775 'subnet-tags': {'items': {'type': 'string'},
9777 'required': ['subnet-tags',
9781 'CreateSpacesParams': {'additionalProperties': False,
9782 'properties': {'spaces': {'items': {'$ref': '#/definitions/CreateSpaceParams'},
9784 'required': ['spaces'],
9786 'DiscoverSpacesResults': {'additionalProperties': False,
9787 'properties': {'results': {'items': {'$ref': '#/definitions/ProviderSpace'},
9789 'required': ['results'],
9791 'Error': {'additionalProperties': False,
9792 'properties': {'code': {'type': 'string'},
9793 'info': {'$ref': '#/definitions/ErrorInfo'},
9794 'message': {'type': 'string'}},
9795 'required': ['message', 'code'],
9797 'ErrorInfo': {'additionalProperties': False,
9798 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
9799 'macaroon-path': {'type': 'string'}},
9801 'ErrorResult': {'additionalProperties': False,
9802 'properties': {'error': {'$ref': '#/definitions/Error'}},
9804 'ErrorResults': {'additionalProperties': False,
9805 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
9807 'required': ['results'],
9809 'ListSubnetsResults': {'additionalProperties': False,
9810 'properties': {'results': {'items': {'$ref': '#/definitions/Subnet'},
9812 'required': ['results'],
9814 'Macaroon': {'additionalProperties': False, 'type': 'object'},
9815 'ModelConfigResult': {'additionalProperties': False,
9816 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
9819 'required': ['config'],
9821 'ProviderSpace': {'additionalProperties': False,
9822 'properties': {'error': {'$ref': '#/definitions/Error'},
9823 'name': {'type': 'string'},
9824 'provider-id': {'type': 'string'},
9825 'subnets': {'items': {'$ref': '#/definitions/Subnet'},
9827 'required': ['name',
9831 'Subnet': {'additionalProperties': False,
9832 'properties': {'cidr': {'type': 'string'},
9833 'life': {'type': 'string'},
9834 'provider-id': {'type': 'string'},
9835 'space-tag': {'type': 'string'},
9836 'status': {'type': 'string'},
9837 'vlan-tag': {'type': 'integer'},
9838 'zones': {'items': {'type': 'string'},
9840 'required': ['cidr',
9846 'SubnetsFilters': {'additionalProperties': False,
9847 'properties': {'space-tag': {'type': 'string'},
9848 'zone': {'type': 'string'}},
9850 'properties': {'AddSubnets': {'properties': {'Params': {'$ref': '#/definitions/AddSubnetsParams'},
9851 'Result': {'$ref': '#/definitions/ErrorResults'}},
9853 'CreateSpaces': {'properties': {'Params': {'$ref': '#/definitions/CreateSpacesParams'},
9854 'Result': {'$ref': '#/definitions/ErrorResults'}},
9856 'ListSpaces': {'properties': {'Result': {'$ref': '#/definitions/DiscoverSpacesResults'}},
9858 'ListSubnets': {'properties': {'Params': {'$ref': '#/definitions/SubnetsFilters'},
9859 'Result': {'$ref': '#/definitions/ListSubnetsResults'}},
9861 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
9866 @ReturnMapping(ErrorResults
)
9867 async def AddSubnets(self
, subnets
):
9869 subnets : typing.Sequence[~AddSubnetParams]
9870 Returns -> typing.Sequence[~ErrorResult]
9872 # map input types to rpc msg
9874 msg
= dict(Type
='DiscoverSpaces', Request
='AddSubnets', Version
=2, Params
=params
)
9875 params
['subnets'] = subnets
9876 reply
= await self
.rpc(msg
)
9881 @ReturnMapping(ErrorResults
)
9882 async def CreateSpaces(self
, spaces
):
9884 spaces : typing.Sequence[~CreateSpaceParams]
9885 Returns -> typing.Sequence[~ErrorResult]
9887 # map input types to rpc msg
9889 msg
= dict(Type
='DiscoverSpaces', Request
='CreateSpaces', Version
=2, Params
=params
)
9890 params
['spaces'] = spaces
9891 reply
= await self
.rpc(msg
)
9896 @ReturnMapping(DiscoverSpacesResults
)
9897 async def ListSpaces(self
):
9900 Returns -> typing.Sequence[~ProviderSpace]
9902 # map input types to rpc msg
9904 msg
= dict(Type
='DiscoverSpaces', Request
='ListSpaces', Version
=2, Params
=params
)
9906 reply
= await self
.rpc(msg
)
9911 @ReturnMapping(ListSubnetsResults
)
9912 async def ListSubnets(self
, space_tag
, zone
):
9916 Returns -> typing.Sequence[~Subnet]
9918 # map input types to rpc msg
9920 msg
= dict(Type
='DiscoverSpaces', Request
='ListSubnets', Version
=2, Params
=params
)
9921 params
['space-tag'] = space_tag
9922 params
['zone'] = zone
9923 reply
= await self
.rpc(msg
)
9928 @ReturnMapping(ModelConfigResult
)
9929 async def ModelConfig(self
):
9932 Returns -> typing.Mapping[str, typing.Any]
9934 # map input types to rpc msg
9936 msg
= dict(Type
='DiscoverSpaces', Request
='ModelConfig', Version
=2, Params
=params
)
9938 reply
= await self
.rpc(msg
)
9942 class DiskManagerFacade(Type
):
9943 name
= 'DiskManager'
9945 schema
= {'definitions': {'BlockDevice': {'additionalProperties': False,
9946 'properties': {'BusAddress': {'type': 'string'},
9947 'DeviceLinks': {'items': {'type': 'string'},
9949 'DeviceName': {'type': 'string'},
9950 'FilesystemType': {'type': 'string'},
9951 'HardwareId': {'type': 'string'},
9952 'InUse': {'type': 'boolean'},
9953 'Label': {'type': 'string'},
9954 'MountPoint': {'type': 'string'},
9955 'Size': {'type': 'integer'},
9956 'UUID': {'type': 'string'}},
9957 'required': ['DeviceName',
9968 'Error': {'additionalProperties': False,
9969 'properties': {'code': {'type': 'string'},
9970 'info': {'$ref': '#/definitions/ErrorInfo'},
9971 'message': {'type': 'string'}},
9972 'required': ['message', 'code'],
9974 'ErrorInfo': {'additionalProperties': False,
9975 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
9976 'macaroon-path': {'type': 'string'}},
9978 'ErrorResult': {'additionalProperties': False,
9979 'properties': {'error': {'$ref': '#/definitions/Error'}},
9981 'ErrorResults': {'additionalProperties': False,
9982 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
9984 'required': ['results'],
9986 'Macaroon': {'additionalProperties': False, 'type': 'object'},
9987 'MachineBlockDevices': {'additionalProperties': False,
9988 'properties': {'block-devices': {'items': {'$ref': '#/definitions/BlockDevice'},
9990 'machine': {'type': 'string'}},
9991 'required': ['machine'],
9993 'SetMachineBlockDevices': {'additionalProperties': False,
9994 'properties': {'machine-block-devices': {'items': {'$ref': '#/definitions/MachineBlockDevices'},
9996 'required': ['machine-block-devices'],
9998 'properties': {'SetMachineBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/SetMachineBlockDevices'},
9999 'Result': {'$ref': '#/definitions/ErrorResults'}},
10000 'type': 'object'}},
10004 @ReturnMapping(ErrorResults
)
10005 async def SetMachineBlockDevices(self
, machine_block_devices
):
10007 machine_block_devices : typing.Sequence[~MachineBlockDevices]
10008 Returns -> typing.Sequence[~ErrorResult]
10010 # map input types to rpc msg
10012 msg
= dict(Type
='DiskManager', Request
='SetMachineBlockDevices', Version
=2, Params
=params
)
10013 params
['machine-block-devices'] = machine_block_devices
10014 reply
= await self
.rpc(msg
)
10018 class EntityWatcherFacade(Type
):
10019 name
= 'EntityWatcher'
10021 schema
= {'definitions': {'EntitiesWatchResult': {'additionalProperties': False,
10022 'properties': {'changes': {'items': {'type': 'string'},
10024 'error': {'$ref': '#/definitions/Error'},
10025 'watcher-id': {'type': 'string'}},
10026 'required': ['watcher-id'],
10028 'Error': {'additionalProperties': False,
10029 'properties': {'code': {'type': 'string'},
10030 'info': {'$ref': '#/definitions/ErrorInfo'},
10031 'message': {'type': 'string'}},
10032 'required': ['message', 'code'],
10034 'ErrorInfo': {'additionalProperties': False,
10035 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
10036 'macaroon-path': {'type': 'string'}},
10038 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
10039 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/EntitiesWatchResult'}},
10041 'Stop': {'type': 'object'}},
10045 @ReturnMapping(EntitiesWatchResult
)
10046 async def Next(self
):
10049 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')]
10051 # map input types to rpc msg
10053 msg
= dict(Type
='EntityWatcher', Request
='Next', Version
=2, Params
=params
)
10055 reply
= await self
.rpc(msg
)
10060 @ReturnMapping(None)
10061 async def Stop(self
):
10066 # map input types to rpc msg
10068 msg
= dict(Type
='EntityWatcher', Request
='Stop', Version
=2, Params
=params
)
10070 reply
= await self
.rpc(msg
)
10074 class FilesystemAttachmentsWatcherFacade(Type
):
10075 name
= 'FilesystemAttachmentsWatcher'
10077 schema
= {'definitions': {'Error': {'additionalProperties': False,
10078 'properties': {'code': {'type': 'string'},
10079 'info': {'$ref': '#/definitions/ErrorInfo'},
10080 'message': {'type': 'string'}},
10081 'required': ['message', 'code'],
10083 'ErrorInfo': {'additionalProperties': False,
10084 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
10085 'macaroon-path': {'type': 'string'}},
10087 'Macaroon': {'additionalProperties': False, 'type': 'object'},
10088 'MachineStorageId': {'additionalProperties': False,
10089 'properties': {'attachment-tag': {'type': 'string'},
10090 'machine-tag': {'type': 'string'}},
10091 'required': ['machine-tag',
10094 'MachineStorageIdsWatchResult': {'additionalProperties': False,
10095 'properties': {'changes': {'items': {'$ref': '#/definitions/MachineStorageId'},
10097 'error': {'$ref': '#/definitions/Error'},
10098 'watcher-id': {'type': 'string'}},
10099 'required': ['watcher-id',
10101 'type': 'object'}},
10102 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResult'}},
10104 'Stop': {'type': 'object'}},
10108 @ReturnMapping(MachineStorageIdsWatchResult
)
10109 async def Next(self
):
10112 Returns -> typing.Union[typing.Sequence[~MachineStorageId], _ForwardRef('Error')]
10114 # map input types to rpc msg
10116 msg
= dict(Type
='FilesystemAttachmentsWatcher', Request
='Next', Version
=2, Params
=params
)
10118 reply
= await self
.rpc(msg
)
10123 @ReturnMapping(None)
10124 async def Stop(self
):
10129 # map input types to rpc msg
10131 msg
= dict(Type
='FilesystemAttachmentsWatcher', Request
='Stop', Version
=2, Params
=params
)
10133 reply
= await self
.rpc(msg
)
10137 class FirewallerFacade(Type
):
10138 name
= 'Firewaller'
10140 schema
= {'definitions': {'BoolResult': {'additionalProperties': False,
10141 'properties': {'error': {'$ref': '#/definitions/Error'},
10142 'result': {'type': 'boolean'}},
10143 'required': ['result'],
10145 'BoolResults': {'additionalProperties': False,
10146 'properties': {'results': {'items': {'$ref': '#/definitions/BoolResult'},
10148 'required': ['results'],
10150 'Entities': {'additionalProperties': False,
10151 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
10153 'required': ['entities'],
10155 'Entity': {'additionalProperties': False,
10156 'properties': {'tag': {'type': 'string'}},
10157 'required': ['tag'],
10159 'Error': {'additionalProperties': False,
10160 'properties': {'code': {'type': 'string'},
10161 'info': {'$ref': '#/definitions/ErrorInfo'},
10162 'message': {'type': 'string'}},
10163 'required': ['message', 'code'],
10165 'ErrorInfo': {'additionalProperties': False,
10166 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
10167 'macaroon-path': {'type': 'string'}},
10169 'LifeResult': {'additionalProperties': False,
10170 'properties': {'error': {'$ref': '#/definitions/Error'},
10171 'life': {'type': 'string'}},
10172 'required': ['life'],
10174 'LifeResults': {'additionalProperties': False,
10175 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
10177 'required': ['results'],
10179 'Macaroon': {'additionalProperties': False, 'type': 'object'},
10180 'MachinePortRange': {'additionalProperties': False,
10181 'properties': {'port-range': {'$ref': '#/definitions/PortRange'},
10182 'relation-tag': {'type': 'string'},
10183 'unit-tag': {'type': 'string'}},
10184 'required': ['unit-tag',
10188 'MachinePorts': {'additionalProperties': False,
10189 'properties': {'machine-tag': {'type': 'string'},
10190 'subnet-tag': {'type': 'string'}},
10191 'required': ['machine-tag', 'subnet-tag'],
10193 'MachinePortsParams': {'additionalProperties': False,
10194 'properties': {'params': {'items': {'$ref': '#/definitions/MachinePorts'},
10196 'required': ['params'],
10198 'MachinePortsResult': {'additionalProperties': False,
10199 'properties': {'error': {'$ref': '#/definitions/Error'},
10200 'ports': {'items': {'$ref': '#/definitions/MachinePortRange'},
10202 'required': ['ports'],
10204 'MachinePortsResults': {'additionalProperties': False,
10205 'properties': {'results': {'items': {'$ref': '#/definitions/MachinePortsResult'},
10207 'required': ['results'],
10209 'ModelConfigResult': {'additionalProperties': False,
10210 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
10211 'type': 'object'}},
10212 'type': 'object'}},
10213 'required': ['config'],
10215 'NotifyWatchResult': {'additionalProperties': False,
10216 'properties': {'NotifyWatcherId': {'type': 'string'},
10217 'error': {'$ref': '#/definitions/Error'}},
10218 'required': ['NotifyWatcherId'],
10220 'NotifyWatchResults': {'additionalProperties': False,
10221 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
10223 'required': ['results'],
10225 'PortRange': {'additionalProperties': False,
10226 'properties': {'from-port': {'type': 'integer'},
10227 'protocol': {'type': 'string'},
10228 'to-port': {'type': 'integer'}},
10229 'required': ['from-port', 'to-port', 'protocol'],
10231 'StringResult': {'additionalProperties': False,
10232 'properties': {'error': {'$ref': '#/definitions/Error'},
10233 'result': {'type': 'string'}},
10234 'required': ['result'],
10236 'StringResults': {'additionalProperties': False,
10237 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
10239 'required': ['results'],
10241 'StringsResult': {'additionalProperties': False,
10242 'properties': {'error': {'$ref': '#/definitions/Error'},
10243 'result': {'items': {'type': 'string'},
10246 'StringsResults': {'additionalProperties': False,
10247 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
10249 'required': ['results'],
10251 'StringsWatchResult': {'additionalProperties': False,
10252 'properties': {'changes': {'items': {'type': 'string'},
10254 'error': {'$ref': '#/definitions/Error'},
10255 'watcher-id': {'type': 'string'}},
10256 'required': ['watcher-id'],
10258 'StringsWatchResults': {'additionalProperties': False,
10259 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
10261 'required': ['results'],
10262 'type': 'object'}},
10263 'properties': {'GetAssignedMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10264 'Result': {'$ref': '#/definitions/StringResults'}},
10266 'GetExposed': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10267 'Result': {'$ref': '#/definitions/BoolResults'}},
10269 'GetMachineActiveSubnets': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10270 'Result': {'$ref': '#/definitions/StringsResults'}},
10272 'GetMachinePorts': {'properties': {'Params': {'$ref': '#/definitions/MachinePortsParams'},
10273 'Result': {'$ref': '#/definitions/MachinePortsResults'}},
10275 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10276 'Result': {'$ref': '#/definitions/StringResults'}},
10278 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10279 'Result': {'$ref': '#/definitions/LifeResults'}},
10281 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
10283 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10284 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
10286 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
10288 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
10290 'WatchOpenedPorts': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10291 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
10293 'WatchUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10294 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
10295 'type': 'object'}},
10299 @ReturnMapping(StringResults
)
10300 async def GetAssignedMachine(self
, entities
):
10302 entities : typing.Sequence[~Entity]
10303 Returns -> typing.Sequence[~StringResult]
10305 # map input types to rpc msg
10307 msg
= dict(Type
='Firewaller', Request
='GetAssignedMachine', Version
=3, Params
=params
)
10308 params
['entities'] = entities
10309 reply
= await self
.rpc(msg
)
10314 @ReturnMapping(BoolResults
)
10315 async def GetExposed(self
, entities
):
10317 entities : typing.Sequence[~Entity]
10318 Returns -> typing.Sequence[~BoolResult]
10320 # map input types to rpc msg
10322 msg
= dict(Type
='Firewaller', Request
='GetExposed', Version
=3, Params
=params
)
10323 params
['entities'] = entities
10324 reply
= await self
.rpc(msg
)
10329 @ReturnMapping(StringsResults
)
10330 async def GetMachineActiveSubnets(self
, entities
):
10332 entities : typing.Sequence[~Entity]
10333 Returns -> typing.Sequence[~StringsResult]
10335 # map input types to rpc msg
10337 msg
= dict(Type
='Firewaller', Request
='GetMachineActiveSubnets', Version
=3, Params
=params
)
10338 params
['entities'] = entities
10339 reply
= await self
.rpc(msg
)
10344 @ReturnMapping(MachinePortsResults
)
10345 async def GetMachinePorts(self
, params
):
10347 params : typing.Sequence[~MachinePorts]
10348 Returns -> typing.Sequence[~MachinePortsResult]
10350 # map input types to rpc msg
10352 msg
= dict(Type
='Firewaller', Request
='GetMachinePorts', Version
=3, Params
=params
)
10353 params
['params'] = params
10354 reply
= await self
.rpc(msg
)
10359 @ReturnMapping(StringResults
)
10360 async def InstanceId(self
, entities
):
10362 entities : typing.Sequence[~Entity]
10363 Returns -> typing.Sequence[~StringResult]
10365 # map input types to rpc msg
10367 msg
= dict(Type
='Firewaller', Request
='InstanceId', Version
=3, Params
=params
)
10368 params
['entities'] = entities
10369 reply
= await self
.rpc(msg
)
10374 @ReturnMapping(LifeResults
)
10375 async def Life(self
, entities
):
10377 entities : typing.Sequence[~Entity]
10378 Returns -> typing.Sequence[~LifeResult]
10380 # map input types to rpc msg
10382 msg
= dict(Type
='Firewaller', Request
='Life', Version
=3, Params
=params
)
10383 params
['entities'] = entities
10384 reply
= await self
.rpc(msg
)
10389 @ReturnMapping(ModelConfigResult
)
10390 async def ModelConfig(self
):
10393 Returns -> typing.Mapping[str, typing.Any]
10395 # map input types to rpc msg
10397 msg
= dict(Type
='Firewaller', Request
='ModelConfig', Version
=3, Params
=params
)
10399 reply
= await self
.rpc(msg
)
10404 @ReturnMapping(NotifyWatchResults
)
10405 async def Watch(self
, entities
):
10407 entities : typing.Sequence[~Entity]
10408 Returns -> typing.Sequence[~NotifyWatchResult]
10410 # map input types to rpc msg
10412 msg
= dict(Type
='Firewaller', Request
='Watch', Version
=3, Params
=params
)
10413 params
['entities'] = entities
10414 reply
= await self
.rpc(msg
)
10419 @ReturnMapping(NotifyWatchResult
)
10420 async def WatchForModelConfigChanges(self
):
10423 Returns -> typing.Union[str, _ForwardRef('Error')]
10425 # map input types to rpc msg
10427 msg
= dict(Type
='Firewaller', Request
='WatchForModelConfigChanges', Version
=3, Params
=params
)
10429 reply
= await self
.rpc(msg
)
10434 @ReturnMapping(StringsWatchResult
)
10435 async def WatchModelMachines(self
):
10438 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')]
10440 # map input types to rpc msg
10442 msg
= dict(Type
='Firewaller', Request
='WatchModelMachines', Version
=3, Params
=params
)
10444 reply
= await self
.rpc(msg
)
10449 @ReturnMapping(StringsWatchResults
)
10450 async def WatchOpenedPorts(self
, entities
):
10452 entities : typing.Sequence[~Entity]
10453 Returns -> typing.Sequence[~StringsWatchResult]
10455 # map input types to rpc msg
10457 msg
= dict(Type
='Firewaller', Request
='WatchOpenedPorts', Version
=3, Params
=params
)
10458 params
['entities'] = entities
10459 reply
= await self
.rpc(msg
)
10464 @ReturnMapping(StringsWatchResults
)
10465 async def WatchUnits(self
, entities
):
10467 entities : typing.Sequence[~Entity]
10468 Returns -> typing.Sequence[~StringsWatchResult]
10470 # map input types to rpc msg
10472 msg
= dict(Type
='Firewaller', Request
='WatchUnits', Version
=3, Params
=params
)
10473 params
['entities'] = entities
10474 reply
= await self
.rpc(msg
)
10478 class HighAvailabilityFacade(Type
):
10479 name
= 'HighAvailability'
10481 schema
= {'definitions': {'Address': {'additionalProperties': False,
10482 'properties': {'Scope': {'type': 'string'},
10483 'SpaceName': {'type': 'string'},
10484 'SpaceProviderId': {'type': 'string'},
10485 'Type': {'type': 'string'},
10486 'Value': {'type': 'string'}},
10487 'required': ['Value',
10491 'SpaceProviderId'],
10493 'ControllersChangeResult': {'additionalProperties': False,
10494 'properties': {'error': {'$ref': '#/definitions/Error'},
10495 'result': {'$ref': '#/definitions/ControllersChanges'}},
10496 'required': ['result'],
10498 'ControllersChangeResults': {'additionalProperties': False,
10499 'properties': {'results': {'items': {'$ref': '#/definitions/ControllersChangeResult'},
10501 'required': ['results'],
10503 'ControllersChanges': {'additionalProperties': False,
10504 'properties': {'added': {'items': {'type': 'string'},
10506 'converted': {'items': {'type': 'string'},
10508 'demoted': {'items': {'type': 'string'},
10510 'maintained': {'items': {'type': 'string'},
10512 'promoted': {'items': {'type': 'string'},
10514 'removed': {'items': {'type': 'string'},
10517 'ControllersSpec': {'additionalProperties': False,
10518 'properties': {'constraints': {'$ref': '#/definitions/Value'},
10519 'model-tag': {'type': 'string'},
10520 'num-controllers': {'type': 'integer'},
10521 'placement': {'items': {'type': 'string'},
10523 'series': {'type': 'string'}},
10524 'required': ['model-tag',
10525 'num-controllers'],
10527 'ControllersSpecs': {'additionalProperties': False,
10528 'properties': {'specs': {'items': {'$ref': '#/definitions/ControllersSpec'},
10530 'required': ['specs'],
10532 'Error': {'additionalProperties': False,
10533 'properties': {'code': {'type': 'string'},
10534 'info': {'$ref': '#/definitions/ErrorInfo'},
10535 'message': {'type': 'string'}},
10536 'required': ['message', 'code'],
10538 'ErrorInfo': {'additionalProperties': False,
10539 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
10540 'macaroon-path': {'type': 'string'}},
10542 'HAMember': {'additionalProperties': False,
10543 'properties': {'public-address': {'$ref': '#/definitions/Address'},
10544 'series': {'type': 'string'},
10545 'tag': {'type': 'string'}},
10546 'required': ['tag', 'public-address', 'series'],
10548 'Macaroon': {'additionalProperties': False, 'type': 'object'},
10549 'Member': {'additionalProperties': False,
10550 'properties': {'Address': {'type': 'string'},
10551 'Arbiter': {'type': 'boolean'},
10552 'BuildIndexes': {'type': 'boolean'},
10553 'Hidden': {'type': 'boolean'},
10554 'Id': {'type': 'integer'},
10555 'Priority': {'type': 'number'},
10556 'SlaveDelay': {'type': 'integer'},
10557 'Tags': {'patternProperties': {'.*': {'type': 'string'}},
10559 'Votes': {'type': 'integer'}},
10570 'MongoUpgradeResults': {'additionalProperties': False,
10571 'properties': {'ha-members': {'items': {'$ref': '#/definitions/HAMember'},
10573 'master': {'$ref': '#/definitions/HAMember'},
10574 'rs-members': {'items': {'$ref': '#/definitions/Member'},
10576 'required': ['rs-members',
10580 'ResumeReplicationParams': {'additionalProperties': False,
10581 'properties': {'members': {'items': {'$ref': '#/definitions/Member'},
10583 'required': ['members'],
10585 'UpgradeMongoParams': {'additionalProperties': False,
10586 'properties': {'target': {'$ref': '#/definitions/Version'}},
10587 'required': ['target'],
10589 'Value': {'additionalProperties': False,
10590 'properties': {'arch': {'type': 'string'},
10591 'container': {'type': 'string'},
10592 'cpu-cores': {'type': 'integer'},
10593 'cpu-power': {'type': 'integer'},
10594 'instance-type': {'type': 'string'},
10595 'mem': {'type': 'integer'},
10596 'root-disk': {'type': 'integer'},
10597 'spaces': {'items': {'type': 'string'},
10599 'tags': {'items': {'type': 'string'},
10601 'virt-type': {'type': 'string'}},
10603 'Version': {'additionalProperties': False,
10604 'properties': {'Major': {'type': 'integer'},
10605 'Minor': {'type': 'integer'},
10606 'Patch': {'type': 'string'},
10607 'StorageEngine': {'type': 'string'}},
10608 'required': ['Major',
10612 'type': 'object'}},
10613 'properties': {'EnableHA': {'properties': {'Params': {'$ref': '#/definitions/ControllersSpecs'},
10614 'Result': {'$ref': '#/definitions/ControllersChangeResults'}},
10616 'ResumeHAReplicationAfterUpgrade': {'properties': {'Params': {'$ref': '#/definitions/ResumeReplicationParams'}},
10618 'StopHAReplicationForUpgrade': {'properties': {'Params': {'$ref': '#/definitions/UpgradeMongoParams'},
10619 'Result': {'$ref': '#/definitions/MongoUpgradeResults'}},
10620 'type': 'object'}},
10624 @ReturnMapping(ControllersChangeResults
)
10625 async def EnableHA(self
, specs
):
10627 specs : typing.Sequence[~ControllersSpec]
10628 Returns -> typing.Sequence[~ControllersChangeResult]
10630 # map input types to rpc msg
10632 msg
= dict(Type
='HighAvailability', Request
='EnableHA', Version
=2, Params
=params
)
10633 params
['specs'] = specs
10634 reply
= await self
.rpc(msg
)
10639 @ReturnMapping(None)
10640 async def ResumeHAReplicationAfterUpgrade(self
, members
):
10642 members : typing.Sequence[~Member]
10645 # map input types to rpc msg
10647 msg
= dict(Type
='HighAvailability', Request
='ResumeHAReplicationAfterUpgrade', Version
=2, Params
=params
)
10648 params
['members'] = members
10649 reply
= await self
.rpc(msg
)
10654 @ReturnMapping(MongoUpgradeResults
)
10655 async def StopHAReplicationForUpgrade(self
, major
, minor
, patch
, storageengine
):
10660 storageengine : str
10661 Returns -> typing.Union[_ForwardRef('HAMember'), typing.Sequence[~Member]]
10663 # map input types to rpc msg
10665 msg
= dict(Type
='HighAvailability', Request
='StopHAReplicationForUpgrade', Version
=2, Params
=params
)
10666 params
['Major'] = major
10667 params
['Minor'] = minor
10668 params
['Patch'] = patch
10669 params
['StorageEngine'] = storageengine
10670 reply
= await self
.rpc(msg
)
10674 class HostKeyReporterFacade(Type
):
10675 name
= 'HostKeyReporter'
10677 schema
= {'definitions': {'Error': {'additionalProperties': False,
10678 'properties': {'code': {'type': 'string'},
10679 'info': {'$ref': '#/definitions/ErrorInfo'},
10680 'message': {'type': 'string'}},
10681 'required': ['message', 'code'],
10683 'ErrorInfo': {'additionalProperties': False,
10684 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
10685 'macaroon-path': {'type': 'string'}},
10687 'ErrorResult': {'additionalProperties': False,
10688 'properties': {'error': {'$ref': '#/definitions/Error'}},
10690 'ErrorResults': {'additionalProperties': False,
10691 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
10693 'required': ['results'],
10695 'Macaroon': {'additionalProperties': False, 'type': 'object'},
10696 'SSHHostKeySet': {'additionalProperties': False,
10697 'properties': {'entity-keys': {'items': {'$ref': '#/definitions/SSHHostKeys'},
10699 'required': ['entity-keys'],
10701 'SSHHostKeys': {'additionalProperties': False,
10702 'properties': {'public-keys': {'items': {'type': 'string'},
10704 'tag': {'type': 'string'}},
10705 'required': ['tag', 'public-keys'],
10706 'type': 'object'}},
10707 'properties': {'ReportKeys': {'properties': {'Params': {'$ref': '#/definitions/SSHHostKeySet'},
10708 'Result': {'$ref': '#/definitions/ErrorResults'}},
10709 'type': 'object'}},
10713 @ReturnMapping(ErrorResults
)
10714 async def ReportKeys(self
, entity_keys
):
10716 entity_keys : typing.Sequence[~SSHHostKeys]
10717 Returns -> typing.Sequence[~ErrorResult]
10719 # map input types to rpc msg
10721 msg
= dict(Type
='HostKeyReporter', Request
='ReportKeys', Version
=1, Params
=params
)
10722 params
['entity-keys'] = entity_keys
10723 reply
= await self
.rpc(msg
)
10727 class ImageManagerFacade(Type
):
10728 name
= 'ImageManager'
10730 schema
= {'definitions': {'Error': {'additionalProperties': False,
10731 'properties': {'code': {'type': 'string'},
10732 'info': {'$ref': '#/definitions/ErrorInfo'},
10733 'message': {'type': 'string'}},
10734 'required': ['message', 'code'],
10736 'ErrorInfo': {'additionalProperties': False,
10737 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
10738 'macaroon-path': {'type': 'string'}},
10740 'ErrorResult': {'additionalProperties': False,
10741 'properties': {'error': {'$ref': '#/definitions/Error'}},
10743 'ErrorResults': {'additionalProperties': False,
10744 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
10746 'required': ['results'],
10748 'ImageFilterParams': {'additionalProperties': False,
10749 'properties': {'images': {'items': {'$ref': '#/definitions/ImageSpec'},
10751 'required': ['images'],
10753 'ImageMetadata': {'additionalProperties': False,
10754 'properties': {'arch': {'type': 'string'},
10755 'created': {'format': 'date-time',
10757 'kind': {'type': 'string'},
10758 'series': {'type': 'string'},
10759 'url': {'type': 'string'}},
10760 'required': ['kind',
10766 'ImageSpec': {'additionalProperties': False,
10767 'properties': {'arch': {'type': 'string'},
10768 'kind': {'type': 'string'},
10769 'series': {'type': 'string'}},
10770 'required': ['kind', 'arch', 'series'],
10772 'ListImageResult': {'additionalProperties': False,
10773 'properties': {'result': {'items': {'$ref': '#/definitions/ImageMetadata'},
10775 'required': ['result'],
10777 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
10778 'properties': {'DeleteImages': {'properties': {'Params': {'$ref': '#/definitions/ImageFilterParams'},
10779 'Result': {'$ref': '#/definitions/ErrorResults'}},
10781 'ListImages': {'properties': {'Params': {'$ref': '#/definitions/ImageFilterParams'},
10782 'Result': {'$ref': '#/definitions/ListImageResult'}},
10783 'type': 'object'}},
10787 @ReturnMapping(ErrorResults
)
10788 async def DeleteImages(self
, images
):
10790 images : typing.Sequence[~ImageSpec]
10791 Returns -> typing.Sequence[~ErrorResult]
10793 # map input types to rpc msg
10795 msg
= dict(Type
='ImageManager', Request
='DeleteImages', Version
=2, Params
=params
)
10796 params
['images'] = images
10797 reply
= await self
.rpc(msg
)
10802 @ReturnMapping(ListImageResult
)
10803 async def ListImages(self
, images
):
10805 images : typing.Sequence[~ImageSpec]
10806 Returns -> typing.Sequence[~ImageMetadata]
10808 # map input types to rpc msg
10810 msg
= dict(Type
='ImageManager', Request
='ListImages', Version
=2, Params
=params
)
10811 params
['images'] = images
10812 reply
= await self
.rpc(msg
)
10816 class ImageMetadataFacade(Type
):
10817 name
= 'ImageMetadata'
10819 schema
= {'definitions': {'CloudImageMetadata': {'additionalProperties': False,
10820 'properties': {'arch': {'type': 'string'},
10821 'image-id': {'type': 'string'},
10822 'priority': {'type': 'integer'},
10823 'region': {'type': 'string'},
10824 'root-storage-size': {'type': 'integer'},
10825 'root-storage-type': {'type': 'string'},
10826 'series': {'type': 'string'},
10827 'source': {'type': 'string'},
10828 'stream': {'type': 'string'},
10829 'version': {'type': 'string'},
10830 'virt-type': {'type': 'string'}},
10831 'required': ['image-id',
10839 'CloudImageMetadataList': {'additionalProperties': False,
10840 'properties': {'metadata': {'items': {'$ref': '#/definitions/CloudImageMetadata'},
10843 'Error': {'additionalProperties': False,
10844 'properties': {'code': {'type': 'string'},
10845 'info': {'$ref': '#/definitions/ErrorInfo'},
10846 'message': {'type': 'string'}},
10847 'required': ['message', 'code'],
10849 'ErrorInfo': {'additionalProperties': False,
10850 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
10851 'macaroon-path': {'type': 'string'}},
10853 'ErrorResult': {'additionalProperties': False,
10854 'properties': {'error': {'$ref': '#/definitions/Error'}},
10856 'ErrorResults': {'additionalProperties': False,
10857 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
10859 'required': ['results'],
10861 'ImageMetadataFilter': {'additionalProperties': False,
10862 'properties': {'arches': {'items': {'type': 'string'},
10864 'region': {'type': 'string'},
10865 'root-storage-type': {'type': 'string'},
10866 'series': {'items': {'type': 'string'},
10868 'stream': {'type': 'string'},
10869 'virt-type': {'type': 'string'}},
10871 'ListCloudImageMetadataResult': {'additionalProperties': False,
10872 'properties': {'result': {'items': {'$ref': '#/definitions/CloudImageMetadata'},
10874 'required': ['result'],
10876 'Macaroon': {'additionalProperties': False, 'type': 'object'},
10877 'MetadataImageIds': {'additionalProperties': False,
10878 'properties': {'image-ids': {'items': {'type': 'string'},
10880 'required': ['image-ids'],
10882 'MetadataSaveParams': {'additionalProperties': False,
10883 'properties': {'metadata': {'items': {'$ref': '#/definitions/CloudImageMetadataList'},
10885 'type': 'object'}},
10886 'properties': {'Delete': {'properties': {'Params': {'$ref': '#/definitions/MetadataImageIds'},
10887 'Result': {'$ref': '#/definitions/ErrorResults'}},
10889 'List': {'properties': {'Params': {'$ref': '#/definitions/ImageMetadataFilter'},
10890 'Result': {'$ref': '#/definitions/ListCloudImageMetadataResult'}},
10892 'Save': {'properties': {'Params': {'$ref': '#/definitions/MetadataSaveParams'},
10893 'Result': {'$ref': '#/definitions/ErrorResults'}},
10895 'UpdateFromPublishedImages': {'type': 'object'}},
10899 @ReturnMapping(ErrorResults
)
10900 async def Delete(self
, image_ids
):
10902 image_ids : typing.Sequence[str]
10903 Returns -> typing.Sequence[~ErrorResult]
10905 # map input types to rpc msg
10907 msg
= dict(Type
='ImageMetadata', Request
='Delete', Version
=2, Params
=params
)
10908 params
['image-ids'] = image_ids
10909 reply
= await self
.rpc(msg
)
10914 @ReturnMapping(ListCloudImageMetadataResult
)
10915 async def List(self
, arches
, region
, root_storage_type
, series
, stream
, virt_type
):
10917 arches : typing.Sequence[str]
10919 root_storage_type : str
10920 series : typing.Sequence[str]
10923 Returns -> typing.Sequence[~CloudImageMetadata]
10925 # map input types to rpc msg
10927 msg
= dict(Type
='ImageMetadata', Request
='List', Version
=2, Params
=params
)
10928 params
['arches'] = arches
10929 params
['region'] = region
10930 params
['root-storage-type'] = root_storage_type
10931 params
['series'] = series
10932 params
['stream'] = stream
10933 params
['virt-type'] = virt_type
10934 reply
= await self
.rpc(msg
)
10939 @ReturnMapping(ErrorResults
)
10940 async def Save(self
, metadata
):
10942 metadata : typing.Sequence[~CloudImageMetadataList]
10943 Returns -> typing.Sequence[~ErrorResult]
10945 # map input types to rpc msg
10947 msg
= dict(Type
='ImageMetadata', Request
='Save', Version
=2, Params
=params
)
10948 params
['metadata'] = metadata
10949 reply
= await self
.rpc(msg
)
10954 @ReturnMapping(None)
10955 async def UpdateFromPublishedImages(self
):
10960 # map input types to rpc msg
10962 msg
= dict(Type
='ImageMetadata', Request
='UpdateFromPublishedImages', Version
=2, Params
=params
)
10964 reply
= await self
.rpc(msg
)
10968 class InstancePollerFacade(Type
):
10969 name
= 'InstancePoller'
10971 schema
= {'definitions': {'Address': {'additionalProperties': False,
10972 'properties': {'scope': {'type': 'string'},
10973 'space-name': {'type': 'string'},
10974 'type': {'type': 'string'},
10975 'value': {'type': 'string'}},
10976 'required': ['value', 'type', 'scope'],
10978 'BoolResult': {'additionalProperties': False,
10979 'properties': {'error': {'$ref': '#/definitions/Error'},
10980 'result': {'type': 'boolean'}},
10981 'required': ['result'],
10983 'BoolResults': {'additionalProperties': False,
10984 'properties': {'results': {'items': {'$ref': '#/definitions/BoolResult'},
10986 'required': ['results'],
10988 'Entities': {'additionalProperties': False,
10989 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
10991 'required': ['entities'],
10993 'Entity': {'additionalProperties': False,
10994 'properties': {'tag': {'type': 'string'}},
10995 'required': ['tag'],
10997 'EntityStatusArgs': {'additionalProperties': False,
10998 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
10999 'type': 'object'}},
11001 'info': {'type': 'string'},
11002 'status': {'type': 'string'},
11003 'tag': {'type': 'string'}},
11004 'required': ['tag',
11009 'Error': {'additionalProperties': False,
11010 'properties': {'code': {'type': 'string'},
11011 'info': {'$ref': '#/definitions/ErrorInfo'},
11012 'message': {'type': 'string'}},
11013 'required': ['message', 'code'],
11015 'ErrorInfo': {'additionalProperties': False,
11016 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
11017 'macaroon-path': {'type': 'string'}},
11019 'ErrorResult': {'additionalProperties': False,
11020 'properties': {'error': {'$ref': '#/definitions/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'],
11032 'LifeResults': {'additionalProperties': False,
11033 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
11035 'required': ['results'],
11037 'Macaroon': {'additionalProperties': False, 'type': 'object'},
11038 'MachineAddresses': {'additionalProperties': False,
11039 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
11041 'tag': {'type': 'string'}},
11042 'required': ['tag', 'addresses'],
11044 'MachineAddressesResult': {'additionalProperties': False,
11045 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
11047 'error': {'$ref': '#/definitions/Error'}},
11048 'required': ['addresses'],
11050 'MachineAddressesResults': {'additionalProperties': False,
11051 'properties': {'results': {'items': {'$ref': '#/definitions/MachineAddressesResult'},
11053 'required': ['results'],
11055 'ModelConfigResult': {'additionalProperties': False,
11056 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
11057 'type': 'object'}},
11058 'type': 'object'}},
11059 'required': ['config'],
11061 'NotifyWatchResult': {'additionalProperties': False,
11062 'properties': {'NotifyWatcherId': {'type': 'string'},
11063 'error': {'$ref': '#/definitions/Error'}},
11064 'required': ['NotifyWatcherId'],
11066 'SetMachinesAddresses': {'additionalProperties': False,
11067 'properties': {'machine-addresses': {'items': {'$ref': '#/definitions/MachineAddresses'},
11069 'required': ['machine-addresses'],
11071 'SetStatus': {'additionalProperties': False,
11072 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
11074 'required': ['entities'],
11076 'StatusResult': {'additionalProperties': False,
11077 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
11078 'type': 'object'}},
11080 'error': {'$ref': '#/definitions/Error'},
11081 'id': {'type': 'string'},
11082 'info': {'type': 'string'},
11083 'life': {'type': 'string'},
11084 'since': {'format': 'date-time',
11086 'status': {'type': 'string'}},
11094 'StatusResults': {'additionalProperties': False,
11095 'properties': {'results': {'items': {'$ref': '#/definitions/StatusResult'},
11097 'required': ['results'],
11099 'StringResult': {'additionalProperties': False,
11100 'properties': {'error': {'$ref': '#/definitions/Error'},
11101 'result': {'type': 'string'}},
11102 'required': ['result'],
11104 'StringResults': {'additionalProperties': False,
11105 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
11107 'required': ['results'],
11109 'StringsWatchResult': {'additionalProperties': False,
11110 'properties': {'changes': {'items': {'type': 'string'},
11112 'error': {'$ref': '#/definitions/Error'},
11113 'watcher-id': {'type': 'string'}},
11114 'required': ['watcher-id'],
11115 'type': 'object'}},
11116 'properties': {'AreManuallyProvisioned': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11117 'Result': {'$ref': '#/definitions/BoolResults'}},
11119 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11120 'Result': {'$ref': '#/definitions/StringResults'}},
11122 'InstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11123 'Result': {'$ref': '#/definitions/StatusResults'}},
11125 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11126 'Result': {'$ref': '#/definitions/LifeResults'}},
11128 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
11130 'ProviderAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11131 'Result': {'$ref': '#/definitions/MachineAddressesResults'}},
11133 'SetInstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
11134 'Result': {'$ref': '#/definitions/ErrorResults'}},
11136 'SetProviderAddresses': {'properties': {'Params': {'$ref': '#/definitions/SetMachinesAddresses'},
11137 'Result': {'$ref': '#/definitions/ErrorResults'}},
11139 'Status': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11140 'Result': {'$ref': '#/definitions/StatusResults'}},
11142 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
11144 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
11145 'type': 'object'}},
11149 @ReturnMapping(BoolResults
)
11150 async def AreManuallyProvisioned(self
, entities
):
11152 entities : typing.Sequence[~Entity]
11153 Returns -> typing.Sequence[~BoolResult]
11155 # map input types to rpc msg
11157 msg
= dict(Type
='InstancePoller', Request
='AreManuallyProvisioned', Version
=3, Params
=params
)
11158 params
['entities'] = entities
11159 reply
= await self
.rpc(msg
)
11164 @ReturnMapping(StringResults
)
11165 async def InstanceId(self
, entities
):
11167 entities : typing.Sequence[~Entity]
11168 Returns -> typing.Sequence[~StringResult]
11170 # map input types to rpc msg
11172 msg
= dict(Type
='InstancePoller', Request
='InstanceId', Version
=3, Params
=params
)
11173 params
['entities'] = entities
11174 reply
= await self
.rpc(msg
)
11179 @ReturnMapping(StatusResults
)
11180 async def InstanceStatus(self
, entities
):
11182 entities : typing.Sequence[~Entity]
11183 Returns -> typing.Sequence[~StatusResult]
11185 # map input types to rpc msg
11187 msg
= dict(Type
='InstancePoller', Request
='InstanceStatus', Version
=3, Params
=params
)
11188 params
['entities'] = entities
11189 reply
= await self
.rpc(msg
)
11194 @ReturnMapping(LifeResults
)
11195 async def Life(self
, entities
):
11197 entities : typing.Sequence[~Entity]
11198 Returns -> typing.Sequence[~LifeResult]
11200 # map input types to rpc msg
11202 msg
= dict(Type
='InstancePoller', Request
='Life', Version
=3, Params
=params
)
11203 params
['entities'] = entities
11204 reply
= await self
.rpc(msg
)
11209 @ReturnMapping(ModelConfigResult
)
11210 async def ModelConfig(self
):
11213 Returns -> typing.Mapping[str, typing.Any]
11215 # map input types to rpc msg
11217 msg
= dict(Type
='InstancePoller', Request
='ModelConfig', Version
=3, Params
=params
)
11219 reply
= await self
.rpc(msg
)
11224 @ReturnMapping(MachineAddressesResults
)
11225 async def ProviderAddresses(self
, entities
):
11227 entities : typing.Sequence[~Entity]
11228 Returns -> typing.Sequence[~MachineAddressesResult]
11230 # map input types to rpc msg
11232 msg
= dict(Type
='InstancePoller', Request
='ProviderAddresses', Version
=3, Params
=params
)
11233 params
['entities'] = entities
11234 reply
= await self
.rpc(msg
)
11239 @ReturnMapping(ErrorResults
)
11240 async def SetInstanceStatus(self
, entities
):
11242 entities : typing.Sequence[~EntityStatusArgs]
11243 Returns -> typing.Sequence[~ErrorResult]
11245 # map input types to rpc msg
11247 msg
= dict(Type
='InstancePoller', Request
='SetInstanceStatus', Version
=3, Params
=params
)
11248 params
['entities'] = entities
11249 reply
= await self
.rpc(msg
)
11254 @ReturnMapping(ErrorResults
)
11255 async def SetProviderAddresses(self
, machine_addresses
):
11257 machine_addresses : typing.Sequence[~MachineAddresses]
11258 Returns -> typing.Sequence[~ErrorResult]
11260 # map input types to rpc msg
11262 msg
= dict(Type
='InstancePoller', Request
='SetProviderAddresses', Version
=3, Params
=params
)
11263 params
['machine-addresses'] = machine_addresses
11264 reply
= await self
.rpc(msg
)
11269 @ReturnMapping(StatusResults
)
11270 async def Status(self
, entities
):
11272 entities : typing.Sequence[~Entity]
11273 Returns -> typing.Sequence[~StatusResult]
11275 # map input types to rpc msg
11277 msg
= dict(Type
='InstancePoller', Request
='Status', Version
=3, Params
=params
)
11278 params
['entities'] = entities
11279 reply
= await self
.rpc(msg
)
11284 @ReturnMapping(NotifyWatchResult
)
11285 async def WatchForModelConfigChanges(self
):
11288 Returns -> typing.Union[str, _ForwardRef('Error')]
11290 # map input types to rpc msg
11292 msg
= dict(Type
='InstancePoller', Request
='WatchForModelConfigChanges', Version
=3, Params
=params
)
11294 reply
= await self
.rpc(msg
)
11299 @ReturnMapping(StringsWatchResult
)
11300 async def WatchModelMachines(self
):
11303 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')]
11305 # map input types to rpc msg
11307 msg
= dict(Type
='InstancePoller', Request
='WatchModelMachines', Version
=3, Params
=params
)
11309 reply
= await self
.rpc(msg
)
11313 class KeyManagerFacade(Type
):
11314 name
= 'KeyManager'
11316 schema
= {'definitions': {'Entities': {'additionalProperties': False,
11317 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
11319 'required': ['entities'],
11321 'Entity': {'additionalProperties': False,
11322 'properties': {'tag': {'type': 'string'}},
11323 'required': ['tag'],
11325 'Error': {'additionalProperties': False,
11326 'properties': {'code': {'type': 'string'},
11327 'info': {'$ref': '#/definitions/ErrorInfo'},
11328 'message': {'type': 'string'}},
11329 'required': ['message', 'code'],
11331 'ErrorInfo': {'additionalProperties': False,
11332 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
11333 'macaroon-path': {'type': 'string'}},
11335 'ErrorResult': {'additionalProperties': False,
11336 'properties': {'error': {'$ref': '#/definitions/Error'}},
11338 'ErrorResults': {'additionalProperties': False,
11339 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
11341 'required': ['results'],
11343 'ListSSHKeys': {'additionalProperties': False,
11344 'properties': {'entities': {'$ref': '#/definitions/Entities'},
11345 'mode': {'type': 'boolean'}},
11346 'required': ['entities', 'mode'],
11348 'Macaroon': {'additionalProperties': False, 'type': 'object'},
11349 'ModifyUserSSHKeys': {'additionalProperties': False,
11350 'properties': {'ssh-keys': {'items': {'type': 'string'},
11352 'user': {'type': 'string'}},
11353 'required': ['user', 'ssh-keys'],
11355 'StringsResult': {'additionalProperties': False,
11356 'properties': {'error': {'$ref': '#/definitions/Error'},
11357 'result': {'items': {'type': 'string'},
11360 'StringsResults': {'additionalProperties': False,
11361 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
11363 'required': ['results'],
11364 'type': 'object'}},
11365 'properties': {'AddKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'},
11366 'Result': {'$ref': '#/definitions/ErrorResults'}},
11368 'DeleteKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'},
11369 'Result': {'$ref': '#/definitions/ErrorResults'}},
11371 'ImportKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'},
11372 'Result': {'$ref': '#/definitions/ErrorResults'}},
11374 'ListKeys': {'properties': {'Params': {'$ref': '#/definitions/ListSSHKeys'},
11375 'Result': {'$ref': '#/definitions/StringsResults'}},
11376 'type': 'object'}},
11380 @ReturnMapping(ErrorResults
)
11381 async def AddKeys(self
, ssh_keys
, user
):
11383 ssh_keys : typing.Sequence[str]
11385 Returns -> typing.Sequence[~ErrorResult]
11387 # map input types to rpc msg
11389 msg
= dict(Type
='KeyManager', Request
='AddKeys', Version
=1, Params
=params
)
11390 params
['ssh-keys'] = ssh_keys
11391 params
['user'] = user
11392 reply
= await self
.rpc(msg
)
11397 @ReturnMapping(ErrorResults
)
11398 async def DeleteKeys(self
, ssh_keys
, user
):
11400 ssh_keys : typing.Sequence[str]
11402 Returns -> typing.Sequence[~ErrorResult]
11404 # map input types to rpc msg
11406 msg
= dict(Type
='KeyManager', Request
='DeleteKeys', Version
=1, Params
=params
)
11407 params
['ssh-keys'] = ssh_keys
11408 params
['user'] = user
11409 reply
= await self
.rpc(msg
)
11414 @ReturnMapping(ErrorResults
)
11415 async def ImportKeys(self
, ssh_keys
, user
):
11417 ssh_keys : typing.Sequence[str]
11419 Returns -> typing.Sequence[~ErrorResult]
11421 # map input types to rpc msg
11423 msg
= dict(Type
='KeyManager', Request
='ImportKeys', Version
=1, Params
=params
)
11424 params
['ssh-keys'] = ssh_keys
11425 params
['user'] = user
11426 reply
= await self
.rpc(msg
)
11431 @ReturnMapping(StringsResults
)
11432 async def ListKeys(self
, entities
, mode
):
11434 entities : Entities
11436 Returns -> typing.Sequence[~StringsResult]
11438 # map input types to rpc msg
11440 msg
= dict(Type
='KeyManager', Request
='ListKeys', Version
=1, Params
=params
)
11441 params
['entities'] = entities
11442 params
['mode'] = mode
11443 reply
= await self
.rpc(msg
)
11447 class KeyUpdaterFacade(Type
):
11448 name
= 'KeyUpdater'
11450 schema
= {'definitions': {'Entities': {'additionalProperties': False,
11451 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
11453 'required': ['entities'],
11455 'Entity': {'additionalProperties': False,
11456 'properties': {'tag': {'type': 'string'}},
11457 'required': ['tag'],
11459 'Error': {'additionalProperties': False,
11460 'properties': {'code': {'type': 'string'},
11461 'info': {'$ref': '#/definitions/ErrorInfo'},
11462 'message': {'type': 'string'}},
11463 'required': ['message', 'code'],
11465 'ErrorInfo': {'additionalProperties': False,
11466 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
11467 'macaroon-path': {'type': 'string'}},
11469 'Macaroon': {'additionalProperties': False, 'type': 'object'},
11470 'NotifyWatchResult': {'additionalProperties': False,
11471 'properties': {'NotifyWatcherId': {'type': 'string'},
11472 'error': {'$ref': '#/definitions/Error'}},
11473 'required': ['NotifyWatcherId'],
11475 'NotifyWatchResults': {'additionalProperties': False,
11476 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
11478 'required': ['results'],
11480 'StringsResult': {'additionalProperties': False,
11481 'properties': {'error': {'$ref': '#/definitions/Error'},
11482 'result': {'items': {'type': 'string'},
11485 'StringsResults': {'additionalProperties': False,
11486 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
11488 'required': ['results'],
11489 'type': 'object'}},
11490 'properties': {'AuthorisedKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11491 'Result': {'$ref': '#/definitions/StringsResults'}},
11493 'WatchAuthorisedKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11494 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
11495 'type': 'object'}},
11499 @ReturnMapping(StringsResults
)
11500 async def AuthorisedKeys(self
, entities
):
11502 entities : typing.Sequence[~Entity]
11503 Returns -> typing.Sequence[~StringsResult]
11505 # map input types to rpc msg
11507 msg
= dict(Type
='KeyUpdater', Request
='AuthorisedKeys', Version
=1, Params
=params
)
11508 params
['entities'] = entities
11509 reply
= await self
.rpc(msg
)
11514 @ReturnMapping(NotifyWatchResults
)
11515 async def WatchAuthorisedKeys(self
, entities
):
11517 entities : typing.Sequence[~Entity]
11518 Returns -> typing.Sequence[~NotifyWatchResult]
11520 # map input types to rpc msg
11522 msg
= dict(Type
='KeyUpdater', Request
='WatchAuthorisedKeys', Version
=1, Params
=params
)
11523 params
['entities'] = entities
11524 reply
= await self
.rpc(msg
)
11528 class LeadershipServiceFacade(Type
):
11529 name
= 'LeadershipService'
11531 schema
= {'definitions': {'ApplicationTag': {'additionalProperties': False,
11532 'properties': {'Name': {'type': 'string'}},
11533 'required': ['Name'],
11535 'ClaimLeadershipBulkParams': {'additionalProperties': False,
11536 'properties': {'params': {'items': {'$ref': '#/definitions/ClaimLeadershipParams'},
11538 'required': ['params'],
11540 'ClaimLeadershipBulkResults': {'additionalProperties': False,
11541 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
11543 'required': ['results'],
11545 'ClaimLeadershipParams': {'additionalProperties': False,
11546 'properties': {'application-tag': {'type': 'string'},
11547 'duration': {'type': 'number'},
11548 'unit-tag': {'type': 'string'}},
11549 'required': ['application-tag',
11553 'Error': {'additionalProperties': False,
11554 'properties': {'code': {'type': 'string'},
11555 'info': {'$ref': '#/definitions/ErrorInfo'},
11556 'message': {'type': 'string'}},
11557 'required': ['message', 'code'],
11559 'ErrorInfo': {'additionalProperties': False,
11560 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
11561 'macaroon-path': {'type': 'string'}},
11563 'ErrorResult': {'additionalProperties': False,
11564 'properties': {'error': {'$ref': '#/definitions/Error'}},
11566 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
11567 'properties': {'BlockUntilLeadershipReleased': {'properties': {'Params': {'$ref': '#/definitions/ApplicationTag'},
11568 'Result': {'$ref': '#/definitions/ErrorResult'}},
11570 'ClaimLeadership': {'properties': {'Params': {'$ref': '#/definitions/ClaimLeadershipBulkParams'},
11571 'Result': {'$ref': '#/definitions/ClaimLeadershipBulkResults'}},
11572 'type': 'object'}},
11576 @ReturnMapping(ErrorResult
)
11577 async def BlockUntilLeadershipReleased(self
, name
):
11582 # map input types to rpc msg
11584 msg
= dict(Type
='LeadershipService', Request
='BlockUntilLeadershipReleased', Version
=2, Params
=params
)
11585 params
['Name'] = name
11586 reply
= await self
.rpc(msg
)
11591 @ReturnMapping(ClaimLeadershipBulkResults
)
11592 async def ClaimLeadership(self
, params
):
11594 params : typing.Sequence[~ClaimLeadershipParams]
11595 Returns -> typing.Sequence[~ErrorResult]
11597 # map input types to rpc msg
11599 msg
= dict(Type
='LeadershipService', Request
='ClaimLeadership', Version
=2, Params
=params
)
11600 params
['params'] = params
11601 reply
= await self
.rpc(msg
)
11605 class LifeFlagFacade(Type
):
11608 schema
= {'definitions': {'Entities': {'additionalProperties': False,
11609 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
11611 'required': ['entities'],
11613 'Entity': {'additionalProperties': False,
11614 'properties': {'tag': {'type': 'string'}},
11615 'required': ['tag'],
11617 'Error': {'additionalProperties': False,
11618 'properties': {'code': {'type': 'string'},
11619 'info': {'$ref': '#/definitions/ErrorInfo'},
11620 'message': {'type': 'string'}},
11621 'required': ['message', 'code'],
11623 'ErrorInfo': {'additionalProperties': False,
11624 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
11625 'macaroon-path': {'type': 'string'}},
11627 'LifeResult': {'additionalProperties': False,
11628 'properties': {'error': {'$ref': '#/definitions/Error'},
11629 'life': {'type': 'string'}},
11630 'required': ['life'],
11632 'LifeResults': {'additionalProperties': False,
11633 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
11635 'required': ['results'],
11637 'Macaroon': {'additionalProperties': False, 'type': 'object'},
11638 'NotifyWatchResult': {'additionalProperties': False,
11639 'properties': {'NotifyWatcherId': {'type': 'string'},
11640 'error': {'$ref': '#/definitions/Error'}},
11641 'required': ['NotifyWatcherId'],
11643 'NotifyWatchResults': {'additionalProperties': False,
11644 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
11646 'required': ['results'],
11647 'type': 'object'}},
11648 'properties': {'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11649 'Result': {'$ref': '#/definitions/LifeResults'}},
11651 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11652 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
11653 'type': 'object'}},
11657 @ReturnMapping(LifeResults
)
11658 async def Life(self
, entities
):
11660 entities : typing.Sequence[~Entity]
11661 Returns -> typing.Sequence[~LifeResult]
11663 # map input types to rpc msg
11665 msg
= dict(Type
='LifeFlag', Request
='Life', Version
=1, Params
=params
)
11666 params
['entities'] = entities
11667 reply
= await self
.rpc(msg
)
11672 @ReturnMapping(NotifyWatchResults
)
11673 async def Watch(self
, entities
):
11675 entities : typing.Sequence[~Entity]
11676 Returns -> typing.Sequence[~NotifyWatchResult]
11678 # map input types to rpc msg
11680 msg
= dict(Type
='LifeFlag', Request
='Watch', Version
=1, Params
=params
)
11681 params
['entities'] = entities
11682 reply
= await self
.rpc(msg
)
11686 class LogForwardingFacade(Type
):
11687 name
= 'LogForwarding'
11689 schema
= {'definitions': {'Error': {'additionalProperties': False,
11690 'properties': {'code': {'type': 'string'},
11691 'info': {'$ref': '#/definitions/ErrorInfo'},
11692 'message': {'type': 'string'}},
11693 'required': ['message', 'code'],
11695 'ErrorInfo': {'additionalProperties': False,
11696 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
11697 'macaroon-path': {'type': 'string'}},
11699 'ErrorResult': {'additionalProperties': False,
11700 'properties': {'error': {'$ref': '#/definitions/Error'}},
11702 'ErrorResults': {'additionalProperties': False,
11703 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
11705 'required': ['results'],
11707 'LogForwardingGetLastSentParams': {'additionalProperties': False,
11708 'properties': {'ids': {'items': {'$ref': '#/definitions/LogForwardingID'},
11710 'required': ['ids'],
11712 'LogForwardingGetLastSentResult': {'additionalProperties': False,
11713 'properties': {'err': {'$ref': '#/definitions/Error'},
11714 'record-id': {'type': 'integer'}},
11715 'required': ['record-id',
11718 'LogForwardingGetLastSentResults': {'additionalProperties': False,
11719 'properties': {'results': {'items': {'$ref': '#/definitions/LogForwardingGetLastSentResult'},
11721 'required': ['results'],
11723 'LogForwardingID': {'additionalProperties': False,
11724 'properties': {'model': {'type': 'string'},
11725 'sink': {'type': 'string'}},
11726 'required': ['model', 'sink'],
11728 'LogForwardingSetLastSentParam': {'additionalProperties': False,
11729 'properties': {'LogForwardingID': {'$ref': '#/definitions/LogForwardingID'},
11730 'record-id': {'type': 'integer'}},
11731 'required': ['LogForwardingID',
11734 'LogForwardingSetLastSentParams': {'additionalProperties': False,
11735 'properties': {'params': {'items': {'$ref': '#/definitions/LogForwardingSetLastSentParam'},
11737 'required': ['params'],
11739 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
11740 'properties': {'GetLastSent': {'properties': {'Params': {'$ref': '#/definitions/LogForwardingGetLastSentParams'},
11741 'Result': {'$ref': '#/definitions/LogForwardingGetLastSentResults'}},
11743 'SetLastSent': {'properties': {'Params': {'$ref': '#/definitions/LogForwardingSetLastSentParams'},
11744 'Result': {'$ref': '#/definitions/ErrorResults'}},
11745 'type': 'object'}},
11749 @ReturnMapping(LogForwardingGetLastSentResults
)
11750 async def GetLastSent(self
, ids
):
11752 ids : typing.Sequence[~LogForwardingID]
11753 Returns -> typing.Sequence[~LogForwardingGetLastSentResult]
11755 # map input types to rpc msg
11757 msg
= dict(Type
='LogForwarding', Request
='GetLastSent', Version
=1, Params
=params
)
11758 params
['ids'] = ids
11759 reply
= await self
.rpc(msg
)
11764 @ReturnMapping(ErrorResults
)
11765 async def SetLastSent(self
, params
):
11767 params : typing.Sequence[~LogForwardingSetLastSentParam]
11768 Returns -> typing.Sequence[~ErrorResult]
11770 # map input types to rpc msg
11772 msg
= dict(Type
='LogForwarding', Request
='SetLastSent', Version
=1, Params
=params
)
11773 params
['params'] = params
11774 reply
= await self
.rpc(msg
)
11778 class LoggerFacade(Type
):
11781 schema
= {'definitions': {'Entities': {'additionalProperties': False,
11782 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
11784 'required': ['entities'],
11786 'Entity': {'additionalProperties': False,
11787 'properties': {'tag': {'type': 'string'}},
11788 'required': ['tag'],
11790 'Error': {'additionalProperties': False,
11791 'properties': {'code': {'type': 'string'},
11792 'info': {'$ref': '#/definitions/ErrorInfo'},
11793 'message': {'type': 'string'}},
11794 'required': ['message', 'code'],
11796 'ErrorInfo': {'additionalProperties': False,
11797 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
11798 'macaroon-path': {'type': 'string'}},
11800 'Macaroon': {'additionalProperties': False, 'type': 'object'},
11801 'NotifyWatchResult': {'additionalProperties': False,
11802 'properties': {'NotifyWatcherId': {'type': 'string'},
11803 'error': {'$ref': '#/definitions/Error'}},
11804 'required': ['NotifyWatcherId'],
11806 'NotifyWatchResults': {'additionalProperties': False,
11807 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
11809 'required': ['results'],
11811 'StringResult': {'additionalProperties': False,
11812 'properties': {'error': {'$ref': '#/definitions/Error'},
11813 'result': {'type': 'string'}},
11814 'required': ['result'],
11816 'StringResults': {'additionalProperties': False,
11817 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
11819 'required': ['results'],
11820 'type': 'object'}},
11821 'properties': {'LoggingConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11822 'Result': {'$ref': '#/definitions/StringResults'}},
11824 'WatchLoggingConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11825 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
11826 'type': 'object'}},
11830 @ReturnMapping(StringResults
)
11831 async def LoggingConfig(self
, entities
):
11833 entities : typing.Sequence[~Entity]
11834 Returns -> typing.Sequence[~StringResult]
11836 # map input types to rpc msg
11838 msg
= dict(Type
='Logger', Request
='LoggingConfig', Version
=1, Params
=params
)
11839 params
['entities'] = entities
11840 reply
= await self
.rpc(msg
)
11845 @ReturnMapping(NotifyWatchResults
)
11846 async def WatchLoggingConfig(self
, entities
):
11848 entities : typing.Sequence[~Entity]
11849 Returns -> typing.Sequence[~NotifyWatchResult]
11851 # map input types to rpc msg
11853 msg
= dict(Type
='Logger', Request
='WatchLoggingConfig', Version
=1, Params
=params
)
11854 params
['entities'] = entities
11855 reply
= await self
.rpc(msg
)
11859 class MachineActionsFacade(Type
):
11860 name
= 'MachineActions'
11862 schema
= {'definitions': {'Action': {'additionalProperties': False,
11863 'properties': {'name': {'type': 'string'},
11864 'parameters': {'patternProperties': {'.*': {'additionalProperties': True,
11865 'type': 'object'}},
11867 'receiver': {'type': 'string'},
11868 'tag': {'type': 'string'}},
11869 'required': ['tag', 'receiver', 'name'],
11871 'ActionExecutionResult': {'additionalProperties': False,
11872 'properties': {'action-tag': {'type': 'string'},
11873 'message': {'type': 'string'},
11874 'results': {'patternProperties': {'.*': {'additionalProperties': True,
11875 'type': 'object'}},
11877 'status': {'type': 'string'}},
11878 'required': ['action-tag', 'status'],
11880 'ActionExecutionResults': {'additionalProperties': False,
11881 'properties': {'results': {'items': {'$ref': '#/definitions/ActionExecutionResult'},
11884 'ActionResult': {'additionalProperties': False,
11885 'properties': {'action': {'$ref': '#/definitions/Action'},
11886 'completed': {'format': 'date-time',
11888 'enqueued': {'format': 'date-time',
11890 'error': {'$ref': '#/definitions/Error'},
11891 'message': {'type': 'string'},
11892 'output': {'patternProperties': {'.*': {'additionalProperties': True,
11893 'type': 'object'}},
11895 'started': {'format': 'date-time',
11897 'status': {'type': 'string'}},
11899 'ActionResults': {'additionalProperties': False,
11900 'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'},
11903 'ActionsByReceiver': {'additionalProperties': False,
11904 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'},
11906 'error': {'$ref': '#/definitions/Error'},
11907 'receiver': {'type': 'string'}},
11909 'ActionsByReceivers': {'additionalProperties': False,
11910 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByReceiver'},
11913 'Entities': {'additionalProperties': False,
11914 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
11916 'required': ['entities'],
11918 'Entity': {'additionalProperties': False,
11919 'properties': {'tag': {'type': 'string'}},
11920 'required': ['tag'],
11922 'Error': {'additionalProperties': False,
11923 'properties': {'code': {'type': 'string'},
11924 'info': {'$ref': '#/definitions/ErrorInfo'},
11925 'message': {'type': 'string'}},
11926 'required': ['message', 'code'],
11928 'ErrorInfo': {'additionalProperties': False,
11929 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
11930 'macaroon-path': {'type': 'string'}},
11932 'ErrorResult': {'additionalProperties': False,
11933 'properties': {'error': {'$ref': '#/definitions/Error'}},
11935 'ErrorResults': {'additionalProperties': False,
11936 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
11938 'required': ['results'],
11940 'Macaroon': {'additionalProperties': False, 'type': 'object'},
11941 'StringsWatchResult': {'additionalProperties': False,
11942 'properties': {'changes': {'items': {'type': 'string'},
11944 'error': {'$ref': '#/definitions/Error'},
11945 'watcher-id': {'type': 'string'}},
11946 'required': ['watcher-id'],
11948 'StringsWatchResults': {'additionalProperties': False,
11949 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
11951 'required': ['results'],
11952 'type': 'object'}},
11953 'properties': {'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11954 'Result': {'$ref': '#/definitions/ActionResults'}},
11956 'BeginActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11957 'Result': {'$ref': '#/definitions/ErrorResults'}},
11959 'FinishActions': {'properties': {'Params': {'$ref': '#/definitions/ActionExecutionResults'},
11960 'Result': {'$ref': '#/definitions/ErrorResults'}},
11962 'RunningActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11963 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
11965 'WatchActionNotifications': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11966 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
11967 'type': 'object'}},
11971 @ReturnMapping(ActionResults
)
11972 async def Actions(self
, entities
):
11974 entities : typing.Sequence[~Entity]
11975 Returns -> typing.Sequence[~ActionResult]
11977 # map input types to rpc msg
11979 msg
= dict(Type
='MachineActions', Request
='Actions', Version
=1, Params
=params
)
11980 params
['entities'] = entities
11981 reply
= await self
.rpc(msg
)
11986 @ReturnMapping(ErrorResults
)
11987 async def BeginActions(self
, entities
):
11989 entities : typing.Sequence[~Entity]
11990 Returns -> typing.Sequence[~ErrorResult]
11992 # map input types to rpc msg
11994 msg
= dict(Type
='MachineActions', Request
='BeginActions', Version
=1, Params
=params
)
11995 params
['entities'] = entities
11996 reply
= await self
.rpc(msg
)
12001 @ReturnMapping(ErrorResults
)
12002 async def FinishActions(self
, results
):
12004 results : typing.Sequence[~ActionExecutionResult]
12005 Returns -> typing.Sequence[~ErrorResult]
12007 # map input types to rpc msg
12009 msg
= dict(Type
='MachineActions', Request
='FinishActions', Version
=1, Params
=params
)
12010 params
['results'] = results
12011 reply
= await self
.rpc(msg
)
12016 @ReturnMapping(ActionsByReceivers
)
12017 async def RunningActions(self
, entities
):
12019 entities : typing.Sequence[~Entity]
12020 Returns -> typing.Sequence[~ActionsByReceiver]
12022 # map input types to rpc msg
12024 msg
= dict(Type
='MachineActions', Request
='RunningActions', Version
=1, Params
=params
)
12025 params
['entities'] = entities
12026 reply
= await self
.rpc(msg
)
12031 @ReturnMapping(StringsWatchResults
)
12032 async def WatchActionNotifications(self
, entities
):
12034 entities : typing.Sequence[~Entity]
12035 Returns -> typing.Sequence[~StringsWatchResult]
12037 # map input types to rpc msg
12039 msg
= dict(Type
='MachineActions', Request
='WatchActionNotifications', Version
=1, Params
=params
)
12040 params
['entities'] = entities
12041 reply
= await self
.rpc(msg
)
12045 class MachineManagerFacade(Type
):
12046 name
= 'MachineManager'
12048 schema
= {'definitions': {'AddMachineParams': {'additionalProperties': False,
12049 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
12051 'constraints': {'$ref': '#/definitions/Value'},
12052 'container-type': {'type': 'string'},
12053 'disks': {'items': {'$ref': '#/definitions/Constraints'},
12055 'hardware-characteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
12056 'instance-id': {'type': 'string'},
12057 'jobs': {'items': {'type': 'string'},
12059 'nonce': {'type': 'string'},
12060 'parent-id': {'type': 'string'},
12061 'placement': {'$ref': '#/definitions/Placement'},
12062 'series': {'type': 'string'}},
12063 'required': ['series',
12070 'hardware-characteristics',
12073 'AddMachines': {'additionalProperties': False,
12074 'properties': {'params': {'items': {'$ref': '#/definitions/AddMachineParams'},
12076 'required': ['params'],
12078 'AddMachinesResult': {'additionalProperties': False,
12079 'properties': {'error': {'$ref': '#/definitions/Error'},
12080 'machine': {'type': 'string'}},
12081 'required': ['machine'],
12083 'AddMachinesResults': {'additionalProperties': False,
12084 'properties': {'machines': {'items': {'$ref': '#/definitions/AddMachinesResult'},
12086 'required': ['machines'],
12088 'Address': {'additionalProperties': False,
12089 'properties': {'scope': {'type': 'string'},
12090 'space-name': {'type': 'string'},
12091 'type': {'type': 'string'},
12092 'value': {'type': 'string'}},
12093 'required': ['value', 'type', 'scope'],
12095 'Constraints': {'additionalProperties': False,
12096 'properties': {'Count': {'type': 'integer'},
12097 'Pool': {'type': 'string'},
12098 'Size': {'type': 'integer'}},
12099 'required': ['Pool', 'Size', 'Count'],
12101 'Error': {'additionalProperties': False,
12102 'properties': {'code': {'type': 'string'},
12103 'info': {'$ref': '#/definitions/ErrorInfo'},
12104 'message': {'type': 'string'}},
12105 'required': ['message', 'code'],
12107 'ErrorInfo': {'additionalProperties': False,
12108 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
12109 'macaroon-path': {'type': 'string'}},
12111 'HardwareCharacteristics': {'additionalProperties': False,
12112 'properties': {'arch': {'type': 'string'},
12113 'availability-zone': {'type': 'string'},
12114 'cpu-cores': {'type': 'integer'},
12115 'cpu-power': {'type': 'integer'},
12116 'mem': {'type': 'integer'},
12117 'root-disk': {'type': 'integer'},
12118 'tags': {'items': {'type': 'string'},
12121 'Macaroon': {'additionalProperties': False, 'type': 'object'},
12122 'Placement': {'additionalProperties': False,
12123 'properties': {'directive': {'type': 'string'},
12124 'scope': {'type': 'string'}},
12125 'required': ['scope', 'directive'],
12127 'Value': {'additionalProperties': False,
12128 'properties': {'arch': {'type': 'string'},
12129 'container': {'type': 'string'},
12130 'cpu-cores': {'type': 'integer'},
12131 'cpu-power': {'type': 'integer'},
12132 'instance-type': {'type': 'string'},
12133 'mem': {'type': 'integer'},
12134 'root-disk': {'type': 'integer'},
12135 'spaces': {'items': {'type': 'string'},
12137 'tags': {'items': {'type': 'string'},
12139 'virt-type': {'type': 'string'}},
12140 'type': 'object'}},
12141 'properties': {'AddMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
12142 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
12143 'type': 'object'}},
12147 @ReturnMapping(AddMachinesResults
)
12148 async def AddMachines(self
, params
):
12150 params : typing.Sequence[~AddMachineParams]
12151 Returns -> typing.Sequence[~AddMachinesResult]
12153 # map input types to rpc msg
12155 msg
= dict(Type
='MachineManager', Request
='AddMachines', Version
=2, Params
=params
)
12156 params
['params'] = params
12157 reply
= await self
.rpc(msg
)
12161 class MachinerFacade(Type
):
12164 schema
= {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
12165 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
12168 'required': ['servers'],
12170 'Address': {'additionalProperties': False,
12171 'properties': {'scope': {'type': 'string'},
12172 'space-name': {'type': 'string'},
12173 'type': {'type': 'string'},
12174 'value': {'type': 'string'}},
12175 'required': ['value', 'type', 'scope'],
12177 'BytesResult': {'additionalProperties': False,
12178 'properties': {'result': {'items': {'type': 'integer'},
12180 'required': ['result'],
12182 'Entities': {'additionalProperties': False,
12183 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
12185 'required': ['entities'],
12187 'Entity': {'additionalProperties': False,
12188 'properties': {'tag': {'type': 'string'}},
12189 'required': ['tag'],
12191 'EntityStatusArgs': {'additionalProperties': False,
12192 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
12193 'type': 'object'}},
12195 'info': {'type': 'string'},
12196 'status': {'type': 'string'},
12197 'tag': {'type': 'string'}},
12198 'required': ['tag',
12203 'Error': {'additionalProperties': False,
12204 'properties': {'code': {'type': 'string'},
12205 'info': {'$ref': '#/definitions/ErrorInfo'},
12206 'message': {'type': 'string'}},
12207 'required': ['message', 'code'],
12209 'ErrorInfo': {'additionalProperties': False,
12210 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
12211 'macaroon-path': {'type': 'string'}},
12213 'ErrorResult': {'additionalProperties': False,
12214 'properties': {'error': {'$ref': '#/definitions/Error'}},
12216 'ErrorResults': {'additionalProperties': False,
12217 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
12219 'required': ['results'],
12221 'HostPort': {'additionalProperties': False,
12222 'properties': {'Address': {'$ref': '#/definitions/Address'},
12223 'port': {'type': 'integer'}},
12224 'required': ['Address', 'port'],
12226 'JobsResult': {'additionalProperties': False,
12227 'properties': {'error': {'$ref': '#/definitions/Error'},
12228 'jobs': {'items': {'type': 'string'},
12230 'required': ['jobs'],
12232 'JobsResults': {'additionalProperties': False,
12233 'properties': {'results': {'items': {'$ref': '#/definitions/JobsResult'},
12235 'required': ['results'],
12237 'LifeResult': {'additionalProperties': False,
12238 'properties': {'error': {'$ref': '#/definitions/Error'},
12239 'life': {'type': 'string'}},
12240 'required': ['life'],
12242 'LifeResults': {'additionalProperties': False,
12243 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
12245 'required': ['results'],
12247 'Macaroon': {'additionalProperties': False, 'type': 'object'},
12248 'MachineAddresses': {'additionalProperties': False,
12249 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
12251 'tag': {'type': 'string'}},
12252 'required': ['tag', 'addresses'],
12254 'NetworkConfig': {'additionalProperties': False,
12255 'properties': {'address': {'type': 'string'},
12256 'cidr': {'type': 'string'},
12257 'config-type': {'type': 'string'},
12258 'device-index': {'type': 'integer'},
12259 'disabled': {'type': 'boolean'},
12260 'dns-search-domains': {'items': {'type': 'string'},
12262 'dns-servers': {'items': {'type': 'string'},
12264 'gateway-address': {'type': 'string'},
12265 'interface-name': {'type': 'string'},
12266 'interface-type': {'type': 'string'},
12267 'mac-address': {'type': 'string'},
12268 'mtu': {'type': 'integer'},
12269 'no-auto-start': {'type': 'boolean'},
12270 'parent-interface-name': {'type': 'string'},
12271 'provider-address-id': {'type': 'string'},
12272 'provider-id': {'type': 'string'},
12273 'provider-space-id': {'type': 'string'},
12274 'provider-subnet-id': {'type': 'string'},
12275 'provider-vlan-id': {'type': 'string'},
12276 'vlan-tag': {'type': 'integer'}},
12277 'required': ['device-index',
12282 'provider-subnet-id',
12283 'provider-space-id',
12284 'provider-address-id',
12285 'provider-vlan-id',
12288 'parent-interface-name',
12292 'NotifyWatchResult': {'additionalProperties': False,
12293 'properties': {'NotifyWatcherId': {'type': 'string'},
12294 'error': {'$ref': '#/definitions/Error'}},
12295 'required': ['NotifyWatcherId'],
12297 'NotifyWatchResults': {'additionalProperties': False,
12298 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
12300 'required': ['results'],
12302 'SetMachineNetworkConfig': {'additionalProperties': False,
12303 'properties': {'config': {'items': {'$ref': '#/definitions/NetworkConfig'},
12305 'tag': {'type': 'string'}},
12306 'required': ['tag', 'config'],
12308 'SetMachinesAddresses': {'additionalProperties': False,
12309 'properties': {'machine-addresses': {'items': {'$ref': '#/definitions/MachineAddresses'},
12311 'required': ['machine-addresses'],
12313 'SetStatus': {'additionalProperties': False,
12314 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
12316 'required': ['entities'],
12318 'StringResult': {'additionalProperties': False,
12319 'properties': {'error': {'$ref': '#/definitions/Error'},
12320 'result': {'type': 'string'}},
12321 'required': ['result'],
12323 'StringsResult': {'additionalProperties': False,
12324 'properties': {'error': {'$ref': '#/definitions/Error'},
12325 'result': {'items': {'type': 'string'},
12327 'type': 'object'}},
12328 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
12330 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
12332 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
12334 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12335 'Result': {'$ref': '#/definitions/ErrorResults'}},
12337 'Jobs': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12338 'Result': {'$ref': '#/definitions/JobsResults'}},
12340 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12341 'Result': {'$ref': '#/definitions/LifeResults'}},
12343 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
12345 'SetMachineAddresses': {'properties': {'Params': {'$ref': '#/definitions/SetMachinesAddresses'},
12346 'Result': {'$ref': '#/definitions/ErrorResults'}},
12348 'SetObservedNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/SetMachineNetworkConfig'}},
12350 'SetProviderNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12351 'Result': {'$ref': '#/definitions/ErrorResults'}},
12353 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
12354 'Result': {'$ref': '#/definitions/ErrorResults'}},
12356 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
12357 'Result': {'$ref': '#/definitions/ErrorResults'}},
12359 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12360 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
12362 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
12363 'type': 'object'}},
12367 @ReturnMapping(StringsResult
)
12368 async def APIAddresses(self
):
12371 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[str]]
12373 # map input types to rpc msg
12375 msg
= dict(Type
='Machiner', Request
='APIAddresses', Version
=1, Params
=params
)
12377 reply
= await self
.rpc(msg
)
12382 @ReturnMapping(APIHostPortsResult
)
12383 async def APIHostPorts(self
):
12386 Returns -> typing.Sequence[~HostPort]
12388 # map input types to rpc msg
12390 msg
= dict(Type
='Machiner', Request
='APIHostPorts', Version
=1, Params
=params
)
12392 reply
= await self
.rpc(msg
)
12397 @ReturnMapping(BytesResult
)
12398 async def CACert(self
):
12401 Returns -> typing.Sequence[int]
12403 # map input types to rpc msg
12405 msg
= dict(Type
='Machiner', Request
='CACert', Version
=1, Params
=params
)
12407 reply
= await self
.rpc(msg
)
12412 @ReturnMapping(ErrorResults
)
12413 async def EnsureDead(self
, entities
):
12415 entities : typing.Sequence[~Entity]
12416 Returns -> typing.Sequence[~ErrorResult]
12418 # map input types to rpc msg
12420 msg
= dict(Type
='Machiner', Request
='EnsureDead', Version
=1, Params
=params
)
12421 params
['entities'] = entities
12422 reply
= await self
.rpc(msg
)
12427 @ReturnMapping(JobsResults
)
12428 async def Jobs(self
, entities
):
12430 entities : typing.Sequence[~Entity]
12431 Returns -> typing.Sequence[~JobsResult]
12433 # map input types to rpc msg
12435 msg
= dict(Type
='Machiner', Request
='Jobs', Version
=1, Params
=params
)
12436 params
['entities'] = entities
12437 reply
= await self
.rpc(msg
)
12442 @ReturnMapping(LifeResults
)
12443 async def Life(self
, entities
):
12445 entities : typing.Sequence[~Entity]
12446 Returns -> typing.Sequence[~LifeResult]
12448 # map input types to rpc msg
12450 msg
= dict(Type
='Machiner', Request
='Life', Version
=1, Params
=params
)
12451 params
['entities'] = entities
12452 reply
= await self
.rpc(msg
)
12457 @ReturnMapping(StringResult
)
12458 async def ModelUUID(self
):
12461 Returns -> typing.Union[_ForwardRef('Error'), str]
12463 # map input types to rpc msg
12465 msg
= dict(Type
='Machiner', Request
='ModelUUID', Version
=1, Params
=params
)
12467 reply
= await self
.rpc(msg
)
12472 @ReturnMapping(ErrorResults
)
12473 async def SetMachineAddresses(self
, machine_addresses
):
12475 machine_addresses : typing.Sequence[~MachineAddresses]
12476 Returns -> typing.Sequence[~ErrorResult]
12478 # map input types to rpc msg
12480 msg
= dict(Type
='Machiner', Request
='SetMachineAddresses', Version
=1, Params
=params
)
12481 params
['machine-addresses'] = machine_addresses
12482 reply
= await self
.rpc(msg
)
12487 @ReturnMapping(None)
12488 async def SetObservedNetworkConfig(self
, config
, tag
):
12490 config : typing.Sequence[~NetworkConfig]
12494 # map input types to rpc msg
12496 msg
= dict(Type
='Machiner', Request
='SetObservedNetworkConfig', Version
=1, Params
=params
)
12497 params
['config'] = config
12498 params
['tag'] = tag
12499 reply
= await self
.rpc(msg
)
12504 @ReturnMapping(ErrorResults
)
12505 async def SetProviderNetworkConfig(self
, entities
):
12507 entities : typing.Sequence[~Entity]
12508 Returns -> typing.Sequence[~ErrorResult]
12510 # map input types to rpc msg
12512 msg
= dict(Type
='Machiner', Request
='SetProviderNetworkConfig', Version
=1, Params
=params
)
12513 params
['entities'] = entities
12514 reply
= await self
.rpc(msg
)
12519 @ReturnMapping(ErrorResults
)
12520 async def SetStatus(self
, entities
):
12522 entities : typing.Sequence[~EntityStatusArgs]
12523 Returns -> typing.Sequence[~ErrorResult]
12525 # map input types to rpc msg
12527 msg
= dict(Type
='Machiner', Request
='SetStatus', Version
=1, Params
=params
)
12528 params
['entities'] = entities
12529 reply
= await self
.rpc(msg
)
12534 @ReturnMapping(ErrorResults
)
12535 async def UpdateStatus(self
, entities
):
12537 entities : typing.Sequence[~EntityStatusArgs]
12538 Returns -> typing.Sequence[~ErrorResult]
12540 # map input types to rpc msg
12542 msg
= dict(Type
='Machiner', Request
='UpdateStatus', Version
=1, Params
=params
)
12543 params
['entities'] = entities
12544 reply
= await self
.rpc(msg
)
12549 @ReturnMapping(NotifyWatchResults
)
12550 async def Watch(self
, entities
):
12552 entities : typing.Sequence[~Entity]
12553 Returns -> typing.Sequence[~NotifyWatchResult]
12555 # map input types to rpc msg
12557 msg
= dict(Type
='Machiner', Request
='Watch', Version
=1, Params
=params
)
12558 params
['entities'] = entities
12559 reply
= await self
.rpc(msg
)
12564 @ReturnMapping(NotifyWatchResult
)
12565 async def WatchAPIHostPorts(self
):
12568 Returns -> typing.Union[str, _ForwardRef('Error')]
12570 # map input types to rpc msg
12572 msg
= dict(Type
='Machiner', Request
='WatchAPIHostPorts', Version
=1, Params
=params
)
12574 reply
= await self
.rpc(msg
)
12578 class MeterStatusFacade(Type
):
12579 name
= 'MeterStatus'
12581 schema
= {'definitions': {'Entities': {'additionalProperties': False,
12582 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
12584 'required': ['entities'],
12586 'Entity': {'additionalProperties': False,
12587 'properties': {'tag': {'type': 'string'}},
12588 'required': ['tag'],
12590 'Error': {'additionalProperties': False,
12591 'properties': {'code': {'type': 'string'},
12592 'info': {'$ref': '#/definitions/ErrorInfo'},
12593 'message': {'type': 'string'}},
12594 'required': ['message', 'code'],
12596 'ErrorInfo': {'additionalProperties': False,
12597 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
12598 'macaroon-path': {'type': 'string'}},
12600 'Macaroon': {'additionalProperties': False, 'type': 'object'},
12601 'MeterStatusResult': {'additionalProperties': False,
12602 'properties': {'code': {'type': 'string'},
12603 'error': {'$ref': '#/definitions/Error'},
12604 'info': {'type': 'string'}},
12605 'required': ['code', 'info'],
12607 'MeterStatusResults': {'additionalProperties': False,
12608 'properties': {'results': {'items': {'$ref': '#/definitions/MeterStatusResult'},
12610 'required': ['results'],
12612 'NotifyWatchResult': {'additionalProperties': False,
12613 'properties': {'NotifyWatcherId': {'type': 'string'},
12614 'error': {'$ref': '#/definitions/Error'}},
12615 'required': ['NotifyWatcherId'],
12617 'NotifyWatchResults': {'additionalProperties': False,
12618 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
12620 'required': ['results'],
12621 'type': 'object'}},
12622 'properties': {'GetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12623 'Result': {'$ref': '#/definitions/MeterStatusResults'}},
12625 'WatchMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12626 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
12627 'type': 'object'}},
12631 @ReturnMapping(MeterStatusResults
)
12632 async def GetMeterStatus(self
, entities
):
12634 entities : typing.Sequence[~Entity]
12635 Returns -> typing.Sequence[~MeterStatusResult]
12637 # map input types to rpc msg
12639 msg
= dict(Type
='MeterStatus', Request
='GetMeterStatus', Version
=1, Params
=params
)
12640 params
['entities'] = entities
12641 reply
= await self
.rpc(msg
)
12646 @ReturnMapping(NotifyWatchResults
)
12647 async def WatchMeterStatus(self
, entities
):
12649 entities : typing.Sequence[~Entity]
12650 Returns -> typing.Sequence[~NotifyWatchResult]
12652 # map input types to rpc msg
12654 msg
= dict(Type
='MeterStatus', Request
='WatchMeterStatus', Version
=1, Params
=params
)
12655 params
['entities'] = entities
12656 reply
= await self
.rpc(msg
)
12660 class MetricsAdderFacade(Type
):
12661 name
= 'MetricsAdder'
12663 schema
= {'definitions': {'Error': {'additionalProperties': False,
12664 'properties': {'code': {'type': 'string'},
12665 'info': {'$ref': '#/definitions/ErrorInfo'},
12666 'message': {'type': 'string'}},
12667 'required': ['message', 'code'],
12669 'ErrorInfo': {'additionalProperties': False,
12670 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
12671 'macaroon-path': {'type': 'string'}},
12673 'ErrorResult': {'additionalProperties': False,
12674 'properties': {'error': {'$ref': '#/definitions/Error'}},
12676 'ErrorResults': {'additionalProperties': False,
12677 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
12679 'required': ['results'],
12681 'Macaroon': {'additionalProperties': False, 'type': 'object'},
12682 'Metric': {'additionalProperties': False,
12683 'properties': {'key': {'type': 'string'},
12684 'time': {'format': 'date-time',
12686 'value': {'type': 'string'}},
12687 'required': ['key', 'value', 'time'],
12689 'MetricBatch': {'additionalProperties': False,
12690 'properties': {'charm-url': {'type': 'string'},
12691 'created': {'format': 'date-time',
12693 'metrics': {'items': {'$ref': '#/definitions/Metric'},
12695 'uuid': {'type': 'string'}},
12696 'required': ['uuid',
12701 'MetricBatchParam': {'additionalProperties': False,
12702 'properties': {'batch': {'$ref': '#/definitions/MetricBatch'},
12703 'tag': {'type': 'string'}},
12704 'required': ['tag', 'batch'],
12706 'MetricBatchParams': {'additionalProperties': False,
12707 'properties': {'batches': {'items': {'$ref': '#/definitions/MetricBatchParam'},
12709 'required': ['batches'],
12710 'type': 'object'}},
12711 'properties': {'AddMetricBatches': {'properties': {'Params': {'$ref': '#/definitions/MetricBatchParams'},
12712 'Result': {'$ref': '#/definitions/ErrorResults'}},
12713 'type': 'object'}},
12717 @ReturnMapping(ErrorResults
)
12718 async def AddMetricBatches(self
, batches
):
12720 batches : typing.Sequence[~MetricBatchParam]
12721 Returns -> typing.Sequence[~ErrorResult]
12723 # map input types to rpc msg
12725 msg
= dict(Type
='MetricsAdder', Request
='AddMetricBatches', Version
=2, Params
=params
)
12726 params
['batches'] = batches
12727 reply
= await self
.rpc(msg
)
12731 class MetricsDebugFacade(Type
):
12732 name
= 'MetricsDebug'
12734 schema
= {'definitions': {'Entities': {'additionalProperties': False,
12735 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
12737 'required': ['entities'],
12739 'Entity': {'additionalProperties': False,
12740 'properties': {'tag': {'type': 'string'}},
12741 'required': ['tag'],
12743 'EntityMetrics': {'additionalProperties': False,
12744 'properties': {'error': {'$ref': '#/definitions/Error'},
12745 'metrics': {'items': {'$ref': '#/definitions/MetricResult'},
12748 'Error': {'additionalProperties': False,
12749 'properties': {'code': {'type': 'string'},
12750 'info': {'$ref': '#/definitions/ErrorInfo'},
12751 'message': {'type': 'string'}},
12752 'required': ['message', 'code'],
12754 'ErrorInfo': {'additionalProperties': False,
12755 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
12756 'macaroon-path': {'type': 'string'}},
12758 'ErrorResult': {'additionalProperties': False,
12759 'properties': {'error': {'$ref': '#/definitions/Error'}},
12761 'ErrorResults': {'additionalProperties': False,
12762 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
12764 'required': ['results'],
12766 'Macaroon': {'additionalProperties': False, 'type': 'object'},
12767 'MeterStatusParam': {'additionalProperties': False,
12768 'properties': {'code': {'type': 'string'},
12769 'info': {'type': 'string'},
12770 'tag': {'type': 'string'}},
12771 'required': ['tag', 'code', 'info'],
12773 'MeterStatusParams': {'additionalProperties': False,
12774 'properties': {'statues': {'items': {'$ref': '#/definitions/MeterStatusParam'},
12776 'required': ['statues'],
12778 'MetricResult': {'additionalProperties': False,
12779 'properties': {'key': {'type': 'string'},
12780 'time': {'format': 'date-time',
12782 'value': {'type': 'string'}},
12783 'required': ['time', 'key', 'value'],
12785 'MetricResults': {'additionalProperties': False,
12786 'properties': {'results': {'items': {'$ref': '#/definitions/EntityMetrics'},
12788 'required': ['results'],
12789 'type': 'object'}},
12790 'properties': {'GetMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12791 'Result': {'$ref': '#/definitions/MetricResults'}},
12793 'SetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/MeterStatusParams'},
12794 'Result': {'$ref': '#/definitions/ErrorResults'}},
12795 'type': 'object'}},
12799 @ReturnMapping(MetricResults
)
12800 async def GetMetrics(self
, entities
):
12802 entities : typing.Sequence[~Entity]
12803 Returns -> typing.Sequence[~EntityMetrics]
12805 # map input types to rpc msg
12807 msg
= dict(Type
='MetricsDebug', Request
='GetMetrics', Version
=2, Params
=params
)
12808 params
['entities'] = entities
12809 reply
= await self
.rpc(msg
)
12814 @ReturnMapping(ErrorResults
)
12815 async def SetMeterStatus(self
, statues
):
12817 statues : typing.Sequence[~MeterStatusParam]
12818 Returns -> typing.Sequence[~ErrorResult]
12820 # map input types to rpc msg
12822 msg
= dict(Type
='MetricsDebug', Request
='SetMeterStatus', Version
=2, Params
=params
)
12823 params
['statues'] = statues
12824 reply
= await self
.rpc(msg
)
12828 class MetricsManagerFacade(Type
):
12829 name
= 'MetricsManager'
12831 schema
= {'definitions': {'Entities': {'additionalProperties': False,
12832 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
12834 'required': ['entities'],
12836 'Entity': {'additionalProperties': False,
12837 'properties': {'tag': {'type': 'string'}},
12838 'required': ['tag'],
12840 'Error': {'additionalProperties': False,
12841 'properties': {'code': {'type': 'string'},
12842 'info': {'$ref': '#/definitions/ErrorInfo'},
12843 'message': {'type': 'string'}},
12844 'required': ['message', 'code'],
12846 'ErrorInfo': {'additionalProperties': False,
12847 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
12848 'macaroon-path': {'type': 'string'}},
12850 'ErrorResult': {'additionalProperties': False,
12851 'properties': {'error': {'$ref': '#/definitions/Error'}},
12853 'ErrorResults': {'additionalProperties': False,
12854 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
12856 'required': ['results'],
12858 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
12859 'properties': {'CleanupOldMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12860 'Result': {'$ref': '#/definitions/ErrorResults'}},
12862 'SendMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12863 'Result': {'$ref': '#/definitions/ErrorResults'}},
12864 'type': 'object'}},
12868 @ReturnMapping(ErrorResults
)
12869 async def CleanupOldMetrics(self
, entities
):
12871 entities : typing.Sequence[~Entity]
12872 Returns -> typing.Sequence[~ErrorResult]
12874 # map input types to rpc msg
12876 msg
= dict(Type
='MetricsManager', Request
='CleanupOldMetrics', Version
=1, Params
=params
)
12877 params
['entities'] = entities
12878 reply
= await self
.rpc(msg
)
12883 @ReturnMapping(ErrorResults
)
12884 async def SendMetrics(self
, entities
):
12886 entities : typing.Sequence[~Entity]
12887 Returns -> typing.Sequence[~ErrorResult]
12889 # map input types to rpc msg
12891 msg
= dict(Type
='MetricsManager', Request
='SendMetrics', Version
=1, Params
=params
)
12892 params
['entities'] = entities
12893 reply
= await self
.rpc(msg
)
12897 class MigrationFlagFacade(Type
):
12898 name
= 'MigrationFlag'
12900 schema
= {'definitions': {'Entities': {'additionalProperties': False,
12901 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
12903 'required': ['entities'],
12905 'Entity': {'additionalProperties': False,
12906 'properties': {'tag': {'type': 'string'}},
12907 'required': ['tag'],
12909 'Error': {'additionalProperties': False,
12910 'properties': {'code': {'type': 'string'},
12911 'info': {'$ref': '#/definitions/ErrorInfo'},
12912 'message': {'type': 'string'}},
12913 'required': ['message', 'code'],
12915 'ErrorInfo': {'additionalProperties': False,
12916 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
12917 'macaroon-path': {'type': 'string'}},
12919 'Macaroon': {'additionalProperties': False, 'type': 'object'},
12920 'NotifyWatchResult': {'additionalProperties': False,
12921 'properties': {'NotifyWatcherId': {'type': 'string'},
12922 'error': {'$ref': '#/definitions/Error'}},
12923 'required': ['NotifyWatcherId'],
12925 'NotifyWatchResults': {'additionalProperties': False,
12926 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
12928 'required': ['results'],
12930 'PhaseResult': {'additionalProperties': False,
12931 'properties': {'error': {'$ref': '#/definitions/Error'},
12932 'phase': {'type': 'string'}},
12933 'required': ['phase'],
12935 'PhaseResults': {'additionalProperties': False,
12936 'properties': {'results': {'items': {'$ref': '#/definitions/PhaseResult'},
12938 'required': ['results'],
12939 'type': 'object'}},
12940 'properties': {'Phase': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12941 'Result': {'$ref': '#/definitions/PhaseResults'}},
12943 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12944 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
12945 'type': 'object'}},
12949 @ReturnMapping(PhaseResults
)
12950 async def Phase(self
, entities
):
12952 entities : typing.Sequence[~Entity]
12953 Returns -> typing.Sequence[~PhaseResult]
12955 # map input types to rpc msg
12957 msg
= dict(Type
='MigrationFlag', Request
='Phase', Version
=1, Params
=params
)
12958 params
['entities'] = entities
12959 reply
= await self
.rpc(msg
)
12964 @ReturnMapping(NotifyWatchResults
)
12965 async def Watch(self
, entities
):
12967 entities : typing.Sequence[~Entity]
12968 Returns -> typing.Sequence[~NotifyWatchResult]
12970 # map input types to rpc msg
12972 msg
= dict(Type
='MigrationFlag', Request
='Watch', Version
=1, Params
=params
)
12973 params
['entities'] = entities
12974 reply
= await self
.rpc(msg
)
12978 class MigrationMasterFacade(Type
):
12979 name
= 'MigrationMaster'
12981 schema
= {'definitions': {'Error': {'additionalProperties': False,
12982 'properties': {'code': {'type': 'string'},
12983 'info': {'$ref': '#/definitions/ErrorInfo'},
12984 'message': {'type': 'string'}},
12985 'required': ['message', 'code'],
12987 'ErrorInfo': {'additionalProperties': False,
12988 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
12989 'macaroon-path': {'type': 'string'}},
12991 'FullMigrationStatus': {'additionalProperties': False,
12992 'properties': {'attempt': {'type': 'integer'},
12993 'phase': {'type': 'string'},
12994 'spec': {'$ref': '#/definitions/ModelMigrationSpec'}},
12995 'required': ['spec',
12999 'Macaroon': {'additionalProperties': False, 'type': 'object'},
13000 'ModelMigrationSpec': {'additionalProperties': False,
13001 'properties': {'model-tag': {'type': 'string'},
13002 'target-info': {'$ref': '#/definitions/ModelMigrationTargetInfo'}},
13003 'required': ['model-tag',
13006 'ModelMigrationTargetInfo': {'additionalProperties': False,
13007 'properties': {'addrs': {'items': {'type': 'string'},
13009 'auth-tag': {'type': 'string'},
13010 'ca-cert': {'type': 'string'},
13011 'controller-tag': {'type': 'string'},
13012 'password': {'type': 'string'}},
13013 'required': ['controller-tag',
13019 'NotifyWatchResult': {'additionalProperties': False,
13020 'properties': {'NotifyWatcherId': {'type': 'string'},
13021 'error': {'$ref': '#/definitions/Error'}},
13022 'required': ['NotifyWatcherId'],
13024 'SerializedModel': {'additionalProperties': False,
13025 'properties': {'bytes': {'items': {'type': 'integer'},
13027 'required': ['bytes'],
13029 'SetMigrationPhaseArgs': {'additionalProperties': False,
13030 'properties': {'phase': {'type': 'string'}},
13031 'required': ['phase'],
13032 'type': 'object'}},
13033 'properties': {'Export': {'properties': {'Result': {'$ref': '#/definitions/SerializedModel'}},
13035 'GetMigrationStatus': {'properties': {'Result': {'$ref': '#/definitions/FullMigrationStatus'}},
13037 'SetPhase': {'properties': {'Params': {'$ref': '#/definitions/SetMigrationPhaseArgs'}},
13039 'Watch': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
13040 'type': 'object'}},
13044 @ReturnMapping(SerializedModel
)
13045 async def Export(self
):
13048 Returns -> typing.Sequence[int]
13050 # map input types to rpc msg
13052 msg
= dict(Type
='MigrationMaster', Request
='Export', Version
=1, Params
=params
)
13054 reply
= await self
.rpc(msg
)
13059 @ReturnMapping(FullMigrationStatus
)
13060 async def GetMigrationStatus(self
):
13063 Returns -> typing.Union[int, str, _ForwardRef('ModelMigrationSpec')]
13065 # map input types to rpc msg
13067 msg
= dict(Type
='MigrationMaster', Request
='GetMigrationStatus', Version
=1, Params
=params
)
13069 reply
= await self
.rpc(msg
)
13074 @ReturnMapping(None)
13075 async def SetPhase(self
, phase
):
13080 # map input types to rpc msg
13082 msg
= dict(Type
='MigrationMaster', Request
='SetPhase', Version
=1, Params
=params
)
13083 params
['phase'] = phase
13084 reply
= await self
.rpc(msg
)
13089 @ReturnMapping(NotifyWatchResult
)
13090 async def Watch(self
):
13093 Returns -> typing.Union[str, _ForwardRef('Error')]
13095 # map input types to rpc msg
13097 msg
= dict(Type
='MigrationMaster', Request
='Watch', Version
=1, Params
=params
)
13099 reply
= await self
.rpc(msg
)
13103 class MigrationMinionFacade(Type
):
13104 name
= 'MigrationMinion'
13106 schema
= {'definitions': {'Error': {'additionalProperties': False,
13107 'properties': {'code': {'type': 'string'},
13108 'info': {'$ref': '#/definitions/ErrorInfo'},
13109 'message': {'type': 'string'}},
13110 'required': ['message', 'code'],
13112 'ErrorInfo': {'additionalProperties': False,
13113 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
13114 'macaroon-path': {'type': 'string'}},
13116 'Macaroon': {'additionalProperties': False, 'type': 'object'},
13117 'NotifyWatchResult': {'additionalProperties': False,
13118 'properties': {'NotifyWatcherId': {'type': 'string'},
13119 'error': {'$ref': '#/definitions/Error'}},
13120 'required': ['NotifyWatcherId'],
13121 'type': 'object'}},
13122 'properties': {'Watch': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
13123 'type': 'object'}},
13127 @ReturnMapping(NotifyWatchResult
)
13128 async def Watch(self
):
13131 Returns -> typing.Union[str, _ForwardRef('Error')]
13133 # map input types to rpc msg
13135 msg
= dict(Type
='MigrationMinion', Request
='Watch', Version
=1, Params
=params
)
13137 reply
= await self
.rpc(msg
)
13141 class MigrationStatusWatcherFacade(Type
):
13142 name
= 'MigrationStatusWatcher'
13144 schema
= {'definitions': {'MigrationStatus': {'additionalProperties': False,
13145 'properties': {'attempt': {'type': 'integer'},
13146 'phase': {'type': 'string'},
13147 'source-api-addrs': {'items': {'type': 'string'},
13149 'source-ca-cert': {'type': 'string'},
13150 'target-api-addrs': {'items': {'type': 'string'},
13152 'target-ca-cert': {'type': 'string'}},
13153 'required': ['attempt',
13155 'source-api-addrs',
13157 'target-api-addrs',
13159 'type': 'object'}},
13160 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MigrationStatus'}},
13162 'Stop': {'type': 'object'}},
13166 @ReturnMapping(MigrationStatus
)
13167 async def Next(self
):
13170 Returns -> typing.Union[int, typing.Sequence[str]]
13172 # map input types to rpc msg
13174 msg
= dict(Type
='MigrationStatusWatcher', Request
='Next', Version
=1, Params
=params
)
13176 reply
= await self
.rpc(msg
)
13181 @ReturnMapping(None)
13182 async def Stop(self
):
13187 # map input types to rpc msg
13189 msg
= dict(Type
='MigrationStatusWatcher', Request
='Stop', Version
=1, Params
=params
)
13191 reply
= await self
.rpc(msg
)
13195 class MigrationTargetFacade(Type
):
13196 name
= 'MigrationTarget'
13198 schema
= {'definitions': {'ModelArgs': {'additionalProperties': False,
13199 'properties': {'model-tag': {'type': 'string'}},
13200 'required': ['model-tag'],
13202 'SerializedModel': {'additionalProperties': False,
13203 'properties': {'bytes': {'items': {'type': 'integer'},
13205 'required': ['bytes'],
13206 'type': 'object'}},
13207 'properties': {'Abort': {'properties': {'Params': {'$ref': '#/definitions/ModelArgs'}},
13209 'Activate': {'properties': {'Params': {'$ref': '#/definitions/ModelArgs'}},
13211 'Import': {'properties': {'Params': {'$ref': '#/definitions/SerializedModel'}},
13212 'type': 'object'}},
13216 @ReturnMapping(None)
13217 async def Abort(self
, model_tag
):
13222 # map input types to rpc msg
13224 msg
= dict(Type
='MigrationTarget', Request
='Abort', Version
=1, Params
=params
)
13225 params
['model-tag'] = model_tag
13226 reply
= await self
.rpc(msg
)
13231 @ReturnMapping(None)
13232 async def Activate(self
, model_tag
):
13237 # map input types to rpc msg
13239 msg
= dict(Type
='MigrationTarget', Request
='Activate', Version
=1, Params
=params
)
13240 params
['model-tag'] = model_tag
13241 reply
= await self
.rpc(msg
)
13246 @ReturnMapping(None)
13247 async def Import(self
, bytes_
):
13249 bytes_ : typing.Sequence[int]
13252 # map input types to rpc msg
13254 msg
= dict(Type
='MigrationTarget', Request
='Import', Version
=1, Params
=params
)
13255 params
['bytes'] = bytes_
13256 reply
= await self
.rpc(msg
)
13260 class ModelManagerFacade(Type
):
13261 name
= 'ModelManager'
13263 schema
= {'definitions': {'Entities': {'additionalProperties': False,
13264 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
13266 'required': ['entities'],
13268 'Entity': {'additionalProperties': False,
13269 'properties': {'tag': {'type': 'string'}},
13270 'required': ['tag'],
13272 'EntityStatus': {'additionalProperties': False,
13273 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
13274 'type': 'object'}},
13276 'info': {'type': 'string'},
13277 'since': {'format': 'date-time',
13279 'status': {'type': 'string'}},
13280 'required': ['status', 'info', 'since'],
13282 'Error': {'additionalProperties': False,
13283 'properties': {'code': {'type': 'string'},
13284 'info': {'$ref': '#/definitions/ErrorInfo'},
13285 'message': {'type': 'string'}},
13286 'required': ['message', 'code'],
13288 'ErrorInfo': {'additionalProperties': False,
13289 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
13290 'macaroon-path': {'type': 'string'}},
13292 'ErrorResult': {'additionalProperties': False,
13293 'properties': {'error': {'$ref': '#/definitions/Error'}},
13295 'ErrorResults': {'additionalProperties': False,
13296 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
13298 'required': ['results'],
13300 'Macaroon': {'additionalProperties': False, 'type': 'object'},
13301 'Model': {'additionalProperties': False,
13302 'properties': {'name': {'type': 'string'},
13303 'owner-tag': {'type': 'string'},
13304 'uuid': {'type': 'string'}},
13305 'required': ['name', 'uuid', 'owner-tag'],
13307 'ModelCreateArgs': {'additionalProperties': False,
13308 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
13309 'type': 'object'}},
13311 'credential': {'type': 'string'},
13312 'name': {'type': 'string'},
13313 'owner-tag': {'type': 'string'},
13314 'region': {'type': 'string'}},
13315 'required': ['name', 'owner-tag'],
13317 'ModelInfo': {'additionalProperties': False,
13318 'properties': {'cloud': {'type': 'string'},
13319 'cloud-credential': {'type': 'string'},
13320 'cloud-region': {'type': 'string'},
13321 'controller-uuid': {'type': 'string'},
13322 'default-series': {'type': 'string'},
13323 'life': {'type': 'string'},
13324 'name': {'type': 'string'},
13325 'owner-tag': {'type': 'string'},
13326 'provider-type': {'type': 'string'},
13327 'status': {'$ref': '#/definitions/EntityStatus'},
13328 'users': {'items': {'$ref': '#/definitions/ModelUserInfo'},
13330 'uuid': {'type': 'string'}},
13331 'required': ['name',
13342 'ModelInfoResult': {'additionalProperties': False,
13343 'properties': {'error': {'$ref': '#/definitions/Error'},
13344 'result': {'$ref': '#/definitions/ModelInfo'}},
13346 'ModelInfoResults': {'additionalProperties': False,
13347 'properties': {'results': {'items': {'$ref': '#/definitions/ModelInfoResult'},
13349 'required': ['results'],
13351 'ModelUserInfo': {'additionalProperties': False,
13352 'properties': {'access': {'type': 'string'},
13353 'display-name': {'type': 'string'},
13354 'last-connection': {'format': 'date-time',
13356 'user': {'type': 'string'}},
13357 'required': ['user',
13362 'ModifyModelAccess': {'additionalProperties': False,
13363 'properties': {'access': {'type': 'string'},
13364 'action': {'type': 'string'},
13365 'model-tag': {'type': 'string'},
13366 'user-tag': {'type': 'string'}},
13367 'required': ['user-tag',
13372 'ModifyModelAccessRequest': {'additionalProperties': False,
13373 'properties': {'changes': {'items': {'$ref': '#/definitions/ModifyModelAccess'},
13375 'required': ['changes'],
13377 'UserModel': {'additionalProperties': False,
13378 'properties': {'last-connection': {'format': 'date-time',
13380 'model': {'$ref': '#/definitions/Model'}},
13381 'required': ['model', 'last-connection'],
13383 'UserModelList': {'additionalProperties': False,
13384 'properties': {'user-models': {'items': {'$ref': '#/definitions/UserModel'},
13386 'required': ['user-models'],
13387 'type': 'object'}},
13388 'properties': {'CreateModel': {'properties': {'Params': {'$ref': '#/definitions/ModelCreateArgs'},
13389 'Result': {'$ref': '#/definitions/ModelInfo'}},
13391 'DestroyModel': {'type': 'object'},
13392 'ListModels': {'properties': {'Params': {'$ref': '#/definitions/Entity'},
13393 'Result': {'$ref': '#/definitions/UserModelList'}},
13395 'ModelInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13396 'Result': {'$ref': '#/definitions/ModelInfoResults'}},
13398 'ModifyModelAccess': {'properties': {'Params': {'$ref': '#/definitions/ModifyModelAccessRequest'},
13399 'Result': {'$ref': '#/definitions/ErrorResults'}},
13400 'type': 'object'}},
13404 @ReturnMapping(ModelInfo
)
13405 async def CreateModel(self
, config
, credential
, name
, owner_tag
, region
):
13407 config : typing.Mapping[str, typing.Any]
13412 Returns -> typing.Union[_ForwardRef('EntityStatus'), typing.Sequence[~ModelUserInfo]]
13414 # map input types to rpc msg
13416 msg
= dict(Type
='ModelManager', Request
='CreateModel', Version
=2, Params
=params
)
13417 params
['config'] = config
13418 params
['credential'] = credential
13419 params
['name'] = name
13420 params
['owner-tag'] = owner_tag
13421 params
['region'] = region
13422 reply
= await self
.rpc(msg
)
13427 @ReturnMapping(None)
13428 async def DestroyModel(self
):
13433 # map input types to rpc msg
13435 msg
= dict(Type
='ModelManager', Request
='DestroyModel', Version
=2, Params
=params
)
13437 reply
= await self
.rpc(msg
)
13442 @ReturnMapping(UserModelList
)
13443 async def ListModels(self
, tag
):
13446 Returns -> typing.Sequence[~UserModel]
13448 # map input types to rpc msg
13450 msg
= dict(Type
='ModelManager', Request
='ListModels', Version
=2, Params
=params
)
13451 params
['tag'] = tag
13452 reply
= await self
.rpc(msg
)
13457 @ReturnMapping(ModelInfoResults
)
13458 async def ModelInfo(self
, entities
):
13460 entities : typing.Sequence[~Entity]
13461 Returns -> typing.Sequence[~ModelInfoResult]
13463 # map input types to rpc msg
13465 msg
= dict(Type
='ModelManager', Request
='ModelInfo', Version
=2, Params
=params
)
13466 params
['entities'] = entities
13467 reply
= await self
.rpc(msg
)
13472 @ReturnMapping(ErrorResults
)
13473 async def ModifyModelAccess(self
, changes
):
13475 changes : typing.Sequence[~ModifyModelAccess]
13476 Returns -> typing.Sequence[~ErrorResult]
13478 # map input types to rpc msg
13480 msg
= dict(Type
='ModelManager', Request
='ModifyModelAccess', Version
=2, Params
=params
)
13481 params
['changes'] = changes
13482 reply
= await self
.rpc(msg
)
13486 class NotifyWatcherFacade(Type
):
13487 name
= 'NotifyWatcher'
13489 schema
= {'properties': {'Next': {'type': 'object'}, 'Stop': {'type': 'object'}},
13493 @ReturnMapping(None)
13494 async def Next(self
):
13499 # map input types to rpc msg
13501 msg
= dict(Type
='NotifyWatcher', Request
='Next', Version
=1, Params
=params
)
13503 reply
= await self
.rpc(msg
)
13508 @ReturnMapping(None)
13509 async def Stop(self
):
13514 # map input types to rpc msg
13516 msg
= dict(Type
='NotifyWatcher', Request
='Stop', Version
=1, Params
=params
)
13518 reply
= await self
.rpc(msg
)
13522 class PingerFacade(Type
):
13525 schema
= {'properties': {'Ping': {'type': 'object'}, 'Stop': {'type': 'object'}},
13529 @ReturnMapping(None)
13530 async def Ping(self
):
13535 # map input types to rpc msg
13537 msg
= dict(Type
='Pinger', Request
='Ping', Version
=1, Params
=params
)
13539 reply
= await self
.rpc(msg
)
13544 @ReturnMapping(None)
13545 async def Stop(self
):
13550 # map input types to rpc msg
13552 msg
= dict(Type
='Pinger', Request
='Stop', Version
=1, Params
=params
)
13554 reply
= await self
.rpc(msg
)
13558 class ProvisionerFacade(Type
):
13559 name
= 'Provisioner'
13561 schema
= {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
13562 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
13565 'required': ['servers'],
13567 'Address': {'additionalProperties': False,
13568 'properties': {'scope': {'type': 'string'},
13569 'space-name': {'type': 'string'},
13570 'type': {'type': 'string'},
13571 'value': {'type': 'string'}},
13572 'required': ['value', 'type', 'scope'],
13574 'Binary': {'additionalProperties': False,
13575 'properties': {'Arch': {'type': 'string'},
13576 'Number': {'$ref': '#/definitions/Number'},
13577 'Series': {'type': 'string'}},
13578 'required': ['Number', 'Series', 'Arch'],
13580 'BytesResult': {'additionalProperties': False,
13581 'properties': {'result': {'items': {'type': 'integer'},
13583 'required': ['result'],
13585 'CloudImageMetadata': {'additionalProperties': False,
13586 'properties': {'arch': {'type': 'string'},
13587 'image-id': {'type': 'string'},
13588 'priority': {'type': 'integer'},
13589 'region': {'type': 'string'},
13590 'root-storage-size': {'type': 'integer'},
13591 'root-storage-type': {'type': 'string'},
13592 'series': {'type': 'string'},
13593 'source': {'type': 'string'},
13594 'stream': {'type': 'string'},
13595 'version': {'type': 'string'},
13596 'virt-type': {'type': 'string'}},
13597 'required': ['image-id',
13605 'ConstraintsResult': {'additionalProperties': False,
13606 'properties': {'constraints': {'$ref': '#/definitions/Value'},
13607 'error': {'$ref': '#/definitions/Error'}},
13608 'required': ['constraints'],
13610 'ConstraintsResults': {'additionalProperties': False,
13611 'properties': {'results': {'items': {'$ref': '#/definitions/ConstraintsResult'},
13613 'required': ['results'],
13615 'ContainerConfig': {'additionalProperties': False,
13616 'properties': {'UpdateBehavior': {'$ref': '#/definitions/UpdateBehavior'},
13617 'apt-mirror': {'type': 'string'},
13618 'apt-proxy': {'$ref': '#/definitions/Settings'},
13619 'authorized-keys': {'type': 'string'},
13620 'provider-type': {'type': 'string'},
13621 'proxy': {'$ref': '#/definitions/Settings'},
13622 'ssl-hostname-verification': {'type': 'boolean'}},
13623 'required': ['provider-type',
13625 'ssl-hostname-verification',
13631 'ContainerManagerConfig': {'additionalProperties': False,
13632 'properties': {'config': {'patternProperties': {'.*': {'type': 'string'}},
13633 'type': 'object'}},
13634 'required': ['config'],
13636 'ContainerManagerConfigParams': {'additionalProperties': False,
13637 'properties': {'type': {'type': 'string'}},
13638 'required': ['type'],
13640 'ControllerConfigResult': {'additionalProperties': False,
13641 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
13642 'type': 'object'}},
13643 'type': 'object'}},
13644 'required': ['config'],
13646 'DistributionGroupResult': {'additionalProperties': False,
13647 'properties': {'error': {'$ref': '#/definitions/Error'},
13648 'result': {'items': {'type': 'string'},
13650 'required': ['result'],
13652 'DistributionGroupResults': {'additionalProperties': False,
13653 'properties': {'results': {'items': {'$ref': '#/definitions/DistributionGroupResult'},
13655 'required': ['results'],
13657 'Entities': {'additionalProperties': False,
13658 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
13660 'required': ['entities'],
13662 'Entity': {'additionalProperties': False,
13663 'properties': {'tag': {'type': 'string'}},
13664 'required': ['tag'],
13666 'EntityPassword': {'additionalProperties': False,
13667 'properties': {'password': {'type': 'string'},
13668 'tag': {'type': 'string'}},
13669 'required': ['tag', 'password'],
13671 'EntityPasswords': {'additionalProperties': False,
13672 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'},
13674 'required': ['changes'],
13676 'EntityStatusArgs': {'additionalProperties': False,
13677 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
13678 'type': 'object'}},
13680 'info': {'type': 'string'},
13681 'status': {'type': 'string'},
13682 'tag': {'type': 'string'}},
13683 'required': ['tag',
13688 'Error': {'additionalProperties': False,
13689 'properties': {'code': {'type': 'string'},
13690 'info': {'$ref': '#/definitions/ErrorInfo'},
13691 'message': {'type': 'string'}},
13692 'required': ['message', 'code'],
13694 'ErrorInfo': {'additionalProperties': False,
13695 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
13696 'macaroon-path': {'type': 'string'}},
13698 'ErrorResult': {'additionalProperties': False,
13699 'properties': {'error': {'$ref': '#/definitions/Error'}},
13701 'ErrorResults': {'additionalProperties': False,
13702 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
13704 'required': ['results'],
13706 'FindToolsParams': {'additionalProperties': False,
13707 'properties': {'arch': {'type': 'string'},
13708 'major': {'type': 'integer'},
13709 'minor': {'type': 'integer'},
13710 'number': {'$ref': '#/definitions/Number'},
13711 'series': {'type': 'string'}},
13712 'required': ['number',
13718 'FindToolsResult': {'additionalProperties': False,
13719 'properties': {'error': {'$ref': '#/definitions/Error'},
13720 'list': {'items': {'$ref': '#/definitions/Tools'},
13722 'required': ['list'],
13724 'HardwareCharacteristics': {'additionalProperties': False,
13725 'properties': {'arch': {'type': 'string'},
13726 'availability-zone': {'type': 'string'},
13727 'cpu-cores': {'type': 'integer'},
13728 'cpu-power': {'type': 'integer'},
13729 'mem': {'type': 'integer'},
13730 'root-disk': {'type': 'integer'},
13731 'tags': {'items': {'type': 'string'},
13734 'HostPort': {'additionalProperties': False,
13735 'properties': {'Address': {'$ref': '#/definitions/Address'},
13736 'port': {'type': 'integer'}},
13737 'required': ['Address', 'port'],
13739 'InstanceInfo': {'additionalProperties': False,
13740 'properties': {'characteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
13741 'instance-id': {'type': 'string'},
13742 'network-config': {'items': {'$ref': '#/definitions/NetworkConfig'},
13744 'nonce': {'type': 'string'},
13745 'tag': {'type': 'string'},
13746 'volume-attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/VolumeAttachmentInfo'}},
13748 'volumes': {'items': {'$ref': '#/definitions/Volume'},
13750 'required': ['tag',
13755 'volume-attachments',
13758 'InstancesInfo': {'additionalProperties': False,
13759 'properties': {'machines': {'items': {'$ref': '#/definitions/InstanceInfo'},
13761 'required': ['machines'],
13763 'LifeResult': {'additionalProperties': False,
13764 'properties': {'error': {'$ref': '#/definitions/Error'},
13765 'life': {'type': 'string'}},
13766 'required': ['life'],
13768 'LifeResults': {'additionalProperties': False,
13769 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
13771 'required': ['results'],
13773 'Macaroon': {'additionalProperties': False, 'type': 'object'},
13774 'MachineContainers': {'additionalProperties': False,
13775 'properties': {'container-types': {'items': {'type': 'string'},
13777 'machine-tag': {'type': 'string'}},
13778 'required': ['machine-tag',
13779 'container-types'],
13781 'MachineContainersParams': {'additionalProperties': False,
13782 'properties': {'params': {'items': {'$ref': '#/definitions/MachineContainers'},
13784 'required': ['params'],
13786 'MachineNetworkConfigResult': {'additionalProperties': False,
13787 'properties': {'error': {'$ref': '#/definitions/Error'},
13788 'info': {'items': {'$ref': '#/definitions/NetworkConfig'},
13790 'required': ['info'],
13792 'MachineNetworkConfigResults': {'additionalProperties': False,
13793 'properties': {'results': {'items': {'$ref': '#/definitions/MachineNetworkConfigResult'},
13795 'required': ['results'],
13797 'ModelConfigResult': {'additionalProperties': False,
13798 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
13799 'type': 'object'}},
13800 'type': 'object'}},
13801 'required': ['config'],
13803 'NetworkConfig': {'additionalProperties': False,
13804 'properties': {'address': {'type': 'string'},
13805 'cidr': {'type': 'string'},
13806 'config-type': {'type': 'string'},
13807 'device-index': {'type': 'integer'},
13808 'disabled': {'type': 'boolean'},
13809 'dns-search-domains': {'items': {'type': 'string'},
13811 'dns-servers': {'items': {'type': 'string'},
13813 'gateway-address': {'type': 'string'},
13814 'interface-name': {'type': 'string'},
13815 'interface-type': {'type': 'string'},
13816 'mac-address': {'type': 'string'},
13817 'mtu': {'type': 'integer'},
13818 'no-auto-start': {'type': 'boolean'},
13819 'parent-interface-name': {'type': 'string'},
13820 'provider-address-id': {'type': 'string'},
13821 'provider-id': {'type': 'string'},
13822 'provider-space-id': {'type': 'string'},
13823 'provider-subnet-id': {'type': 'string'},
13824 'provider-vlan-id': {'type': 'string'},
13825 'vlan-tag': {'type': 'integer'}},
13826 'required': ['device-index',
13831 'provider-subnet-id',
13832 'provider-space-id',
13833 'provider-address-id',
13834 'provider-vlan-id',
13837 'parent-interface-name',
13841 'NotifyWatchResult': {'additionalProperties': False,
13842 'properties': {'NotifyWatcherId': {'type': 'string'},
13843 'error': {'$ref': '#/definitions/Error'}},
13844 'required': ['NotifyWatcherId'],
13846 'Number': {'additionalProperties': False,
13847 'properties': {'Build': {'type': 'integer'},
13848 'Major': {'type': 'integer'},
13849 'Minor': {'type': 'integer'},
13850 'Patch': {'type': 'integer'},
13851 'Tag': {'type': 'string'}},
13852 'required': ['Major',
13858 'ProvisioningInfo': {'additionalProperties': False,
13859 'properties': {'constraints': {'$ref': '#/definitions/Value'},
13860 'controller-config': {'patternProperties': {'.*': {'additionalProperties': True,
13861 'type': 'object'}},
13863 'endpoint-bindings': {'patternProperties': {'.*': {'type': 'string'}},
13865 'image-metadata': {'items': {'$ref': '#/definitions/CloudImageMetadata'},
13867 'jobs': {'items': {'type': 'string'},
13869 'placement': {'type': 'string'},
13870 'series': {'type': 'string'},
13871 'subnets-to-zones': {'patternProperties': {'.*': {'items': {'type': 'string'},
13874 'tags': {'patternProperties': {'.*': {'type': 'string'}},
13876 'volumes': {'items': {'$ref': '#/definitions/VolumeParams'},
13878 'required': ['constraints',
13883 'ProvisioningInfoResult': {'additionalProperties': False,
13884 'properties': {'error': {'$ref': '#/definitions/Error'},
13885 'result': {'$ref': '#/definitions/ProvisioningInfo'}},
13886 'required': ['result'],
13888 'ProvisioningInfoResults': {'additionalProperties': False,
13889 'properties': {'results': {'items': {'$ref': '#/definitions/ProvisioningInfoResult'},
13891 'required': ['results'],
13893 'SetStatus': {'additionalProperties': False,
13894 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
13896 'required': ['entities'],
13898 'Settings': {'additionalProperties': False,
13899 'properties': {'Ftp': {'type': 'string'},
13900 'Http': {'type': 'string'},
13901 'Https': {'type': 'string'},
13902 'NoProxy': {'type': 'string'}},
13903 'required': ['Http', 'Https', 'Ftp', 'NoProxy'],
13905 'StatusResult': {'additionalProperties': False,
13906 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
13907 'type': 'object'}},
13909 'error': {'$ref': '#/definitions/Error'},
13910 'id': {'type': 'string'},
13911 'info': {'type': 'string'},
13912 'life': {'type': 'string'},
13913 'since': {'format': 'date-time',
13915 'status': {'type': 'string'}},
13923 'StatusResults': {'additionalProperties': False,
13924 'properties': {'results': {'items': {'$ref': '#/definitions/StatusResult'},
13926 'required': ['results'],
13928 'StringResult': {'additionalProperties': False,
13929 'properties': {'error': {'$ref': '#/definitions/Error'},
13930 'result': {'type': 'string'}},
13931 'required': ['result'],
13933 'StringResults': {'additionalProperties': False,
13934 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
13936 'required': ['results'],
13938 'StringsResult': {'additionalProperties': False,
13939 'properties': {'error': {'$ref': '#/definitions/Error'},
13940 'result': {'items': {'type': 'string'},
13943 'StringsWatchResult': {'additionalProperties': False,
13944 'properties': {'changes': {'items': {'type': 'string'},
13946 'error': {'$ref': '#/definitions/Error'},
13947 'watcher-id': {'type': 'string'}},
13948 'required': ['watcher-id'],
13950 'StringsWatchResults': {'additionalProperties': False,
13951 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
13953 'required': ['results'],
13955 'Tools': {'additionalProperties': False,
13956 'properties': {'sha256': {'type': 'string'},
13957 'size': {'type': 'integer'},
13958 'url': {'type': 'string'},
13959 'version': {'$ref': '#/definitions/Binary'}},
13960 'required': ['version', 'url', 'size'],
13962 'ToolsResult': {'additionalProperties': False,
13963 'properties': {'disable-ssl-hostname-verification': {'type': 'boolean'},
13964 'error': {'$ref': '#/definitions/Error'},
13965 'tools': {'items': {'$ref': '#/definitions/Tools'},
13967 'required': ['tools',
13968 'disable-ssl-hostname-verification'],
13970 'ToolsResults': {'additionalProperties': False,
13971 'properties': {'results': {'items': {'$ref': '#/definitions/ToolsResult'},
13973 'required': ['results'],
13975 'UpdateBehavior': {'additionalProperties': False,
13976 'properties': {'enable-os-refresh-update': {'type': 'boolean'},
13977 'enable-os-upgrade': {'type': 'boolean'}},
13978 'required': ['enable-os-refresh-update',
13979 'enable-os-upgrade'],
13981 'Value': {'additionalProperties': False,
13982 'properties': {'arch': {'type': 'string'},
13983 'container': {'type': 'string'},
13984 'cpu-cores': {'type': 'integer'},
13985 'cpu-power': {'type': 'integer'},
13986 'instance-type': {'type': 'string'},
13987 'mem': {'type': 'integer'},
13988 'root-disk': {'type': 'integer'},
13989 'spaces': {'items': {'type': 'string'},
13991 'tags': {'items': {'type': 'string'},
13993 'virt-type': {'type': 'string'}},
13995 'Volume': {'additionalProperties': False,
13996 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'},
13997 'volume-tag': {'type': 'string'}},
13998 'required': ['volume-tag', 'info'],
14000 'VolumeAttachmentInfo': {'additionalProperties': False,
14001 'properties': {'bus-address': {'type': 'string'},
14002 'device-link': {'type': 'string'},
14003 'device-name': {'type': 'string'},
14004 'read-only': {'type': 'boolean'}},
14006 'VolumeAttachmentParams': {'additionalProperties': False,
14007 'properties': {'instance-id': {'type': 'string'},
14008 'machine-tag': {'type': 'string'},
14009 'provider': {'type': 'string'},
14010 'read-only': {'type': 'boolean'},
14011 'volume-id': {'type': 'string'},
14012 'volume-tag': {'type': 'string'}},
14013 'required': ['volume-tag',
14017 'VolumeInfo': {'additionalProperties': False,
14018 'properties': {'hardware-id': {'type': 'string'},
14019 'persistent': {'type': 'boolean'},
14020 'size': {'type': 'integer'},
14021 'volume-id': {'type': 'string'}},
14022 'required': ['volume-id', 'size', 'persistent'],
14024 'VolumeParams': {'additionalProperties': False,
14025 'properties': {'attachment': {'$ref': '#/definitions/VolumeAttachmentParams'},
14026 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
14027 'type': 'object'}},
14029 'provider': {'type': 'string'},
14030 'size': {'type': 'integer'},
14031 'tags': {'patternProperties': {'.*': {'type': 'string'}},
14033 'volume-tag': {'type': 'string'}},
14034 'required': ['volume-tag',
14038 'WatchContainer': {'additionalProperties': False,
14039 'properties': {'container-type': {'type': 'string'},
14040 'machine-tag': {'type': 'string'}},
14041 'required': ['machine-tag',
14044 'WatchContainers': {'additionalProperties': False,
14045 'properties': {'params': {'items': {'$ref': '#/definitions/WatchContainer'},
14047 'required': ['params'],
14048 'type': 'object'}},
14049 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
14051 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
14053 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
14055 'Constraints': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14056 'Result': {'$ref': '#/definitions/ConstraintsResults'}},
14058 'ContainerConfig': {'properties': {'Result': {'$ref': '#/definitions/ContainerConfig'}},
14060 'ContainerManagerConfig': {'properties': {'Params': {'$ref': '#/definitions/ContainerManagerConfigParams'},
14061 'Result': {'$ref': '#/definitions/ContainerManagerConfig'}},
14063 'ControllerConfig': {'properties': {'Result': {'$ref': '#/definitions/ControllerConfigResult'}},
14065 'DistributionGroup': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14066 'Result': {'$ref': '#/definitions/DistributionGroupResults'}},
14068 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14069 'Result': {'$ref': '#/definitions/ErrorResults'}},
14071 'FindTools': {'properties': {'Params': {'$ref': '#/definitions/FindToolsParams'},
14072 'Result': {'$ref': '#/definitions/FindToolsResult'}},
14074 'GetContainerInterfaceInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14075 'Result': {'$ref': '#/definitions/MachineNetworkConfigResults'}},
14077 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14078 'Result': {'$ref': '#/definitions/StringResults'}},
14080 'InstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14081 'Result': {'$ref': '#/definitions/StatusResults'}},
14083 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14084 'Result': {'$ref': '#/definitions/LifeResults'}},
14086 'MachinesWithTransientErrors': {'properties': {'Result': {'$ref': '#/definitions/StatusResults'}},
14088 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
14090 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
14092 'PrepareContainerInterfaceInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14093 'Result': {'$ref': '#/definitions/MachineNetworkConfigResults'}},
14095 'ProvisioningInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14096 'Result': {'$ref': '#/definitions/ProvisioningInfoResults'}},
14098 'ReleaseContainerAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14099 'Result': {'$ref': '#/definitions/ErrorResults'}},
14101 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14102 'Result': {'$ref': '#/definitions/ErrorResults'}},
14104 'Series': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14105 'Result': {'$ref': '#/definitions/StringResults'}},
14107 'SetInstanceInfo': {'properties': {'Params': {'$ref': '#/definitions/InstancesInfo'},
14108 'Result': {'$ref': '#/definitions/ErrorResults'}},
14110 'SetInstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
14111 'Result': {'$ref': '#/definitions/ErrorResults'}},
14113 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
14114 'Result': {'$ref': '#/definitions/ErrorResults'}},
14116 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
14117 'Result': {'$ref': '#/definitions/ErrorResults'}},
14119 'SetSupportedContainers': {'properties': {'Params': {'$ref': '#/definitions/MachineContainersParams'},
14120 'Result': {'$ref': '#/definitions/ErrorResults'}},
14122 'StateAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
14124 'Status': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14125 'Result': {'$ref': '#/definitions/StatusResults'}},
14127 'Tools': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14128 'Result': {'$ref': '#/definitions/ToolsResults'}},
14130 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
14131 'Result': {'$ref': '#/definitions/ErrorResults'}},
14133 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
14135 'WatchAllContainers': {'properties': {'Params': {'$ref': '#/definitions/WatchContainers'},
14136 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
14138 'WatchContainers': {'properties': {'Params': {'$ref': '#/definitions/WatchContainers'},
14139 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
14141 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
14143 'WatchMachineErrorRetry': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
14145 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
14146 'type': 'object'}},
14150 @ReturnMapping(StringsResult
)
14151 async def APIAddresses(self
):
14154 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[str]]
14156 # map input types to rpc msg
14158 msg
= dict(Type
='Provisioner', Request
='APIAddresses', Version
=3, Params
=params
)
14160 reply
= await self
.rpc(msg
)
14165 @ReturnMapping(APIHostPortsResult
)
14166 async def APIHostPorts(self
):
14169 Returns -> typing.Sequence[~HostPort]
14171 # map input types to rpc msg
14173 msg
= dict(Type
='Provisioner', Request
='APIHostPorts', Version
=3, Params
=params
)
14175 reply
= await self
.rpc(msg
)
14180 @ReturnMapping(BytesResult
)
14181 async def CACert(self
):
14184 Returns -> typing.Sequence[int]
14186 # map input types to rpc msg
14188 msg
= dict(Type
='Provisioner', Request
='CACert', Version
=3, Params
=params
)
14190 reply
= await self
.rpc(msg
)
14195 @ReturnMapping(ConstraintsResults
)
14196 async def Constraints(self
, entities
):
14198 entities : typing.Sequence[~Entity]
14199 Returns -> typing.Sequence[~ConstraintsResult]
14201 # map input types to rpc msg
14203 msg
= dict(Type
='Provisioner', Request
='Constraints', Version
=3, Params
=params
)
14204 params
['entities'] = entities
14205 reply
= await self
.rpc(msg
)
14210 @ReturnMapping(ContainerConfig
)
14211 async def ContainerConfig(self
):
14214 Returns -> typing.Union[_ForwardRef('UpdateBehavior'), str, _ForwardRef('Settings'), _ForwardRef('Settings'), bool]
14216 # map input types to rpc msg
14218 msg
= dict(Type
='Provisioner', Request
='ContainerConfig', Version
=3, Params
=params
)
14220 reply
= await self
.rpc(msg
)
14225 @ReturnMapping(ContainerManagerConfig
)
14226 async def ContainerManagerConfig(self
, type_
):
14229 Returns -> typing.Mapping[str, str]
14231 # map input types to rpc msg
14233 msg
= dict(Type
='Provisioner', Request
='ContainerManagerConfig', Version
=3, Params
=params
)
14234 params
['type'] = type_
14235 reply
= await self
.rpc(msg
)
14240 @ReturnMapping(ControllerConfigResult
)
14241 async def ControllerConfig(self
):
14244 Returns -> typing.Mapping[str, typing.Any]
14246 # map input types to rpc msg
14248 msg
= dict(Type
='Provisioner', Request
='ControllerConfig', Version
=3, Params
=params
)
14250 reply
= await self
.rpc(msg
)
14255 @ReturnMapping(DistributionGroupResults
)
14256 async def DistributionGroup(self
, entities
):
14258 entities : typing.Sequence[~Entity]
14259 Returns -> typing.Sequence[~DistributionGroupResult]
14261 # map input types to rpc msg
14263 msg
= dict(Type
='Provisioner', Request
='DistributionGroup', Version
=3, Params
=params
)
14264 params
['entities'] = entities
14265 reply
= await self
.rpc(msg
)
14270 @ReturnMapping(ErrorResults
)
14271 async def EnsureDead(self
, entities
):
14273 entities : typing.Sequence[~Entity]
14274 Returns -> typing.Sequence[~ErrorResult]
14276 # map input types to rpc msg
14278 msg
= dict(Type
='Provisioner', Request
='EnsureDead', Version
=3, Params
=params
)
14279 params
['entities'] = entities
14280 reply
= await self
.rpc(msg
)
14285 @ReturnMapping(FindToolsResult
)
14286 async def FindTools(self
, arch
, major
, minor
, number
, series
):
14293 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[~Tools]]
14295 # map input types to rpc msg
14297 msg
= dict(Type
='Provisioner', Request
='FindTools', Version
=3, Params
=params
)
14298 params
['arch'] = arch
14299 params
['major'] = major
14300 params
['minor'] = minor
14301 params
['number'] = number
14302 params
['series'] = series
14303 reply
= await self
.rpc(msg
)
14308 @ReturnMapping(MachineNetworkConfigResults
)
14309 async def GetContainerInterfaceInfo(self
, entities
):
14311 entities : typing.Sequence[~Entity]
14312 Returns -> typing.Sequence[~MachineNetworkConfigResult]
14314 # map input types to rpc msg
14316 msg
= dict(Type
='Provisioner', Request
='GetContainerInterfaceInfo', Version
=3, Params
=params
)
14317 params
['entities'] = entities
14318 reply
= await self
.rpc(msg
)
14323 @ReturnMapping(StringResults
)
14324 async def InstanceId(self
, entities
):
14326 entities : typing.Sequence[~Entity]
14327 Returns -> typing.Sequence[~StringResult]
14329 # map input types to rpc msg
14331 msg
= dict(Type
='Provisioner', Request
='InstanceId', Version
=3, Params
=params
)
14332 params
['entities'] = entities
14333 reply
= await self
.rpc(msg
)
14338 @ReturnMapping(StatusResults
)
14339 async def InstanceStatus(self
, entities
):
14341 entities : typing.Sequence[~Entity]
14342 Returns -> typing.Sequence[~StatusResult]
14344 # map input types to rpc msg
14346 msg
= dict(Type
='Provisioner', Request
='InstanceStatus', Version
=3, Params
=params
)
14347 params
['entities'] = entities
14348 reply
= await self
.rpc(msg
)
14353 @ReturnMapping(LifeResults
)
14354 async def Life(self
, entities
):
14356 entities : typing.Sequence[~Entity]
14357 Returns -> typing.Sequence[~LifeResult]
14359 # map input types to rpc msg
14361 msg
= dict(Type
='Provisioner', Request
='Life', Version
=3, Params
=params
)
14362 params
['entities'] = entities
14363 reply
= await self
.rpc(msg
)
14368 @ReturnMapping(StatusResults
)
14369 async def MachinesWithTransientErrors(self
):
14372 Returns -> typing.Sequence[~StatusResult]
14374 # map input types to rpc msg
14376 msg
= dict(Type
='Provisioner', Request
='MachinesWithTransientErrors', Version
=3, Params
=params
)
14378 reply
= await self
.rpc(msg
)
14383 @ReturnMapping(ModelConfigResult
)
14384 async def ModelConfig(self
):
14387 Returns -> typing.Mapping[str, typing.Any]
14389 # map input types to rpc msg
14391 msg
= dict(Type
='Provisioner', Request
='ModelConfig', Version
=3, Params
=params
)
14393 reply
= await self
.rpc(msg
)
14398 @ReturnMapping(StringResult
)
14399 async def ModelUUID(self
):
14402 Returns -> typing.Union[_ForwardRef('Error'), str]
14404 # map input types to rpc msg
14406 msg
= dict(Type
='Provisioner', Request
='ModelUUID', Version
=3, Params
=params
)
14408 reply
= await self
.rpc(msg
)
14413 @ReturnMapping(MachineNetworkConfigResults
)
14414 async def PrepareContainerInterfaceInfo(self
, entities
):
14416 entities : typing.Sequence[~Entity]
14417 Returns -> typing.Sequence[~MachineNetworkConfigResult]
14419 # map input types to rpc msg
14421 msg
= dict(Type
='Provisioner', Request
='PrepareContainerInterfaceInfo', Version
=3, Params
=params
)
14422 params
['entities'] = entities
14423 reply
= await self
.rpc(msg
)
14428 @ReturnMapping(ProvisioningInfoResults
)
14429 async def ProvisioningInfo(self
, entities
):
14431 entities : typing.Sequence[~Entity]
14432 Returns -> typing.Sequence[~ProvisioningInfoResult]
14434 # map input types to rpc msg
14436 msg
= dict(Type
='Provisioner', Request
='ProvisioningInfo', Version
=3, Params
=params
)
14437 params
['entities'] = entities
14438 reply
= await self
.rpc(msg
)
14443 @ReturnMapping(ErrorResults
)
14444 async def ReleaseContainerAddresses(self
, entities
):
14446 entities : typing.Sequence[~Entity]
14447 Returns -> typing.Sequence[~ErrorResult]
14449 # map input types to rpc msg
14451 msg
= dict(Type
='Provisioner', Request
='ReleaseContainerAddresses', Version
=3, Params
=params
)
14452 params
['entities'] = entities
14453 reply
= await self
.rpc(msg
)
14458 @ReturnMapping(ErrorResults
)
14459 async def Remove(self
, entities
):
14461 entities : typing.Sequence[~Entity]
14462 Returns -> typing.Sequence[~ErrorResult]
14464 # map input types to rpc msg
14466 msg
= dict(Type
='Provisioner', Request
='Remove', Version
=3, Params
=params
)
14467 params
['entities'] = entities
14468 reply
= await self
.rpc(msg
)
14473 @ReturnMapping(StringResults
)
14474 async def Series(self
, entities
):
14476 entities : typing.Sequence[~Entity]
14477 Returns -> typing.Sequence[~StringResult]
14479 # map input types to rpc msg
14481 msg
= dict(Type
='Provisioner', Request
='Series', Version
=3, Params
=params
)
14482 params
['entities'] = entities
14483 reply
= await self
.rpc(msg
)
14488 @ReturnMapping(ErrorResults
)
14489 async def SetInstanceInfo(self
, machines
):
14491 machines : typing.Sequence[~InstanceInfo]
14492 Returns -> typing.Sequence[~ErrorResult]
14494 # map input types to rpc msg
14496 msg
= dict(Type
='Provisioner', Request
='SetInstanceInfo', Version
=3, Params
=params
)
14497 params
['machines'] = machines
14498 reply
= await self
.rpc(msg
)
14503 @ReturnMapping(ErrorResults
)
14504 async def SetInstanceStatus(self
, entities
):
14506 entities : typing.Sequence[~EntityStatusArgs]
14507 Returns -> typing.Sequence[~ErrorResult]
14509 # map input types to rpc msg
14511 msg
= dict(Type
='Provisioner', Request
='SetInstanceStatus', Version
=3, Params
=params
)
14512 params
['entities'] = entities
14513 reply
= await self
.rpc(msg
)
14518 @ReturnMapping(ErrorResults
)
14519 async def SetPasswords(self
, changes
):
14521 changes : typing.Sequence[~EntityPassword]
14522 Returns -> typing.Sequence[~ErrorResult]
14524 # map input types to rpc msg
14526 msg
= dict(Type
='Provisioner', Request
='SetPasswords', Version
=3, Params
=params
)
14527 params
['changes'] = changes
14528 reply
= await self
.rpc(msg
)
14533 @ReturnMapping(ErrorResults
)
14534 async def SetStatus(self
, entities
):
14536 entities : typing.Sequence[~EntityStatusArgs]
14537 Returns -> typing.Sequence[~ErrorResult]
14539 # map input types to rpc msg
14541 msg
= dict(Type
='Provisioner', Request
='SetStatus', Version
=3, Params
=params
)
14542 params
['entities'] = entities
14543 reply
= await self
.rpc(msg
)
14548 @ReturnMapping(ErrorResults
)
14549 async def SetSupportedContainers(self
, params
):
14551 params : typing.Sequence[~MachineContainers]
14552 Returns -> typing.Sequence[~ErrorResult]
14554 # map input types to rpc msg
14556 msg
= dict(Type
='Provisioner', Request
='SetSupportedContainers', Version
=3, Params
=params
)
14557 params
['params'] = params
14558 reply
= await self
.rpc(msg
)
14563 @ReturnMapping(StringsResult
)
14564 async def StateAddresses(self
):
14567 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[str]]
14569 # map input types to rpc msg
14571 msg
= dict(Type
='Provisioner', Request
='StateAddresses', Version
=3, Params
=params
)
14573 reply
= await self
.rpc(msg
)
14578 @ReturnMapping(StatusResults
)
14579 async def Status(self
, entities
):
14581 entities : typing.Sequence[~Entity]
14582 Returns -> typing.Sequence[~StatusResult]
14584 # map input types to rpc msg
14586 msg
= dict(Type
='Provisioner', Request
='Status', Version
=3, Params
=params
)
14587 params
['entities'] = entities
14588 reply
= await self
.rpc(msg
)
14593 @ReturnMapping(ToolsResults
)
14594 async def Tools(self
, entities
):
14596 entities : typing.Sequence[~Entity]
14597 Returns -> typing.Sequence[~ToolsResult]
14599 # map input types to rpc msg
14601 msg
= dict(Type
='Provisioner', Request
='Tools', Version
=3, Params
=params
)
14602 params
['entities'] = entities
14603 reply
= await self
.rpc(msg
)
14608 @ReturnMapping(ErrorResults
)
14609 async def UpdateStatus(self
, entities
):
14611 entities : typing.Sequence[~EntityStatusArgs]
14612 Returns -> typing.Sequence[~ErrorResult]
14614 # map input types to rpc msg
14616 msg
= dict(Type
='Provisioner', Request
='UpdateStatus', Version
=3, Params
=params
)
14617 params
['entities'] = entities
14618 reply
= await self
.rpc(msg
)
14623 @ReturnMapping(NotifyWatchResult
)
14624 async def WatchAPIHostPorts(self
):
14627 Returns -> typing.Union[str, _ForwardRef('Error')]
14629 # map input types to rpc msg
14631 msg
= dict(Type
='Provisioner', Request
='WatchAPIHostPorts', Version
=3, Params
=params
)
14633 reply
= await self
.rpc(msg
)
14638 @ReturnMapping(StringsWatchResults
)
14639 async def WatchAllContainers(self
, params
):
14641 params : typing.Sequence[~WatchContainer]
14642 Returns -> typing.Sequence[~StringsWatchResult]
14644 # map input types to rpc msg
14646 msg
= dict(Type
='Provisioner', Request
='WatchAllContainers', Version
=3, Params
=params
)
14647 params
['params'] = params
14648 reply
= await self
.rpc(msg
)
14653 @ReturnMapping(StringsWatchResults
)
14654 async def WatchContainers(self
, params
):
14656 params : typing.Sequence[~WatchContainer]
14657 Returns -> typing.Sequence[~StringsWatchResult]
14659 # map input types to rpc msg
14661 msg
= dict(Type
='Provisioner', Request
='WatchContainers', Version
=3, Params
=params
)
14662 params
['params'] = params
14663 reply
= await self
.rpc(msg
)
14668 @ReturnMapping(NotifyWatchResult
)
14669 async def WatchForModelConfigChanges(self
):
14672 Returns -> typing.Union[str, _ForwardRef('Error')]
14674 # map input types to rpc msg
14676 msg
= dict(Type
='Provisioner', Request
='WatchForModelConfigChanges', Version
=3, Params
=params
)
14678 reply
= await self
.rpc(msg
)
14683 @ReturnMapping(NotifyWatchResult
)
14684 async def WatchMachineErrorRetry(self
):
14687 Returns -> typing.Union[str, _ForwardRef('Error')]
14689 # map input types to rpc msg
14691 msg
= dict(Type
='Provisioner', Request
='WatchMachineErrorRetry', Version
=3, Params
=params
)
14693 reply
= await self
.rpc(msg
)
14698 @ReturnMapping(StringsWatchResult
)
14699 async def WatchModelMachines(self
):
14702 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')]
14704 # map input types to rpc msg
14706 msg
= dict(Type
='Provisioner', Request
='WatchModelMachines', Version
=3, Params
=params
)
14708 reply
= await self
.rpc(msg
)
14712 class ProxyUpdaterFacade(Type
):
14713 name
= 'ProxyUpdater'
14715 schema
= {'definitions': {'Entities': {'additionalProperties': False,
14716 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
14718 'required': ['entities'],
14720 'Entity': {'additionalProperties': False,
14721 'properties': {'tag': {'type': 'string'}},
14722 'required': ['tag'],
14724 'Error': {'additionalProperties': False,
14725 'properties': {'code': {'type': 'string'},
14726 'info': {'$ref': '#/definitions/ErrorInfo'},
14727 'message': {'type': 'string'}},
14728 'required': ['message', 'code'],
14730 'ErrorInfo': {'additionalProperties': False,
14731 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
14732 'macaroon-path': {'type': 'string'}},
14734 'Macaroon': {'additionalProperties': False, 'type': 'object'},
14735 'NotifyWatchResult': {'additionalProperties': False,
14736 'properties': {'NotifyWatcherId': {'type': 'string'},
14737 'error': {'$ref': '#/definitions/Error'}},
14738 'required': ['NotifyWatcherId'],
14740 'NotifyWatchResults': {'additionalProperties': False,
14741 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
14743 'required': ['results'],
14745 'ProxyConfig': {'additionalProperties': False,
14746 'properties': {'ftp': {'type': 'string'},
14747 'http': {'type': 'string'},
14748 'https': {'type': 'string'},
14749 'no-proxy': {'type': 'string'}},
14750 'required': ['http',
14755 'ProxyConfigResult': {'additionalProperties': False,
14756 'properties': {'apt-proxy-settings': {'$ref': '#/definitions/ProxyConfig'},
14757 'error': {'$ref': '#/definitions/Error'},
14758 'proxy-settings': {'$ref': '#/definitions/ProxyConfig'}},
14759 'required': ['proxy-settings',
14760 'apt-proxy-settings'],
14762 'ProxyConfigResults': {'additionalProperties': False,
14763 'properties': {'results': {'items': {'$ref': '#/definitions/ProxyConfigResult'},
14765 'required': ['results'],
14766 'type': 'object'}},
14767 'properties': {'ProxyConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14768 'Result': {'$ref': '#/definitions/ProxyConfigResults'}},
14770 'WatchForProxyConfigAndAPIHostPortChanges': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14771 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
14772 'type': 'object'}},
14776 @ReturnMapping(ProxyConfigResults
)
14777 async def ProxyConfig(self
, entities
):
14779 entities : typing.Sequence[~Entity]
14780 Returns -> typing.Sequence[~ProxyConfigResult]
14782 # map input types to rpc msg
14784 msg
= dict(Type
='ProxyUpdater', Request
='ProxyConfig', Version
=1, Params
=params
)
14785 params
['entities'] = entities
14786 reply
= await self
.rpc(msg
)
14791 @ReturnMapping(NotifyWatchResults
)
14792 async def WatchForProxyConfigAndAPIHostPortChanges(self
, entities
):
14794 entities : typing.Sequence[~Entity]
14795 Returns -> typing.Sequence[~NotifyWatchResult]
14797 # map input types to rpc msg
14799 msg
= dict(Type
='ProxyUpdater', Request
='WatchForProxyConfigAndAPIHostPortChanges', Version
=1, Params
=params
)
14800 params
['entities'] = entities
14801 reply
= await self
.rpc(msg
)
14805 class RebootFacade(Type
):
14808 schema
= {'definitions': {'Entities': {'additionalProperties': False,
14809 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
14811 'required': ['entities'],
14813 'Entity': {'additionalProperties': False,
14814 'properties': {'tag': {'type': 'string'}},
14815 'required': ['tag'],
14817 'Error': {'additionalProperties': False,
14818 'properties': {'code': {'type': 'string'},
14819 'info': {'$ref': '#/definitions/ErrorInfo'},
14820 'message': {'type': 'string'}},
14821 'required': ['message', 'code'],
14823 'ErrorInfo': {'additionalProperties': False,
14824 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
14825 'macaroon-path': {'type': 'string'}},
14827 'ErrorResult': {'additionalProperties': False,
14828 'properties': {'error': {'$ref': '#/definitions/Error'}},
14830 'ErrorResults': {'additionalProperties': False,
14831 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
14833 'required': ['results'],
14835 'Macaroon': {'additionalProperties': False, 'type': 'object'},
14836 'NotifyWatchResult': {'additionalProperties': False,
14837 'properties': {'NotifyWatcherId': {'type': 'string'},
14838 'error': {'$ref': '#/definitions/Error'}},
14839 'required': ['NotifyWatcherId'],
14841 'RebootActionResult': {'additionalProperties': False,
14842 'properties': {'error': {'$ref': '#/definitions/Error'},
14843 'result': {'type': 'string'}},
14845 'RebootActionResults': {'additionalProperties': False,
14846 'properties': {'results': {'items': {'$ref': '#/definitions/RebootActionResult'},
14848 'type': 'object'}},
14849 'properties': {'ClearReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14850 'Result': {'$ref': '#/definitions/ErrorResults'}},
14852 'GetRebootAction': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14853 'Result': {'$ref': '#/definitions/RebootActionResults'}},
14855 'RequestReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14856 'Result': {'$ref': '#/definitions/ErrorResults'}},
14858 'WatchForRebootEvent': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
14859 'type': 'object'}},
14863 @ReturnMapping(ErrorResults
)
14864 async def ClearReboot(self
, entities
):
14866 entities : typing.Sequence[~Entity]
14867 Returns -> typing.Sequence[~ErrorResult]
14869 # map input types to rpc msg
14871 msg
= dict(Type
='Reboot', Request
='ClearReboot', Version
=2, Params
=params
)
14872 params
['entities'] = entities
14873 reply
= await self
.rpc(msg
)
14878 @ReturnMapping(RebootActionResults
)
14879 async def GetRebootAction(self
, entities
):
14881 entities : typing.Sequence[~Entity]
14882 Returns -> typing.Sequence[~RebootActionResult]
14884 # map input types to rpc msg
14886 msg
= dict(Type
='Reboot', Request
='GetRebootAction', Version
=2, Params
=params
)
14887 params
['entities'] = entities
14888 reply
= await self
.rpc(msg
)
14893 @ReturnMapping(ErrorResults
)
14894 async def RequestReboot(self
, entities
):
14896 entities : typing.Sequence[~Entity]
14897 Returns -> typing.Sequence[~ErrorResult]
14899 # map input types to rpc msg
14901 msg
= dict(Type
='Reboot', Request
='RequestReboot', Version
=2, Params
=params
)
14902 params
['entities'] = entities
14903 reply
= await self
.rpc(msg
)
14908 @ReturnMapping(NotifyWatchResult
)
14909 async def WatchForRebootEvent(self
):
14912 Returns -> typing.Union[str, _ForwardRef('Error')]
14914 # map input types to rpc msg
14916 msg
= dict(Type
='Reboot', Request
='WatchForRebootEvent', Version
=2, Params
=params
)
14918 reply
= await self
.rpc(msg
)
14922 class RelationUnitsWatcherFacade(Type
):
14923 name
= 'RelationUnitsWatcher'
14925 schema
= {'definitions': {'Error': {'additionalProperties': False,
14926 'properties': {'code': {'type': 'string'},
14927 'info': {'$ref': '#/definitions/ErrorInfo'},
14928 'message': {'type': 'string'}},
14929 'required': ['message', 'code'],
14931 'ErrorInfo': {'additionalProperties': False,
14932 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
14933 'macaroon-path': {'type': 'string'}},
14935 'Macaroon': {'additionalProperties': False, 'type': 'object'},
14936 'RelationUnitsChange': {'additionalProperties': False,
14937 'properties': {'changed': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitSettings'}},
14939 'departed': {'items': {'type': 'string'},
14941 'required': ['changed'],
14943 'RelationUnitsWatchResult': {'additionalProperties': False,
14944 'properties': {'changes': {'$ref': '#/definitions/RelationUnitsChange'},
14945 'error': {'$ref': '#/definitions/Error'},
14946 'watcher-id': {'type': 'string'}},
14947 'required': ['watcher-id',
14950 'UnitSettings': {'additionalProperties': False,
14951 'properties': {'version': {'type': 'integer'}},
14952 'required': ['version'],
14953 'type': 'object'}},
14954 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/RelationUnitsWatchResult'}},
14956 'Stop': {'type': 'object'}},
14960 @ReturnMapping(RelationUnitsWatchResult
)
14961 async def Next(self
):
14964 Returns -> typing.Union[_ForwardRef('RelationUnitsChange'), _ForwardRef('Error'), str]
14966 # map input types to rpc msg
14968 msg
= dict(Type
='RelationUnitsWatcher', Request
='Next', Version
=1, Params
=params
)
14970 reply
= await self
.rpc(msg
)
14975 @ReturnMapping(None)
14976 async def Stop(self
):
14981 # map input types to rpc msg
14983 msg
= dict(Type
='RelationUnitsWatcher', Request
='Stop', Version
=1, Params
=params
)
14985 reply
= await self
.rpc(msg
)
14989 class ResumerFacade(Type
):
14992 schema
= {'properties': {'ResumeTransactions': {'type': 'object'}}, 'type': 'object'}
14995 @ReturnMapping(None)
14996 async def ResumeTransactions(self
):
15001 # map input types to rpc msg
15003 msg
= dict(Type
='Resumer', Request
='ResumeTransactions', Version
=2, Params
=params
)
15005 reply
= await self
.rpc(msg
)
15009 class RetryStrategyFacade(Type
):
15010 name
= 'RetryStrategy'
15012 schema
= {'definitions': {'Entities': {'additionalProperties': False,
15013 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
15015 'required': ['entities'],
15017 'Entity': {'additionalProperties': False,
15018 'properties': {'tag': {'type': 'string'}},
15019 'required': ['tag'],
15021 'Error': {'additionalProperties': False,
15022 'properties': {'code': {'type': 'string'},
15023 'info': {'$ref': '#/definitions/ErrorInfo'},
15024 'message': {'type': 'string'}},
15025 'required': ['message', 'code'],
15027 'ErrorInfo': {'additionalProperties': False,
15028 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
15029 'macaroon-path': {'type': 'string'}},
15031 'Macaroon': {'additionalProperties': False, 'type': 'object'},
15032 'NotifyWatchResult': {'additionalProperties': False,
15033 'properties': {'NotifyWatcherId': {'type': 'string'},
15034 'error': {'$ref': '#/definitions/Error'}},
15035 'required': ['NotifyWatcherId'],
15037 'NotifyWatchResults': {'additionalProperties': False,
15038 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
15040 'required': ['results'],
15042 'RetryStrategy': {'additionalProperties': False,
15043 'properties': {'jitter-retry-time': {'type': 'boolean'},
15044 'max-retry-time': {'type': 'integer'},
15045 'min-retry-time': {'type': 'integer'},
15046 'retry-time-factor': {'type': 'integer'},
15047 'should-retry': {'type': 'boolean'}},
15048 'required': ['should-retry',
15051 'jitter-retry-time',
15052 'retry-time-factor'],
15054 'RetryStrategyResult': {'additionalProperties': False,
15055 'properties': {'error': {'$ref': '#/definitions/Error'},
15056 'result': {'$ref': '#/definitions/RetryStrategy'}},
15058 'RetryStrategyResults': {'additionalProperties': False,
15059 'properties': {'results': {'items': {'$ref': '#/definitions/RetryStrategyResult'},
15061 'required': ['results'],
15062 'type': 'object'}},
15063 'properties': {'RetryStrategy': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15064 'Result': {'$ref': '#/definitions/RetryStrategyResults'}},
15066 'WatchRetryStrategy': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15067 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
15068 'type': 'object'}},
15072 @ReturnMapping(RetryStrategyResults
)
15073 async def RetryStrategy(self
, entities
):
15075 entities : typing.Sequence[~Entity]
15076 Returns -> typing.Sequence[~RetryStrategyResult]
15078 # map input types to rpc msg
15080 msg
= dict(Type
='RetryStrategy', Request
='RetryStrategy', Version
=1, Params
=params
)
15081 params
['entities'] = entities
15082 reply
= await self
.rpc(msg
)
15087 @ReturnMapping(NotifyWatchResults
)
15088 async def WatchRetryStrategy(self
, entities
):
15090 entities : typing.Sequence[~Entity]
15091 Returns -> typing.Sequence[~NotifyWatchResult]
15093 # map input types to rpc msg
15095 msg
= dict(Type
='RetryStrategy', Request
='WatchRetryStrategy', Version
=1, Params
=params
)
15096 params
['entities'] = entities
15097 reply
= await self
.rpc(msg
)
15101 class SSHClientFacade(Type
):
15104 schema
= {'definitions': {'Entities': {'additionalProperties': False,
15105 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
15107 'required': ['entities'],
15109 'Entity': {'additionalProperties': False,
15110 'properties': {'tag': {'type': 'string'}},
15111 'required': ['tag'],
15113 'Error': {'additionalProperties': False,
15114 'properties': {'code': {'type': 'string'},
15115 'info': {'$ref': '#/definitions/ErrorInfo'},
15116 'message': {'type': 'string'}},
15117 'required': ['message', 'code'],
15119 'ErrorInfo': {'additionalProperties': False,
15120 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
15121 'macaroon-path': {'type': 'string'}},
15123 'Macaroon': {'additionalProperties': False, 'type': 'object'},
15124 'SSHAddressResult': {'additionalProperties': False,
15125 'properties': {'address': {'type': 'string'},
15126 'error': {'$ref': '#/definitions/Error'}},
15128 'SSHAddressResults': {'additionalProperties': False,
15129 'properties': {'results': {'items': {'$ref': '#/definitions/SSHAddressResult'},
15131 'required': ['results'],
15133 'SSHProxyResult': {'additionalProperties': False,
15134 'properties': {'use-proxy': {'type': 'boolean'}},
15135 'required': ['use-proxy'],
15137 'SSHPublicKeysResult': {'additionalProperties': False,
15138 'properties': {'error': {'$ref': '#/definitions/Error'},
15139 'public-keys': {'items': {'type': 'string'},
15142 'SSHPublicKeysResults': {'additionalProperties': False,
15143 'properties': {'results': {'items': {'$ref': '#/definitions/SSHPublicKeysResult'},
15145 'required': ['results'],
15146 'type': 'object'}},
15147 'properties': {'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15148 'Result': {'$ref': '#/definitions/SSHAddressResults'}},
15150 'Proxy': {'properties': {'Result': {'$ref': '#/definitions/SSHProxyResult'}},
15152 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15153 'Result': {'$ref': '#/definitions/SSHAddressResults'}},
15155 'PublicKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15156 'Result': {'$ref': '#/definitions/SSHPublicKeysResults'}},
15157 'type': 'object'}},
15161 @ReturnMapping(SSHAddressResults
)
15162 async def PrivateAddress(self
, entities
):
15164 entities : typing.Sequence[~Entity]
15165 Returns -> typing.Sequence[~SSHAddressResult]
15167 # map input types to rpc msg
15169 msg
= dict(Type
='SSHClient', Request
='PrivateAddress', Version
=1, Params
=params
)
15170 params
['entities'] = entities
15171 reply
= await self
.rpc(msg
)
15176 @ReturnMapping(SSHProxyResult
)
15177 async def Proxy(self
):
15182 # map input types to rpc msg
15184 msg
= dict(Type
='SSHClient', Request
='Proxy', Version
=1, Params
=params
)
15186 reply
= await self
.rpc(msg
)
15191 @ReturnMapping(SSHAddressResults
)
15192 async def PublicAddress(self
, entities
):
15194 entities : typing.Sequence[~Entity]
15195 Returns -> typing.Sequence[~SSHAddressResult]
15197 # map input types to rpc msg
15199 msg
= dict(Type
='SSHClient', Request
='PublicAddress', Version
=1, Params
=params
)
15200 params
['entities'] = entities
15201 reply
= await self
.rpc(msg
)
15206 @ReturnMapping(SSHPublicKeysResults
)
15207 async def PublicKeys(self
, entities
):
15209 entities : typing.Sequence[~Entity]
15210 Returns -> typing.Sequence[~SSHPublicKeysResult]
15212 # map input types to rpc msg
15214 msg
= dict(Type
='SSHClient', Request
='PublicKeys', Version
=1, Params
=params
)
15215 params
['entities'] = entities
15216 reply
= await self
.rpc(msg
)
15220 class SingularFacade(Type
):
15223 schema
= {'definitions': {'Entities': {'additionalProperties': False,
15224 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
15226 'required': ['entities'],
15228 'Entity': {'additionalProperties': False,
15229 'properties': {'tag': {'type': 'string'}},
15230 'required': ['tag'],
15232 'Error': {'additionalProperties': False,
15233 'properties': {'code': {'type': 'string'},
15234 'info': {'$ref': '#/definitions/ErrorInfo'},
15235 'message': {'type': 'string'}},
15236 'required': ['message', 'code'],
15238 'ErrorInfo': {'additionalProperties': False,
15239 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
15240 'macaroon-path': {'type': 'string'}},
15242 'ErrorResult': {'additionalProperties': False,
15243 'properties': {'error': {'$ref': '#/definitions/Error'}},
15245 'ErrorResults': {'additionalProperties': False,
15246 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
15248 'required': ['results'],
15250 'Macaroon': {'additionalProperties': False, 'type': 'object'},
15251 'SingularClaim': {'additionalProperties': False,
15252 'properties': {'controller-tag': {'type': 'string'},
15253 'duration': {'type': 'integer'},
15254 'model-tag': {'type': 'string'}},
15255 'required': ['model-tag',
15259 'SingularClaims': {'additionalProperties': False,
15260 'properties': {'claims': {'items': {'$ref': '#/definitions/SingularClaim'},
15262 'required': ['claims'],
15263 'type': 'object'}},
15264 'properties': {'Claim': {'properties': {'Params': {'$ref': '#/definitions/SingularClaims'},
15265 'Result': {'$ref': '#/definitions/ErrorResults'}},
15267 'Wait': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15268 'Result': {'$ref': '#/definitions/ErrorResults'}},
15269 'type': 'object'}},
15273 @ReturnMapping(ErrorResults
)
15274 async def Claim(self
, claims
):
15276 claims : typing.Sequence[~SingularClaim]
15277 Returns -> typing.Sequence[~ErrorResult]
15279 # map input types to rpc msg
15281 msg
= dict(Type
='Singular', Request
='Claim', Version
=1, Params
=params
)
15282 params
['claims'] = claims
15283 reply
= await self
.rpc(msg
)
15288 @ReturnMapping(ErrorResults
)
15289 async def Wait(self
, entities
):
15291 entities : typing.Sequence[~Entity]
15292 Returns -> typing.Sequence[~ErrorResult]
15294 # map input types to rpc msg
15296 msg
= dict(Type
='Singular', Request
='Wait', Version
=1, Params
=params
)
15297 params
['entities'] = entities
15298 reply
= await self
.rpc(msg
)
15302 class SpacesFacade(Type
):
15305 schema
= {'definitions': {'CreateSpaceParams': {'additionalProperties': False,
15306 'properties': {'provider-id': {'type': 'string'},
15307 'public': {'type': 'boolean'},
15308 'space-tag': {'type': 'string'},
15309 'subnet-tags': {'items': {'type': 'string'},
15311 'required': ['subnet-tags',
15315 'CreateSpacesParams': {'additionalProperties': False,
15316 'properties': {'spaces': {'items': {'$ref': '#/definitions/CreateSpaceParams'},
15318 'required': ['spaces'],
15320 'Error': {'additionalProperties': False,
15321 'properties': {'code': {'type': 'string'},
15322 'info': {'$ref': '#/definitions/ErrorInfo'},
15323 'message': {'type': 'string'}},
15324 'required': ['message', 'code'],
15326 'ErrorInfo': {'additionalProperties': False,
15327 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
15328 'macaroon-path': {'type': 'string'}},
15330 'ErrorResult': {'additionalProperties': False,
15331 'properties': {'error': {'$ref': '#/definitions/Error'}},
15333 'ErrorResults': {'additionalProperties': False,
15334 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
15336 'required': ['results'],
15338 'ListSpacesResults': {'additionalProperties': False,
15339 'properties': {'results': {'items': {'$ref': '#/definitions/Space'},
15341 'required': ['results'],
15343 'Macaroon': {'additionalProperties': False, 'type': 'object'},
15344 'Space': {'additionalProperties': False,
15345 'properties': {'error': {'$ref': '#/definitions/Error'},
15346 'name': {'type': 'string'},
15347 'subnets': {'items': {'$ref': '#/definitions/Subnet'},
15349 'required': ['name', 'subnets'],
15351 'Subnet': {'additionalProperties': False,
15352 'properties': {'cidr': {'type': 'string'},
15353 'life': {'type': 'string'},
15354 'provider-id': {'type': 'string'},
15355 'space-tag': {'type': 'string'},
15356 'status': {'type': 'string'},
15357 'vlan-tag': {'type': 'integer'},
15358 'zones': {'items': {'type': 'string'},
15360 'required': ['cidr',
15365 'type': 'object'}},
15366 'properties': {'CreateSpaces': {'properties': {'Params': {'$ref': '#/definitions/CreateSpacesParams'},
15367 'Result': {'$ref': '#/definitions/ErrorResults'}},
15369 'ListSpaces': {'properties': {'Result': {'$ref': '#/definitions/ListSpacesResults'}},
15370 'type': 'object'}},
15374 @ReturnMapping(ErrorResults
)
15375 async def CreateSpaces(self
, spaces
):
15377 spaces : typing.Sequence[~CreateSpaceParams]
15378 Returns -> typing.Sequence[~ErrorResult]
15380 # map input types to rpc msg
15382 msg
= dict(Type
='Spaces', Request
='CreateSpaces', Version
=2, Params
=params
)
15383 params
['spaces'] = spaces
15384 reply
= await self
.rpc(msg
)
15389 @ReturnMapping(ListSpacesResults
)
15390 async def ListSpaces(self
):
15393 Returns -> typing.Sequence[~Space]
15395 # map input types to rpc msg
15397 msg
= dict(Type
='Spaces', Request
='ListSpaces', Version
=2, Params
=params
)
15399 reply
= await self
.rpc(msg
)
15403 class StatusHistoryFacade(Type
):
15404 name
= 'StatusHistory'
15406 schema
= {'definitions': {'StatusHistoryPruneArgs': {'additionalProperties': False,
15407 'properties': {'max-history-mb': {'type': 'integer'},
15408 'max-history-time': {'type': 'integer'}},
15409 'required': ['max-history-time',
15411 'type': 'object'}},
15412 'properties': {'Prune': {'properties': {'Params': {'$ref': '#/definitions/StatusHistoryPruneArgs'}},
15413 'type': 'object'}},
15417 @ReturnMapping(None)
15418 async def Prune(self
, max_history_mb
, max_history_time
):
15420 max_history_mb : int
15421 max_history_time : int
15424 # map input types to rpc msg
15426 msg
= dict(Type
='StatusHistory', Request
='Prune', Version
=2, Params
=params
)
15427 params
['max-history-mb'] = max_history_mb
15428 params
['max-history-time'] = max_history_time
15429 reply
= await self
.rpc(msg
)
15433 class StorageFacade(Type
):
15436 schema
= {'definitions': {'Entities': {'additionalProperties': False,
15437 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
15439 'required': ['entities'],
15441 'Entity': {'additionalProperties': False,
15442 'properties': {'tag': {'type': 'string'}},
15443 'required': ['tag'],
15445 'EntityStatus': {'additionalProperties': False,
15446 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
15447 'type': 'object'}},
15449 'info': {'type': 'string'},
15450 'since': {'format': 'date-time',
15452 'status': {'type': 'string'}},
15453 'required': ['status', 'info', 'since'],
15455 'Error': {'additionalProperties': False,
15456 'properties': {'code': {'type': 'string'},
15457 'info': {'$ref': '#/definitions/ErrorInfo'},
15458 'message': {'type': 'string'}},
15459 'required': ['message', 'code'],
15461 'ErrorInfo': {'additionalProperties': False,
15462 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
15463 'macaroon-path': {'type': 'string'}},
15465 'ErrorResult': {'additionalProperties': False,
15466 'properties': {'error': {'$ref': '#/definitions/Error'}},
15468 'ErrorResults': {'additionalProperties': False,
15469 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
15471 'required': ['results'],
15473 'FilesystemAttachmentInfo': {'additionalProperties': False,
15474 'properties': {'mount-point': {'type': 'string'},
15475 'read-only': {'type': 'boolean'}},
15477 'FilesystemDetails': {'additionalProperties': False,
15478 'properties': {'filesystem-tag': {'type': 'string'},
15479 'info': {'$ref': '#/definitions/FilesystemInfo'},
15480 'machine-attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/FilesystemAttachmentInfo'}},
15482 'status': {'$ref': '#/definitions/EntityStatus'},
15483 'storage': {'$ref': '#/definitions/StorageDetails'},
15484 'volume-tag': {'type': 'string'}},
15485 'required': ['filesystem-tag',
15489 'FilesystemDetailsListResult': {'additionalProperties': False,
15490 'properties': {'error': {'$ref': '#/definitions/Error'},
15491 'result': {'items': {'$ref': '#/definitions/FilesystemDetails'},
15494 'FilesystemDetailsListResults': {'additionalProperties': False,
15495 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemDetailsListResult'},
15498 'FilesystemFilter': {'additionalProperties': False,
15499 'properties': {'machines': {'items': {'type': 'string'},
15502 'FilesystemFilters': {'additionalProperties': False,
15503 'properties': {'filters': {'items': {'$ref': '#/definitions/FilesystemFilter'},
15506 'FilesystemInfo': {'additionalProperties': False,
15507 'properties': {'filesystem-id': {'type': 'string'},
15508 'size': {'type': 'integer'}},
15509 'required': ['filesystem-id', 'size'],
15511 'Macaroon': {'additionalProperties': False, 'type': 'object'},
15512 'StorageAddParams': {'additionalProperties': False,
15513 'properties': {'name': {'type': 'string'},
15514 'storage': {'$ref': '#/definitions/StorageConstraints'},
15515 'unit': {'type': 'string'}},
15516 'required': ['unit', 'name', 'storage'],
15518 'StorageAttachmentDetails': {'additionalProperties': False,
15519 'properties': {'location': {'type': 'string'},
15520 'machine-tag': {'type': 'string'},
15521 'storage-tag': {'type': 'string'},
15522 'unit-tag': {'type': 'string'}},
15523 'required': ['storage-tag',
15527 'StorageConstraints': {'additionalProperties': False,
15528 'properties': {'count': {'type': 'integer'},
15529 'pool': {'type': 'string'},
15530 'size': {'type': 'integer'}},
15532 'StorageDetails': {'additionalProperties': False,
15533 'properties': {'attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/StorageAttachmentDetails'}},
15535 'kind': {'type': 'integer'},
15536 'owner-tag': {'type': 'string'},
15537 'persistent': {'type': 'boolean'},
15538 'status': {'$ref': '#/definitions/EntityStatus'},
15539 'storage-tag': {'type': 'string'}},
15540 'required': ['storage-tag',
15546 'StorageDetailsListResult': {'additionalProperties': False,
15547 'properties': {'error': {'$ref': '#/definitions/Error'},
15548 'result': {'items': {'$ref': '#/definitions/StorageDetails'},
15551 'StorageDetailsListResults': {'additionalProperties': False,
15552 'properties': {'results': {'items': {'$ref': '#/definitions/StorageDetailsListResult'},
15555 'StorageDetailsResult': {'additionalProperties': False,
15556 'properties': {'error': {'$ref': '#/definitions/Error'},
15557 'result': {'$ref': '#/definitions/StorageDetails'}},
15559 'StorageDetailsResults': {'additionalProperties': False,
15560 'properties': {'results': {'items': {'$ref': '#/definitions/StorageDetailsResult'},
15563 'StorageFilter': {'additionalProperties': False,
15565 'StorageFilters': {'additionalProperties': False,
15566 'properties': {'filters': {'items': {'$ref': '#/definitions/StorageFilter'},
15569 'StoragePool': {'additionalProperties': False,
15570 'properties': {'attrs': {'patternProperties': {'.*': {'additionalProperties': True,
15571 'type': 'object'}},
15573 'name': {'type': 'string'},
15574 'provider': {'type': 'string'}},
15575 'required': ['name', 'provider', 'attrs'],
15577 'StoragePoolFilter': {'additionalProperties': False,
15578 'properties': {'names': {'items': {'type': 'string'},
15580 'providers': {'items': {'type': 'string'},
15583 'StoragePoolFilters': {'additionalProperties': False,
15584 'properties': {'filters': {'items': {'$ref': '#/definitions/StoragePoolFilter'},
15587 'StoragePoolsResult': {'additionalProperties': False,
15588 'properties': {'error': {'$ref': '#/definitions/Error'},
15589 'storage-pools': {'items': {'$ref': '#/definitions/StoragePool'},
15592 'StoragePoolsResults': {'additionalProperties': False,
15593 'properties': {'results': {'items': {'$ref': '#/definitions/StoragePoolsResult'},
15596 'StoragesAddParams': {'additionalProperties': False,
15597 'properties': {'storages': {'items': {'$ref': '#/definitions/StorageAddParams'},
15599 'required': ['storages'],
15601 'VolumeAttachmentInfo': {'additionalProperties': False,
15602 'properties': {'bus-address': {'type': 'string'},
15603 'device-link': {'type': 'string'},
15604 'device-name': {'type': 'string'},
15605 'read-only': {'type': 'boolean'}},
15607 'VolumeDetails': {'additionalProperties': False,
15608 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'},
15609 'machine-attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/VolumeAttachmentInfo'}},
15611 'status': {'$ref': '#/definitions/EntityStatus'},
15612 'storage': {'$ref': '#/definitions/StorageDetails'},
15613 'volume-tag': {'type': 'string'}},
15614 'required': ['volume-tag', 'info', 'status'],
15616 'VolumeDetailsListResult': {'additionalProperties': False,
15617 'properties': {'error': {'$ref': '#/definitions/Error'},
15618 'result': {'items': {'$ref': '#/definitions/VolumeDetails'},
15621 'VolumeDetailsListResults': {'additionalProperties': False,
15622 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeDetailsListResult'},
15625 'VolumeFilter': {'additionalProperties': False,
15626 'properties': {'machines': {'items': {'type': 'string'},
15629 'VolumeFilters': {'additionalProperties': False,
15630 'properties': {'filters': {'items': {'$ref': '#/definitions/VolumeFilter'},
15633 'VolumeInfo': {'additionalProperties': False,
15634 'properties': {'hardware-id': {'type': 'string'},
15635 'persistent': {'type': 'boolean'},
15636 'size': {'type': 'integer'},
15637 'volume-id': {'type': 'string'}},
15638 'required': ['volume-id', 'size', 'persistent'],
15639 'type': 'object'}},
15640 'properties': {'AddToUnit': {'properties': {'Params': {'$ref': '#/definitions/StoragesAddParams'},
15641 'Result': {'$ref': '#/definitions/ErrorResults'}},
15643 'CreatePool': {'properties': {'Params': {'$ref': '#/definitions/StoragePool'}},
15645 'ListFilesystems': {'properties': {'Params': {'$ref': '#/definitions/FilesystemFilters'},
15646 'Result': {'$ref': '#/definitions/FilesystemDetailsListResults'}},
15648 'ListPools': {'properties': {'Params': {'$ref': '#/definitions/StoragePoolFilters'},
15649 'Result': {'$ref': '#/definitions/StoragePoolsResults'}},
15651 'ListStorageDetails': {'properties': {'Params': {'$ref': '#/definitions/StorageFilters'},
15652 'Result': {'$ref': '#/definitions/StorageDetailsListResults'}},
15654 'ListVolumes': {'properties': {'Params': {'$ref': '#/definitions/VolumeFilters'},
15655 'Result': {'$ref': '#/definitions/VolumeDetailsListResults'}},
15657 'StorageDetails': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15658 'Result': {'$ref': '#/definitions/StorageDetailsResults'}},
15659 'type': 'object'}},
15663 @ReturnMapping(ErrorResults
)
15664 async def AddToUnit(self
, storages
):
15666 storages : typing.Sequence[~StorageAddParams]
15667 Returns -> typing.Sequence[~ErrorResult]
15669 # map input types to rpc msg
15671 msg
= dict(Type
='Storage', Request
='AddToUnit', Version
=2, Params
=params
)
15672 params
['storages'] = storages
15673 reply
= await self
.rpc(msg
)
15678 @ReturnMapping(None)
15679 async def CreatePool(self
, attrs
, name
, provider
):
15681 attrs : typing.Mapping[str, typing.Any]
15686 # map input types to rpc msg
15688 msg
= dict(Type
='Storage', Request
='CreatePool', Version
=2, Params
=params
)
15689 params
['attrs'] = attrs
15690 params
['name'] = name
15691 params
['provider'] = provider
15692 reply
= await self
.rpc(msg
)
15697 @ReturnMapping(FilesystemDetailsListResults
)
15698 async def ListFilesystems(self
, filters
):
15700 filters : typing.Sequence[~FilesystemFilter]
15701 Returns -> typing.Sequence[~FilesystemDetailsListResult]
15703 # map input types to rpc msg
15705 msg
= dict(Type
='Storage', Request
='ListFilesystems', Version
=2, Params
=params
)
15706 params
['filters'] = filters
15707 reply
= await self
.rpc(msg
)
15712 @ReturnMapping(StoragePoolsResults
)
15713 async def ListPools(self
, filters
):
15715 filters : typing.Sequence[~StoragePoolFilter]
15716 Returns -> typing.Sequence[~StoragePoolsResult]
15718 # map input types to rpc msg
15720 msg
= dict(Type
='Storage', Request
='ListPools', Version
=2, Params
=params
)
15721 params
['filters'] = filters
15722 reply
= await self
.rpc(msg
)
15727 @ReturnMapping(StorageDetailsListResults
)
15728 async def ListStorageDetails(self
, filters
):
15730 filters : typing.Sequence[~StorageFilter]
15731 Returns -> typing.Sequence[~StorageDetailsListResult]
15733 # map input types to rpc msg
15735 msg
= dict(Type
='Storage', Request
='ListStorageDetails', Version
=2, Params
=params
)
15736 params
['filters'] = filters
15737 reply
= await self
.rpc(msg
)
15742 @ReturnMapping(VolumeDetailsListResults
)
15743 async def ListVolumes(self
, filters
):
15745 filters : typing.Sequence[~VolumeFilter]
15746 Returns -> typing.Sequence[~VolumeDetailsListResult]
15748 # map input types to rpc msg
15750 msg
= dict(Type
='Storage', Request
='ListVolumes', Version
=2, Params
=params
)
15751 params
['filters'] = filters
15752 reply
= await self
.rpc(msg
)
15757 @ReturnMapping(StorageDetailsResults
)
15758 async def StorageDetails(self
, entities
):
15760 entities : typing.Sequence[~Entity]
15761 Returns -> typing.Sequence[~StorageDetailsResult]
15763 # map input types to rpc msg
15765 msg
= dict(Type
='Storage', Request
='StorageDetails', Version
=2, Params
=params
)
15766 params
['entities'] = entities
15767 reply
= await self
.rpc(msg
)
15771 class StorageProvisionerFacade(Type
):
15772 name
= 'StorageProvisioner'
15774 schema
= {'definitions': {'BlockDevice': {'additionalProperties': False,
15775 'properties': {'BusAddress': {'type': 'string'},
15776 'DeviceLinks': {'items': {'type': 'string'},
15778 'DeviceName': {'type': 'string'},
15779 'FilesystemType': {'type': 'string'},
15780 'HardwareId': {'type': 'string'},
15781 'InUse': {'type': 'boolean'},
15782 'Label': {'type': 'string'},
15783 'MountPoint': {'type': 'string'},
15784 'Size': {'type': 'integer'},
15785 'UUID': {'type': 'string'}},
15786 'required': ['DeviceName',
15797 'BlockDeviceResult': {'additionalProperties': False,
15798 'properties': {'error': {'$ref': '#/definitions/Error'},
15799 'result': {'$ref': '#/definitions/BlockDevice'}},
15800 'required': ['result'],
15802 'BlockDeviceResults': {'additionalProperties': False,
15803 'properties': {'results': {'items': {'$ref': '#/definitions/BlockDeviceResult'},
15806 'Entities': {'additionalProperties': False,
15807 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
15809 'required': ['entities'],
15811 'Entity': {'additionalProperties': False,
15812 'properties': {'tag': {'type': 'string'}},
15813 'required': ['tag'],
15815 'EntityStatusArgs': {'additionalProperties': False,
15816 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
15817 'type': 'object'}},
15819 'info': {'type': 'string'},
15820 'status': {'type': 'string'},
15821 'tag': {'type': 'string'}},
15822 'required': ['tag',
15827 'Error': {'additionalProperties': False,
15828 'properties': {'code': {'type': 'string'},
15829 'info': {'$ref': '#/definitions/ErrorInfo'},
15830 'message': {'type': 'string'}},
15831 'required': ['message', 'code'],
15833 'ErrorInfo': {'additionalProperties': False,
15834 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
15835 'macaroon-path': {'type': 'string'}},
15837 'ErrorResult': {'additionalProperties': False,
15838 'properties': {'error': {'$ref': '#/definitions/Error'}},
15840 'ErrorResults': {'additionalProperties': False,
15841 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
15843 'required': ['results'],
15845 'Filesystem': {'additionalProperties': False,
15846 'properties': {'filesystem-tag': {'type': 'string'},
15847 'info': {'$ref': '#/definitions/FilesystemInfo'},
15848 'volume-tag': {'type': 'string'}},
15849 'required': ['filesystem-tag', 'info'],
15851 'FilesystemAttachment': {'additionalProperties': False,
15852 'properties': {'filesystem-tag': {'type': 'string'},
15853 'info': {'$ref': '#/definitions/FilesystemAttachmentInfo'},
15854 'machine-tag': {'type': 'string'}},
15855 'required': ['filesystem-tag',
15859 'FilesystemAttachmentInfo': {'additionalProperties': False,
15860 'properties': {'mount-point': {'type': 'string'},
15861 'read-only': {'type': 'boolean'}},
15863 'FilesystemAttachmentParams': {'additionalProperties': False,
15864 'properties': {'filesystem-id': {'type': 'string'},
15865 'filesystem-tag': {'type': 'string'},
15866 'instance-id': {'type': 'string'},
15867 'machine-tag': {'type': 'string'},
15868 'mount-point': {'type': 'string'},
15869 'provider': {'type': 'string'},
15870 'read-only': {'type': 'boolean'}},
15871 'required': ['filesystem-tag',
15875 'FilesystemAttachmentParamsResult': {'additionalProperties': False,
15876 'properties': {'error': {'$ref': '#/definitions/Error'},
15877 'result': {'$ref': '#/definitions/FilesystemAttachmentParams'}},
15878 'required': ['result'],
15880 'FilesystemAttachmentParamsResults': {'additionalProperties': False,
15881 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemAttachmentParamsResult'},
15884 'FilesystemAttachmentResult': {'additionalProperties': False,
15885 'properties': {'error': {'$ref': '#/definitions/Error'},
15886 'result': {'$ref': '#/definitions/FilesystemAttachment'}},
15887 'required': ['result'],
15889 'FilesystemAttachmentResults': {'additionalProperties': False,
15890 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemAttachmentResult'},
15893 'FilesystemAttachments': {'additionalProperties': False,
15894 'properties': {'filesystem-attachments': {'items': {'$ref': '#/definitions/FilesystemAttachment'},
15896 'required': ['filesystem-attachments'],
15898 'FilesystemInfo': {'additionalProperties': False,
15899 'properties': {'filesystem-id': {'type': 'string'},
15900 'size': {'type': 'integer'}},
15901 'required': ['filesystem-id', 'size'],
15903 'FilesystemParams': {'additionalProperties': False,
15904 'properties': {'attachment': {'$ref': '#/definitions/FilesystemAttachmentParams'},
15905 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
15906 'type': 'object'}},
15908 'filesystem-tag': {'type': 'string'},
15909 'provider': {'type': 'string'},
15910 'size': {'type': 'integer'},
15911 'tags': {'patternProperties': {'.*': {'type': 'string'}},
15913 'volume-tag': {'type': 'string'}},
15914 'required': ['filesystem-tag',
15918 'FilesystemParamsResult': {'additionalProperties': False,
15919 'properties': {'error': {'$ref': '#/definitions/Error'},
15920 'result': {'$ref': '#/definitions/FilesystemParams'}},
15921 'required': ['result'],
15923 'FilesystemParamsResults': {'additionalProperties': False,
15924 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemParamsResult'},
15927 'FilesystemResult': {'additionalProperties': False,
15928 'properties': {'error': {'$ref': '#/definitions/Error'},
15929 'result': {'$ref': '#/definitions/Filesystem'}},
15930 'required': ['result'],
15932 'FilesystemResults': {'additionalProperties': False,
15933 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemResult'},
15936 'Filesystems': {'additionalProperties': False,
15937 'properties': {'filesystems': {'items': {'$ref': '#/definitions/Filesystem'},
15939 'required': ['filesystems'],
15941 'LifeResult': {'additionalProperties': False,
15942 'properties': {'error': {'$ref': '#/definitions/Error'},
15943 'life': {'type': 'string'}},
15944 'required': ['life'],
15946 'LifeResults': {'additionalProperties': False,
15947 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
15949 'required': ['results'],
15951 'Macaroon': {'additionalProperties': False, 'type': 'object'},
15952 'MachineStorageId': {'additionalProperties': False,
15953 'properties': {'attachment-tag': {'type': 'string'},
15954 'machine-tag': {'type': 'string'}},
15955 'required': ['machine-tag',
15958 'MachineStorageIds': {'additionalProperties': False,
15959 'properties': {'ids': {'items': {'$ref': '#/definitions/MachineStorageId'},
15961 'required': ['ids'],
15963 'MachineStorageIdsWatchResult': {'additionalProperties': False,
15964 'properties': {'changes': {'items': {'$ref': '#/definitions/MachineStorageId'},
15966 'error': {'$ref': '#/definitions/Error'},
15967 'watcher-id': {'type': 'string'}},
15968 'required': ['watcher-id',
15971 'MachineStorageIdsWatchResults': {'additionalProperties': False,
15972 'properties': {'results': {'items': {'$ref': '#/definitions/MachineStorageIdsWatchResult'},
15974 'required': ['results'],
15976 'ModelConfigResult': {'additionalProperties': False,
15977 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
15978 'type': 'object'}},
15979 'type': 'object'}},
15980 'required': ['config'],
15982 'NotifyWatchResult': {'additionalProperties': False,
15983 'properties': {'NotifyWatcherId': {'type': 'string'},
15984 'error': {'$ref': '#/definitions/Error'}},
15985 'required': ['NotifyWatcherId'],
15987 'NotifyWatchResults': {'additionalProperties': False,
15988 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
15990 'required': ['results'],
15992 'SetStatus': {'additionalProperties': False,
15993 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
15995 'required': ['entities'],
15997 'StringResult': {'additionalProperties': False,
15998 'properties': {'error': {'$ref': '#/definitions/Error'},
15999 'result': {'type': 'string'}},
16000 'required': ['result'],
16002 'StringResults': {'additionalProperties': False,
16003 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
16005 'required': ['results'],
16007 'StringsWatchResult': {'additionalProperties': False,
16008 'properties': {'changes': {'items': {'type': 'string'},
16010 'error': {'$ref': '#/definitions/Error'},
16011 'watcher-id': {'type': 'string'}},
16012 'required': ['watcher-id'],
16014 'StringsWatchResults': {'additionalProperties': False,
16015 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
16017 'required': ['results'],
16019 'Volume': {'additionalProperties': False,
16020 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'},
16021 'volume-tag': {'type': 'string'}},
16022 'required': ['volume-tag', 'info'],
16024 'VolumeAttachment': {'additionalProperties': False,
16025 'properties': {'info': {'$ref': '#/definitions/VolumeAttachmentInfo'},
16026 'machine-tag': {'type': 'string'},
16027 'volume-tag': {'type': 'string'}},
16028 'required': ['volume-tag',
16032 'VolumeAttachmentInfo': {'additionalProperties': False,
16033 'properties': {'bus-address': {'type': 'string'},
16034 'device-link': {'type': 'string'},
16035 'device-name': {'type': 'string'},
16036 'read-only': {'type': 'boolean'}},
16038 'VolumeAttachmentParams': {'additionalProperties': False,
16039 'properties': {'instance-id': {'type': 'string'},
16040 'machine-tag': {'type': 'string'},
16041 'provider': {'type': 'string'},
16042 'read-only': {'type': 'boolean'},
16043 'volume-id': {'type': 'string'},
16044 'volume-tag': {'type': 'string'}},
16045 'required': ['volume-tag',
16049 'VolumeAttachmentParamsResult': {'additionalProperties': False,
16050 'properties': {'error': {'$ref': '#/definitions/Error'},
16051 'result': {'$ref': '#/definitions/VolumeAttachmentParams'}},
16052 'required': ['result'],
16054 'VolumeAttachmentParamsResults': {'additionalProperties': False,
16055 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeAttachmentParamsResult'},
16058 'VolumeAttachmentResult': {'additionalProperties': False,
16059 'properties': {'error': {'$ref': '#/definitions/Error'},
16060 'result': {'$ref': '#/definitions/VolumeAttachment'}},
16061 'required': ['result'],
16063 'VolumeAttachmentResults': {'additionalProperties': False,
16064 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeAttachmentResult'},
16067 'VolumeAttachments': {'additionalProperties': False,
16068 'properties': {'volume-attachments': {'items': {'$ref': '#/definitions/VolumeAttachment'},
16070 'required': ['volume-attachments'],
16072 'VolumeInfo': {'additionalProperties': False,
16073 'properties': {'hardware-id': {'type': 'string'},
16074 'persistent': {'type': 'boolean'},
16075 'size': {'type': 'integer'},
16076 'volume-id': {'type': 'string'}},
16077 'required': ['volume-id', 'size', 'persistent'],
16079 'VolumeParams': {'additionalProperties': False,
16080 'properties': {'attachment': {'$ref': '#/definitions/VolumeAttachmentParams'},
16081 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
16082 'type': 'object'}},
16084 'provider': {'type': 'string'},
16085 'size': {'type': 'integer'},
16086 'tags': {'patternProperties': {'.*': {'type': 'string'}},
16088 'volume-tag': {'type': 'string'}},
16089 'required': ['volume-tag',
16093 'VolumeParamsResult': {'additionalProperties': False,
16094 'properties': {'error': {'$ref': '#/definitions/Error'},
16095 'result': {'$ref': '#/definitions/VolumeParams'}},
16096 'required': ['result'],
16098 'VolumeParamsResults': {'additionalProperties': False,
16099 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeParamsResult'},
16102 'VolumeResult': {'additionalProperties': False,
16103 'properties': {'error': {'$ref': '#/definitions/Error'},
16104 'result': {'$ref': '#/definitions/Volume'}},
16105 'required': ['result'],
16107 'VolumeResults': {'additionalProperties': False,
16108 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeResult'},
16111 'Volumes': {'additionalProperties': False,
16112 'properties': {'volumes': {'items': {'$ref': '#/definitions/Volume'},
16114 'required': ['volumes'],
16115 'type': 'object'}},
16116 'properties': {'AttachmentLife': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
16117 'Result': {'$ref': '#/definitions/LifeResults'}},
16119 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16120 'Result': {'$ref': '#/definitions/ErrorResults'}},
16122 'FilesystemAttachmentParams': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
16123 'Result': {'$ref': '#/definitions/FilesystemAttachmentParamsResults'}},
16125 'FilesystemAttachments': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
16126 'Result': {'$ref': '#/definitions/FilesystemAttachmentResults'}},
16128 'FilesystemParams': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16129 'Result': {'$ref': '#/definitions/FilesystemParamsResults'}},
16131 'Filesystems': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16132 'Result': {'$ref': '#/definitions/FilesystemResults'}},
16134 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16135 'Result': {'$ref': '#/definitions/StringResults'}},
16137 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16138 'Result': {'$ref': '#/definitions/LifeResults'}},
16140 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
16142 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16143 'Result': {'$ref': '#/definitions/ErrorResults'}},
16145 'RemoveAttachment': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
16146 'Result': {'$ref': '#/definitions/ErrorResults'}},
16148 'SetFilesystemAttachmentInfo': {'properties': {'Params': {'$ref': '#/definitions/FilesystemAttachments'},
16149 'Result': {'$ref': '#/definitions/ErrorResults'}},
16151 'SetFilesystemInfo': {'properties': {'Params': {'$ref': '#/definitions/Filesystems'},
16152 'Result': {'$ref': '#/definitions/ErrorResults'}},
16154 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
16155 'Result': {'$ref': '#/definitions/ErrorResults'}},
16157 'SetVolumeAttachmentInfo': {'properties': {'Params': {'$ref': '#/definitions/VolumeAttachments'},
16158 'Result': {'$ref': '#/definitions/ErrorResults'}},
16160 'SetVolumeInfo': {'properties': {'Params': {'$ref': '#/definitions/Volumes'},
16161 'Result': {'$ref': '#/definitions/ErrorResults'}},
16163 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
16164 'Result': {'$ref': '#/definitions/ErrorResults'}},
16166 'VolumeAttachmentParams': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
16167 'Result': {'$ref': '#/definitions/VolumeAttachmentParamsResults'}},
16169 'VolumeAttachments': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
16170 'Result': {'$ref': '#/definitions/VolumeAttachmentResults'}},
16172 'VolumeBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
16173 'Result': {'$ref': '#/definitions/BlockDeviceResults'}},
16175 'VolumeParams': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16176 'Result': {'$ref': '#/definitions/VolumeParamsResults'}},
16178 'Volumes': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16179 'Result': {'$ref': '#/definitions/VolumeResults'}},
16181 'WatchBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16182 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
16184 'WatchFilesystemAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16185 'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResults'}},
16187 'WatchFilesystems': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16188 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
16190 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
16192 'WatchMachines': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16193 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
16195 'WatchVolumeAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16196 'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResults'}},
16198 'WatchVolumes': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16199 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
16200 'type': 'object'}},
16204 @ReturnMapping(LifeResults
)
16205 async def AttachmentLife(self
, ids
):
16207 ids : typing.Sequence[~MachineStorageId]
16208 Returns -> typing.Sequence[~LifeResult]
16210 # map input types to rpc msg
16212 msg
= dict(Type
='StorageProvisioner', Request
='AttachmentLife', Version
=2, Params
=params
)
16213 params
['ids'] = ids
16214 reply
= await self
.rpc(msg
)
16219 @ReturnMapping(ErrorResults
)
16220 async def EnsureDead(self
, entities
):
16222 entities : typing.Sequence[~Entity]
16223 Returns -> typing.Sequence[~ErrorResult]
16225 # map input types to rpc msg
16227 msg
= dict(Type
='StorageProvisioner', Request
='EnsureDead', Version
=2, Params
=params
)
16228 params
['entities'] = entities
16229 reply
= await self
.rpc(msg
)
16234 @ReturnMapping(FilesystemAttachmentParamsResults
)
16235 async def FilesystemAttachmentParams(self
, ids
):
16237 ids : typing.Sequence[~MachineStorageId]
16238 Returns -> typing.Sequence[~FilesystemAttachmentParamsResult]
16240 # map input types to rpc msg
16242 msg
= dict(Type
='StorageProvisioner', Request
='FilesystemAttachmentParams', Version
=2, Params
=params
)
16243 params
['ids'] = ids
16244 reply
= await self
.rpc(msg
)
16249 @ReturnMapping(FilesystemAttachmentResults
)
16250 async def FilesystemAttachments(self
, ids
):
16252 ids : typing.Sequence[~MachineStorageId]
16253 Returns -> typing.Sequence[~FilesystemAttachmentResult]
16255 # map input types to rpc msg
16257 msg
= dict(Type
='StorageProvisioner', Request
='FilesystemAttachments', Version
=2, Params
=params
)
16258 params
['ids'] = ids
16259 reply
= await self
.rpc(msg
)
16264 @ReturnMapping(FilesystemParamsResults
)
16265 async def FilesystemParams(self
, entities
):
16267 entities : typing.Sequence[~Entity]
16268 Returns -> typing.Sequence[~FilesystemParamsResult]
16270 # map input types to rpc msg
16272 msg
= dict(Type
='StorageProvisioner', Request
='FilesystemParams', Version
=2, Params
=params
)
16273 params
['entities'] = entities
16274 reply
= await self
.rpc(msg
)
16279 @ReturnMapping(FilesystemResults
)
16280 async def Filesystems(self
, entities
):
16282 entities : typing.Sequence[~Entity]
16283 Returns -> typing.Sequence[~FilesystemResult]
16285 # map input types to rpc msg
16287 msg
= dict(Type
='StorageProvisioner', Request
='Filesystems', Version
=2, Params
=params
)
16288 params
['entities'] = entities
16289 reply
= await self
.rpc(msg
)
16294 @ReturnMapping(StringResults
)
16295 async def InstanceId(self
, entities
):
16297 entities : typing.Sequence[~Entity]
16298 Returns -> typing.Sequence[~StringResult]
16300 # map input types to rpc msg
16302 msg
= dict(Type
='StorageProvisioner', Request
='InstanceId', Version
=2, Params
=params
)
16303 params
['entities'] = entities
16304 reply
= await self
.rpc(msg
)
16309 @ReturnMapping(LifeResults
)
16310 async def Life(self
, entities
):
16312 entities : typing.Sequence[~Entity]
16313 Returns -> typing.Sequence[~LifeResult]
16315 # map input types to rpc msg
16317 msg
= dict(Type
='StorageProvisioner', Request
='Life', Version
=2, Params
=params
)
16318 params
['entities'] = entities
16319 reply
= await self
.rpc(msg
)
16324 @ReturnMapping(ModelConfigResult
)
16325 async def ModelConfig(self
):
16328 Returns -> typing.Mapping[str, typing.Any]
16330 # map input types to rpc msg
16332 msg
= dict(Type
='StorageProvisioner', Request
='ModelConfig', Version
=2, Params
=params
)
16334 reply
= await self
.rpc(msg
)
16339 @ReturnMapping(ErrorResults
)
16340 async def Remove(self
, entities
):
16342 entities : typing.Sequence[~Entity]
16343 Returns -> typing.Sequence[~ErrorResult]
16345 # map input types to rpc msg
16347 msg
= dict(Type
='StorageProvisioner', Request
='Remove', Version
=2, Params
=params
)
16348 params
['entities'] = entities
16349 reply
= await self
.rpc(msg
)
16354 @ReturnMapping(ErrorResults
)
16355 async def RemoveAttachment(self
, ids
):
16357 ids : typing.Sequence[~MachineStorageId]
16358 Returns -> typing.Sequence[~ErrorResult]
16360 # map input types to rpc msg
16362 msg
= dict(Type
='StorageProvisioner', Request
='RemoveAttachment', Version
=2, Params
=params
)
16363 params
['ids'] = ids
16364 reply
= await self
.rpc(msg
)
16369 @ReturnMapping(ErrorResults
)
16370 async def SetFilesystemAttachmentInfo(self
, filesystem_attachments
):
16372 filesystem_attachments : typing.Sequence[~FilesystemAttachment]
16373 Returns -> typing.Sequence[~ErrorResult]
16375 # map input types to rpc msg
16377 msg
= dict(Type
='StorageProvisioner', Request
='SetFilesystemAttachmentInfo', Version
=2, Params
=params
)
16378 params
['filesystem-attachments'] = filesystem_attachments
16379 reply
= await self
.rpc(msg
)
16384 @ReturnMapping(ErrorResults
)
16385 async def SetFilesystemInfo(self
, filesystems
):
16387 filesystems : typing.Sequence[~Filesystem]
16388 Returns -> typing.Sequence[~ErrorResult]
16390 # map input types to rpc msg
16392 msg
= dict(Type
='StorageProvisioner', Request
='SetFilesystemInfo', Version
=2, Params
=params
)
16393 params
['filesystems'] = filesystems
16394 reply
= await self
.rpc(msg
)
16399 @ReturnMapping(ErrorResults
)
16400 async def SetStatus(self
, entities
):
16402 entities : typing.Sequence[~EntityStatusArgs]
16403 Returns -> typing.Sequence[~ErrorResult]
16405 # map input types to rpc msg
16407 msg
= dict(Type
='StorageProvisioner', Request
='SetStatus', Version
=2, Params
=params
)
16408 params
['entities'] = entities
16409 reply
= await self
.rpc(msg
)
16414 @ReturnMapping(ErrorResults
)
16415 async def SetVolumeAttachmentInfo(self
, volume_attachments
):
16417 volume_attachments : typing.Sequence[~VolumeAttachment]
16418 Returns -> typing.Sequence[~ErrorResult]
16420 # map input types to rpc msg
16422 msg
= dict(Type
='StorageProvisioner', Request
='SetVolumeAttachmentInfo', Version
=2, Params
=params
)
16423 params
['volume-attachments'] = volume_attachments
16424 reply
= await self
.rpc(msg
)
16429 @ReturnMapping(ErrorResults
)
16430 async def SetVolumeInfo(self
, volumes
):
16432 volumes : typing.Sequence[~Volume]
16433 Returns -> typing.Sequence[~ErrorResult]
16435 # map input types to rpc msg
16437 msg
= dict(Type
='StorageProvisioner', Request
='SetVolumeInfo', Version
=2, Params
=params
)
16438 params
['volumes'] = volumes
16439 reply
= await self
.rpc(msg
)
16444 @ReturnMapping(ErrorResults
)
16445 async def UpdateStatus(self
, entities
):
16447 entities : typing.Sequence[~EntityStatusArgs]
16448 Returns -> typing.Sequence[~ErrorResult]
16450 # map input types to rpc msg
16452 msg
= dict(Type
='StorageProvisioner', Request
='UpdateStatus', Version
=2, Params
=params
)
16453 params
['entities'] = entities
16454 reply
= await self
.rpc(msg
)
16459 @ReturnMapping(VolumeAttachmentParamsResults
)
16460 async def VolumeAttachmentParams(self
, ids
):
16462 ids : typing.Sequence[~MachineStorageId]
16463 Returns -> typing.Sequence[~VolumeAttachmentParamsResult]
16465 # map input types to rpc msg
16467 msg
= dict(Type
='StorageProvisioner', Request
='VolumeAttachmentParams', Version
=2, Params
=params
)
16468 params
['ids'] = ids
16469 reply
= await self
.rpc(msg
)
16474 @ReturnMapping(VolumeAttachmentResults
)
16475 async def VolumeAttachments(self
, ids
):
16477 ids : typing.Sequence[~MachineStorageId]
16478 Returns -> typing.Sequence[~VolumeAttachmentResult]
16480 # map input types to rpc msg
16482 msg
= dict(Type
='StorageProvisioner', Request
='VolumeAttachments', Version
=2, Params
=params
)
16483 params
['ids'] = ids
16484 reply
= await self
.rpc(msg
)
16489 @ReturnMapping(BlockDeviceResults
)
16490 async def VolumeBlockDevices(self
, ids
):
16492 ids : typing.Sequence[~MachineStorageId]
16493 Returns -> typing.Sequence[~BlockDeviceResult]
16495 # map input types to rpc msg
16497 msg
= dict(Type
='StorageProvisioner', Request
='VolumeBlockDevices', Version
=2, Params
=params
)
16498 params
['ids'] = ids
16499 reply
= await self
.rpc(msg
)
16504 @ReturnMapping(VolumeParamsResults
)
16505 async def VolumeParams(self
, entities
):
16507 entities : typing.Sequence[~Entity]
16508 Returns -> typing.Sequence[~VolumeParamsResult]
16510 # map input types to rpc msg
16512 msg
= dict(Type
='StorageProvisioner', Request
='VolumeParams', Version
=2, Params
=params
)
16513 params
['entities'] = entities
16514 reply
= await self
.rpc(msg
)
16519 @ReturnMapping(VolumeResults
)
16520 async def Volumes(self
, entities
):
16522 entities : typing.Sequence[~Entity]
16523 Returns -> typing.Sequence[~VolumeResult]
16525 # map input types to rpc msg
16527 msg
= dict(Type
='StorageProvisioner', Request
='Volumes', Version
=2, Params
=params
)
16528 params
['entities'] = entities
16529 reply
= await self
.rpc(msg
)
16534 @ReturnMapping(NotifyWatchResults
)
16535 async def WatchBlockDevices(self
, entities
):
16537 entities : typing.Sequence[~Entity]
16538 Returns -> typing.Sequence[~NotifyWatchResult]
16540 # map input types to rpc msg
16542 msg
= dict(Type
='StorageProvisioner', Request
='WatchBlockDevices', Version
=2, Params
=params
)
16543 params
['entities'] = entities
16544 reply
= await self
.rpc(msg
)
16549 @ReturnMapping(MachineStorageIdsWatchResults
)
16550 async def WatchFilesystemAttachments(self
, entities
):
16552 entities : typing.Sequence[~Entity]
16553 Returns -> typing.Sequence[~MachineStorageIdsWatchResult]
16555 # map input types to rpc msg
16557 msg
= dict(Type
='StorageProvisioner', Request
='WatchFilesystemAttachments', Version
=2, Params
=params
)
16558 params
['entities'] = entities
16559 reply
= await self
.rpc(msg
)
16564 @ReturnMapping(StringsWatchResults
)
16565 async def WatchFilesystems(self
, entities
):
16567 entities : typing.Sequence[~Entity]
16568 Returns -> typing.Sequence[~StringsWatchResult]
16570 # map input types to rpc msg
16572 msg
= dict(Type
='StorageProvisioner', Request
='WatchFilesystems', Version
=2, Params
=params
)
16573 params
['entities'] = entities
16574 reply
= await self
.rpc(msg
)
16579 @ReturnMapping(NotifyWatchResult
)
16580 async def WatchForModelConfigChanges(self
):
16583 Returns -> typing.Union[str, _ForwardRef('Error')]
16585 # map input types to rpc msg
16587 msg
= dict(Type
='StorageProvisioner', Request
='WatchForModelConfigChanges', Version
=2, Params
=params
)
16589 reply
= await self
.rpc(msg
)
16594 @ReturnMapping(NotifyWatchResults
)
16595 async def WatchMachines(self
, entities
):
16597 entities : typing.Sequence[~Entity]
16598 Returns -> typing.Sequence[~NotifyWatchResult]
16600 # map input types to rpc msg
16602 msg
= dict(Type
='StorageProvisioner', Request
='WatchMachines', Version
=2, Params
=params
)
16603 params
['entities'] = entities
16604 reply
= await self
.rpc(msg
)
16609 @ReturnMapping(MachineStorageIdsWatchResults
)
16610 async def WatchVolumeAttachments(self
, entities
):
16612 entities : typing.Sequence[~Entity]
16613 Returns -> typing.Sequence[~MachineStorageIdsWatchResult]
16615 # map input types to rpc msg
16617 msg
= dict(Type
='StorageProvisioner', Request
='WatchVolumeAttachments', Version
=2, Params
=params
)
16618 params
['entities'] = entities
16619 reply
= await self
.rpc(msg
)
16624 @ReturnMapping(StringsWatchResults
)
16625 async def WatchVolumes(self
, entities
):
16627 entities : typing.Sequence[~Entity]
16628 Returns -> typing.Sequence[~StringsWatchResult]
16630 # map input types to rpc msg
16632 msg
= dict(Type
='StorageProvisioner', Request
='WatchVolumes', Version
=2, Params
=params
)
16633 params
['entities'] = entities
16634 reply
= await self
.rpc(msg
)
16638 class StringsWatcherFacade(Type
):
16639 name
= 'StringsWatcher'
16641 schema
= {'definitions': {'Error': {'additionalProperties': False,
16642 'properties': {'code': {'type': 'string'},
16643 'info': {'$ref': '#/definitions/ErrorInfo'},
16644 'message': {'type': 'string'}},
16645 'required': ['message', 'code'],
16647 'ErrorInfo': {'additionalProperties': False,
16648 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
16649 'macaroon-path': {'type': 'string'}},
16651 'Macaroon': {'additionalProperties': False, 'type': 'object'},
16652 'StringsWatchResult': {'additionalProperties': False,
16653 'properties': {'changes': {'items': {'type': 'string'},
16655 'error': {'$ref': '#/definitions/Error'},
16656 'watcher-id': {'type': 'string'}},
16657 'required': ['watcher-id'],
16658 'type': 'object'}},
16659 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
16661 'Stop': {'type': 'object'}},
16665 @ReturnMapping(StringsWatchResult
)
16666 async def Next(self
):
16669 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')]
16671 # map input types to rpc msg
16673 msg
= dict(Type
='StringsWatcher', Request
='Next', Version
=1, Params
=params
)
16675 reply
= await self
.rpc(msg
)
16680 @ReturnMapping(None)
16681 async def Stop(self
):
16686 # map input types to rpc msg
16688 msg
= dict(Type
='StringsWatcher', Request
='Stop', Version
=1, Params
=params
)
16690 reply
= await self
.rpc(msg
)
16694 class SubnetsFacade(Type
):
16697 schema
= {'definitions': {'AddSubnetParams': {'additionalProperties': False,
16698 'properties': {'space-tag': {'type': 'string'},
16699 'subnet-provider-id': {'type': 'string'},
16700 'subnet-tag': {'type': 'string'},
16701 'zones': {'items': {'type': 'string'},
16703 'required': ['space-tag'],
16705 'AddSubnetsParams': {'additionalProperties': False,
16706 'properties': {'subnets': {'items': {'$ref': '#/definitions/AddSubnetParams'},
16708 'required': ['subnets'],
16710 'Error': {'additionalProperties': False,
16711 'properties': {'code': {'type': 'string'},
16712 'info': {'$ref': '#/definitions/ErrorInfo'},
16713 'message': {'type': 'string'}},
16714 'required': ['message', 'code'],
16716 'ErrorInfo': {'additionalProperties': False,
16717 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
16718 'macaroon-path': {'type': 'string'}},
16720 'ErrorResult': {'additionalProperties': False,
16721 'properties': {'error': {'$ref': '#/definitions/Error'}},
16723 'ErrorResults': {'additionalProperties': False,
16724 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
16726 'required': ['results'],
16728 'ListSubnetsResults': {'additionalProperties': False,
16729 'properties': {'results': {'items': {'$ref': '#/definitions/Subnet'},
16731 'required': ['results'],
16733 'Macaroon': {'additionalProperties': False, 'type': 'object'},
16734 'SpaceResult': {'additionalProperties': False,
16735 'properties': {'error': {'$ref': '#/definitions/Error'},
16736 'tag': {'type': 'string'}},
16737 'required': ['tag'],
16739 'SpaceResults': {'additionalProperties': False,
16740 'properties': {'results': {'items': {'$ref': '#/definitions/SpaceResult'},
16742 'required': ['results'],
16744 'Subnet': {'additionalProperties': False,
16745 'properties': {'cidr': {'type': 'string'},
16746 'life': {'type': 'string'},
16747 'provider-id': {'type': 'string'},
16748 'space-tag': {'type': 'string'},
16749 'status': {'type': 'string'},
16750 'vlan-tag': {'type': 'integer'},
16751 'zones': {'items': {'type': 'string'},
16753 'required': ['cidr',
16759 'SubnetsFilters': {'additionalProperties': False,
16760 'properties': {'space-tag': {'type': 'string'},
16761 'zone': {'type': 'string'}},
16763 'ZoneResult': {'additionalProperties': False,
16764 'properties': {'available': {'type': 'boolean'},
16765 'error': {'$ref': '#/definitions/Error'},
16766 'name': {'type': 'string'}},
16767 'required': ['name', 'available'],
16769 'ZoneResults': {'additionalProperties': False,
16770 'properties': {'results': {'items': {'$ref': '#/definitions/ZoneResult'},
16772 'required': ['results'],
16773 'type': 'object'}},
16774 'properties': {'AddSubnets': {'properties': {'Params': {'$ref': '#/definitions/AddSubnetsParams'},
16775 'Result': {'$ref': '#/definitions/ErrorResults'}},
16777 'AllSpaces': {'properties': {'Result': {'$ref': '#/definitions/SpaceResults'}},
16779 'AllZones': {'properties': {'Result': {'$ref': '#/definitions/ZoneResults'}},
16781 'ListSubnets': {'properties': {'Params': {'$ref': '#/definitions/SubnetsFilters'},
16782 'Result': {'$ref': '#/definitions/ListSubnetsResults'}},
16783 'type': 'object'}},
16787 @ReturnMapping(ErrorResults
)
16788 async def AddSubnets(self
, subnets
):
16790 subnets : typing.Sequence[~AddSubnetParams]
16791 Returns -> typing.Sequence[~ErrorResult]
16793 # map input types to rpc msg
16795 msg
= dict(Type
='Subnets', Request
='AddSubnets', Version
=2, Params
=params
)
16796 params
['subnets'] = subnets
16797 reply
= await self
.rpc(msg
)
16802 @ReturnMapping(SpaceResults
)
16803 async def AllSpaces(self
):
16806 Returns -> typing.Sequence[~SpaceResult]
16808 # map input types to rpc msg
16810 msg
= dict(Type
='Subnets', Request
='AllSpaces', Version
=2, Params
=params
)
16812 reply
= await self
.rpc(msg
)
16817 @ReturnMapping(ZoneResults
)
16818 async def AllZones(self
):
16821 Returns -> typing.Sequence[~ZoneResult]
16823 # map input types to rpc msg
16825 msg
= dict(Type
='Subnets', Request
='AllZones', Version
=2, Params
=params
)
16827 reply
= await self
.rpc(msg
)
16832 @ReturnMapping(ListSubnetsResults
)
16833 async def ListSubnets(self
, space_tag
, zone
):
16837 Returns -> typing.Sequence[~Subnet]
16839 # map input types to rpc msg
16841 msg
= dict(Type
='Subnets', Request
='ListSubnets', Version
=2, Params
=params
)
16842 params
['space-tag'] = space_tag
16843 params
['zone'] = zone
16844 reply
= await self
.rpc(msg
)
16848 class UndertakerFacade(Type
):
16849 name
= 'Undertaker'
16851 schema
= {'definitions': {'EntityStatusArgs': {'additionalProperties': False,
16852 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
16853 'type': 'object'}},
16855 'info': {'type': 'string'},
16856 'status': {'type': 'string'},
16857 'tag': {'type': 'string'}},
16858 'required': ['tag',
16863 'Error': {'additionalProperties': False,
16864 'properties': {'code': {'type': 'string'},
16865 'info': {'$ref': '#/definitions/ErrorInfo'},
16866 'message': {'type': 'string'}},
16867 'required': ['message', 'code'],
16869 'ErrorInfo': {'additionalProperties': False,
16870 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
16871 'macaroon-path': {'type': 'string'}},
16873 'ErrorResult': {'additionalProperties': False,
16874 'properties': {'error': {'$ref': '#/definitions/Error'}},
16876 'ErrorResults': {'additionalProperties': False,
16877 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
16879 'required': ['results'],
16881 'Macaroon': {'additionalProperties': False, 'type': 'object'},
16882 'ModelConfigResult': {'additionalProperties': False,
16883 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
16884 'type': 'object'}},
16885 'type': 'object'}},
16886 'required': ['config'],
16888 'NotifyWatchResult': {'additionalProperties': False,
16889 'properties': {'NotifyWatcherId': {'type': 'string'},
16890 'error': {'$ref': '#/definitions/Error'}},
16891 'required': ['NotifyWatcherId'],
16893 'NotifyWatchResults': {'additionalProperties': False,
16894 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
16896 'required': ['results'],
16898 'SetStatus': {'additionalProperties': False,
16899 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
16901 'required': ['entities'],
16903 'UndertakerModelInfo': {'additionalProperties': False,
16904 'properties': {'global-name': {'type': 'string'},
16905 'is-system': {'type': 'boolean'},
16906 'life': {'type': 'string'},
16907 'name': {'type': 'string'},
16908 'uuid': {'type': 'string'}},
16909 'required': ['uuid',
16915 'UndertakerModelInfoResult': {'additionalProperties': False,
16916 'properties': {'error': {'$ref': '#/definitions/Error'},
16917 'result': {'$ref': '#/definitions/UndertakerModelInfo'}},
16918 'required': ['result'],
16919 'type': 'object'}},
16920 'properties': {'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
16922 'ModelInfo': {'properties': {'Result': {'$ref': '#/definitions/UndertakerModelInfoResult'}},
16924 'ProcessDyingModel': {'type': 'object'},
16925 'RemoveModel': {'type': 'object'},
16926 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
16927 'Result': {'$ref': '#/definitions/ErrorResults'}},
16929 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
16930 'Result': {'$ref': '#/definitions/ErrorResults'}},
16932 'WatchModelResources': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
16933 'type': 'object'}},
16937 @ReturnMapping(ModelConfigResult
)
16938 async def ModelConfig(self
):
16941 Returns -> typing.Mapping[str, typing.Any]
16943 # map input types to rpc msg
16945 msg
= dict(Type
='Undertaker', Request
='ModelConfig', Version
=1, Params
=params
)
16947 reply
= await self
.rpc(msg
)
16952 @ReturnMapping(UndertakerModelInfoResult
)
16953 async def ModelInfo(self
):
16956 Returns -> typing.Union[_ForwardRef('Error'), _ForwardRef('UndertakerModelInfo')]
16958 # map input types to rpc msg
16960 msg
= dict(Type
='Undertaker', Request
='ModelInfo', Version
=1, Params
=params
)
16962 reply
= await self
.rpc(msg
)
16967 @ReturnMapping(None)
16968 async def ProcessDyingModel(self
):
16973 # map input types to rpc msg
16975 msg
= dict(Type
='Undertaker', Request
='ProcessDyingModel', Version
=1, Params
=params
)
16977 reply
= await self
.rpc(msg
)
16982 @ReturnMapping(None)
16983 async def RemoveModel(self
):
16988 # map input types to rpc msg
16990 msg
= dict(Type
='Undertaker', Request
='RemoveModel', Version
=1, Params
=params
)
16992 reply
= await self
.rpc(msg
)
16997 @ReturnMapping(ErrorResults
)
16998 async def SetStatus(self
, entities
):
17000 entities : typing.Sequence[~EntityStatusArgs]
17001 Returns -> typing.Sequence[~ErrorResult]
17003 # map input types to rpc msg
17005 msg
= dict(Type
='Undertaker', Request
='SetStatus', Version
=1, Params
=params
)
17006 params
['entities'] = entities
17007 reply
= await self
.rpc(msg
)
17012 @ReturnMapping(ErrorResults
)
17013 async def UpdateStatus(self
, entities
):
17015 entities : typing.Sequence[~EntityStatusArgs]
17016 Returns -> typing.Sequence[~ErrorResult]
17018 # map input types to rpc msg
17020 msg
= dict(Type
='Undertaker', Request
='UpdateStatus', Version
=1, Params
=params
)
17021 params
['entities'] = entities
17022 reply
= await self
.rpc(msg
)
17027 @ReturnMapping(NotifyWatchResults
)
17028 async def WatchModelResources(self
):
17031 Returns -> typing.Sequence[~NotifyWatchResult]
17033 # map input types to rpc msg
17035 msg
= dict(Type
='Undertaker', Request
='WatchModelResources', Version
=1, Params
=params
)
17037 reply
= await self
.rpc(msg
)
17041 class UnitAssignerFacade(Type
):
17042 name
= 'UnitAssigner'
17044 schema
= {'definitions': {'Entities': {'additionalProperties': False,
17045 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
17047 'required': ['entities'],
17049 'Entity': {'additionalProperties': False,
17050 'properties': {'tag': {'type': 'string'}},
17051 'required': ['tag'],
17053 'EntityStatusArgs': {'additionalProperties': False,
17054 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
17055 'type': 'object'}},
17057 'info': {'type': 'string'},
17058 'status': {'type': 'string'},
17059 'tag': {'type': 'string'}},
17060 'required': ['tag',
17065 'Error': {'additionalProperties': False,
17066 'properties': {'code': {'type': 'string'},
17067 'info': {'$ref': '#/definitions/ErrorInfo'},
17068 'message': {'type': 'string'}},
17069 'required': ['message', 'code'],
17071 'ErrorInfo': {'additionalProperties': False,
17072 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
17073 'macaroon-path': {'type': 'string'}},
17075 'ErrorResult': {'additionalProperties': False,
17076 'properties': {'error': {'$ref': '#/definitions/Error'}},
17078 'ErrorResults': {'additionalProperties': False,
17079 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
17081 'required': ['results'],
17083 'Macaroon': {'additionalProperties': False, 'type': 'object'},
17084 'SetStatus': {'additionalProperties': False,
17085 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
17087 'required': ['entities'],
17089 'StringsWatchResult': {'additionalProperties': False,
17090 'properties': {'changes': {'items': {'type': 'string'},
17092 'error': {'$ref': '#/definitions/Error'},
17093 'watcher-id': {'type': 'string'}},
17094 'required': ['watcher-id'],
17095 'type': 'object'}},
17096 'properties': {'AssignUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17097 'Result': {'$ref': '#/definitions/ErrorResults'}},
17099 'SetAgentStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
17100 'Result': {'$ref': '#/definitions/ErrorResults'}},
17102 'WatchUnitAssignments': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
17103 'type': 'object'}},
17107 @ReturnMapping(ErrorResults
)
17108 async def AssignUnits(self
, entities
):
17110 entities : typing.Sequence[~Entity]
17111 Returns -> typing.Sequence[~ErrorResult]
17113 # map input types to rpc msg
17115 msg
= dict(Type
='UnitAssigner', Request
='AssignUnits', Version
=1, Params
=params
)
17116 params
['entities'] = entities
17117 reply
= await self
.rpc(msg
)
17122 @ReturnMapping(ErrorResults
)
17123 async def SetAgentStatus(self
, entities
):
17125 entities : typing.Sequence[~EntityStatusArgs]
17126 Returns -> typing.Sequence[~ErrorResult]
17128 # map input types to rpc msg
17130 msg
= dict(Type
='UnitAssigner', Request
='SetAgentStatus', Version
=1, Params
=params
)
17131 params
['entities'] = entities
17132 reply
= await self
.rpc(msg
)
17137 @ReturnMapping(StringsWatchResult
)
17138 async def WatchUnitAssignments(self
):
17141 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')]
17143 # map input types to rpc msg
17145 msg
= dict(Type
='UnitAssigner', Request
='WatchUnitAssignments', Version
=1, Params
=params
)
17147 reply
= await self
.rpc(msg
)
17151 class UniterFacade(Type
):
17154 schema
= {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
17155 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
17158 'required': ['servers'],
17160 'Action': {'additionalProperties': False,
17161 'properties': {'name': {'type': 'string'},
17162 'parameters': {'patternProperties': {'.*': {'additionalProperties': True,
17163 'type': 'object'}},
17165 'receiver': {'type': 'string'},
17166 'tag': {'type': 'string'}},
17167 'required': ['tag', 'receiver', 'name'],
17169 'ActionExecutionResult': {'additionalProperties': False,
17170 'properties': {'action-tag': {'type': 'string'},
17171 'message': {'type': 'string'},
17172 'results': {'patternProperties': {'.*': {'additionalProperties': True,
17173 'type': 'object'}},
17175 'status': {'type': 'string'}},
17176 'required': ['action-tag', 'status'],
17178 'ActionExecutionResults': {'additionalProperties': False,
17179 'properties': {'results': {'items': {'$ref': '#/definitions/ActionExecutionResult'},
17182 'ActionResult': {'additionalProperties': False,
17183 'properties': {'action': {'$ref': '#/definitions/Action'},
17184 'completed': {'format': 'date-time',
17186 'enqueued': {'format': 'date-time',
17188 'error': {'$ref': '#/definitions/Error'},
17189 'message': {'type': 'string'},
17190 'output': {'patternProperties': {'.*': {'additionalProperties': True,
17191 'type': 'object'}},
17193 'started': {'format': 'date-time',
17195 'status': {'type': 'string'}},
17197 'ActionResults': {'additionalProperties': False,
17198 'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'},
17201 'Address': {'additionalProperties': False,
17202 'properties': {'scope': {'type': 'string'},
17203 'space-name': {'type': 'string'},
17204 'type': {'type': 'string'},
17205 'value': {'type': 'string'}},
17206 'required': ['value', 'type', 'scope'],
17208 'ApplicationStatusResult': {'additionalProperties': False,
17209 'properties': {'application': {'$ref': '#/definitions/StatusResult'},
17210 'error': {'$ref': '#/definitions/Error'},
17211 'units': {'patternProperties': {'.*': {'$ref': '#/definitions/StatusResult'}},
17212 'type': 'object'}},
17213 'required': ['application',
17216 'ApplicationStatusResults': {'additionalProperties': False,
17217 'properties': {'results': {'items': {'$ref': '#/definitions/ApplicationStatusResult'},
17219 'required': ['results'],
17221 'BoolResult': {'additionalProperties': False,
17222 'properties': {'error': {'$ref': '#/definitions/Error'},
17223 'result': {'type': 'boolean'}},
17224 'required': ['result'],
17226 'BoolResults': {'additionalProperties': False,
17227 'properties': {'results': {'items': {'$ref': '#/definitions/BoolResult'},
17229 'required': ['results'],
17231 'BytesResult': {'additionalProperties': False,
17232 'properties': {'result': {'items': {'type': 'integer'},
17234 'required': ['result'],
17236 'CharmRelation': {'additionalProperties': False,
17237 'properties': {'interface': {'type': 'string'},
17238 'limit': {'type': 'integer'},
17239 'name': {'type': 'string'},
17240 'optional': {'type': 'boolean'},
17241 'role': {'type': 'string'},
17242 'scope': {'type': 'string'}},
17243 'required': ['name',
17250 'CharmURL': {'additionalProperties': False,
17251 'properties': {'url': {'type': 'string'}},
17252 'required': ['url'],
17254 'CharmURLs': {'additionalProperties': False,
17255 'properties': {'urls': {'items': {'$ref': '#/definitions/CharmURL'},
17257 'required': ['urls'],
17259 'ConfigSettingsResult': {'additionalProperties': False,
17260 'properties': {'error': {'$ref': '#/definitions/Error'},
17261 'settings': {'patternProperties': {'.*': {'additionalProperties': True,
17262 'type': 'object'}},
17263 'type': 'object'}},
17264 'required': ['settings'],
17266 'ConfigSettingsResults': {'additionalProperties': False,
17267 'properties': {'results': {'items': {'$ref': '#/definitions/ConfigSettingsResult'},
17269 'required': ['results'],
17271 'Endpoint': {'additionalProperties': False,
17272 'properties': {'application-name': {'type': 'string'},
17273 'relation': {'$ref': '#/definitions/CharmRelation'}},
17274 'required': ['application-name', 'relation'],
17276 'Entities': {'additionalProperties': False,
17277 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
17279 'required': ['entities'],
17281 'EntitiesCharmURL': {'additionalProperties': False,
17282 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityCharmURL'},
17284 'required': ['entities'],
17286 'EntitiesPortRanges': {'additionalProperties': False,
17287 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityPortRange'},
17289 'required': ['entities'],
17291 'Entity': {'additionalProperties': False,
17292 'properties': {'tag': {'type': 'string'}},
17293 'required': ['tag'],
17295 'EntityCharmURL': {'additionalProperties': False,
17296 'properties': {'charm-url': {'type': 'string'},
17297 'tag': {'type': 'string'}},
17298 'required': ['tag', 'charm-url'],
17300 'EntityPortRange': {'additionalProperties': False,
17301 'properties': {'from-port': {'type': 'integer'},
17302 'protocol': {'type': 'string'},
17303 'tag': {'type': 'string'},
17304 'to-port': {'type': 'integer'}},
17305 'required': ['tag',
17310 'EntityStatusArgs': {'additionalProperties': False,
17311 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
17312 'type': 'object'}},
17314 'info': {'type': 'string'},
17315 'status': {'type': 'string'},
17316 'tag': {'type': 'string'}},
17317 'required': ['tag',
17322 'EntityWorkloadVersion': {'additionalProperties': False,
17323 'properties': {'tag': {'type': 'string'},
17324 'workload-version': {'type': 'string'}},
17325 'required': ['tag',
17326 'workload-version'],
17328 'EntityWorkloadVersions': {'additionalProperties': False,
17329 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityWorkloadVersion'},
17331 'required': ['entities'],
17333 'Error': {'additionalProperties': False,
17334 'properties': {'code': {'type': 'string'},
17335 'info': {'$ref': '#/definitions/ErrorInfo'},
17336 'message': {'type': 'string'}},
17337 'required': ['message', 'code'],
17339 'ErrorInfo': {'additionalProperties': False,
17340 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
17341 'macaroon-path': {'type': 'string'}},
17343 'ErrorResult': {'additionalProperties': False,
17344 'properties': {'error': {'$ref': '#/definitions/Error'}},
17346 'ErrorResults': {'additionalProperties': False,
17347 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
17349 'required': ['results'],
17351 'GetLeadershipSettingsBulkResults': {'additionalProperties': False,
17352 'properties': {'results': {'items': {'$ref': '#/definitions/GetLeadershipSettingsResult'},
17354 'required': ['results'],
17356 'GetLeadershipSettingsResult': {'additionalProperties': False,
17357 'properties': {'error': {'$ref': '#/definitions/Error'},
17358 'settings': {'patternProperties': {'.*': {'type': 'string'}},
17359 'type': 'object'}},
17360 'required': ['settings'],
17362 'HostPort': {'additionalProperties': False,
17363 'properties': {'Address': {'$ref': '#/definitions/Address'},
17364 'port': {'type': 'integer'}},
17365 'required': ['Address', 'port'],
17367 'IntResult': {'additionalProperties': False,
17368 'properties': {'error': {'$ref': '#/definitions/Error'},
17369 'result': {'type': 'integer'}},
17370 'required': ['result'],
17372 'IntResults': {'additionalProperties': False,
17373 'properties': {'results': {'items': {'$ref': '#/definitions/IntResult'},
17375 'required': ['results'],
17377 'LifeResult': {'additionalProperties': False,
17378 'properties': {'error': {'$ref': '#/definitions/Error'},
17379 'life': {'type': 'string'}},
17380 'required': ['life'],
17382 'LifeResults': {'additionalProperties': False,
17383 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
17385 'required': ['results'],
17387 'Macaroon': {'additionalProperties': False, 'type': 'object'},
17388 'MachinePortRange': {'additionalProperties': False,
17389 'properties': {'port-range': {'$ref': '#/definitions/PortRange'},
17390 'relation-tag': {'type': 'string'},
17391 'unit-tag': {'type': 'string'}},
17392 'required': ['unit-tag',
17396 'MachinePortsResult': {'additionalProperties': False,
17397 'properties': {'error': {'$ref': '#/definitions/Error'},
17398 'ports': {'items': {'$ref': '#/definitions/MachinePortRange'},
17400 'required': ['ports'],
17402 'MachinePortsResults': {'additionalProperties': False,
17403 'properties': {'results': {'items': {'$ref': '#/definitions/MachinePortsResult'},
17405 'required': ['results'],
17407 'MergeLeadershipSettingsBulkParams': {'additionalProperties': False,
17408 'properties': {'params': {'items': {'$ref': '#/definitions/MergeLeadershipSettingsParam'},
17410 'required': ['params'],
17412 'MergeLeadershipSettingsParam': {'additionalProperties': False,
17413 'properties': {'application-tag': {'type': 'string'},
17414 'settings': {'patternProperties': {'.*': {'type': 'string'}},
17415 'type': 'object'}},
17416 'required': ['application-tag',
17419 'MeterStatusResult': {'additionalProperties': False,
17420 'properties': {'code': {'type': 'string'},
17421 'error': {'$ref': '#/definitions/Error'},
17422 'info': {'type': 'string'}},
17423 'required': ['code', 'info'],
17425 'MeterStatusResults': {'additionalProperties': False,
17426 'properties': {'results': {'items': {'$ref': '#/definitions/MeterStatusResult'},
17428 'required': ['results'],
17430 'Metric': {'additionalProperties': False,
17431 'properties': {'key': {'type': 'string'},
17432 'time': {'format': 'date-time',
17434 'value': {'type': 'string'}},
17435 'required': ['key', 'value', 'time'],
17437 'MetricBatch': {'additionalProperties': False,
17438 'properties': {'charm-url': {'type': 'string'},
17439 'created': {'format': 'date-time',
17441 'metrics': {'items': {'$ref': '#/definitions/Metric'},
17443 'uuid': {'type': 'string'}},
17444 'required': ['uuid',
17449 'MetricBatchParam': {'additionalProperties': False,
17450 'properties': {'batch': {'$ref': '#/definitions/MetricBatch'},
17451 'tag': {'type': 'string'}},
17452 'required': ['tag', 'batch'],
17454 'MetricBatchParams': {'additionalProperties': False,
17455 'properties': {'batches': {'items': {'$ref': '#/definitions/MetricBatchParam'},
17457 'required': ['batches'],
17459 'ModelConfigResult': {'additionalProperties': False,
17460 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
17461 'type': 'object'}},
17462 'type': 'object'}},
17463 'required': ['config'],
17465 'ModelResult': {'additionalProperties': False,
17466 'properties': {'error': {'$ref': '#/definitions/Error'},
17467 'name': {'type': 'string'},
17468 'uuid': {'type': 'string'}},
17469 'required': ['name', 'uuid'],
17471 'NetworkConfig': {'additionalProperties': False,
17472 'properties': {'address': {'type': 'string'},
17473 'cidr': {'type': 'string'},
17474 'config-type': {'type': 'string'},
17475 'device-index': {'type': 'integer'},
17476 'disabled': {'type': 'boolean'},
17477 'dns-search-domains': {'items': {'type': 'string'},
17479 'dns-servers': {'items': {'type': 'string'},
17481 'gateway-address': {'type': 'string'},
17482 'interface-name': {'type': 'string'},
17483 'interface-type': {'type': 'string'},
17484 'mac-address': {'type': 'string'},
17485 'mtu': {'type': 'integer'},
17486 'no-auto-start': {'type': 'boolean'},
17487 'parent-interface-name': {'type': 'string'},
17488 'provider-address-id': {'type': 'string'},
17489 'provider-id': {'type': 'string'},
17490 'provider-space-id': {'type': 'string'},
17491 'provider-subnet-id': {'type': 'string'},
17492 'provider-vlan-id': {'type': 'string'},
17493 'vlan-tag': {'type': 'integer'}},
17494 'required': ['device-index',
17499 'provider-subnet-id',
17500 'provider-space-id',
17501 'provider-address-id',
17502 'provider-vlan-id',
17505 'parent-interface-name',
17509 'NotifyWatchResult': {'additionalProperties': False,
17510 'properties': {'NotifyWatcherId': {'type': 'string'},
17511 'error': {'$ref': '#/definitions/Error'}},
17512 'required': ['NotifyWatcherId'],
17514 'NotifyWatchResults': {'additionalProperties': False,
17515 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
17517 'required': ['results'],
17519 'PortRange': {'additionalProperties': False,
17520 'properties': {'from-port': {'type': 'integer'},
17521 'protocol': {'type': 'string'},
17522 'to-port': {'type': 'integer'}},
17523 'required': ['from-port', 'to-port', 'protocol'],
17525 'RelationIds': {'additionalProperties': False,
17526 'properties': {'relation-ids': {'items': {'type': 'integer'},
17528 'required': ['relation-ids'],
17530 'RelationResult': {'additionalProperties': False,
17531 'properties': {'endpoint': {'$ref': '#/definitions/Endpoint'},
17532 'error': {'$ref': '#/definitions/Error'},
17533 'id': {'type': 'integer'},
17534 'key': {'type': 'string'},
17535 'life': {'type': 'string'}},
17536 'required': ['life',
17541 'RelationResults': {'additionalProperties': False,
17542 'properties': {'results': {'items': {'$ref': '#/definitions/RelationResult'},
17544 'required': ['results'],
17546 'RelationUnit': {'additionalProperties': False,
17547 'properties': {'relation': {'type': 'string'},
17548 'unit': {'type': 'string'}},
17549 'required': ['relation', 'unit'],
17551 'RelationUnitPair': {'additionalProperties': False,
17552 'properties': {'local-unit': {'type': 'string'},
17553 'relation': {'type': 'string'},
17554 'remote-unit': {'type': 'string'}},
17555 'required': ['relation',
17559 'RelationUnitPairs': {'additionalProperties': False,
17560 'properties': {'relation-unit-pairs': {'items': {'$ref': '#/definitions/RelationUnitPair'},
17562 'required': ['relation-unit-pairs'],
17564 'RelationUnitSettings': {'additionalProperties': False,
17565 'properties': {'relation': {'type': 'string'},
17566 'settings': {'patternProperties': {'.*': {'type': 'string'}},
17568 'unit': {'type': 'string'}},
17569 'required': ['relation',
17573 'RelationUnits': {'additionalProperties': False,
17574 'properties': {'relation-units': {'items': {'$ref': '#/definitions/RelationUnit'},
17576 'required': ['relation-units'],
17578 'RelationUnitsChange': {'additionalProperties': False,
17579 'properties': {'changed': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitSettings'}},
17581 'departed': {'items': {'type': 'string'},
17583 'required': ['changed'],
17585 'RelationUnitsSettings': {'additionalProperties': False,
17586 'properties': {'relation-units': {'items': {'$ref': '#/definitions/RelationUnitSettings'},
17588 'required': ['relation-units'],
17590 'RelationUnitsWatchResult': {'additionalProperties': False,
17591 'properties': {'changes': {'$ref': '#/definitions/RelationUnitsChange'},
17592 'error': {'$ref': '#/definitions/Error'},
17593 'watcher-id': {'type': 'string'}},
17594 'required': ['watcher-id',
17597 'RelationUnitsWatchResults': {'additionalProperties': False,
17598 'properties': {'results': {'items': {'$ref': '#/definitions/RelationUnitsWatchResult'},
17600 'required': ['results'],
17602 'ResolvedModeResult': {'additionalProperties': False,
17603 'properties': {'error': {'$ref': '#/definitions/Error'},
17604 'mode': {'type': 'string'}},
17605 'required': ['mode'],
17607 'ResolvedModeResults': {'additionalProperties': False,
17608 'properties': {'results': {'items': {'$ref': '#/definitions/ResolvedModeResult'},
17610 'required': ['results'],
17612 'SetStatus': {'additionalProperties': False,
17613 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
17615 'required': ['entities'],
17617 'SettingsResult': {'additionalProperties': False,
17618 'properties': {'error': {'$ref': '#/definitions/Error'},
17619 'settings': {'patternProperties': {'.*': {'type': 'string'}},
17620 'type': 'object'}},
17621 'required': ['settings'],
17623 'SettingsResults': {'additionalProperties': False,
17624 'properties': {'results': {'items': {'$ref': '#/definitions/SettingsResult'},
17626 'required': ['results'],
17628 'StatusResult': {'additionalProperties': False,
17629 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
17630 'type': 'object'}},
17632 'error': {'$ref': '#/definitions/Error'},
17633 'id': {'type': 'string'},
17634 'info': {'type': 'string'},
17635 'life': {'type': 'string'},
17636 'since': {'format': 'date-time',
17638 'status': {'type': 'string'}},
17646 'StatusResults': {'additionalProperties': False,
17647 'properties': {'results': {'items': {'$ref': '#/definitions/StatusResult'},
17649 'required': ['results'],
17651 'StorageAddParams': {'additionalProperties': False,
17652 'properties': {'name': {'type': 'string'},
17653 'storage': {'$ref': '#/definitions/StorageConstraints'},
17654 'unit': {'type': 'string'}},
17655 'required': ['unit', 'name', 'storage'],
17657 'StorageAttachment': {'additionalProperties': False,
17658 'properties': {'kind': {'type': 'integer'},
17659 'life': {'type': 'string'},
17660 'location': {'type': 'string'},
17661 'owner-tag': {'type': 'string'},
17662 'storage-tag': {'type': 'string'},
17663 'unit-tag': {'type': 'string'}},
17664 'required': ['storage-tag',
17671 'StorageAttachmentId': {'additionalProperties': False,
17672 'properties': {'storage-tag': {'type': 'string'},
17673 'unit-tag': {'type': 'string'}},
17674 'required': ['storage-tag',
17677 'StorageAttachmentIds': {'additionalProperties': False,
17678 'properties': {'ids': {'items': {'$ref': '#/definitions/StorageAttachmentId'},
17680 'required': ['ids'],
17682 'StorageAttachmentIdsResult': {'additionalProperties': False,
17683 'properties': {'error': {'$ref': '#/definitions/Error'},
17684 'result': {'$ref': '#/definitions/StorageAttachmentIds'}},
17685 'required': ['result'],
17687 'StorageAttachmentIdsResults': {'additionalProperties': False,
17688 'properties': {'results': {'items': {'$ref': '#/definitions/StorageAttachmentIdsResult'},
17691 'StorageAttachmentResult': {'additionalProperties': False,
17692 'properties': {'error': {'$ref': '#/definitions/Error'},
17693 'result': {'$ref': '#/definitions/StorageAttachment'}},
17694 'required': ['result'],
17696 'StorageAttachmentResults': {'additionalProperties': False,
17697 'properties': {'results': {'items': {'$ref': '#/definitions/StorageAttachmentResult'},
17700 'StorageConstraints': {'additionalProperties': False,
17701 'properties': {'count': {'type': 'integer'},
17702 'pool': {'type': 'string'},
17703 'size': {'type': 'integer'}},
17705 'StoragesAddParams': {'additionalProperties': False,
17706 'properties': {'storages': {'items': {'$ref': '#/definitions/StorageAddParams'},
17708 'required': ['storages'],
17710 'StringBoolResult': {'additionalProperties': False,
17711 'properties': {'error': {'$ref': '#/definitions/Error'},
17712 'ok': {'type': 'boolean'},
17713 'result': {'type': 'string'}},
17714 'required': ['result', 'ok'],
17716 'StringBoolResults': {'additionalProperties': False,
17717 'properties': {'results': {'items': {'$ref': '#/definitions/StringBoolResult'},
17719 'required': ['results'],
17721 'StringResult': {'additionalProperties': False,
17722 'properties': {'error': {'$ref': '#/definitions/Error'},
17723 'result': {'type': 'string'}},
17724 'required': ['result'],
17726 'StringResults': {'additionalProperties': False,
17727 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
17729 'required': ['results'],
17731 'StringsResult': {'additionalProperties': False,
17732 'properties': {'error': {'$ref': '#/definitions/Error'},
17733 'result': {'items': {'type': 'string'},
17736 'StringsResults': {'additionalProperties': False,
17737 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
17739 'required': ['results'],
17741 'StringsWatchResult': {'additionalProperties': False,
17742 'properties': {'changes': {'items': {'type': 'string'},
17744 'error': {'$ref': '#/definitions/Error'},
17745 'watcher-id': {'type': 'string'}},
17746 'required': ['watcher-id'],
17748 'StringsWatchResults': {'additionalProperties': False,
17749 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
17751 'required': ['results'],
17753 'UnitNetworkConfig': {'additionalProperties': False,
17754 'properties': {'binding-name': {'type': 'string'},
17755 'unit-tag': {'type': 'string'}},
17756 'required': ['unit-tag', 'binding-name'],
17758 'UnitNetworkConfigResult': {'additionalProperties': False,
17759 'properties': {'error': {'$ref': '#/definitions/Error'},
17760 'info': {'items': {'$ref': '#/definitions/NetworkConfig'},
17762 'required': ['info'],
17764 'UnitNetworkConfigResults': {'additionalProperties': False,
17765 'properties': {'results': {'items': {'$ref': '#/definitions/UnitNetworkConfigResult'},
17767 'required': ['results'],
17769 'UnitSettings': {'additionalProperties': False,
17770 'properties': {'version': {'type': 'integer'}},
17771 'required': ['version'],
17773 'UnitsNetworkConfig': {'additionalProperties': False,
17774 'properties': {'args': {'items': {'$ref': '#/definitions/UnitNetworkConfig'},
17776 'required': ['args'],
17777 'type': 'object'}},
17778 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
17780 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
17782 'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17783 'Result': {'$ref': '#/definitions/ActionResults'}},
17785 'AddMetricBatches': {'properties': {'Params': {'$ref': '#/definitions/MetricBatchParams'},
17786 'Result': {'$ref': '#/definitions/ErrorResults'}},
17788 'AddUnitStorage': {'properties': {'Params': {'$ref': '#/definitions/StoragesAddParams'},
17789 'Result': {'$ref': '#/definitions/ErrorResults'}},
17791 'AllMachinePorts': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17792 'Result': {'$ref': '#/definitions/MachinePortsResults'}},
17794 'ApplicationStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17795 'Result': {'$ref': '#/definitions/ApplicationStatusResults'}},
17797 'AssignedMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17798 'Result': {'$ref': '#/definitions/StringResults'}},
17800 'AvailabilityZone': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17801 'Result': {'$ref': '#/definitions/StringResults'}},
17803 'BeginActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17804 'Result': {'$ref': '#/definitions/ErrorResults'}},
17806 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
17808 'CharmArchiveSha256': {'properties': {'Params': {'$ref': '#/definitions/CharmURLs'},
17809 'Result': {'$ref': '#/definitions/StringResults'}},
17811 'CharmModifiedVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17812 'Result': {'$ref': '#/definitions/IntResults'}},
17814 'CharmURL': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17815 'Result': {'$ref': '#/definitions/StringBoolResults'}},
17817 'ClearResolved': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17818 'Result': {'$ref': '#/definitions/ErrorResults'}},
17820 'ClosePorts': {'properties': {'Params': {'$ref': '#/definitions/EntitiesPortRanges'},
17821 'Result': {'$ref': '#/definitions/ErrorResults'}},
17823 'ConfigSettings': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17824 'Result': {'$ref': '#/definitions/ConfigSettingsResults'}},
17826 'CurrentModel': {'properties': {'Result': {'$ref': '#/definitions/ModelResult'}},
17828 'Destroy': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17829 'Result': {'$ref': '#/definitions/ErrorResults'}},
17831 'DestroyAllSubordinates': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17832 'Result': {'$ref': '#/definitions/ErrorResults'}},
17834 'DestroyUnitStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17835 'Result': {'$ref': '#/definitions/ErrorResults'}},
17837 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17838 'Result': {'$ref': '#/definitions/ErrorResults'}},
17840 'EnterScope': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
17841 'Result': {'$ref': '#/definitions/ErrorResults'}},
17843 'FinishActions': {'properties': {'Params': {'$ref': '#/definitions/ActionExecutionResults'},
17844 'Result': {'$ref': '#/definitions/ErrorResults'}},
17846 'GetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17847 'Result': {'$ref': '#/definitions/MeterStatusResults'}},
17849 'GetPrincipal': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17850 'Result': {'$ref': '#/definitions/StringBoolResults'}},
17852 'HasSubordinates': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17853 'Result': {'$ref': '#/definitions/BoolResults'}},
17855 'JoinedRelations': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17856 'Result': {'$ref': '#/definitions/StringsResults'}},
17858 'LeaveScope': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
17859 'Result': {'$ref': '#/definitions/ErrorResults'}},
17861 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17862 'Result': {'$ref': '#/definitions/LifeResults'}},
17864 'Merge': {'properties': {'Params': {'$ref': '#/definitions/MergeLeadershipSettingsBulkParams'},
17865 'Result': {'$ref': '#/definitions/ErrorResults'}},
17867 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
17869 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
17871 'NetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/UnitsNetworkConfig'},
17872 'Result': {'$ref': '#/definitions/UnitNetworkConfigResults'}},
17874 'OpenPorts': {'properties': {'Params': {'$ref': '#/definitions/EntitiesPortRanges'},
17875 'Result': {'$ref': '#/definitions/ErrorResults'}},
17877 'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17878 'Result': {'$ref': '#/definitions/StringResults'}},
17880 'ProviderType': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
17882 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17883 'Result': {'$ref': '#/definitions/StringResults'}},
17885 'Read': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17886 'Result': {'$ref': '#/definitions/GetLeadershipSettingsBulkResults'}},
17888 'ReadRemoteSettings': {'properties': {'Params': {'$ref': '#/definitions/RelationUnitPairs'},
17889 'Result': {'$ref': '#/definitions/SettingsResults'}},
17891 'ReadSettings': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
17892 'Result': {'$ref': '#/definitions/SettingsResults'}},
17894 'Relation': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
17895 'Result': {'$ref': '#/definitions/RelationResults'}},
17897 'RelationById': {'properties': {'Params': {'$ref': '#/definitions/RelationIds'},
17898 'Result': {'$ref': '#/definitions/RelationResults'}},
17900 'RemoveStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
17901 'Result': {'$ref': '#/definitions/ErrorResults'}},
17903 'RequestReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17904 'Result': {'$ref': '#/definitions/ErrorResults'}},
17906 'Resolved': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17907 'Result': {'$ref': '#/definitions/ResolvedModeResults'}},
17909 'SetAgentStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
17910 'Result': {'$ref': '#/definitions/ErrorResults'}},
17912 'SetApplicationStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
17913 'Result': {'$ref': '#/definitions/ErrorResults'}},
17915 'SetCharmURL': {'properties': {'Params': {'$ref': '#/definitions/EntitiesCharmURL'},
17916 'Result': {'$ref': '#/definitions/ErrorResults'}},
17918 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
17919 'Result': {'$ref': '#/definitions/ErrorResults'}},
17921 'SetUnitStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
17922 'Result': {'$ref': '#/definitions/ErrorResults'}},
17924 'SetWorkloadVersion': {'properties': {'Params': {'$ref': '#/definitions/EntityWorkloadVersions'},
17925 'Result': {'$ref': '#/definitions/ErrorResults'}},
17927 'StorageAttachmentLife': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
17928 'Result': {'$ref': '#/definitions/LifeResults'}},
17930 'StorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
17931 'Result': {'$ref': '#/definitions/StorageAttachmentResults'}},
17933 'UnitStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17934 'Result': {'$ref': '#/definitions/StatusResults'}},
17936 'UnitStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17937 'Result': {'$ref': '#/definitions/StorageAttachmentIdsResults'}},
17939 'UpdateSettings': {'properties': {'Params': {'$ref': '#/definitions/RelationUnitsSettings'},
17940 'Result': {'$ref': '#/definitions/ErrorResults'}},
17942 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17943 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
17945 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
17947 'WatchActionNotifications': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17948 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
17950 'WatchApplicationRelations': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17951 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
17953 'WatchConfigSettings': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17954 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
17956 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
17958 'WatchLeadershipSettings': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17959 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
17961 'WatchMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17962 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
17964 'WatchRelationUnits': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
17965 'Result': {'$ref': '#/definitions/RelationUnitsWatchResults'}},
17967 'WatchStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
17968 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
17970 'WatchUnitAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17971 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
17973 'WatchUnitStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17974 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
17976 'WorkloadVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17977 'Result': {'$ref': '#/definitions/StringResults'}},
17978 'type': 'object'}},
17982 @ReturnMapping(StringsResult
)
17983 async def APIAddresses(self
):
17986 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[str]]
17988 # map input types to rpc msg
17990 msg
= dict(Type
='Uniter', Request
='APIAddresses', Version
=4, Params
=params
)
17992 reply
= await self
.rpc(msg
)
17997 @ReturnMapping(APIHostPortsResult
)
17998 async def APIHostPorts(self
):
18001 Returns -> typing.Sequence[~HostPort]
18003 # map input types to rpc msg
18005 msg
= dict(Type
='Uniter', Request
='APIHostPorts', Version
=4, Params
=params
)
18007 reply
= await self
.rpc(msg
)
18012 @ReturnMapping(ActionResults
)
18013 async def Actions(self
, entities
):
18015 entities : typing.Sequence[~Entity]
18016 Returns -> typing.Sequence[~ActionResult]
18018 # map input types to rpc msg
18020 msg
= dict(Type
='Uniter', Request
='Actions', Version
=4, Params
=params
)
18021 params
['entities'] = entities
18022 reply
= await self
.rpc(msg
)
18027 @ReturnMapping(ErrorResults
)
18028 async def AddMetricBatches(self
, batches
):
18030 batches : typing.Sequence[~MetricBatchParam]
18031 Returns -> typing.Sequence[~ErrorResult]
18033 # map input types to rpc msg
18035 msg
= dict(Type
='Uniter', Request
='AddMetricBatches', Version
=4, Params
=params
)
18036 params
['batches'] = batches
18037 reply
= await self
.rpc(msg
)
18042 @ReturnMapping(ErrorResults
)
18043 async def AddUnitStorage(self
, storages
):
18045 storages : typing.Sequence[~StorageAddParams]
18046 Returns -> typing.Sequence[~ErrorResult]
18048 # map input types to rpc msg
18050 msg
= dict(Type
='Uniter', Request
='AddUnitStorage', Version
=4, Params
=params
)
18051 params
['storages'] = storages
18052 reply
= await self
.rpc(msg
)
18057 @ReturnMapping(MachinePortsResults
)
18058 async def AllMachinePorts(self
, entities
):
18060 entities : typing.Sequence[~Entity]
18061 Returns -> typing.Sequence[~MachinePortsResult]
18063 # map input types to rpc msg
18065 msg
= dict(Type
='Uniter', Request
='AllMachinePorts', Version
=4, Params
=params
)
18066 params
['entities'] = entities
18067 reply
= await self
.rpc(msg
)
18072 @ReturnMapping(ApplicationStatusResults
)
18073 async def ApplicationStatus(self
, entities
):
18075 entities : typing.Sequence[~Entity]
18076 Returns -> typing.Sequence[~ApplicationStatusResult]
18078 # map input types to rpc msg
18080 msg
= dict(Type
='Uniter', Request
='ApplicationStatus', Version
=4, Params
=params
)
18081 params
['entities'] = entities
18082 reply
= await self
.rpc(msg
)
18087 @ReturnMapping(StringResults
)
18088 async def AssignedMachine(self
, entities
):
18090 entities : typing.Sequence[~Entity]
18091 Returns -> typing.Sequence[~StringResult]
18093 # map input types to rpc msg
18095 msg
= dict(Type
='Uniter', Request
='AssignedMachine', Version
=4, Params
=params
)
18096 params
['entities'] = entities
18097 reply
= await self
.rpc(msg
)
18102 @ReturnMapping(StringResults
)
18103 async def AvailabilityZone(self
, entities
):
18105 entities : typing.Sequence[~Entity]
18106 Returns -> typing.Sequence[~StringResult]
18108 # map input types to rpc msg
18110 msg
= dict(Type
='Uniter', Request
='AvailabilityZone', Version
=4, Params
=params
)
18111 params
['entities'] = entities
18112 reply
= await self
.rpc(msg
)
18117 @ReturnMapping(ErrorResults
)
18118 async def BeginActions(self
, entities
):
18120 entities : typing.Sequence[~Entity]
18121 Returns -> typing.Sequence[~ErrorResult]
18123 # map input types to rpc msg
18125 msg
= dict(Type
='Uniter', Request
='BeginActions', Version
=4, Params
=params
)
18126 params
['entities'] = entities
18127 reply
= await self
.rpc(msg
)
18132 @ReturnMapping(BytesResult
)
18133 async def CACert(self
):
18136 Returns -> typing.Sequence[int]
18138 # map input types to rpc msg
18140 msg
= dict(Type
='Uniter', Request
='CACert', Version
=4, Params
=params
)
18142 reply
= await self
.rpc(msg
)
18147 @ReturnMapping(StringResults
)
18148 async def CharmArchiveSha256(self
, urls
):
18150 urls : typing.Sequence[~CharmURL]
18151 Returns -> typing.Sequence[~StringResult]
18153 # map input types to rpc msg
18155 msg
= dict(Type
='Uniter', Request
='CharmArchiveSha256', Version
=4, Params
=params
)
18156 params
['urls'] = urls
18157 reply
= await self
.rpc(msg
)
18162 @ReturnMapping(IntResults
)
18163 async def CharmModifiedVersion(self
, entities
):
18165 entities : typing.Sequence[~Entity]
18166 Returns -> typing.Sequence[~IntResult]
18168 # map input types to rpc msg
18170 msg
= dict(Type
='Uniter', Request
='CharmModifiedVersion', Version
=4, Params
=params
)
18171 params
['entities'] = entities
18172 reply
= await self
.rpc(msg
)
18177 @ReturnMapping(StringBoolResults
)
18178 async def CharmURL(self
, entities
):
18180 entities : typing.Sequence[~Entity]
18181 Returns -> typing.Sequence[~StringBoolResult]
18183 # map input types to rpc msg
18185 msg
= dict(Type
='Uniter', Request
='CharmURL', Version
=4, Params
=params
)
18186 params
['entities'] = entities
18187 reply
= await self
.rpc(msg
)
18192 @ReturnMapping(ErrorResults
)
18193 async def ClearResolved(self
, entities
):
18195 entities : typing.Sequence[~Entity]
18196 Returns -> typing.Sequence[~ErrorResult]
18198 # map input types to rpc msg
18200 msg
= dict(Type
='Uniter', Request
='ClearResolved', Version
=4, Params
=params
)
18201 params
['entities'] = entities
18202 reply
= await self
.rpc(msg
)
18207 @ReturnMapping(ErrorResults
)
18208 async def ClosePorts(self
, entities
):
18210 entities : typing.Sequence[~EntityPortRange]
18211 Returns -> typing.Sequence[~ErrorResult]
18213 # map input types to rpc msg
18215 msg
= dict(Type
='Uniter', Request
='ClosePorts', Version
=4, Params
=params
)
18216 params
['entities'] = entities
18217 reply
= await self
.rpc(msg
)
18222 @ReturnMapping(ConfigSettingsResults
)
18223 async def ConfigSettings(self
, entities
):
18225 entities : typing.Sequence[~Entity]
18226 Returns -> typing.Sequence[~ConfigSettingsResult]
18228 # map input types to rpc msg
18230 msg
= dict(Type
='Uniter', Request
='ConfigSettings', Version
=4, Params
=params
)
18231 params
['entities'] = entities
18232 reply
= await self
.rpc(msg
)
18237 @ReturnMapping(ModelResult
)
18238 async def CurrentModel(self
):
18241 Returns -> typing.Union[_ForwardRef('Error'), str]
18243 # map input types to rpc msg
18245 msg
= dict(Type
='Uniter', Request
='CurrentModel', Version
=4, Params
=params
)
18247 reply
= await self
.rpc(msg
)
18252 @ReturnMapping(ErrorResults
)
18253 async def Destroy(self
, entities
):
18255 entities : typing.Sequence[~Entity]
18256 Returns -> typing.Sequence[~ErrorResult]
18258 # map input types to rpc msg
18260 msg
= dict(Type
='Uniter', Request
='Destroy', Version
=4, Params
=params
)
18261 params
['entities'] = entities
18262 reply
= await self
.rpc(msg
)
18267 @ReturnMapping(ErrorResults
)
18268 async def DestroyAllSubordinates(self
, entities
):
18270 entities : typing.Sequence[~Entity]
18271 Returns -> typing.Sequence[~ErrorResult]
18273 # map input types to rpc msg
18275 msg
= dict(Type
='Uniter', Request
='DestroyAllSubordinates', Version
=4, Params
=params
)
18276 params
['entities'] = entities
18277 reply
= await self
.rpc(msg
)
18282 @ReturnMapping(ErrorResults
)
18283 async def DestroyUnitStorageAttachments(self
, entities
):
18285 entities : typing.Sequence[~Entity]
18286 Returns -> typing.Sequence[~ErrorResult]
18288 # map input types to rpc msg
18290 msg
= dict(Type
='Uniter', Request
='DestroyUnitStorageAttachments', Version
=4, Params
=params
)
18291 params
['entities'] = entities
18292 reply
= await self
.rpc(msg
)
18297 @ReturnMapping(ErrorResults
)
18298 async def EnsureDead(self
, entities
):
18300 entities : typing.Sequence[~Entity]
18301 Returns -> typing.Sequence[~ErrorResult]
18303 # map input types to rpc msg
18305 msg
= dict(Type
='Uniter', Request
='EnsureDead', Version
=4, Params
=params
)
18306 params
['entities'] = entities
18307 reply
= await self
.rpc(msg
)
18312 @ReturnMapping(ErrorResults
)
18313 async def EnterScope(self
, relation_units
):
18315 relation_units : typing.Sequence[~RelationUnit]
18316 Returns -> typing.Sequence[~ErrorResult]
18318 # map input types to rpc msg
18320 msg
= dict(Type
='Uniter', Request
='EnterScope', Version
=4, Params
=params
)
18321 params
['relation-units'] = relation_units
18322 reply
= await self
.rpc(msg
)
18327 @ReturnMapping(ErrorResults
)
18328 async def FinishActions(self
, results
):
18330 results : typing.Sequence[~ActionExecutionResult]
18331 Returns -> typing.Sequence[~ErrorResult]
18333 # map input types to rpc msg
18335 msg
= dict(Type
='Uniter', Request
='FinishActions', Version
=4, Params
=params
)
18336 params
['results'] = results
18337 reply
= await self
.rpc(msg
)
18342 @ReturnMapping(MeterStatusResults
)
18343 async def GetMeterStatus(self
, entities
):
18345 entities : typing.Sequence[~Entity]
18346 Returns -> typing.Sequence[~MeterStatusResult]
18348 # map input types to rpc msg
18350 msg
= dict(Type
='Uniter', Request
='GetMeterStatus', Version
=4, Params
=params
)
18351 params
['entities'] = entities
18352 reply
= await self
.rpc(msg
)
18357 @ReturnMapping(StringBoolResults
)
18358 async def GetPrincipal(self
, entities
):
18360 entities : typing.Sequence[~Entity]
18361 Returns -> typing.Sequence[~StringBoolResult]
18363 # map input types to rpc msg
18365 msg
= dict(Type
='Uniter', Request
='GetPrincipal', Version
=4, Params
=params
)
18366 params
['entities'] = entities
18367 reply
= await self
.rpc(msg
)
18372 @ReturnMapping(BoolResults
)
18373 async def HasSubordinates(self
, entities
):
18375 entities : typing.Sequence[~Entity]
18376 Returns -> typing.Sequence[~BoolResult]
18378 # map input types to rpc msg
18380 msg
= dict(Type
='Uniter', Request
='HasSubordinates', Version
=4, Params
=params
)
18381 params
['entities'] = entities
18382 reply
= await self
.rpc(msg
)
18387 @ReturnMapping(StringsResults
)
18388 async def JoinedRelations(self
, entities
):
18390 entities : typing.Sequence[~Entity]
18391 Returns -> typing.Sequence[~StringsResult]
18393 # map input types to rpc msg
18395 msg
= dict(Type
='Uniter', Request
='JoinedRelations', Version
=4, Params
=params
)
18396 params
['entities'] = entities
18397 reply
= await self
.rpc(msg
)
18402 @ReturnMapping(ErrorResults
)
18403 async def LeaveScope(self
, relation_units
):
18405 relation_units : typing.Sequence[~RelationUnit]
18406 Returns -> typing.Sequence[~ErrorResult]
18408 # map input types to rpc msg
18410 msg
= dict(Type
='Uniter', Request
='LeaveScope', Version
=4, Params
=params
)
18411 params
['relation-units'] = relation_units
18412 reply
= await self
.rpc(msg
)
18417 @ReturnMapping(LifeResults
)
18418 async def Life(self
, entities
):
18420 entities : typing.Sequence[~Entity]
18421 Returns -> typing.Sequence[~LifeResult]
18423 # map input types to rpc msg
18425 msg
= dict(Type
='Uniter', Request
='Life', Version
=4, Params
=params
)
18426 params
['entities'] = entities
18427 reply
= await self
.rpc(msg
)
18432 @ReturnMapping(ErrorResults
)
18433 async def Merge(self
, params
):
18435 params : typing.Sequence[~MergeLeadershipSettingsParam]
18436 Returns -> typing.Sequence[~ErrorResult]
18438 # map input types to rpc msg
18440 msg
= dict(Type
='Uniter', Request
='Merge', Version
=4, Params
=params
)
18441 params
['params'] = params
18442 reply
= await self
.rpc(msg
)
18447 @ReturnMapping(ModelConfigResult
)
18448 async def ModelConfig(self
):
18451 Returns -> typing.Mapping[str, typing.Any]
18453 # map input types to rpc msg
18455 msg
= dict(Type
='Uniter', Request
='ModelConfig', Version
=4, Params
=params
)
18457 reply
= await self
.rpc(msg
)
18462 @ReturnMapping(StringResult
)
18463 async def ModelUUID(self
):
18466 Returns -> typing.Union[_ForwardRef('Error'), str]
18468 # map input types to rpc msg
18470 msg
= dict(Type
='Uniter', Request
='ModelUUID', Version
=4, Params
=params
)
18472 reply
= await self
.rpc(msg
)
18477 @ReturnMapping(UnitNetworkConfigResults
)
18478 async def NetworkConfig(self
, args
):
18480 args : typing.Sequence[~UnitNetworkConfig]
18481 Returns -> typing.Sequence[~UnitNetworkConfigResult]
18483 # map input types to rpc msg
18485 msg
= dict(Type
='Uniter', Request
='NetworkConfig', Version
=4, Params
=params
)
18486 params
['args'] = args
18487 reply
= await self
.rpc(msg
)
18492 @ReturnMapping(ErrorResults
)
18493 async def OpenPorts(self
, entities
):
18495 entities : typing.Sequence[~EntityPortRange]
18496 Returns -> typing.Sequence[~ErrorResult]
18498 # map input types to rpc msg
18500 msg
= dict(Type
='Uniter', Request
='OpenPorts', Version
=4, Params
=params
)
18501 params
['entities'] = entities
18502 reply
= await self
.rpc(msg
)
18507 @ReturnMapping(StringResults
)
18508 async def PrivateAddress(self
, entities
):
18510 entities : typing.Sequence[~Entity]
18511 Returns -> typing.Sequence[~StringResult]
18513 # map input types to rpc msg
18515 msg
= dict(Type
='Uniter', Request
='PrivateAddress', Version
=4, Params
=params
)
18516 params
['entities'] = entities
18517 reply
= await self
.rpc(msg
)
18522 @ReturnMapping(StringResult
)
18523 async def ProviderType(self
):
18526 Returns -> typing.Union[_ForwardRef('Error'), str]
18528 # map input types to rpc msg
18530 msg
= dict(Type
='Uniter', Request
='ProviderType', Version
=4, Params
=params
)
18532 reply
= await self
.rpc(msg
)
18537 @ReturnMapping(StringResults
)
18538 async def PublicAddress(self
, entities
):
18540 entities : typing.Sequence[~Entity]
18541 Returns -> typing.Sequence[~StringResult]
18543 # map input types to rpc msg
18545 msg
= dict(Type
='Uniter', Request
='PublicAddress', Version
=4, Params
=params
)
18546 params
['entities'] = entities
18547 reply
= await self
.rpc(msg
)
18552 @ReturnMapping(GetLeadershipSettingsBulkResults
)
18553 async def Read(self
, entities
):
18555 entities : typing.Sequence[~Entity]
18556 Returns -> typing.Sequence[~GetLeadershipSettingsResult]
18558 # map input types to rpc msg
18560 msg
= dict(Type
='Uniter', Request
='Read', Version
=4, Params
=params
)
18561 params
['entities'] = entities
18562 reply
= await self
.rpc(msg
)
18567 @ReturnMapping(SettingsResults
)
18568 async def ReadRemoteSettings(self
, relation_unit_pairs
):
18570 relation_unit_pairs : typing.Sequence[~RelationUnitPair]
18571 Returns -> typing.Sequence[~SettingsResult]
18573 # map input types to rpc msg
18575 msg
= dict(Type
='Uniter', Request
='ReadRemoteSettings', Version
=4, Params
=params
)
18576 params
['relation-unit-pairs'] = relation_unit_pairs
18577 reply
= await self
.rpc(msg
)
18582 @ReturnMapping(SettingsResults
)
18583 async def ReadSettings(self
, relation_units
):
18585 relation_units : typing.Sequence[~RelationUnit]
18586 Returns -> typing.Sequence[~SettingsResult]
18588 # map input types to rpc msg
18590 msg
= dict(Type
='Uniter', Request
='ReadSettings', Version
=4, Params
=params
)
18591 params
['relation-units'] = relation_units
18592 reply
= await self
.rpc(msg
)
18597 @ReturnMapping(RelationResults
)
18598 async def Relation(self
, relation_units
):
18600 relation_units : typing.Sequence[~RelationUnit]
18601 Returns -> typing.Sequence[~RelationResult]
18603 # map input types to rpc msg
18605 msg
= dict(Type
='Uniter', Request
='Relation', Version
=4, Params
=params
)
18606 params
['relation-units'] = relation_units
18607 reply
= await self
.rpc(msg
)
18612 @ReturnMapping(RelationResults
)
18613 async def RelationById(self
, relation_ids
):
18615 relation_ids : typing.Sequence[int]
18616 Returns -> typing.Sequence[~RelationResult]
18618 # map input types to rpc msg
18620 msg
= dict(Type
='Uniter', Request
='RelationById', Version
=4, Params
=params
)
18621 params
['relation-ids'] = relation_ids
18622 reply
= await self
.rpc(msg
)
18627 @ReturnMapping(ErrorResults
)
18628 async def RemoveStorageAttachments(self
, ids
):
18630 ids : typing.Sequence[~StorageAttachmentId]
18631 Returns -> typing.Sequence[~ErrorResult]
18633 # map input types to rpc msg
18635 msg
= dict(Type
='Uniter', Request
='RemoveStorageAttachments', Version
=4, Params
=params
)
18636 params
['ids'] = ids
18637 reply
= await self
.rpc(msg
)
18642 @ReturnMapping(ErrorResults
)
18643 async def RequestReboot(self
, entities
):
18645 entities : typing.Sequence[~Entity]
18646 Returns -> typing.Sequence[~ErrorResult]
18648 # map input types to rpc msg
18650 msg
= dict(Type
='Uniter', Request
='RequestReboot', Version
=4, Params
=params
)
18651 params
['entities'] = entities
18652 reply
= await self
.rpc(msg
)
18657 @ReturnMapping(ResolvedModeResults
)
18658 async def Resolved(self
, entities
):
18660 entities : typing.Sequence[~Entity]
18661 Returns -> typing.Sequence[~ResolvedModeResult]
18663 # map input types to rpc msg
18665 msg
= dict(Type
='Uniter', Request
='Resolved', Version
=4, Params
=params
)
18666 params
['entities'] = entities
18667 reply
= await self
.rpc(msg
)
18672 @ReturnMapping(ErrorResults
)
18673 async def SetAgentStatus(self
, entities
):
18675 entities : typing.Sequence[~EntityStatusArgs]
18676 Returns -> typing.Sequence[~ErrorResult]
18678 # map input types to rpc msg
18680 msg
= dict(Type
='Uniter', Request
='SetAgentStatus', Version
=4, Params
=params
)
18681 params
['entities'] = entities
18682 reply
= await self
.rpc(msg
)
18687 @ReturnMapping(ErrorResults
)
18688 async def SetApplicationStatus(self
, entities
):
18690 entities : typing.Sequence[~EntityStatusArgs]
18691 Returns -> typing.Sequence[~ErrorResult]
18693 # map input types to rpc msg
18695 msg
= dict(Type
='Uniter', Request
='SetApplicationStatus', Version
=4, Params
=params
)
18696 params
['entities'] = entities
18697 reply
= await self
.rpc(msg
)
18702 @ReturnMapping(ErrorResults
)
18703 async def SetCharmURL(self
, entities
):
18705 entities : typing.Sequence[~EntityCharmURL]
18706 Returns -> typing.Sequence[~ErrorResult]
18708 # map input types to rpc msg
18710 msg
= dict(Type
='Uniter', Request
='SetCharmURL', Version
=4, Params
=params
)
18711 params
['entities'] = entities
18712 reply
= await self
.rpc(msg
)
18717 @ReturnMapping(ErrorResults
)
18718 async def SetStatus(self
, entities
):
18720 entities : typing.Sequence[~EntityStatusArgs]
18721 Returns -> typing.Sequence[~ErrorResult]
18723 # map input types to rpc msg
18725 msg
= dict(Type
='Uniter', Request
='SetStatus', Version
=4, Params
=params
)
18726 params
['entities'] = entities
18727 reply
= await self
.rpc(msg
)
18732 @ReturnMapping(ErrorResults
)
18733 async def SetUnitStatus(self
, entities
):
18735 entities : typing.Sequence[~EntityStatusArgs]
18736 Returns -> typing.Sequence[~ErrorResult]
18738 # map input types to rpc msg
18740 msg
= dict(Type
='Uniter', Request
='SetUnitStatus', Version
=4, Params
=params
)
18741 params
['entities'] = entities
18742 reply
= await self
.rpc(msg
)
18747 @ReturnMapping(ErrorResults
)
18748 async def SetWorkloadVersion(self
, entities
):
18750 entities : typing.Sequence[~EntityWorkloadVersion]
18751 Returns -> typing.Sequence[~ErrorResult]
18753 # map input types to rpc msg
18755 msg
= dict(Type
='Uniter', Request
='SetWorkloadVersion', Version
=4, Params
=params
)
18756 params
['entities'] = entities
18757 reply
= await self
.rpc(msg
)
18762 @ReturnMapping(LifeResults
)
18763 async def StorageAttachmentLife(self
, ids
):
18765 ids : typing.Sequence[~StorageAttachmentId]
18766 Returns -> typing.Sequence[~LifeResult]
18768 # map input types to rpc msg
18770 msg
= dict(Type
='Uniter', Request
='StorageAttachmentLife', Version
=4, Params
=params
)
18771 params
['ids'] = ids
18772 reply
= await self
.rpc(msg
)
18777 @ReturnMapping(StorageAttachmentResults
)
18778 async def StorageAttachments(self
, ids
):
18780 ids : typing.Sequence[~StorageAttachmentId]
18781 Returns -> typing.Sequence[~StorageAttachmentResult]
18783 # map input types to rpc msg
18785 msg
= dict(Type
='Uniter', Request
='StorageAttachments', Version
=4, Params
=params
)
18786 params
['ids'] = ids
18787 reply
= await self
.rpc(msg
)
18792 @ReturnMapping(StatusResults
)
18793 async def UnitStatus(self
, entities
):
18795 entities : typing.Sequence[~Entity]
18796 Returns -> typing.Sequence[~StatusResult]
18798 # map input types to rpc msg
18800 msg
= dict(Type
='Uniter', Request
='UnitStatus', Version
=4, Params
=params
)
18801 params
['entities'] = entities
18802 reply
= await self
.rpc(msg
)
18807 @ReturnMapping(StorageAttachmentIdsResults
)
18808 async def UnitStorageAttachments(self
, entities
):
18810 entities : typing.Sequence[~Entity]
18811 Returns -> typing.Sequence[~StorageAttachmentIdsResult]
18813 # map input types to rpc msg
18815 msg
= dict(Type
='Uniter', Request
='UnitStorageAttachments', Version
=4, Params
=params
)
18816 params
['entities'] = entities
18817 reply
= await self
.rpc(msg
)
18822 @ReturnMapping(ErrorResults
)
18823 async def UpdateSettings(self
, relation_units
):
18825 relation_units : typing.Sequence[~RelationUnitSettings]
18826 Returns -> typing.Sequence[~ErrorResult]
18828 # map input types to rpc msg
18830 msg
= dict(Type
='Uniter', Request
='UpdateSettings', Version
=4, Params
=params
)
18831 params
['relation-units'] = relation_units
18832 reply
= await self
.rpc(msg
)
18837 @ReturnMapping(NotifyWatchResults
)
18838 async def Watch(self
, entities
):
18840 entities : typing.Sequence[~Entity]
18841 Returns -> typing.Sequence[~NotifyWatchResult]
18843 # map input types to rpc msg
18845 msg
= dict(Type
='Uniter', Request
='Watch', Version
=4, Params
=params
)
18846 params
['entities'] = entities
18847 reply
= await self
.rpc(msg
)
18852 @ReturnMapping(NotifyWatchResult
)
18853 async def WatchAPIHostPorts(self
):
18856 Returns -> typing.Union[str, _ForwardRef('Error')]
18858 # map input types to rpc msg
18860 msg
= dict(Type
='Uniter', Request
='WatchAPIHostPorts', Version
=4, Params
=params
)
18862 reply
= await self
.rpc(msg
)
18867 @ReturnMapping(StringsWatchResults
)
18868 async def WatchActionNotifications(self
, entities
):
18870 entities : typing.Sequence[~Entity]
18871 Returns -> typing.Sequence[~StringsWatchResult]
18873 # map input types to rpc msg
18875 msg
= dict(Type
='Uniter', Request
='WatchActionNotifications', Version
=4, Params
=params
)
18876 params
['entities'] = entities
18877 reply
= await self
.rpc(msg
)
18882 @ReturnMapping(StringsWatchResults
)
18883 async def WatchApplicationRelations(self
, entities
):
18885 entities : typing.Sequence[~Entity]
18886 Returns -> typing.Sequence[~StringsWatchResult]
18888 # map input types to rpc msg
18890 msg
= dict(Type
='Uniter', Request
='WatchApplicationRelations', Version
=4, Params
=params
)
18891 params
['entities'] = entities
18892 reply
= await self
.rpc(msg
)
18897 @ReturnMapping(NotifyWatchResults
)
18898 async def WatchConfigSettings(self
, entities
):
18900 entities : typing.Sequence[~Entity]
18901 Returns -> typing.Sequence[~NotifyWatchResult]
18903 # map input types to rpc msg
18905 msg
= dict(Type
='Uniter', Request
='WatchConfigSettings', Version
=4, Params
=params
)
18906 params
['entities'] = entities
18907 reply
= await self
.rpc(msg
)
18912 @ReturnMapping(NotifyWatchResult
)
18913 async def WatchForModelConfigChanges(self
):
18916 Returns -> typing.Union[str, _ForwardRef('Error')]
18918 # map input types to rpc msg
18920 msg
= dict(Type
='Uniter', Request
='WatchForModelConfigChanges', Version
=4, Params
=params
)
18922 reply
= await self
.rpc(msg
)
18927 @ReturnMapping(NotifyWatchResults
)
18928 async def WatchLeadershipSettings(self
, entities
):
18930 entities : typing.Sequence[~Entity]
18931 Returns -> typing.Sequence[~NotifyWatchResult]
18933 # map input types to rpc msg
18935 msg
= dict(Type
='Uniter', Request
='WatchLeadershipSettings', Version
=4, Params
=params
)
18936 params
['entities'] = entities
18937 reply
= await self
.rpc(msg
)
18942 @ReturnMapping(NotifyWatchResults
)
18943 async def WatchMeterStatus(self
, entities
):
18945 entities : typing.Sequence[~Entity]
18946 Returns -> typing.Sequence[~NotifyWatchResult]
18948 # map input types to rpc msg
18950 msg
= dict(Type
='Uniter', Request
='WatchMeterStatus', Version
=4, Params
=params
)
18951 params
['entities'] = entities
18952 reply
= await self
.rpc(msg
)
18957 @ReturnMapping(RelationUnitsWatchResults
)
18958 async def WatchRelationUnits(self
, relation_units
):
18960 relation_units : typing.Sequence[~RelationUnit]
18961 Returns -> typing.Sequence[~RelationUnitsWatchResult]
18963 # map input types to rpc msg
18965 msg
= dict(Type
='Uniter', Request
='WatchRelationUnits', Version
=4, Params
=params
)
18966 params
['relation-units'] = relation_units
18967 reply
= await self
.rpc(msg
)
18972 @ReturnMapping(NotifyWatchResults
)
18973 async def WatchStorageAttachments(self
, ids
):
18975 ids : typing.Sequence[~StorageAttachmentId]
18976 Returns -> typing.Sequence[~NotifyWatchResult]
18978 # map input types to rpc msg
18980 msg
= dict(Type
='Uniter', Request
='WatchStorageAttachments', Version
=4, Params
=params
)
18981 params
['ids'] = ids
18982 reply
= await self
.rpc(msg
)
18987 @ReturnMapping(NotifyWatchResults
)
18988 async def WatchUnitAddresses(self
, entities
):
18990 entities : typing.Sequence[~Entity]
18991 Returns -> typing.Sequence[~NotifyWatchResult]
18993 # map input types to rpc msg
18995 msg
= dict(Type
='Uniter', Request
='WatchUnitAddresses', Version
=4, Params
=params
)
18996 params
['entities'] = entities
18997 reply
= await self
.rpc(msg
)
19002 @ReturnMapping(StringsWatchResults
)
19003 async def WatchUnitStorageAttachments(self
, entities
):
19005 entities : typing.Sequence[~Entity]
19006 Returns -> typing.Sequence[~StringsWatchResult]
19008 # map input types to rpc msg
19010 msg
= dict(Type
='Uniter', Request
='WatchUnitStorageAttachments', Version
=4, Params
=params
)
19011 params
['entities'] = entities
19012 reply
= await self
.rpc(msg
)
19017 @ReturnMapping(StringResults
)
19018 async def WorkloadVersion(self
, entities
):
19020 entities : typing.Sequence[~Entity]
19021 Returns -> typing.Sequence[~StringResult]
19023 # map input types to rpc msg
19025 msg
= dict(Type
='Uniter', Request
='WorkloadVersion', Version
=4, Params
=params
)
19026 params
['entities'] = entities
19027 reply
= await self
.rpc(msg
)
19031 class UpgraderFacade(Type
):
19034 schema
= {'definitions': {'Binary': {'additionalProperties': False,
19035 'properties': {'Arch': {'type': 'string'},
19036 'Number': {'$ref': '#/definitions/Number'},
19037 'Series': {'type': 'string'}},
19038 'required': ['Number', 'Series', 'Arch'],
19040 'Entities': {'additionalProperties': False,
19041 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
19043 'required': ['entities'],
19045 'EntitiesVersion': {'additionalProperties': False,
19046 'properties': {'agent-tools': {'items': {'$ref': '#/definitions/EntityVersion'},
19048 'required': ['agent-tools'],
19050 'Entity': {'additionalProperties': False,
19051 'properties': {'tag': {'type': 'string'}},
19052 'required': ['tag'],
19054 'EntityVersion': {'additionalProperties': False,
19055 'properties': {'tag': {'type': 'string'},
19056 'tools': {'$ref': '#/definitions/Version'}},
19057 'required': ['tag', 'tools'],
19059 'Error': {'additionalProperties': False,
19060 'properties': {'code': {'type': 'string'},
19061 'info': {'$ref': '#/definitions/ErrorInfo'},
19062 'message': {'type': 'string'}},
19063 'required': ['message', 'code'],
19065 'ErrorInfo': {'additionalProperties': False,
19066 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
19067 'macaroon-path': {'type': 'string'}},
19069 'ErrorResult': {'additionalProperties': False,
19070 'properties': {'error': {'$ref': '#/definitions/Error'}},
19072 'ErrorResults': {'additionalProperties': False,
19073 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
19075 'required': ['results'],
19077 'Macaroon': {'additionalProperties': False, 'type': 'object'},
19078 'NotifyWatchResult': {'additionalProperties': False,
19079 'properties': {'NotifyWatcherId': {'type': 'string'},
19080 'error': {'$ref': '#/definitions/Error'}},
19081 'required': ['NotifyWatcherId'],
19083 'NotifyWatchResults': {'additionalProperties': False,
19084 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
19086 'required': ['results'],
19088 'Number': {'additionalProperties': False,
19089 'properties': {'Build': {'type': 'integer'},
19090 'Major': {'type': 'integer'},
19091 'Minor': {'type': 'integer'},
19092 'Patch': {'type': 'integer'},
19093 'Tag': {'type': 'string'}},
19094 'required': ['Major',
19100 'Tools': {'additionalProperties': False,
19101 'properties': {'sha256': {'type': 'string'},
19102 'size': {'type': 'integer'},
19103 'url': {'type': 'string'},
19104 'version': {'$ref': '#/definitions/Binary'}},
19105 'required': ['version', 'url', 'size'],
19107 'ToolsResult': {'additionalProperties': False,
19108 'properties': {'disable-ssl-hostname-verification': {'type': 'boolean'},
19109 'error': {'$ref': '#/definitions/Error'},
19110 'tools': {'items': {'$ref': '#/definitions/Tools'},
19112 'required': ['tools',
19113 'disable-ssl-hostname-verification'],
19115 'ToolsResults': {'additionalProperties': False,
19116 'properties': {'results': {'items': {'$ref': '#/definitions/ToolsResult'},
19118 'required': ['results'],
19120 'Version': {'additionalProperties': False,
19121 'properties': {'version': {'$ref': '#/definitions/Binary'}},
19122 'required': ['version'],
19124 'VersionResult': {'additionalProperties': False,
19125 'properties': {'error': {'$ref': '#/definitions/Error'},
19126 'version': {'$ref': '#/definitions/Number'}},
19128 'VersionResults': {'additionalProperties': False,
19129 'properties': {'results': {'items': {'$ref': '#/definitions/VersionResult'},
19131 'required': ['results'],
19132 'type': 'object'}},
19133 'properties': {'DesiredVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19134 'Result': {'$ref': '#/definitions/VersionResults'}},
19136 'SetTools': {'properties': {'Params': {'$ref': '#/definitions/EntitiesVersion'},
19137 'Result': {'$ref': '#/definitions/ErrorResults'}},
19139 'Tools': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19140 'Result': {'$ref': '#/definitions/ToolsResults'}},
19142 'WatchAPIVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19143 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
19144 'type': 'object'}},
19148 @ReturnMapping(VersionResults
)
19149 async def DesiredVersion(self
, entities
):
19151 entities : typing.Sequence[~Entity]
19152 Returns -> typing.Sequence[~VersionResult]
19154 # map input types to rpc msg
19156 msg
= dict(Type
='Upgrader', Request
='DesiredVersion', Version
=1, Params
=params
)
19157 params
['entities'] = entities
19158 reply
= await self
.rpc(msg
)
19163 @ReturnMapping(ErrorResults
)
19164 async def SetTools(self
, agent_tools
):
19166 agent_tools : typing.Sequence[~EntityVersion]
19167 Returns -> typing.Sequence[~ErrorResult]
19169 # map input types to rpc msg
19171 msg
= dict(Type
='Upgrader', Request
='SetTools', Version
=1, Params
=params
)
19172 params
['agent-tools'] = agent_tools
19173 reply
= await self
.rpc(msg
)
19178 @ReturnMapping(ToolsResults
)
19179 async def Tools(self
, entities
):
19181 entities : typing.Sequence[~Entity]
19182 Returns -> typing.Sequence[~ToolsResult]
19184 # map input types to rpc msg
19186 msg
= dict(Type
='Upgrader', Request
='Tools', Version
=1, Params
=params
)
19187 params
['entities'] = entities
19188 reply
= await self
.rpc(msg
)
19193 @ReturnMapping(NotifyWatchResults
)
19194 async def WatchAPIVersion(self
, entities
):
19196 entities : typing.Sequence[~Entity]
19197 Returns -> typing.Sequence[~NotifyWatchResult]
19199 # map input types to rpc msg
19201 msg
= dict(Type
='Upgrader', Request
='WatchAPIVersion', Version
=1, Params
=params
)
19202 params
['entities'] = entities
19203 reply
= await self
.rpc(msg
)
19207 class UserManagerFacade(Type
):
19208 name
= 'UserManager'
19210 schema
= {'definitions': {'AddUser': {'additionalProperties': False,
19211 'properties': {'display-name': {'type': 'string'},
19212 'model-access-permission': {'type': 'string'},
19213 'password': {'type': 'string'},
19214 'shared-model-tags': {'items': {'type': 'string'},
19216 'username': {'type': 'string'}},
19217 'required': ['username',
19219 'shared-model-tags'],
19221 'AddUserResult': {'additionalProperties': False,
19222 'properties': {'error': {'$ref': '#/definitions/Error'},
19223 'secret-key': {'items': {'type': 'integer'},
19225 'tag': {'type': 'string'}},
19227 'AddUserResults': {'additionalProperties': False,
19228 'properties': {'results': {'items': {'$ref': '#/definitions/AddUserResult'},
19230 'required': ['results'],
19232 'AddUsers': {'additionalProperties': False,
19233 'properties': {'users': {'items': {'$ref': '#/definitions/AddUser'},
19235 'required': ['users'],
19237 'Entities': {'additionalProperties': False,
19238 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
19240 'required': ['entities'],
19242 'Entity': {'additionalProperties': False,
19243 'properties': {'tag': {'type': 'string'}},
19244 'required': ['tag'],
19246 'EntityPassword': {'additionalProperties': False,
19247 'properties': {'password': {'type': 'string'},
19248 'tag': {'type': 'string'}},
19249 'required': ['tag', 'password'],
19251 'EntityPasswords': {'additionalProperties': False,
19252 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'},
19254 'required': ['changes'],
19256 'Error': {'additionalProperties': False,
19257 'properties': {'code': {'type': 'string'},
19258 'info': {'$ref': '#/definitions/ErrorInfo'},
19259 'message': {'type': 'string'}},
19260 'required': ['message', 'code'],
19262 'ErrorInfo': {'additionalProperties': False,
19263 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
19264 'macaroon-path': {'type': 'string'}},
19266 'ErrorResult': {'additionalProperties': False,
19267 'properties': {'error': {'$ref': '#/definitions/Error'}},
19269 'ErrorResults': {'additionalProperties': False,
19270 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
19272 'required': ['results'],
19274 'Macaroon': {'additionalProperties': False, 'type': 'object'},
19275 'MacaroonResult': {'additionalProperties': False,
19276 'properties': {'error': {'$ref': '#/definitions/Error'},
19277 'result': {'$ref': '#/definitions/Macaroon'}},
19279 'MacaroonResults': {'additionalProperties': False,
19280 'properties': {'results': {'items': {'$ref': '#/definitions/MacaroonResult'},
19282 'required': ['results'],
19284 'UserInfo': {'additionalProperties': False,
19285 'properties': {'created-by': {'type': 'string'},
19286 'date-created': {'format': 'date-time',
19288 'disabled': {'type': 'boolean'},
19289 'display-name': {'type': 'string'},
19290 'last-connection': {'format': 'date-time',
19292 'username': {'type': 'string'}},
19293 'required': ['username',
19299 'UserInfoRequest': {'additionalProperties': False,
19300 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
19302 'include-disabled': {'type': 'boolean'}},
19303 'required': ['entities',
19304 'include-disabled'],
19306 'UserInfoResult': {'additionalProperties': False,
19307 'properties': {'error': {'$ref': '#/definitions/Error'},
19308 'result': {'$ref': '#/definitions/UserInfo'}},
19310 'UserInfoResults': {'additionalProperties': False,
19311 'properties': {'results': {'items': {'$ref': '#/definitions/UserInfoResult'},
19313 'required': ['results'],
19314 'type': 'object'}},
19315 'properties': {'AddUser': {'properties': {'Params': {'$ref': '#/definitions/AddUsers'},
19316 'Result': {'$ref': '#/definitions/AddUserResults'}},
19318 'CreateLocalLoginMacaroon': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19319 'Result': {'$ref': '#/definitions/MacaroonResults'}},
19321 'DisableUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19322 'Result': {'$ref': '#/definitions/ErrorResults'}},
19324 'EnableUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19325 'Result': {'$ref': '#/definitions/ErrorResults'}},
19327 'SetPassword': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
19328 'Result': {'$ref': '#/definitions/ErrorResults'}},
19330 'UserInfo': {'properties': {'Params': {'$ref': '#/definitions/UserInfoRequest'},
19331 'Result': {'$ref': '#/definitions/UserInfoResults'}},
19332 'type': 'object'}},
19336 @ReturnMapping(AddUserResults
)
19337 async def AddUser(self
, users
):
19339 users : typing.Sequence[~AddUser]
19340 Returns -> typing.Sequence[~AddUserResult]
19342 # map input types to rpc msg
19344 msg
= dict(Type
='UserManager', Request
='AddUser', Version
=1, Params
=params
)
19345 params
['users'] = users
19346 reply
= await self
.rpc(msg
)
19351 @ReturnMapping(MacaroonResults
)
19352 async def CreateLocalLoginMacaroon(self
, entities
):
19354 entities : typing.Sequence[~Entity]
19355 Returns -> typing.Sequence[~MacaroonResult]
19357 # map input types to rpc msg
19359 msg
= dict(Type
='UserManager', Request
='CreateLocalLoginMacaroon', Version
=1, Params
=params
)
19360 params
['entities'] = entities
19361 reply
= await self
.rpc(msg
)
19366 @ReturnMapping(ErrorResults
)
19367 async def DisableUser(self
, entities
):
19369 entities : typing.Sequence[~Entity]
19370 Returns -> typing.Sequence[~ErrorResult]
19372 # map input types to rpc msg
19374 msg
= dict(Type
='UserManager', Request
='DisableUser', Version
=1, Params
=params
)
19375 params
['entities'] = entities
19376 reply
= await self
.rpc(msg
)
19381 @ReturnMapping(ErrorResults
)
19382 async def EnableUser(self
, entities
):
19384 entities : typing.Sequence[~Entity]
19385 Returns -> typing.Sequence[~ErrorResult]
19387 # map input types to rpc msg
19389 msg
= dict(Type
='UserManager', Request
='EnableUser', Version
=1, Params
=params
)
19390 params
['entities'] = entities
19391 reply
= await self
.rpc(msg
)
19396 @ReturnMapping(ErrorResults
)
19397 async def SetPassword(self
, changes
):
19399 changes : typing.Sequence[~EntityPassword]
19400 Returns -> typing.Sequence[~ErrorResult]
19402 # map input types to rpc msg
19404 msg
= dict(Type
='UserManager', Request
='SetPassword', Version
=1, Params
=params
)
19405 params
['changes'] = changes
19406 reply
= await self
.rpc(msg
)
19411 @ReturnMapping(UserInfoResults
)
19412 async def UserInfo(self
, entities
, include_disabled
):
19414 entities : typing.Sequence[~Entity]
19415 include_disabled : bool
19416 Returns -> typing.Sequence[~UserInfoResult]
19418 # map input types to rpc msg
19420 msg
= dict(Type
='UserManager', Request
='UserInfo', Version
=1, Params
=params
)
19421 params
['entities'] = entities
19422 params
['include-disabled'] = include_disabled
19423 reply
= await self
.rpc(msg
)
19427 class VolumeAttachmentsWatcherFacade(Type
):
19428 name
= 'VolumeAttachmentsWatcher'
19430 schema
= {'definitions': {'Error': {'additionalProperties': False,
19431 'properties': {'code': {'type': 'string'},
19432 'info': {'$ref': '#/definitions/ErrorInfo'},
19433 'message': {'type': 'string'}},
19434 'required': ['message', 'code'],
19436 'ErrorInfo': {'additionalProperties': False,
19437 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
19438 'macaroon-path': {'type': 'string'}},
19440 'Macaroon': {'additionalProperties': False, 'type': 'object'},
19441 'MachineStorageId': {'additionalProperties': False,
19442 'properties': {'attachment-tag': {'type': 'string'},
19443 'machine-tag': {'type': 'string'}},
19444 'required': ['machine-tag',
19447 'MachineStorageIdsWatchResult': {'additionalProperties': False,
19448 'properties': {'changes': {'items': {'$ref': '#/definitions/MachineStorageId'},
19450 'error': {'$ref': '#/definitions/Error'},
19451 'watcher-id': {'type': 'string'}},
19452 'required': ['watcher-id',
19454 'type': 'object'}},
19455 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResult'}},
19457 'Stop': {'type': 'object'}},
19461 @ReturnMapping(MachineStorageIdsWatchResult
)
19462 async def Next(self
):
19465 Returns -> typing.Union[typing.Sequence[~MachineStorageId], _ForwardRef('Error')]
19467 # map input types to rpc msg
19469 msg
= dict(Type
='VolumeAttachmentsWatcher', Request
='Next', Version
=2, Params
=params
)
19471 reply
= await self
.rpc(msg
)
19476 @ReturnMapping(None)
19477 async def Stop(self
):
19482 # map input types to rpc msg
19484 msg
= dict(Type
='VolumeAttachmentsWatcher', Request
='Stop', Version
=2, Params
=params
)
19486 reply
= await self
.rpc(msg
)