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', 'parameters': 'parameters', 'receiver': 'receiver', 'tag': 'tag'}
9 _toPy
= {'name': 'name', 'parameters': 'parameters', 'receiver': 'receiver', 'tag': 'tag'}
10 def __init__(self
, name
=None, parameters
=None, receiver
=None, tag
=None):
13 parameters : typing.Mapping<~KT, +VT_co>[str, typing.Any]
18 self
.parameters
= parameters
19 self
.receiver
= receiver
23 class ActionResult(Type
):
24 _toSchema
= {'action': 'action', 'completed': 'completed', 'enqueued': 'enqueued', 'error': 'error', 'message': 'message', 'output': 'output', 'started': 'started', 'status': 'status'}
25 _toPy
= {'action': 'action', 'completed': 'completed', 'enqueued': 'enqueued', 'error': 'error', 'message': 'message', 'output': 'output', 'started': 'started', 'status': 'status'}
26 def __init__(self
, action
=None, completed
=None, enqueued
=None, error
=None, message
=None, output
=None, started
=None, status
=None):
33 output : typing.Mapping<~KT, +VT_co>[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<+T_co>[~ActionResult]<~ActionResult>
54 self
.results
= [ActionResult
.from_json(o
) for o
in results
or []]
57 class ActionSpec(Type
):
58 _toSchema
= {'description': 'description', 'params': 'params'}
59 _toPy
= {'description': 'description', 'params': 'params'}
60 def __init__(self
, description
=None, params
=None):
63 params : typing.Mapping<~KT, +VT_co>[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<+T_co>[~Action]<~Action>
76 self
.actions
= [Action
.from_json(o
) for o
in actions
or []]
79 class ActionsByName(Type
):
80 _toSchema
= {'actions': 'actions', 'error': 'error', 'name': 'name'}
81 _toPy
= {'actions': 'actions', 'error': 'error', 'name': 'name'}
82 def __init__(self
, actions
=None, error
=None, name
=None):
84 actions : typing.Sequence<+T_co>[~ActionResult]<~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<+T_co>[~ActionsByName]<~ActionsByName>
100 self
.actions
= [ActionsByName
.from_json(o
) for o
in actions
or []]
103 class ActionsByReceiver(Type
):
104 _toSchema
= {'actions': 'actions', 'error': 'error', 'receiver': 'receiver'}
105 _toPy
= {'actions': 'actions', 'error': 'error', 'receiver': 'receiver'}
106 def __init__(self
, actions
=None, error
=None, receiver
=None):
108 actions : typing.Sequence<+T_co>[~ActionResult]<~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<+T_co>[~ActionsByReceiver]<~ActionsByReceiver>
124 self
.actions
= [ActionsByReceiver
.from_json(o
) for o
in actions
or []]
127 class ApplicationCharmActionsResult(Type
):
128 _toSchema
= {'actions': 'actions', 'application_tag': 'application-tag', 'error': 'error'}
129 _toPy
= {'actions': 'actions', 'application-tag': 'application_tag', 'error': 'error'}
130 def __init__(self
, actions
=None, application_tag
=None, error
=None):
132 actions : typing.Mapping<~KT, +VT_co>[str, ~ActionSpec]<~ActionSpec>
133 application_tag : str
136 self
.actions
= actions
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<+T_co>[~ApplicationCharmActionsResult]<~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<+T_co>[~Entity]<~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': 'macaroon', 'macaroon_path': 'macaroon-path'}
187 _toPy
= {'macaroon': 'macaroon', 'macaroon-path': 'macaroon_path'}
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<+T_co>[str]
207 class FindTags(Type
):
208 _toSchema
= {'prefixes': 'prefixes'}
209 _toPy
= {'prefixes': 'prefixes'}
210 def __init__(self
, prefixes
=None):
212 prefixes : typing.Sequence<+T_co>[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<+T_co>[~Entity]<~Entity>
224 self
.matches
= [Entity
.from_json(o
) for o
in matches
or []]
227 class Macaroon(Type
):
237 class RunParams(Type
):
238 _toSchema
= {'applications': 'applications', 'commands': 'commands', 'machines': 'machines', 'timeout': 'timeout', 'units': 'units'}
239 _toPy
= {'applications': 'applications', 'commands': 'commands', 'machines': 'machines', 'timeout': 'timeout', 'units': 'units'}
240 def __init__(self
, applications
=None, commands
=None, machines
=None, timeout
=None, units
=None):
242 applications : typing.Sequence<+T_co>[str]
244 machines : typing.Sequence<+T_co>[str]
246 units : typing.Sequence<+T_co>[str]
248 self
.applications
= applications
249 self
.commands
= commands
250 self
.machines
= machines
251 self
.timeout
= timeout
255 class AgentGetEntitiesResult(Type
):
256 _toSchema
= {'container_type': 'container-type', 'error': 'error', 'jobs': 'jobs', 'life': 'life'}
257 _toPy
= {'container-type': 'container_type', 'error': 'error', 'jobs': 'jobs', 'life': 'life'}
258 def __init__(self
, container_type
=None, error
=None, jobs
=None, life
=None):
262 jobs : typing.Sequence<+T_co>[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<+T_co>[~AgentGetEntitiesResult]<~AgentGetEntitiesResult>
278 self
.entities
= [AgentGetEntitiesResult
.from_json(o
) for o
in entities
or []]
281 class CloudCredential(Type
):
282 _toSchema
= {'attrs': 'attrs', 'auth_type': 'auth-type', 'redacted': 'redacted'}
283 _toPy
= {'attrs': 'attrs', 'auth-type': 'auth_type', 'redacted': 'redacted'}
284 def __init__(self
, attrs
=None, auth_type
=None, redacted
=None):
286 attrs : typing.Mapping<~KT, +VT_co>[str, str]
288 redacted : typing.Sequence<+T_co>[str]
291 self
.auth_type
= auth_type
292 self
.redacted
= redacted
295 class CloudSpec(Type
):
296 _toSchema
= {'credential': 'credential', 'endpoint': 'endpoint', 'identity_endpoint': 'identity-endpoint', 'name': 'name', 'region': 'region', 'storage_endpoint': 'storage-endpoint', 'type_': 'type'}
297 _toPy
= {'credential': 'credential', 'endpoint': 'endpoint', 'identity-endpoint': 'identity_endpoint', 'name': 'name', 'region': 'region', 'storage-endpoint': 'storage_endpoint', 'type': 'type_'}
298 def __init__(self
, credential
=None, endpoint
=None, identity_endpoint
=None, name
=None, region
=None, storage_endpoint
=None, type_
=None):
300 credential : CloudCredential
302 identity_endpoint : str
305 storage_endpoint : str
308 self
.credential
= CloudCredential
.from_json(credential
) if credential
else None
309 self
.endpoint
= endpoint
310 self
.identity_endpoint
= identity_endpoint
313 self
.storage_endpoint
= storage_endpoint
317 class CloudSpecResult(Type
):
318 _toSchema
= {'error': 'error', 'result': 'result'}
319 _toPy
= {'error': 'error', 'result': 'result'}
320 def __init__(self
, error
=None, result
=None):
325 self
.error
= Error
.from_json(error
) if error
else None
326 self
.result
= CloudSpec
.from_json(result
) if result
else None
329 class CloudSpecResults(Type
):
330 _toSchema
= {'results': 'results'}
331 _toPy
= {'results': 'results'}
332 def __init__(self
, results
=None):
334 results : typing.Sequence<+T_co>[~CloudSpecResult]<~CloudSpecResult>
336 self
.results
= [CloudSpecResult
.from_json(o
) for o
in results
or []]
339 class ControllerConfigResult(Type
):
340 _toSchema
= {'config': 'config'}
341 _toPy
= {'config': 'config'}
342 def __init__(self
, config
=None):
344 config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
349 class EntityPassword(Type
):
350 _toSchema
= {'password': 'password', 'tag': 'tag'}
351 _toPy
= {'password': 'password', 'tag': 'tag'}
352 def __init__(self
, password
=None, tag
=None):
357 self
.password
= password
361 class EntityPasswords(Type
):
362 _toSchema
= {'changes': 'changes'}
363 _toPy
= {'changes': 'changes'}
364 def __init__(self
, changes
=None):
366 changes : typing.Sequence<+T_co>[~EntityPassword]<~EntityPassword>
368 self
.changes
= [EntityPassword
.from_json(o
) for o
in changes
or []]
371 class ErrorResult(Type
):
372 _toSchema
= {'error': 'error'}
373 _toPy
= {'error': 'error'}
374 def __init__(self
, error
=None):
378 self
.error
= Error
.from_json(error
) if error
else None
381 class ErrorResults(Type
):
382 _toSchema
= {'results': 'results'}
383 _toPy
= {'results': 'results'}
384 def __init__(self
, results
=None):
386 results : typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
388 self
.results
= [ErrorResult
.from_json(o
) for o
in results
or []]
391 class IsMasterResult(Type
):
392 _toSchema
= {'master': 'master'}
393 _toPy
= {'master': 'master'}
394 def __init__(self
, master
=None):
401 class ModelConfigResult(Type
):
402 _toSchema
= {'config': 'config'}
403 _toPy
= {'config': 'config'}
404 def __init__(self
, config
=None):
406 config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
411 class ModelTag(Type
):
421 class NotifyWatchResult(Type
):
422 _toSchema
= {'error': 'error', 'notifywatcherid': 'NotifyWatcherId'}
423 _toPy
= {'NotifyWatcherId': 'notifywatcherid', 'error': 'error'}
424 def __init__(self
, notifywatcherid
=None, error
=None):
426 notifywatcherid : str
429 self
.notifywatcherid
= notifywatcherid
430 self
.error
= Error
.from_json(error
) if error
else None
433 class NotifyWatchResults(Type
):
434 _toSchema
= {'results': 'results'}
435 _toPy
= {'results': 'results'}
436 def __init__(self
, results
=None):
438 results : typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
440 self
.results
= [NotifyWatchResult
.from_json(o
) for o
in results
or []]
443 class StateServingInfo(Type
):
444 _toSchema
= {'api_port': 'api-port', 'ca_private_key': 'ca-private-key', 'cert': 'cert', 'private_key': 'private-key', 'shared_secret': 'shared-secret', 'state_port': 'state-port', 'system_identity': 'system-identity'}
445 _toPy
= {'api-port': 'api_port', 'ca-private-key': 'ca_private_key', 'cert': 'cert', 'private-key': 'private_key', 'shared-secret': 'shared_secret', 'state-port': 'state_port', 'system-identity': 'system_identity'}
446 def __init__(self
, api_port
=None, ca_private_key
=None, cert
=None, private_key
=None, shared_secret
=None, state_port
=None, system_identity
=None):
454 system_identity : str
456 self
.api_port
= api_port
457 self
.ca_private_key
= ca_private_key
459 self
.private_key
= private_key
460 self
.shared_secret
= shared_secret
461 self
.state_port
= state_port
462 self
.system_identity
= system_identity
465 class AllWatcherNextResults(Type
):
466 _toSchema
= {'deltas': 'deltas'}
467 _toPy
= {'deltas': 'deltas'}
468 def __init__(self
, deltas
=None):
470 deltas : typing.Sequence<+T_co>[~Delta]<~Delta>
472 self
.deltas
= [Delta
.from_json(o
) for o
in deltas
or []]
476 _toSchema
= {'entity': 'entity', 'removed': 'removed'}
477 _toPy
= {'entity': 'entity', 'removed': 'removed'}
478 def __init__(self
, entity
=None, removed
=None):
480 entity : typing.Mapping<~KT, +VT_co>[str, typing.Any]
484 self
.removed
= removed
487 class AnnotationsGetResult(Type
):
488 _toSchema
= {'annotations': 'annotations', 'entity': 'entity', 'error': 'error'}
489 _toPy
= {'annotations': 'annotations', 'entity': 'entity', 'error': 'error'}
490 def __init__(self
, annotations
=None, entity
=None, error
=None):
492 annotations : typing.Mapping<~KT, +VT_co>[str, str]
496 self
.annotations
= annotations
498 self
.error
= ErrorResult
.from_json(error
) if error
else None
501 class AnnotationsGetResults(Type
):
502 _toSchema
= {'results': 'results'}
503 _toPy
= {'results': 'results'}
504 def __init__(self
, results
=None):
506 results : typing.Sequence<+T_co>[~AnnotationsGetResult]<~AnnotationsGetResult>
508 self
.results
= [AnnotationsGetResult
.from_json(o
) for o
in results
or []]
511 class AnnotationsSet(Type
):
512 _toSchema
= {'annotations': 'annotations'}
513 _toPy
= {'annotations': 'annotations'}
514 def __init__(self
, annotations
=None):
516 annotations : typing.Sequence<+T_co>[~EntityAnnotations]<~EntityAnnotations>
518 self
.annotations
= [EntityAnnotations
.from_json(o
) for o
in annotations
or []]
521 class EntityAnnotations(Type
):
522 _toSchema
= {'annotations': 'annotations', 'entity': 'entity'}
523 _toPy
= {'annotations': 'annotations', 'entity': 'entity'}
524 def __init__(self
, annotations
=None, entity
=None):
526 annotations : typing.Mapping<~KT, +VT_co>[str, str]
529 self
.annotations
= annotations
533 class AddApplicationUnits(Type
):
534 _toSchema
= {'application': 'application', 'num_units': 'num-units', 'placement': 'placement'}
535 _toPy
= {'application': 'application', 'num-units': 'num_units', 'placement': 'placement'}
536 def __init__(self
, application
=None, num_units
=None, placement
=None):
540 placement : typing.Sequence<+T_co>[~Placement]<~Placement>
542 self
.application
= application
543 self
.num_units
= num_units
544 self
.placement
= [Placement
.from_json(o
) for o
in placement
or []]
547 class AddApplicationUnitsResults(Type
):
548 _toSchema
= {'units': 'units'}
549 _toPy
= {'units': 'units'}
550 def __init__(self
, units
=None):
552 units : typing.Sequence<+T_co>[str]
557 class AddRelation(Type
):
558 _toSchema
= {'endpoints': 'endpoints'}
559 _toPy
= {'endpoints': 'endpoints'}
560 def __init__(self
, endpoints
=None):
562 endpoints : typing.Sequence<+T_co>[str]
564 self
.endpoints
= endpoints
567 class AddRelationResults(Type
):
568 _toSchema
= {'endpoints': 'endpoints'}
569 _toPy
= {'endpoints': 'endpoints'}
570 def __init__(self
, endpoints
=None):
572 endpoints : typing.Mapping<~KT, +VT_co>[str, ~CharmRelation]<~CharmRelation>
574 self
.endpoints
= endpoints
577 class ApplicationCharmRelations(Type
):
578 _toSchema
= {'application': 'application'}
579 _toPy
= {'application': 'application'}
580 def __init__(self
, application
=None):
584 self
.application
= application
587 class ApplicationCharmRelationsResults(Type
):
588 _toSchema
= {'charm_relations': 'charm-relations'}
589 _toPy
= {'charm-relations': 'charm_relations'}
590 def __init__(self
, charm_relations
=None):
592 charm_relations : typing.Sequence<+T_co>[str]
594 self
.charm_relations
= charm_relations
597 class ApplicationDeploy(Type
):
598 _toSchema
= {'application': 'application', 'channel': 'channel', 'charm_url': 'charm-url', 'config': 'config', 'config_yaml': 'config-yaml', 'constraints': 'constraints', 'endpoint_bindings': 'endpoint-bindings', 'num_units': 'num-units', 'placement': 'placement', 'resources': 'resources', 'series': 'series', 'storage': 'storage'}
599 _toPy
= {'application': 'application', 'channel': 'channel', 'charm-url': 'charm_url', 'config': 'config', 'config-yaml': 'config_yaml', 'constraints': 'constraints', 'endpoint-bindings': 'endpoint_bindings', 'num-units': 'num_units', 'placement': 'placement', 'resources': 'resources', 'series': 'series', 'storage': 'storage'}
600 def __init__(self
, application
=None, channel
=None, charm_url
=None, config
=None, config_yaml
=None, constraints
=None, endpoint_bindings
=None, num_units
=None, placement
=None, resources
=None, series
=None, storage
=None):
605 config : typing.Mapping<~KT, +VT_co>[str, str]
608 endpoint_bindings : typing.Mapping<~KT, +VT_co>[str, str]
610 placement : typing.Sequence<+T_co>[~Placement]<~Placement>
611 resources : typing.Mapping<~KT, +VT_co>[str, str]
613 storage : typing.Mapping<~KT, +VT_co>[str, ~Constraints]<~Constraints>
615 self
.application
= application
616 self
.channel
= channel
617 self
.charm_url
= charm_url
619 self
.config_yaml
= config_yaml
620 self
.constraints
= Value
.from_json(constraints
) if constraints
else None
621 self
.endpoint_bindings
= endpoint_bindings
622 self
.num_units
= num_units
623 self
.placement
= [Placement
.from_json(o
) for o
in placement
or []]
624 self
.resources
= resources
626 self
.storage
= storage
629 class ApplicationDestroy(Type
):
630 _toSchema
= {'application': 'application'}
631 _toPy
= {'application': 'application'}
632 def __init__(self
, application
=None):
636 self
.application
= application
639 class ApplicationExpose(Type
):
640 _toSchema
= {'application': 'application'}
641 _toPy
= {'application': 'application'}
642 def __init__(self
, application
=None):
646 self
.application
= application
649 class ApplicationGet(Type
):
650 _toSchema
= {'application': 'application'}
651 _toPy
= {'application': 'application'}
652 def __init__(self
, application
=None):
656 self
.application
= application
659 class ApplicationGetResults(Type
):
660 _toSchema
= {'application': 'application', 'charm': 'charm', 'config': 'config', 'constraints': 'constraints', 'series': 'series'}
661 _toPy
= {'application': 'application', 'charm': 'charm', 'config': 'config', 'constraints': 'constraints', 'series': 'series'}
662 def __init__(self
, application
=None, charm
=None, config
=None, constraints
=None, series
=None):
666 config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
670 self
.application
= application
673 self
.constraints
= Value
.from_json(constraints
) if constraints
else None
677 class ApplicationMetricCredential(Type
):
678 _toSchema
= {'application': 'application', 'metrics_credentials': 'metrics-credentials'}
679 _toPy
= {'application': 'application', 'metrics-credentials': 'metrics_credentials'}
680 def __init__(self
, application
=None, metrics_credentials
=None):
683 metrics_credentials : typing.Sequence<+T_co>[int]
685 self
.application
= application
686 self
.metrics_credentials
= metrics_credentials
689 class ApplicationMetricCredentials(Type
):
690 _toSchema
= {'creds': 'creds'}
691 _toPy
= {'creds': 'creds'}
692 def __init__(self
, creds
=None):
694 creds : typing.Sequence<+T_co>[~ApplicationMetricCredential]<~ApplicationMetricCredential>
696 self
.creds
= [ApplicationMetricCredential
.from_json(o
) for o
in creds
or []]
699 class ApplicationSet(Type
):
700 _toSchema
= {'application': 'application', 'options': 'options'}
701 _toPy
= {'application': 'application', 'options': 'options'}
702 def __init__(self
, application
=None, options
=None):
705 options : typing.Mapping<~KT, +VT_co>[str, str]
707 self
.application
= application
708 self
.options
= options
711 class ApplicationSetCharm(Type
):
712 _toSchema
= {'application': 'application', 'channel': 'channel', 'charm_url': 'charm-url', 'config_settings': 'config-settings', 'config_settings_yaml': 'config-settings-yaml', 'force_series': 'force-series', 'force_units': 'force-units', 'resource_ids': 'resource-ids', 'storage_constraints': 'storage-constraints'}
713 _toPy
= {'application': 'application', 'channel': 'channel', 'charm-url': 'charm_url', 'config-settings': 'config_settings', 'config-settings-yaml': 'config_settings_yaml', 'force-series': 'force_series', 'force-units': 'force_units', 'resource-ids': 'resource_ids', 'storage-constraints': 'storage_constraints'}
714 def __init__(self
, application
=None, channel
=None, charm_url
=None, config_settings
=None, config_settings_yaml
=None, force_series
=None, force_units
=None, resource_ids
=None, storage_constraints
=None):
719 config_settings : typing.Mapping<~KT, +VT_co>[str, str]
720 config_settings_yaml : str
723 resource_ids : typing.Mapping<~KT, +VT_co>[str, str]
724 storage_constraints : typing.Mapping<~KT, +VT_co>[str, ~StorageConstraints]<~StorageConstraints>
726 self
.application
= application
727 self
.channel
= channel
728 self
.charm_url
= charm_url
729 self
.config_settings
= config_settings
730 self
.config_settings_yaml
= config_settings_yaml
731 self
.force_series
= force_series
732 self
.force_units
= force_units
733 self
.resource_ids
= resource_ids
734 self
.storage_constraints
= storage_constraints
737 class ApplicationUnexpose(Type
):
738 _toSchema
= {'application': 'application'}
739 _toPy
= {'application': 'application'}
740 def __init__(self
, application
=None):
744 self
.application
= application
747 class ApplicationUnset(Type
):
748 _toSchema
= {'application': 'application', 'options': 'options'}
749 _toPy
= {'application': 'application', 'options': 'options'}
750 def __init__(self
, application
=None, options
=None):
753 options : typing.Sequence<+T_co>[str]
755 self
.application
= application
756 self
.options
= options
759 class ApplicationUpdate(Type
):
760 _toSchema
= {'application': 'application', 'charm_url': 'charm-url', 'constraints': 'constraints', 'force_charm_url': 'force-charm-url', 'force_series': 'force-series', 'min_units': 'min-units', 'settings': 'settings', 'settings_yaml': 'settings-yaml'}
761 _toPy
= {'application': 'application', 'charm-url': 'charm_url', 'constraints': 'constraints', 'force-charm-url': 'force_charm_url', 'force-series': 'force_series', 'min-units': 'min_units', 'settings': 'settings', 'settings-yaml': 'settings_yaml'}
762 def __init__(self
, application
=None, charm_url
=None, constraints
=None, force_charm_url
=None, force_series
=None, min_units
=None, settings
=None, settings_yaml
=None):
767 force_charm_url : bool
770 settings : typing.Mapping<~KT, +VT_co>[str, str]
773 self
.application
= application
774 self
.charm_url
= charm_url
775 self
.constraints
= Value
.from_json(constraints
) if constraints
else None
776 self
.force_charm_url
= force_charm_url
777 self
.force_series
= force_series
778 self
.min_units
= min_units
779 self
.settings
= settings
780 self
.settings_yaml
= settings_yaml
783 class ApplicationsDeploy(Type
):
784 _toSchema
= {'applications': 'applications'}
785 _toPy
= {'applications': 'applications'}
786 def __init__(self
, applications
=None):
788 applications : typing.Sequence<+T_co>[~ApplicationDeploy]<~ApplicationDeploy>
790 self
.applications
= [ApplicationDeploy
.from_json(o
) for o
in applications
or []]
793 class CharmRelation(Type
):
794 _toSchema
= {'interface': 'interface', 'limit': 'limit', 'name': 'name', 'optional': 'optional', 'role': 'role', 'scope': 'scope'}
795 _toPy
= {'interface': 'interface', 'limit': 'limit', 'name': 'name', 'optional': 'optional', 'role': 'role', 'scope': 'scope'}
796 def __init__(self
, interface
=None, limit
=None, name
=None, optional
=None, role
=None, scope
=None):
805 self
.interface
= interface
808 self
.optional
= optional
813 class Constraints(Type
):
814 _toSchema
= {'count': 'Count', 'pool': 'Pool', 'size': 'Size'}
815 _toPy
= {'Count': 'count', 'Pool': 'pool', 'Size': 'size'}
816 def __init__(self
, count
=None, pool
=None, size
=None):
827 class DestroyApplicationUnits(Type
):
828 _toSchema
= {'unit_names': 'unit-names'}
829 _toPy
= {'unit-names': 'unit_names'}
830 def __init__(self
, unit_names
=None):
832 unit_names : typing.Sequence<+T_co>[str]
834 self
.unit_names
= unit_names
837 class DestroyRelation(Type
):
838 _toSchema
= {'endpoints': 'endpoints'}
839 _toPy
= {'endpoints': 'endpoints'}
840 def __init__(self
, endpoints
=None):
842 endpoints : typing.Sequence<+T_co>[str]
844 self
.endpoints
= endpoints
847 class GetApplicationConstraints(Type
):
848 _toSchema
= {'application': 'application'}
849 _toPy
= {'application': 'application'}
850 def __init__(self
, application
=None):
854 self
.application
= application
857 class GetConstraintsResults(Type
):
858 _toSchema
= {'constraints': 'constraints'}
859 _toPy
= {'constraints': 'constraints'}
860 def __init__(self
, constraints
=None):
864 self
.constraints
= Value
.from_json(constraints
) if constraints
else None
867 class Placement(Type
):
868 _toSchema
= {'directive': 'directive', 'scope': 'scope'}
869 _toPy
= {'directive': 'directive', 'scope': 'scope'}
870 def __init__(self
, directive
=None, scope
=None):
875 self
.directive
= directive
879 class SetConstraints(Type
):
880 _toSchema
= {'application': 'application', 'constraints': 'constraints'}
881 _toPy
= {'application': 'application', 'constraints': 'constraints'}
882 def __init__(self
, application
=None, constraints
=None):
887 self
.application
= application
888 self
.constraints
= Value
.from_json(constraints
) if constraints
else None
891 class StorageConstraints(Type
):
892 _toSchema
= {'count': 'count', 'pool': 'pool', 'size': 'size'}
893 _toPy
= {'count': 'count', 'pool': 'pool', 'size': 'size'}
894 def __init__(self
, count
=None, pool
=None, size
=None):
905 class StringResult(Type
):
906 _toSchema
= {'error': 'error', 'result': 'result'}
907 _toPy
= {'error': 'error', 'result': 'result'}
908 def __init__(self
, error
=None, result
=None):
913 self
.error
= Error
.from_json(error
) if error
else None
918 _toSchema
= {'arch': 'arch', 'container': 'container', 'cores': 'cores', 'cpu_power': 'cpu-power', 'instance_type': 'instance-type', 'mem': 'mem', 'root_disk': 'root-disk', 'spaces': 'spaces', 'tags': 'tags', 'virt_type': 'virt-type'}
919 _toPy
= {'arch': 'arch', 'container': 'container', 'cores': 'cores', 'cpu-power': 'cpu_power', 'instance-type': 'instance_type', 'mem': 'mem', 'root-disk': 'root_disk', 'spaces': 'spaces', 'tags': 'tags', 'virt-type': 'virt_type'}
920 def __init__(self
, arch
=None, container
=None, cores
=None, cpu_power
=None, instance_type
=None, mem
=None, root_disk
=None, spaces
=None, tags
=None, virt_type
=None):
929 spaces : typing.Sequence<+T_co>[str]
930 tags : typing.Sequence<+T_co>[str]
934 self
.container
= container
936 self
.cpu_power
= cpu_power
937 self
.instance_type
= instance_type
939 self
.root_disk
= root_disk
942 self
.virt_type
= virt_type
945 class ApplicationRelationsChange(Type
):
946 _toSchema
= {'changed': 'changed', 'removed': 'removed'}
947 _toPy
= {'changed': 'changed', 'removed': 'removed'}
948 def __init__(self
, changed
=None, removed
=None):
950 changed : typing.Sequence<+T_co>[~RelationChange]<~RelationChange>
951 removed : typing.Sequence<+T_co>[int]
953 self
.changed
= [RelationChange
.from_json(o
) for o
in changed
or []]
954 self
.removed
= removed
957 class ApplicationRelationsWatchResult(Type
):
958 _toSchema
= {'applicationrelationswatcherid': 'ApplicationRelationsWatcherId', 'changes': 'changes', 'error': 'error'}
959 _toPy
= {'ApplicationRelationsWatcherId': 'applicationrelationswatcherid', 'changes': 'changes', 'error': 'error'}
960 def __init__(self
, applicationrelationswatcherid
=None, changes
=None, error
=None):
962 applicationrelationswatcherid : str
963 changes : ApplicationRelationsChange
966 self
.applicationrelationswatcherid
= applicationrelationswatcherid
967 self
.changes
= ApplicationRelationsChange
.from_json(changes
) if changes
else None
968 self
.error
= Error
.from_json(error
) if error
else None
971 class RelationChange(Type
):
972 _toSchema
= {'changedunits': 'changedunits', 'departedunits': 'departedunits', 'id_': 'id', 'life': 'life'}
973 _toPy
= {'changedunits': 'changedunits', 'departedunits': 'departedunits', 'id': 'id_', 'life': 'life'}
974 def __init__(self
, changedunits
=None, departedunits
=None, id_
=None, life
=None):
976 changedunits : typing.Mapping<~KT, +VT_co>[str, ~RelationUnitChange]<~RelationUnitChange>
977 departedunits : typing.Sequence<+T_co>[str]
981 self
.changedunits
= changedunits
982 self
.departedunits
= departedunits
987 class RelationUnitChange(Type
):
988 _toSchema
= {'settings': 'settings'}
989 _toPy
= {'settings': 'settings'}
990 def __init__(self
, settings
=None):
992 settings : typing.Mapping<~KT, +VT_co>[str, typing.Any]
994 self
.settings
= settings
997 class StringsWatchResult(Type
):
998 _toSchema
= {'changes': 'changes', 'error': 'error', 'watcher_id': 'watcher-id'}
999 _toPy
= {'changes': 'changes', 'error': 'error', 'watcher-id': 'watcher_id'}
1000 def __init__(self
, changes
=None, error
=None, watcher_id
=None):
1002 changes : typing.Sequence<+T_co>[str]
1006 self
.changes
= changes
1007 self
.error
= Error
.from_json(error
) if error
else None
1008 self
.watcher_id
= watcher_id
1011 class BackupsCreateArgs(Type
):
1012 _toSchema
= {'notes': 'notes'}
1013 _toPy
= {'notes': 'notes'}
1014 def __init__(self
, notes
=None):
1021 class BackupsInfoArgs(Type
):
1022 _toSchema
= {'id_': 'id'}
1023 _toPy
= {'id': 'id_'}
1024 def __init__(self
, id_
=None):
1031 class BackupsListArgs(Type
):
1041 class BackupsListResult(Type
):
1042 _toSchema
= {'list_': 'list'}
1043 _toPy
= {'list': 'list_'}
1044 def __init__(self
, list_
=None):
1046 list_ : typing.Sequence<+T_co>[~BackupsMetadataResult]<~BackupsMetadataResult>
1048 self
.list_
= [BackupsMetadataResult
.from_json(o
) for o
in list_
or []]
1051 class BackupsMetadataResult(Type
):
1052 _toSchema
= {'ca_cert': 'ca-cert', 'ca_private_key': 'ca-private-key', 'checksum': 'checksum', 'checksum_format': 'checksum-format', 'finished': 'finished', 'hostname': 'hostname', 'id_': 'id', 'machine': 'machine', 'model': 'model', 'notes': 'notes', 'series': 'series', 'size': 'size', 'started': 'started', 'stored': 'stored', 'version': 'version'}
1053 _toPy
= {'ca-cert': 'ca_cert', 'ca-private-key': 'ca_private_key', 'checksum': 'checksum', 'checksum-format': 'checksum_format', 'finished': 'finished', 'hostname': 'hostname', 'id': 'id_', 'machine': 'machine', 'model': 'model', 'notes': 'notes', 'series': 'series', 'size': 'size', 'started': 'started', 'stored': 'stored', 'version': 'version'}
1054 def __init__(self
, ca_cert
=None, ca_private_key
=None, checksum
=None, checksum_format
=None, finished
=None, hostname
=None, id_
=None, machine
=None, model
=None, notes
=None, series
=None, size
=None, started
=None, stored
=None, version
=None):
1057 ca_private_key : str
1059 checksum_format : str
1072 self
.ca_cert
= ca_cert
1073 self
.ca_private_key
= ca_private_key
1074 self
.checksum
= checksum
1075 self
.checksum_format
= checksum_format
1076 self
.finished
= finished
1077 self
.hostname
= hostname
1079 self
.machine
= machine
1082 self
.series
= series
1084 self
.started
= started
1085 self
.stored
= stored
1086 self
.version
= Number
.from_json(version
) if version
else None
1089 class BackupsRemoveArgs(Type
):
1090 _toSchema
= {'id_': 'id'}
1091 _toPy
= {'id': 'id_'}
1092 def __init__(self
, id_
=None):
1100 _toSchema
= {'build': 'Build', 'major': 'Major', 'minor': 'Minor', 'patch': 'Patch', 'tag': 'Tag'}
1101 _toPy
= {'Build': 'build', 'Major': 'major', 'Minor': 'minor', 'Patch': 'patch', 'Tag': 'tag'}
1102 def __init__(self
, build
=None, major
=None, minor
=None, patch
=None, tag
=None):
1117 class RestoreArgs(Type
):
1118 _toSchema
= {'backup_id': 'backup-id'}
1119 _toPy
= {'backup-id': 'backup_id'}
1120 def __init__(self
, backup_id
=None):
1124 self
.backup_id
= backup_id
1128 _toSchema
= {'id_': 'id', 'message': 'message', 'tag': 'tag', 'type_': 'type'}
1129 _toPy
= {'id': 'id_', 'message': 'message', 'tag': 'tag', 'type': 'type_'}
1130 def __init__(self
, id_
=None, message
=None, tag
=None, type_
=None):
1138 self
.message
= message
1143 class BlockResult(Type
):
1144 _toSchema
= {'error': 'error', 'result': 'result'}
1145 _toPy
= {'error': 'error', 'result': 'result'}
1146 def __init__(self
, error
=None, result
=None):
1151 self
.error
= Error
.from_json(error
) if error
else None
1152 self
.result
= Block
.from_json(result
) if result
else None
1155 class BlockResults(Type
):
1156 _toSchema
= {'results': 'results'}
1157 _toPy
= {'results': 'results'}
1158 def __init__(self
, results
=None):
1160 results : typing.Sequence<+T_co>[~BlockResult]<~BlockResult>
1162 self
.results
= [BlockResult
.from_json(o
) for o
in results
or []]
1165 class BlockSwitchParams(Type
):
1166 _toSchema
= {'message': 'message', 'type_': 'type'}
1167 _toPy
= {'message': 'message', 'type': 'type_'}
1168 def __init__(self
, message
=None, type_
=None):
1173 self
.message
= message
1177 class BundleChange(Type
):
1178 _toSchema
= {'args': 'args', 'id_': 'id', 'method': 'method', 'requires': 'requires'}
1179 _toPy
= {'args': 'args', 'id': 'id_', 'method': 'method', 'requires': 'requires'}
1180 def __init__(self
, args
=None, id_
=None, method
=None, requires
=None):
1182 args : typing.Sequence<+T_co>[typing.Any]
1185 requires : typing.Sequence<+T_co>[str]
1189 self
.method
= method
1190 self
.requires
= requires
1193 class BundleChangesParams(Type
):
1194 _toSchema
= {'yaml': 'yaml'}
1195 _toPy
= {'yaml': 'yaml'}
1196 def __init__(self
, yaml
=None):
1203 class BundleChangesResults(Type
):
1204 _toSchema
= {'changes': 'changes', 'errors': 'errors'}
1205 _toPy
= {'changes': 'changes', 'errors': 'errors'}
1206 def __init__(self
, changes
=None, errors
=None):
1208 changes : typing.Sequence<+T_co>[~BundleChange]<~BundleChange>
1209 errors : typing.Sequence<+T_co>[str]
1211 self
.changes
= [BundleChange
.from_json(o
) for o
in changes
or []]
1212 self
.errors
= errors
1215 class CharmActionSpec(Type
):
1216 _toSchema
= {'description': 'description', 'params': 'params'}
1217 _toPy
= {'description': 'description', 'params': 'params'}
1218 def __init__(self
, description
=None, params
=None):
1221 params : typing.Mapping<~KT, +VT_co>[str, typing.Any]
1223 self
.description
= description
1224 self
.params
= params
1227 class CharmActions(Type
):
1228 _toSchema
= {'specs': 'specs'}
1229 _toPy
= {'specs': 'specs'}
1230 def __init__(self
, specs
=None):
1232 specs : typing.Mapping<~KT, +VT_co>[str, ~CharmActionSpec]<~CharmActionSpec>
1237 class CharmInfo(Type
):
1238 _toSchema
= {'actions': 'actions', 'config': 'config', 'meta': 'meta', 'metrics': 'metrics', 'revision': 'revision', 'url': 'url'}
1239 _toPy
= {'actions': 'actions', 'config': 'config', 'meta': 'meta', 'metrics': 'metrics', 'revision': 'revision', 'url': 'url'}
1240 def __init__(self
, actions
=None, config
=None, meta
=None, metrics
=None, revision
=None, url
=None):
1242 actions : CharmActions
1243 config : typing.Mapping<~KT, +VT_co>[str, ~CharmOption]<~CharmOption>
1245 metrics : CharmMetrics
1249 self
.actions
= CharmActions
.from_json(actions
) if actions
else None
1250 self
.config
= config
1251 self
.meta
= CharmMeta
.from_json(meta
) if meta
else None
1252 self
.metrics
= CharmMetrics
.from_json(metrics
) if metrics
else None
1253 self
.revision
= revision
1257 class CharmMeta(Type
):
1258 _toSchema
= {'categories': 'categories', 'description': 'description', 'extra_bindings': 'extra-bindings', 'min_juju_version': 'min-juju-version', 'name': 'name', 'payload_classes': 'payload-classes', 'peers': 'peers', 'provides': 'provides', 'requires': 'requires', 'resources': 'resources', 'series': 'series', 'storage': 'storage', 'subordinate': 'subordinate', 'summary': 'summary', 'tags': 'tags', 'terms': 'terms'}
1259 _toPy
= {'categories': 'categories', 'description': 'description', 'extra-bindings': 'extra_bindings', 'min-juju-version': 'min_juju_version', 'name': 'name', 'payload-classes': 'payload_classes', 'peers': 'peers', 'provides': 'provides', 'requires': 'requires', 'resources': 'resources', 'series': 'series', 'storage': 'storage', 'subordinate': 'subordinate', 'summary': 'summary', 'tags': 'tags', 'terms': 'terms'}
1260 def __init__(self
, categories
=None, description
=None, extra_bindings
=None, min_juju_version
=None, name
=None, payload_classes
=None, peers
=None, provides
=None, requires
=None, resources
=None, series
=None, storage
=None, subordinate
=None, summary
=None, tags
=None, terms
=None):
1262 categories : typing.Sequence<+T_co>[str]
1264 extra_bindings : typing.Mapping<~KT, +VT_co>[str, str]
1265 min_juju_version : str
1267 payload_classes : typing.Mapping<~KT, +VT_co>[str, ~CharmPayloadClass]<~CharmPayloadClass>
1268 peers : typing.Mapping<~KT, +VT_co>[str, ~CharmRelation]<~CharmRelation>
1269 provides : typing.Mapping<~KT, +VT_co>[str, ~CharmRelation]<~CharmRelation>
1270 requires : typing.Mapping<~KT, +VT_co>[str, ~CharmRelation]<~CharmRelation>
1271 resources : typing.Mapping<~KT, +VT_co>[str, ~CharmResourceMeta]<~CharmResourceMeta>
1272 series : typing.Sequence<+T_co>[str]
1273 storage : typing.Mapping<~KT, +VT_co>[str, ~CharmStorage]<~CharmStorage>
1276 tags : typing.Sequence<+T_co>[str]
1277 terms : typing.Sequence<+T_co>[str]
1279 self
.categories
= categories
1280 self
.description
= description
1281 self
.extra_bindings
= extra_bindings
1282 self
.min_juju_version
= min_juju_version
1284 self
.payload_classes
= payload_classes
1286 self
.provides
= provides
1287 self
.requires
= requires
1288 self
.resources
= resources
1289 self
.series
= series
1290 self
.storage
= storage
1291 self
.subordinate
= subordinate
1292 self
.summary
= summary
1297 class CharmMetric(Type
):
1298 _toSchema
= {'description': 'description', 'type_': 'type'}
1299 _toPy
= {'description': 'description', 'type': 'type_'}
1300 def __init__(self
, description
=None, type_
=None):
1305 self
.description
= description
1309 class CharmMetrics(Type
):
1310 _toSchema
= {'metrics': 'metrics', 'plan': 'plan'}
1311 _toPy
= {'metrics': 'metrics', 'plan': 'plan'}
1312 def __init__(self
, metrics
=None, plan
=None):
1314 metrics : typing.Mapping<~KT, +VT_co>[str, ~CharmMetric]<~CharmMetric>
1317 self
.metrics
= metrics
1318 self
.plan
= CharmPlan
.from_json(plan
) if plan
else None
1321 class CharmOption(Type
):
1322 _toSchema
= {'default': 'default', 'description': 'description', 'type_': 'type'}
1323 _toPy
= {'default': 'default', 'description': 'description', 'type': 'type_'}
1324 def __init__(self
, default
=None, description
=None, type_
=None):
1326 default : typing.Mapping<~KT, +VT_co>[str, typing.Any]
1330 self
.default
= default
1331 self
.description
= description
1335 class CharmPayloadClass(Type
):
1336 _toSchema
= {'name': 'name', 'type_': 'type'}
1337 _toPy
= {'name': 'name', 'type': 'type_'}
1338 def __init__(self
, name
=None, type_
=None):
1347 class CharmPlan(Type
):
1348 _toSchema
= {'required': 'required'}
1349 _toPy
= {'required': 'required'}
1350 def __init__(self
, required
=None):
1354 self
.required
= required
1357 class CharmResourceMeta(Type
):
1358 _toSchema
= {'description': 'description', 'name': 'name', 'path': 'path', 'type_': 'type'}
1359 _toPy
= {'description': 'description', 'name': 'name', 'path': 'path', 'type': 'type_'}
1360 def __init__(self
, description
=None, name
=None, path
=None, type_
=None):
1367 self
.description
= description
1373 class CharmStorage(Type
):
1374 _toSchema
= {'count_max': 'count-max', 'count_min': 'count-min', 'description': 'description', 'location': 'location', 'minimum_size': 'minimum-size', 'name': 'name', 'properties': 'properties', 'read_only': 'read-only', 'shared': 'shared', 'type_': 'type'}
1375 _toPy
= {'count-max': 'count_max', 'count-min': 'count_min', 'description': 'description', 'location': 'location', 'minimum-size': 'minimum_size', 'name': 'name', 'properties': 'properties', 'read-only': 'read_only', 'shared': 'shared', 'type': 'type_'}
1376 def __init__(self
, count_max
=None, count_min
=None, description
=None, location
=None, minimum_size
=None, name
=None, properties
=None, read_only
=None, shared
=None, type_
=None):
1384 properties : typing.Sequence<+T_co>[str]
1389 self
.count_max
= count_max
1390 self
.count_min
= count_min
1391 self
.description
= description
1392 self
.location
= location
1393 self
.minimum_size
= minimum_size
1395 self
.properties
= properties
1396 self
.read_only
= read_only
1397 self
.shared
= shared
1401 class CharmURL(Type
):
1402 _toSchema
= {'url': 'url'}
1403 _toPy
= {'url': 'url'}
1404 def __init__(self
, url
=None):
1411 class CharmsList(Type
):
1412 _toSchema
= {'names': 'names'}
1413 _toPy
= {'names': 'names'}
1414 def __init__(self
, names
=None):
1416 names : typing.Sequence<+T_co>[str]
1421 class CharmsListResult(Type
):
1422 _toSchema
= {'charm_urls': 'charm-urls'}
1423 _toPy
= {'charm-urls': 'charm_urls'}
1424 def __init__(self
, charm_urls
=None):
1426 charm_urls : typing.Sequence<+T_co>[str]
1428 self
.charm_urls
= charm_urls
1431 class IsMeteredResult(Type
):
1432 _toSchema
= {'metered': 'metered'}
1433 _toPy
= {'metered': 'metered'}
1434 def __init__(self
, metered
=None):
1438 self
.metered
= metered
1441 class APIHostPortsResult(Type
):
1442 _toSchema
= {'servers': 'servers'}
1443 _toPy
= {'servers': 'servers'}
1444 def __init__(self
, servers
=None):
1446 servers : typing.Sequence<+T_co>[~HostPort]<~HostPort>
1448 self
.servers
= [HostPort
.from_json(o
) for o
in servers
or []]
1451 class AddCharm(Type
):
1452 _toSchema
= {'channel': 'channel', 'url': 'url'}
1453 _toPy
= {'channel': 'channel', 'url': 'url'}
1454 def __init__(self
, channel
=None, url
=None):
1459 self
.channel
= channel
1463 class AddCharmWithAuthorization(Type
):
1464 _toSchema
= {'channel': 'channel', 'macaroon': 'macaroon', 'url': 'url'}
1465 _toPy
= {'channel': 'channel', 'macaroon': 'macaroon', 'url': 'url'}
1466 def __init__(self
, channel
=None, macaroon
=None, url
=None):
1472 self
.channel
= channel
1473 self
.macaroon
= Macaroon
.from_json(macaroon
) if macaroon
else None
1477 class AddMachineParams(Type
):
1478 _toSchema
= {'addresses': 'addresses', 'constraints': 'constraints', 'container_type': 'container-type', 'disks': 'disks', 'hardware_characteristics': 'hardware-characteristics', 'instance_id': 'instance-id', 'jobs': 'jobs', 'nonce': 'nonce', 'parent_id': 'parent-id', 'placement': 'placement', 'series': 'series'}
1479 _toPy
= {'addresses': 'addresses', 'constraints': 'constraints', 'container-type': 'container_type', 'disks': 'disks', 'hardware-characteristics': 'hardware_characteristics', 'instance-id': 'instance_id', 'jobs': 'jobs', 'nonce': 'nonce', 'parent-id': 'parent_id', 'placement': 'placement', 'series': 'series'}
1480 def __init__(self
, addresses
=None, constraints
=None, container_type
=None, disks
=None, hardware_characteristics
=None, instance_id
=None, jobs
=None, nonce
=None, parent_id
=None, placement
=None, series
=None):
1482 addresses : typing.Sequence<+T_co>[~Address]<~Address>
1484 container_type : str
1485 disks : typing.Sequence<+T_co>[~Constraints]<~Constraints>
1486 hardware_characteristics : HardwareCharacteristics
1488 jobs : typing.Sequence<+T_co>[str]
1491 placement : Placement
1494 self
.addresses
= [Address
.from_json(o
) for o
in addresses
or []]
1495 self
.constraints
= Value
.from_json(constraints
) if constraints
else None
1496 self
.container_type
= container_type
1497 self
.disks
= [Constraints
.from_json(o
) for o
in disks
or []]
1498 self
.hardware_characteristics
= HardwareCharacteristics
.from_json(hardware_characteristics
) if hardware_characteristics
else None
1499 self
.instance_id
= instance_id
1502 self
.parent_id
= parent_id
1503 self
.placement
= Placement
.from_json(placement
) if placement
else None
1504 self
.series
= series
1507 class AddMachines(Type
):
1508 _toSchema
= {'params': 'params'}
1509 _toPy
= {'params': 'params'}
1510 def __init__(self
, params
=None):
1512 params : typing.Sequence<+T_co>[~AddMachineParams]<~AddMachineParams>
1514 self
.params
= [AddMachineParams
.from_json(o
) for o
in params
or []]
1517 class AddMachinesResult(Type
):
1518 _toSchema
= {'error': 'error', 'machine': 'machine'}
1519 _toPy
= {'error': 'error', 'machine': 'machine'}
1520 def __init__(self
, error
=None, machine
=None):
1525 self
.error
= Error
.from_json(error
) if error
else None
1526 self
.machine
= machine
1529 class AddMachinesResults(Type
):
1530 _toSchema
= {'machines': 'machines'}
1531 _toPy
= {'machines': 'machines'}
1532 def __init__(self
, machines
=None):
1534 machines : typing.Sequence<+T_co>[~AddMachinesResult]<~AddMachinesResult>
1536 self
.machines
= [AddMachinesResult
.from_json(o
) for o
in machines
or []]
1539 class Address(Type
):
1540 _toSchema
= {'scope': 'scope', 'space_name': 'space-name', 'type_': 'type', 'value': 'value'}
1541 _toPy
= {'scope': 'scope', 'space-name': 'space_name', 'type': 'type_', 'value': 'value'}
1542 def __init__(self
, scope
=None, space_name
=None, type_
=None, value
=None):
1550 self
.space_name
= space_name
1555 class AgentVersionResult(Type
):
1556 _toSchema
= {'version': 'version'}
1557 _toPy
= {'version': 'version'}
1558 def __init__(self
, version
=None):
1562 self
.version
= Number
.from_json(version
) if version
else None
1565 class AllWatcherId(Type
):
1566 _toSchema
= {'watcher_id': 'watcher-id'}
1567 _toPy
= {'watcher-id': 'watcher_id'}
1568 def __init__(self
, watcher_id
=None):
1572 self
.watcher_id
= watcher_id
1575 class ApplicationStatus(Type
):
1576 _toSchema
= {'can_upgrade_to': 'can-upgrade-to', 'charm': 'charm', 'err': 'err', 'exposed': 'exposed', 'life': 'life', 'meter_statuses': 'meter-statuses', 'relations': 'relations', 'series': 'series', 'status': 'status', 'subordinate_to': 'subordinate-to', 'units': 'units', 'workload_version': 'workload-version'}
1577 _toPy
= {'can-upgrade-to': 'can_upgrade_to', 'charm': 'charm', 'err': 'err', 'exposed': 'exposed', 'life': 'life', 'meter-statuses': 'meter_statuses', 'relations': 'relations', 'series': 'series', 'status': 'status', 'subordinate-to': 'subordinate_to', 'units': 'units', 'workload-version': 'workload_version'}
1578 def __init__(self
, can_upgrade_to
=None, charm
=None, err
=None, exposed
=None, life
=None, meter_statuses
=None, relations
=None, series
=None, status
=None, subordinate_to
=None, units
=None, workload_version
=None):
1580 can_upgrade_to : str
1582 err : typing.Mapping<~KT, +VT_co>[str, typing.Any]
1585 meter_statuses : typing.Mapping<~KT, +VT_co>[str, ~MeterStatus]<~MeterStatus>
1586 relations : typing.Sequence<+T_co>[str]
1588 status : DetailedStatus
1589 subordinate_to : typing.Sequence<+T_co>[str]
1590 units : typing.Mapping<~KT, +VT_co>[str, ~UnitStatus]<~UnitStatus>
1591 workload_version : str
1593 self
.can_upgrade_to
= can_upgrade_to
1596 self
.exposed
= exposed
1598 self
.meter_statuses
= meter_statuses
1599 self
.relations
= relations
1600 self
.series
= series
1601 self
.status
= DetailedStatus
.from_json(status
) if status
else None
1602 self
.subordinate_to
= subordinate_to
1604 self
.workload_version
= workload_version
1608 _toSchema
= {'arch': 'Arch', 'number': 'Number', 'series': 'Series'}
1609 _toPy
= {'Arch': 'arch', 'Number': 'number', 'Series': 'series'}
1610 def __init__(self
, arch
=None, number
=None, series
=None):
1617 self
.number
= Number
.from_json(number
) if number
else None
1618 self
.series
= series
1621 class ConfigValue(Type
):
1622 _toSchema
= {'source': 'source', 'value': 'value'}
1623 _toPy
= {'source': 'source', 'value': 'value'}
1624 def __init__(self
, source
=None, value
=None):
1627 value : typing.Mapping<~KT, +VT_co>[str, typing.Any]
1629 self
.source
= source
1633 class DestroyMachines(Type
):
1634 _toSchema
= {'force': 'force', 'machine_names': 'machine-names'}
1635 _toPy
= {'force': 'force', 'machine-names': 'machine_names'}
1636 def __init__(self
, force
=None, machine_names
=None):
1639 machine_names : typing.Sequence<+T_co>[str]
1642 self
.machine_names
= machine_names
1645 class DetailedStatus(Type
):
1646 _toSchema
= {'data': 'data', 'err': 'err', 'info': 'info', 'kind': 'kind', 'life': 'life', 'since': 'since', 'status': 'status', 'version': 'version'}
1647 _toPy
= {'data': 'data', 'err': 'err', 'info': 'info', 'kind': 'kind', 'life': 'life', 'since': 'since', 'status': 'status', 'version': 'version'}
1648 def __init__(self
, data
=None, err
=None, info
=None, kind
=None, life
=None, since
=None, status
=None, version
=None):
1650 data : typing.Mapping<~KT, +VT_co>[str, typing.Any]
1651 err : typing.Mapping<~KT, +VT_co>[str, typing.Any]
1665 self
.status
= status
1666 self
.version
= version
1669 class EndpointStatus(Type
):
1670 _toSchema
= {'application': 'application', 'name': 'name', 'role': 'role', 'subordinate': 'subordinate'}
1671 _toPy
= {'application': 'application', 'name': 'name', 'role': 'role', 'subordinate': 'subordinate'}
1672 def __init__(self
, application
=None, name
=None, role
=None, subordinate
=None):
1679 self
.application
= application
1682 self
.subordinate
= subordinate
1685 class EntityStatus(Type
):
1686 _toSchema
= {'data': 'data', 'info': 'info', 'since': 'since', 'status': 'status'}
1687 _toPy
= {'data': 'data', 'info': 'info', 'since': 'since', 'status': 'status'}
1688 def __init__(self
, data
=None, info
=None, since
=None, status
=None):
1690 data : typing.Mapping<~KT, +VT_co>[str, typing.Any]
1698 self
.status
= status
1701 class FindToolsParams(Type
):
1702 _toSchema
= {'arch': 'arch', 'major': 'major', 'minor': 'minor', 'number': 'number', 'series': 'series'}
1703 _toPy
= {'arch': 'arch', 'major': 'major', 'minor': 'minor', 'number': 'number', 'series': 'series'}
1704 def __init__(self
, arch
=None, major
=None, minor
=None, number
=None, series
=None):
1715 self
.number
= Number
.from_json(number
) if number
else None
1716 self
.series
= series
1719 class FindToolsResult(Type
):
1720 _toSchema
= {'error': 'error', 'list_': 'list'}
1721 _toPy
= {'error': 'error', 'list': 'list_'}
1722 def __init__(self
, error
=None, list_
=None):
1725 list_ : typing.Sequence<+T_co>[~Tools]<~Tools>
1727 self
.error
= Error
.from_json(error
) if error
else None
1728 self
.list_
= [Tools
.from_json(o
) for o
in list_
or []]
1731 class FullStatus(Type
):
1732 _toSchema
= {'applications': 'applications', 'machines': 'machines', 'model': 'model', 'relations': 'relations', 'remote_applications': 'remote-applications'}
1733 _toPy
= {'applications': 'applications', 'machines': 'machines', 'model': 'model', 'relations': 'relations', 'remote-applications': 'remote_applications'}
1734 def __init__(self
, applications
=None, machines
=None, model
=None, relations
=None, remote_applications
=None):
1736 applications : typing.Mapping<~KT, +VT_co>[str, ~ApplicationStatus]<~ApplicationStatus>
1737 machines : typing.Mapping<~KT, +VT_co>[str, ~MachineStatus]<~MachineStatus>
1738 model : ModelStatusInfo
1739 relations : typing.Sequence<+T_co>[~RelationStatus]<~RelationStatus>
1740 remote_applications : typing.Mapping<~KT, +VT_co>[str, ~RemoteApplicationStatus]<~RemoteApplicationStatus>
1742 self
.applications
= applications
1743 self
.machines
= machines
1744 self
.model
= ModelStatusInfo
.from_json(model
) if model
else None
1745 self
.relations
= [RelationStatus
.from_json(o
) for o
in relations
or []]
1746 self
.remote_applications
= remote_applications
1749 class HardwareCharacteristics(Type
):
1750 _toSchema
= {'arch': 'arch', 'availability_zone': 'availability-zone', 'cpu_cores': 'cpu-cores', 'cpu_power': 'cpu-power', 'mem': 'mem', 'root_disk': 'root-disk', 'tags': 'tags'}
1751 _toPy
= {'arch': 'arch', 'availability-zone': 'availability_zone', 'cpu-cores': 'cpu_cores', 'cpu-power': 'cpu_power', 'mem': 'mem', 'root-disk': 'root_disk', 'tags': 'tags'}
1752 def __init__(self
, arch
=None, availability_zone
=None, cpu_cores
=None, cpu_power
=None, mem
=None, root_disk
=None, tags
=None):
1755 availability_zone : str
1760 tags : typing.Sequence<+T_co>[str]
1763 self
.availability_zone
= availability_zone
1764 self
.cpu_cores
= cpu_cores
1765 self
.cpu_power
= cpu_power
1767 self
.root_disk
= root_disk
1771 class History(Type
):
1772 _toSchema
= {'error': 'error', 'statuses': 'statuses'}
1773 _toPy
= {'error': 'error', 'statuses': 'statuses'}
1774 def __init__(self
, error
=None, statuses
=None):
1777 statuses : typing.Sequence<+T_co>[~DetailedStatus]<~DetailedStatus>
1779 self
.error
= Error
.from_json(error
) if error
else None
1780 self
.statuses
= [DetailedStatus
.from_json(o
) for o
in statuses
or []]
1783 class HostPort(Type
):
1784 _toSchema
= {'address': 'Address', 'port': 'port'}
1785 _toPy
= {'Address': 'address', 'port': 'port'}
1786 def __init__(self
, address
=None, port
=None):
1791 self
.address
= Address
.from_json(address
) if address
else None
1795 class MachineHardware(Type
):
1796 _toSchema
= {'arch': 'arch', 'availability_zone': 'availability-zone', 'cores': 'cores', 'cpu_power': 'cpu-power', 'mem': 'mem', 'root_disk': 'root-disk', 'tags': 'tags'}
1797 _toPy
= {'arch': 'arch', 'availability-zone': 'availability_zone', 'cores': 'cores', 'cpu-power': 'cpu_power', 'mem': 'mem', 'root-disk': 'root_disk', 'tags': 'tags'}
1798 def __init__(self
, arch
=None, availability_zone
=None, cores
=None, cpu_power
=None, mem
=None, root_disk
=None, tags
=None):
1801 availability_zone : str
1806 tags : typing.Sequence<+T_co>[str]
1809 self
.availability_zone
= availability_zone
1811 self
.cpu_power
= cpu_power
1813 self
.root_disk
= root_disk
1817 class MachineStatus(Type
):
1818 _toSchema
= {'agent_status': 'agent-status', 'containers': 'containers', 'dns_name': 'dns-name', 'hardware': 'hardware', 'has_vote': 'has-vote', 'id_': 'id', 'instance_id': 'instance-id', 'instance_status': 'instance-status', 'ip_addresses': 'ip-addresses', 'jobs': 'jobs', 'series': 'series', 'wants_vote': 'wants-vote'}
1819 _toPy
= {'agent-status': 'agent_status', 'containers': 'containers', 'dns-name': 'dns_name', 'hardware': 'hardware', 'has-vote': 'has_vote', 'id': 'id_', 'instance-id': 'instance_id', 'instance-status': 'instance_status', 'ip-addresses': 'ip_addresses', 'jobs': 'jobs', 'series': 'series', 'wants-vote': 'wants_vote'}
1820 def __init__(self
, agent_status
=None, containers
=None, dns_name
=None, hardware
=None, has_vote
=None, id_
=None, instance_id
=None, instance_status
=None, ip_addresses
=None, jobs
=None, series
=None, wants_vote
=None):
1822 agent_status : DetailedStatus
1823 containers : typing.Mapping<~KT, +VT_co>[str, ~MachineStatus]<~MachineStatus>
1829 instance_status : DetailedStatus
1830 ip_addresses : typing.Sequence<+T_co>[str]
1831 jobs : typing.Sequence<+T_co>[str]
1835 self
.agent_status
= DetailedStatus
.from_json(agent_status
) if agent_status
else None
1836 self
.containers
= containers
1837 self
.dns_name
= dns_name
1838 self
.hardware
= hardware
1839 self
.has_vote
= has_vote
1841 self
.instance_id
= instance_id
1842 self
.instance_status
= DetailedStatus
.from_json(instance_status
) if instance_status
else None
1843 self
.ip_addresses
= ip_addresses
1845 self
.series
= series
1846 self
.wants_vote
= wants_vote
1849 class MeterStatus(Type
):
1850 _toSchema
= {'color': 'color', 'message': 'message'}
1851 _toPy
= {'color': 'color', 'message': 'message'}
1852 def __init__(self
, color
=None, message
=None):
1858 self
.message
= message
1861 class ModelConfigResults(Type
):
1862 _toSchema
= {'config': 'config'}
1863 _toPy
= {'config': 'config'}
1864 def __init__(self
, config
=None):
1866 config : typing.Mapping<~KT, +VT_co>[str, ~ConfigValue]<~ConfigValue>
1868 self
.config
= config
1871 class ModelInfo(Type
):
1872 _toSchema
= {'cloud_credential_tag': 'cloud-credential-tag', 'cloud_region': 'cloud-region', 'cloud_tag': 'cloud-tag', 'controller_uuid': 'controller-uuid', 'default_series': 'default-series', 'life': 'life', 'machines': 'machines', 'name': 'name', 'owner_tag': 'owner-tag', 'provider_type': 'provider-type', 'status': 'status', 'users': 'users', 'uuid': 'uuid'}
1873 _toPy
= {'cloud-credential-tag': 'cloud_credential_tag', 'cloud-region': 'cloud_region', 'cloud-tag': 'cloud_tag', 'controller-uuid': 'controller_uuid', 'default-series': 'default_series', 'life': 'life', 'machines': 'machines', 'name': 'name', 'owner-tag': 'owner_tag', 'provider-type': 'provider_type', 'status': 'status', 'users': 'users', 'uuid': 'uuid'}
1874 def __init__(self
, cloud_credential_tag
=None, cloud_region
=None, cloud_tag
=None, controller_uuid
=None, default_series
=None, life
=None, machines
=None, name
=None, owner_tag
=None, provider_type
=None, status
=None, users
=None, uuid
=None):
1876 cloud_credential_tag : str
1879 controller_uuid : str
1880 default_series : str
1882 machines : typing.Sequence<+T_co>[~ModelMachineInfo]<~ModelMachineInfo>
1886 status : EntityStatus
1887 users : typing.Sequence<+T_co>[~ModelUserInfo]<~ModelUserInfo>
1890 self
.cloud_credential_tag
= cloud_credential_tag
1891 self
.cloud_region
= cloud_region
1892 self
.cloud_tag
= cloud_tag
1893 self
.controller_uuid
= controller_uuid
1894 self
.default_series
= default_series
1896 self
.machines
= [ModelMachineInfo
.from_json(o
) for o
in machines
or []]
1898 self
.owner_tag
= owner_tag
1899 self
.provider_type
= provider_type
1900 self
.status
= EntityStatus
.from_json(status
) if status
else None
1901 self
.users
= [ModelUserInfo
.from_json(o
) for o
in users
or []]
1905 class ModelMachineInfo(Type
):
1906 _toSchema
= {'hardware': 'hardware', 'has_vote': 'has-vote', 'id_': 'id', 'instance_id': 'instance-id', 'status': 'status', 'wants_vote': 'wants-vote'}
1907 _toPy
= {'hardware': 'hardware', 'has-vote': 'has_vote', 'id': 'id_', 'instance-id': 'instance_id', 'status': 'status', 'wants-vote': 'wants_vote'}
1908 def __init__(self
, hardware
=None, has_vote
=None, id_
=None, instance_id
=None, status
=None, wants_vote
=None):
1910 hardware : MachineHardware
1917 self
.hardware
= MachineHardware
.from_json(hardware
) if hardware
else None
1918 self
.has_vote
= has_vote
1920 self
.instance_id
= instance_id
1921 self
.status
= status
1922 self
.wants_vote
= wants_vote
1925 class ModelSet(Type
):
1926 _toSchema
= {'config': 'config'}
1927 _toPy
= {'config': 'config'}
1928 def __init__(self
, config
=None):
1930 config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
1932 self
.config
= config
1935 class ModelStatusInfo(Type
):
1936 _toSchema
= {'available_version': 'available-version', 'cloud_tag': 'cloud-tag', 'migration': 'migration', 'name': 'name', 'region': 'region', 'version': 'version'}
1937 _toPy
= {'available-version': 'available_version', 'cloud-tag': 'cloud_tag', 'migration': 'migration', 'name': 'name', 'region': 'region', 'version': 'version'}
1938 def __init__(self
, available_version
=None, cloud_tag
=None, migration
=None, name
=None, region
=None, version
=None):
1940 available_version : str
1947 self
.available_version
= available_version
1948 self
.cloud_tag
= cloud_tag
1949 self
.migration
= migration
1951 self
.region
= region
1952 self
.version
= version
1955 class ModelUnset(Type
):
1956 _toSchema
= {'keys': 'keys'}
1957 _toPy
= {'keys': 'keys'}
1958 def __init__(self
, keys
=None):
1960 keys : typing.Sequence<+T_co>[str]
1965 class ModelUserInfo(Type
):
1966 _toSchema
= {'access': 'access', 'display_name': 'display-name', 'last_connection': 'last-connection', 'user': 'user'}
1967 _toPy
= {'access': 'access', 'display-name': 'display_name', 'last-connection': 'last_connection', 'user': 'user'}
1968 def __init__(self
, access
=None, display_name
=None, last_connection
=None, user
=None):
1972 last_connection : str
1975 self
.access
= access
1976 self
.display_name
= display_name
1977 self
.last_connection
= last_connection
1981 class ModelUserInfoResult(Type
):
1982 _toSchema
= {'error': 'error', 'result': 'result'}
1983 _toPy
= {'error': 'error', 'result': 'result'}
1984 def __init__(self
, error
=None, result
=None):
1987 result : ModelUserInfo
1989 self
.error
= Error
.from_json(error
) if error
else None
1990 self
.result
= ModelUserInfo
.from_json(result
) if result
else None
1993 class ModelUserInfoResults(Type
):
1994 _toSchema
= {'results': 'results'}
1995 _toPy
= {'results': 'results'}
1996 def __init__(self
, results
=None):
1998 results : typing.Sequence<+T_co>[~ModelUserInfoResult]<~ModelUserInfoResult>
2000 self
.results
= [ModelUserInfoResult
.from_json(o
) for o
in results
or []]
2003 class PrivateAddress(Type
):
2004 _toSchema
= {'target': 'target'}
2005 _toPy
= {'target': 'target'}
2006 def __init__(self
, target
=None):
2010 self
.target
= target
2013 class PrivateAddressResults(Type
):
2014 _toSchema
= {'private_address': 'private-address'}
2015 _toPy
= {'private-address': 'private_address'}
2016 def __init__(self
, private_address
=None):
2018 private_address : str
2020 self
.private_address
= private_address
2023 class ProvisioningScriptParams(Type
):
2024 _toSchema
= {'data_dir': 'data-dir', 'disable_package_commands': 'disable-package-commands', 'machine_id': 'machine-id', 'nonce': 'nonce'}
2025 _toPy
= {'data-dir': 'data_dir', 'disable-package-commands': 'disable_package_commands', 'machine-id': 'machine_id', 'nonce': 'nonce'}
2026 def __init__(self
, data_dir
=None, disable_package_commands
=None, machine_id
=None, nonce
=None):
2029 disable_package_commands : bool
2033 self
.data_dir
= data_dir
2034 self
.disable_package_commands
= disable_package_commands
2035 self
.machine_id
= machine_id
2039 class ProvisioningScriptResult(Type
):
2040 _toSchema
= {'script': 'script'}
2041 _toPy
= {'script': 'script'}
2042 def __init__(self
, script
=None):
2046 self
.script
= script
2049 class PublicAddress(Type
):
2050 _toSchema
= {'target': 'target'}
2051 _toPy
= {'target': 'target'}
2052 def __init__(self
, target
=None):
2056 self
.target
= target
2059 class PublicAddressResults(Type
):
2060 _toSchema
= {'public_address': 'public-address'}
2061 _toPy
= {'public-address': 'public_address'}
2062 def __init__(self
, public_address
=None):
2064 public_address : str
2066 self
.public_address
= public_address
2069 class RelationStatus(Type
):
2070 _toSchema
= {'endpoints': 'endpoints', 'id_': 'id', 'interface': 'interface', 'key': 'key', 'scope': 'scope'}
2071 _toPy
= {'endpoints': 'endpoints', 'id': 'id_', 'interface': 'interface', 'key': 'key', 'scope': 'scope'}
2072 def __init__(self
, endpoints
=None, id_
=None, interface
=None, key
=None, scope
=None):
2074 endpoints : typing.Sequence<+T_co>[~EndpointStatus]<~EndpointStatus>
2080 self
.endpoints
= [EndpointStatus
.from_json(o
) for o
in endpoints
or []]
2082 self
.interface
= interface
2087 class RemoteApplicationStatus(Type
):
2088 _toSchema
= {'application_name': 'application-name', 'application_url': 'application-url', 'endpoints': 'endpoints', 'err': 'err', 'life': 'life', 'relations': 'relations', 'status': 'status'}
2089 _toPy
= {'application-name': 'application_name', 'application-url': 'application_url', 'endpoints': 'endpoints', 'err': 'err', 'life': 'life', 'relations': 'relations', 'status': 'status'}
2090 def __init__(self
, application_name
=None, application_url
=None, endpoints
=None, err
=None, life
=None, relations
=None, status
=None):
2092 application_name : str
2093 application_url : str
2094 endpoints : typing.Sequence<+T_co>[~RemoteEndpoint]<~RemoteEndpoint>
2095 err : typing.Mapping<~KT, +VT_co>[str, typing.Any]
2097 relations : typing.Sequence<+T_co>[str]
2098 status : DetailedStatus
2100 self
.application_name
= application_name
2101 self
.application_url
= application_url
2102 self
.endpoints
= [RemoteEndpoint
.from_json(o
) for o
in endpoints
or []]
2105 self
.relations
= relations
2106 self
.status
= DetailedStatus
.from_json(status
) if status
else None
2109 class RemoteEndpoint(Type
):
2110 _toSchema
= {'interface': 'interface', 'limit': 'limit', 'name': 'name', 'role': 'role', 'scope': 'scope'}
2111 _toPy
= {'interface': 'interface', 'limit': 'limit', 'name': 'name', 'role': 'role', 'scope': 'scope'}
2112 def __init__(self
, interface
=None, limit
=None, name
=None, role
=None, scope
=None):
2120 self
.interface
= interface
2127 class ResolveCharmResult(Type
):
2128 _toSchema
= {'error': 'error', 'url': 'url'}
2129 _toPy
= {'error': 'error', 'url': 'url'}
2130 def __init__(self
, error
=None, url
=None):
2139 class ResolveCharmResults(Type
):
2140 _toSchema
= {'urls': 'urls'}
2141 _toPy
= {'urls': 'urls'}
2142 def __init__(self
, urls
=None):
2144 urls : typing.Sequence<+T_co>[~ResolveCharmResult]<~ResolveCharmResult>
2146 self
.urls
= [ResolveCharmResult
.from_json(o
) for o
in urls
or []]
2149 class ResolveCharms(Type
):
2150 _toSchema
= {'references': 'references'}
2151 _toPy
= {'references': 'references'}
2152 def __init__(self
, references
=None):
2154 references : typing.Sequence<+T_co>[str]
2156 self
.references
= references
2159 class Resolved(Type
):
2160 _toSchema
= {'retry': 'retry', 'unit_name': 'unit-name'}
2161 _toPy
= {'retry': 'retry', 'unit-name': 'unit_name'}
2162 def __init__(self
, retry
=None, unit_name
=None):
2168 self
.unit_name
= unit_name
2171 class SetModelAgentVersion(Type
):
2172 _toSchema
= {'version': 'version'}
2173 _toPy
= {'version': 'version'}
2174 def __init__(self
, version
=None):
2178 self
.version
= Number
.from_json(version
) if version
else None
2181 class StatusHistoryFilter(Type
):
2182 _toSchema
= {'date': 'date', 'delta': 'delta', 'size': 'size'}
2183 _toPy
= {'date': 'date', 'delta': 'delta', 'size': 'size'}
2184 def __init__(self
, date
=None, delta
=None, size
=None):
2195 class StatusHistoryRequest(Type
):
2196 _toSchema
= {'filter_': 'filter', 'historykind': 'historyKind', 'size': 'size', 'tag': 'tag'}
2197 _toPy
= {'filter': 'filter_', 'historyKind': 'historykind', 'size': 'size', 'tag': 'tag'}
2198 def __init__(self
, filter_
=None, historykind
=None, size
=None, tag
=None):
2200 filter_ : StatusHistoryFilter
2205 self
.filter_
= StatusHistoryFilter
.from_json(filter_
) if filter_
else None
2206 self
.historykind
= historykind
2211 class StatusHistoryRequests(Type
):
2212 _toSchema
= {'requests': 'requests'}
2213 _toPy
= {'requests': 'requests'}
2214 def __init__(self
, requests
=None):
2216 requests : typing.Sequence<+T_co>[~StatusHistoryRequest]<~StatusHistoryRequest>
2218 self
.requests
= [StatusHistoryRequest
.from_json(o
) for o
in requests
or []]
2221 class StatusHistoryResult(Type
):
2222 _toSchema
= {'error': 'error', 'history': 'history'}
2223 _toPy
= {'error': 'error', 'history': 'history'}
2224 def __init__(self
, error
=None, history
=None):
2229 self
.error
= Error
.from_json(error
) if error
else None
2230 self
.history
= History
.from_json(history
) if history
else None
2233 class StatusHistoryResults(Type
):
2234 _toSchema
= {'results': 'results'}
2235 _toPy
= {'results': 'results'}
2236 def __init__(self
, results
=None):
2238 results : typing.Sequence<+T_co>[~StatusHistoryResult]<~StatusHistoryResult>
2240 self
.results
= [StatusHistoryResult
.from_json(o
) for o
in results
or []]
2243 class StatusParams(Type
):
2244 _toSchema
= {'patterns': 'patterns'}
2245 _toPy
= {'patterns': 'patterns'}
2246 def __init__(self
, patterns
=None):
2248 patterns : typing.Sequence<+T_co>[str]
2250 self
.patterns
= patterns
2254 _toSchema
= {'sha256': 'sha256', 'size': 'size', 'url': 'url', 'version': 'version'}
2255 _toPy
= {'sha256': 'sha256', 'size': 'size', 'url': 'url', 'version': 'version'}
2256 def __init__(self
, sha256
=None, size
=None, url
=None, version
=None):
2263 self
.sha256
= sha256
2266 self
.version
= Binary
.from_json(version
) if version
else None
2269 class UnitStatus(Type
):
2270 _toSchema
= {'agent_status': 'agent-status', 'charm': 'charm', 'leader': 'leader', 'machine': 'machine', 'opened_ports': 'opened-ports', 'public_address': 'public-address', 'subordinates': 'subordinates', 'workload_status': 'workload-status', 'workload_version': 'workload-version'}
2271 _toPy
= {'agent-status': 'agent_status', 'charm': 'charm', 'leader': 'leader', 'machine': 'machine', 'opened-ports': 'opened_ports', 'public-address': 'public_address', 'subordinates': 'subordinates', 'workload-status': 'workload_status', 'workload-version': 'workload_version'}
2272 def __init__(self
, agent_status
=None, charm
=None, leader
=None, machine
=None, opened_ports
=None, public_address
=None, subordinates
=None, workload_status
=None, workload_version
=None):
2274 agent_status : DetailedStatus
2278 opened_ports : typing.Sequence<+T_co>[str]
2279 public_address : str
2280 subordinates : typing.Mapping<~KT, +VT_co>[str, ~UnitStatus]<~UnitStatus>
2281 workload_status : DetailedStatus
2282 workload_version : str
2284 self
.agent_status
= DetailedStatus
.from_json(agent_status
) if agent_status
else None
2286 self
.leader
= leader
2287 self
.machine
= machine
2288 self
.opened_ports
= opened_ports
2289 self
.public_address
= public_address
2290 self
.subordinates
= subordinates
2291 self
.workload_status
= DetailedStatus
.from_json(workload_status
) if workload_status
else None
2292 self
.workload_version
= workload_version
2296 _toSchema
= {'auth_types': 'auth-types', 'endpoint': 'endpoint', 'identity_endpoint': 'identity-endpoint', 'regions': 'regions', 'storage_endpoint': 'storage-endpoint', 'type_': 'type'}
2297 _toPy
= {'auth-types': 'auth_types', 'endpoint': 'endpoint', 'identity-endpoint': 'identity_endpoint', 'regions': 'regions', 'storage-endpoint': 'storage_endpoint', 'type': 'type_'}
2298 def __init__(self
, auth_types
=None, endpoint
=None, identity_endpoint
=None, regions
=None, storage_endpoint
=None, type_
=None):
2300 auth_types : typing.Sequence<+T_co>[str]
2302 identity_endpoint : str
2303 regions : typing.Sequence<+T_co>[~CloudRegion]<~CloudRegion>
2304 storage_endpoint : str
2307 self
.auth_types
= auth_types
2308 self
.endpoint
= endpoint
2309 self
.identity_endpoint
= identity_endpoint
2310 self
.regions
= [CloudRegion
.from_json(o
) for o
in regions
or []]
2311 self
.storage_endpoint
= storage_endpoint
2315 class CloudCredentialResult(Type
):
2316 _toSchema
= {'error': 'error', 'result': 'result'}
2317 _toPy
= {'error': 'error', 'result': 'result'}
2318 def __init__(self
, error
=None, result
=None):
2321 result : CloudCredential
2323 self
.error
= Error
.from_json(error
) if error
else None
2324 self
.result
= CloudCredential
.from_json(result
) if result
else None
2327 class CloudCredentialResults(Type
):
2328 _toSchema
= {'results': 'results'}
2329 _toPy
= {'results': 'results'}
2330 def __init__(self
, results
=None):
2332 results : typing.Sequence<+T_co>[~CloudCredentialResult]<~CloudCredentialResult>
2334 self
.results
= [CloudCredentialResult
.from_json(o
) for o
in results
or []]
2337 class CloudRegion(Type
):
2338 _toSchema
= {'endpoint': 'endpoint', 'identity_endpoint': 'identity-endpoint', 'name': 'name', 'storage_endpoint': 'storage-endpoint'}
2339 _toPy
= {'endpoint': 'endpoint', 'identity-endpoint': 'identity_endpoint', 'name': 'name', 'storage-endpoint': 'storage_endpoint'}
2340 def __init__(self
, endpoint
=None, identity_endpoint
=None, name
=None, storage_endpoint
=None):
2343 identity_endpoint : str
2345 storage_endpoint : str
2347 self
.endpoint
= endpoint
2348 self
.identity_endpoint
= identity_endpoint
2350 self
.storage_endpoint
= storage_endpoint
2353 class CloudResult(Type
):
2354 _toSchema
= {'cloud': 'cloud', 'error': 'error'}
2355 _toPy
= {'cloud': 'cloud', 'error': 'error'}
2356 def __init__(self
, cloud
=None, error
=None):
2361 self
.cloud
= Cloud
.from_json(cloud
) if cloud
else None
2362 self
.error
= Error
.from_json(error
) if error
else None
2365 class CloudResults(Type
):
2366 _toSchema
= {'results': 'results'}
2367 _toPy
= {'results': 'results'}
2368 def __init__(self
, results
=None):
2370 results : typing.Sequence<+T_co>[~CloudResult]<~CloudResult>
2372 self
.results
= [CloudResult
.from_json(o
) for o
in results
or []]
2375 class CloudsResult(Type
):
2376 _toSchema
= {'clouds': 'clouds'}
2377 _toPy
= {'clouds': 'clouds'}
2378 def __init__(self
, clouds
=None):
2380 clouds : typing.Mapping<~KT, +VT_co>[str, ~Cloud]<~Cloud>
2382 self
.clouds
= clouds
2385 class StringsResult(Type
):
2386 _toSchema
= {'error': 'error', 'result': 'result'}
2387 _toPy
= {'error': 'error', 'result': 'result'}
2388 def __init__(self
, error
=None, result
=None):
2391 result : typing.Sequence<+T_co>[str]
2393 self
.error
= Error
.from_json(error
) if error
else None
2394 self
.result
= result
2397 class StringsResults(Type
):
2398 _toSchema
= {'results': 'results'}
2399 _toPy
= {'results': 'results'}
2400 def __init__(self
, results
=None):
2402 results : typing.Sequence<+T_co>[~StringsResult]<~StringsResult>
2404 self
.results
= [StringsResult
.from_json(o
) for o
in results
or []]
2407 class UpdateCloudCredential(Type
):
2408 _toSchema
= {'credential': 'credential', 'tag': 'tag'}
2409 _toPy
= {'credential': 'credential', 'tag': 'tag'}
2410 def __init__(self
, credential
=None, tag
=None):
2412 credential : CloudCredential
2415 self
.credential
= CloudCredential
.from_json(credential
) if credential
else None
2419 class UpdateCloudCredentials(Type
):
2420 _toSchema
= {'credentials': 'credentials'}
2421 _toPy
= {'credentials': 'credentials'}
2422 def __init__(self
, credentials
=None):
2424 credentials : typing.Sequence<+T_co>[~UpdateCloudCredential]<~UpdateCloudCredential>
2426 self
.credentials
= [UpdateCloudCredential
.from_json(o
) for o
in credentials
or []]
2429 class UserCloud(Type
):
2430 _toSchema
= {'cloud_tag': 'cloud-tag', 'user_tag': 'user-tag'}
2431 _toPy
= {'cloud-tag': 'cloud_tag', 'user-tag': 'user_tag'}
2432 def __init__(self
, cloud_tag
=None, user_tag
=None):
2437 self
.cloud_tag
= cloud_tag
2438 self
.user_tag
= user_tag
2441 class UserClouds(Type
):
2442 _toSchema
= {'user_clouds': 'user-clouds'}
2443 _toPy
= {'user-clouds': 'user_clouds'}
2444 def __init__(self
, user_clouds
=None):
2446 user_clouds : typing.Sequence<+T_co>[~UserCloud]<~UserCloud>
2448 self
.user_clouds
= [UserCloud
.from_json(o
) for o
in user_clouds
or []]
2451 class DestroyControllerArgs(Type
):
2452 _toSchema
= {'destroy_models': 'destroy-models'}
2453 _toPy
= {'destroy-models': 'destroy_models'}
2454 def __init__(self
, destroy_models
=None):
2456 destroy_models : bool
2458 self
.destroy_models
= destroy_models
2461 class HostedModelConfig(Type
):
2462 _toSchema
= {'cloud_spec': 'cloud-spec', 'config': 'config', 'error': 'error', 'name': 'name', 'owner': 'owner'}
2463 _toPy
= {'cloud-spec': 'cloud_spec', 'config': 'config', 'error': 'error', 'name': 'name', 'owner': 'owner'}
2464 def __init__(self
, cloud_spec
=None, config
=None, error
=None, name
=None, owner
=None):
2466 cloud_spec : CloudSpec
2467 config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
2472 self
.cloud_spec
= CloudSpec
.from_json(cloud_spec
) if cloud_spec
else None
2473 self
.config
= config
2474 self
.error
= Error
.from_json(error
) if error
else None
2479 class HostedModelConfigsResults(Type
):
2480 _toSchema
= {'models': 'models'}
2481 _toPy
= {'models': 'models'}
2482 def __init__(self
, models
=None):
2484 models : typing.Sequence<+T_co>[~HostedModelConfig]<~HostedModelConfig>
2486 self
.models
= [HostedModelConfig
.from_json(o
) for o
in models
or []]
2489 class InitiateMigrationArgs(Type
):
2490 _toSchema
= {'specs': 'specs'}
2491 _toPy
= {'specs': 'specs'}
2492 def __init__(self
, specs
=None):
2494 specs : typing.Sequence<+T_co>[~MigrationSpec]<~MigrationSpec>
2496 self
.specs
= [MigrationSpec
.from_json(o
) for o
in specs
or []]
2499 class InitiateMigrationResult(Type
):
2500 _toSchema
= {'error': 'error', 'migration_id': 'migration-id', 'model_tag': 'model-tag'}
2501 _toPy
= {'error': 'error', 'migration-id': 'migration_id', 'model-tag': 'model_tag'}
2502 def __init__(self
, error
=None, migration_id
=None, model_tag
=None):
2508 self
.error
= Error
.from_json(error
) if error
else None
2509 self
.migration_id
= migration_id
2510 self
.model_tag
= model_tag
2513 class InitiateMigrationResults(Type
):
2514 _toSchema
= {'results': 'results'}
2515 _toPy
= {'results': 'results'}
2516 def __init__(self
, results
=None):
2518 results : typing.Sequence<+T_co>[~InitiateMigrationResult]<~InitiateMigrationResult>
2520 self
.results
= [InitiateMigrationResult
.from_json(o
) for o
in results
or []]
2523 class MigrationSpec(Type
):
2524 _toSchema
= {'external_control': 'external-control', 'model_tag': 'model-tag', 'skip_initial_prechecks': 'skip-initial-prechecks', 'target_info': 'target-info'}
2525 _toPy
= {'external-control': 'external_control', 'model-tag': 'model_tag', 'skip-initial-prechecks': 'skip_initial_prechecks', 'target-info': 'target_info'}
2526 def __init__(self
, external_control
=None, model_tag
=None, skip_initial_prechecks
=None, target_info
=None):
2528 external_control : bool
2530 skip_initial_prechecks : bool
2531 target_info : MigrationTargetInfo
2533 self
.external_control
= external_control
2534 self
.model_tag
= model_tag
2535 self
.skip_initial_prechecks
= skip_initial_prechecks
2536 self
.target_info
= MigrationTargetInfo
.from_json(target_info
) if target_info
else None
2539 class MigrationTargetInfo(Type
):
2540 _toSchema
= {'addrs': 'addrs', 'auth_tag': 'auth-tag', 'ca_cert': 'ca-cert', 'controller_tag': 'controller-tag', 'macaroons': 'macaroons', 'password': 'password'}
2541 _toPy
= {'addrs': 'addrs', 'auth-tag': 'auth_tag', 'ca-cert': 'ca_cert', 'controller-tag': 'controller_tag', 'macaroons': 'macaroons', 'password': 'password'}
2542 def __init__(self
, addrs
=None, auth_tag
=None, ca_cert
=None, controller_tag
=None, macaroons
=None, password
=None):
2544 addrs : typing.Sequence<+T_co>[str]
2547 controller_tag : str
2552 self
.auth_tag
= auth_tag
2553 self
.ca_cert
= ca_cert
2554 self
.controller_tag
= controller_tag
2555 self
.macaroons
= macaroons
2556 self
.password
= password
2560 _toSchema
= {'name': 'name', 'owner_tag': 'owner-tag', 'uuid': 'uuid'}
2561 _toPy
= {'name': 'name', 'owner-tag': 'owner_tag', 'uuid': 'uuid'}
2562 def __init__(self
, name
=None, owner_tag
=None, uuid
=None):
2569 self
.owner_tag
= owner_tag
2573 class ModelBlockInfo(Type
):
2574 _toSchema
= {'blocks': 'blocks', 'model_uuid': 'model-uuid', 'name': 'name', 'owner_tag': 'owner-tag'}
2575 _toPy
= {'blocks': 'blocks', 'model-uuid': 'model_uuid', 'name': 'name', 'owner-tag': 'owner_tag'}
2576 def __init__(self
, blocks
=None, model_uuid
=None, name
=None, owner_tag
=None):
2578 blocks : typing.Sequence<+T_co>[str]
2583 self
.blocks
= blocks
2584 self
.model_uuid
= model_uuid
2586 self
.owner_tag
= owner_tag
2589 class ModelBlockInfoList(Type
):
2590 _toSchema
= {'models': 'models'}
2591 _toPy
= {'models': 'models'}
2592 def __init__(self
, models
=None):
2594 models : typing.Sequence<+T_co>[~ModelBlockInfo]<~ModelBlockInfo>
2596 self
.models
= [ModelBlockInfo
.from_json(o
) for o
in models
or []]
2599 class ModelStatus(Type
):
2600 _toSchema
= {'application_count': 'application-count', 'hosted_machine_count': 'hosted-machine-count', 'life': 'life', 'machines': 'machines', 'model_tag': 'model-tag', 'owner_tag': 'owner-tag'}
2601 _toPy
= {'application-count': 'application_count', 'hosted-machine-count': 'hosted_machine_count', 'life': 'life', 'machines': 'machines', 'model-tag': 'model_tag', 'owner-tag': 'owner_tag'}
2602 def __init__(self
, application_count
=None, hosted_machine_count
=None, life
=None, machines
=None, model_tag
=None, owner_tag
=None):
2604 application_count : int
2605 hosted_machine_count : int
2607 machines : typing.Sequence<+T_co>[~ModelMachineInfo]<~ModelMachineInfo>
2611 self
.application_count
= application_count
2612 self
.hosted_machine_count
= hosted_machine_count
2614 self
.machines
= [ModelMachineInfo
.from_json(o
) for o
in machines
or []]
2615 self
.model_tag
= model_tag
2616 self
.owner_tag
= owner_tag
2619 class ModelStatusResults(Type
):
2620 _toSchema
= {'models': 'models'}
2621 _toPy
= {'models': 'models'}
2622 def __init__(self
, models
=None):
2624 models : typing.Sequence<+T_co>[~ModelStatus]<~ModelStatus>
2626 self
.models
= [ModelStatus
.from_json(o
) for o
in models
or []]
2629 class ModifyControllerAccess(Type
):
2630 _toSchema
= {'access': 'access', 'action': 'action', 'user_tag': 'user-tag'}
2631 _toPy
= {'access': 'access', 'action': 'action', 'user-tag': 'user_tag'}
2632 def __init__(self
, access
=None, action
=None, user_tag
=None):
2638 self
.access
= access
2639 self
.action
= action
2640 self
.user_tag
= user_tag
2643 class ModifyControllerAccessRequest(Type
):
2644 _toSchema
= {'changes': 'changes'}
2645 _toPy
= {'changes': 'changes'}
2646 def __init__(self
, changes
=None):
2648 changes : typing.Sequence<+T_co>[~ModifyControllerAccess]<~ModifyControllerAccess>
2650 self
.changes
= [ModifyControllerAccess
.from_json(o
) for o
in changes
or []]
2653 class RemoveBlocksArgs(Type
):
2654 _toSchema
= {'all_': 'all'}
2655 _toPy
= {'all': 'all_'}
2656 def __init__(self
, all_
=None):
2663 class UserAccess(Type
):
2664 _toSchema
= {'access': 'access', 'user_tag': 'user-tag'}
2665 _toPy
= {'access': 'access', 'user-tag': 'user_tag'}
2666 def __init__(self
, access
=None, user_tag
=None):
2671 self
.access
= access
2672 self
.user_tag
= user_tag
2675 class UserAccessResult(Type
):
2676 _toSchema
= {'error': 'error', 'result': 'result'}
2677 _toPy
= {'error': 'error', 'result': 'result'}
2678 def __init__(self
, error
=None, result
=None):
2683 self
.error
= Error
.from_json(error
) if error
else None
2684 self
.result
= UserAccess
.from_json(result
) if result
else None
2687 class UserAccessResults(Type
):
2688 _toSchema
= {'results': 'results'}
2689 _toPy
= {'results': 'results'}
2690 def __init__(self
, results
=None):
2692 results : typing.Sequence<+T_co>[~UserAccessResult]<~UserAccessResult>
2694 self
.results
= [UserAccessResult
.from_json(o
) for o
in results
or []]
2697 class UserModel(Type
):
2698 _toSchema
= {'last_connection': 'last-connection', 'model': 'model'}
2699 _toPy
= {'last-connection': 'last_connection', 'model': 'model'}
2700 def __init__(self
, last_connection
=None, model
=None):
2702 last_connection : str
2705 self
.last_connection
= last_connection
2706 self
.model
= Model
.from_json(model
) if model
else None
2709 class UserModelList(Type
):
2710 _toSchema
= {'user_models': 'user-models'}
2711 _toPy
= {'user-models': 'user_models'}
2712 def __init__(self
, user_models
=None):
2714 user_models : typing.Sequence<+T_co>[~UserModel]<~UserModel>
2716 self
.user_models
= [UserModel
.from_json(o
) for o
in user_models
or []]
2719 class BytesResult(Type
):
2720 _toSchema
= {'result': 'result'}
2721 _toPy
= {'result': 'result'}
2722 def __init__(self
, result
=None):
2724 result : typing.Sequence<+T_co>[int]
2726 self
.result
= result
2729 class DeployerConnectionValues(Type
):
2730 _toSchema
= {'api_addresses': 'api-addresses', 'state_addresses': 'state-addresses'}
2731 _toPy
= {'api-addresses': 'api_addresses', 'state-addresses': 'state_addresses'}
2732 def __init__(self
, api_addresses
=None, state_addresses
=None):
2734 api_addresses : typing.Sequence<+T_co>[str]
2735 state_addresses : typing.Sequence<+T_co>[str]
2737 self
.api_addresses
= api_addresses
2738 self
.state_addresses
= state_addresses
2741 class EntityStatusArgs(Type
):
2742 _toSchema
= {'data': 'data', 'info': 'info', 'status': 'status', 'tag': 'tag'}
2743 _toPy
= {'data': 'data', 'info': 'info', 'status': 'status', 'tag': 'tag'}
2744 def __init__(self
, data
=None, info
=None, status
=None, tag
=None):
2746 data : typing.Mapping<~KT, +VT_co>[str, typing.Any]
2753 self
.status
= status
2757 class LifeResult(Type
):
2758 _toSchema
= {'error': 'error', 'life': 'life'}
2759 _toPy
= {'error': 'error', 'life': 'life'}
2760 def __init__(self
, error
=None, life
=None):
2765 self
.error
= Error
.from_json(error
) if error
else None
2769 class LifeResults(Type
):
2770 _toSchema
= {'results': 'results'}
2771 _toPy
= {'results': 'results'}
2772 def __init__(self
, results
=None):
2774 results : typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
2776 self
.results
= [LifeResult
.from_json(o
) for o
in results
or []]
2779 class SetStatus(Type
):
2780 _toSchema
= {'entities': 'entities'}
2781 _toPy
= {'entities': 'entities'}
2782 def __init__(self
, entities
=None):
2784 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
2786 self
.entities
= [EntityStatusArgs
.from_json(o
) for o
in entities
or []]
2789 class StringsWatchResults(Type
):
2790 _toSchema
= {'results': 'results'}
2791 _toPy
= {'results': 'results'}
2792 def __init__(self
, results
=None):
2794 results : typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
2796 self
.results
= [StringsWatchResult
.from_json(o
) for o
in results
or []]
2799 class AddSubnetParams(Type
):
2800 _toSchema
= {'space_tag': 'space-tag', 'subnet_provider_id': 'subnet-provider-id', 'subnet_tag': 'subnet-tag', 'zones': 'zones'}
2801 _toPy
= {'space-tag': 'space_tag', 'subnet-provider-id': 'subnet_provider_id', 'subnet-tag': 'subnet_tag', 'zones': 'zones'}
2802 def __init__(self
, space_tag
=None, subnet_provider_id
=None, subnet_tag
=None, zones
=None):
2805 subnet_provider_id : str
2807 zones : typing.Sequence<+T_co>[str]
2809 self
.space_tag
= space_tag
2810 self
.subnet_provider_id
= subnet_provider_id
2811 self
.subnet_tag
= subnet_tag
2815 class AddSubnetsParams(Type
):
2816 _toSchema
= {'subnets': 'subnets'}
2817 _toPy
= {'subnets': 'subnets'}
2818 def __init__(self
, subnets
=None):
2820 subnets : typing.Sequence<+T_co>[~AddSubnetParams]<~AddSubnetParams>
2822 self
.subnets
= [AddSubnetParams
.from_json(o
) for o
in subnets
or []]
2825 class CreateSpaceParams(Type
):
2826 _toSchema
= {'provider_id': 'provider-id', 'public': 'public', 'space_tag': 'space-tag', 'subnet_tags': 'subnet-tags'}
2827 _toPy
= {'provider-id': 'provider_id', 'public': 'public', 'space-tag': 'space_tag', 'subnet-tags': 'subnet_tags'}
2828 def __init__(self
, provider_id
=None, public
=None, space_tag
=None, subnet_tags
=None):
2833 subnet_tags : typing.Sequence<+T_co>[str]
2835 self
.provider_id
= provider_id
2836 self
.public
= public
2837 self
.space_tag
= space_tag
2838 self
.subnet_tags
= subnet_tags
2841 class CreateSpacesParams(Type
):
2842 _toSchema
= {'spaces': 'spaces'}
2843 _toPy
= {'spaces': 'spaces'}
2844 def __init__(self
, spaces
=None):
2846 spaces : typing.Sequence<+T_co>[~CreateSpaceParams]<~CreateSpaceParams>
2848 self
.spaces
= [CreateSpaceParams
.from_json(o
) for o
in spaces
or []]
2851 class DiscoverSpacesResults(Type
):
2852 _toSchema
= {'results': 'results'}
2853 _toPy
= {'results': 'results'}
2854 def __init__(self
, results
=None):
2856 results : typing.Sequence<+T_co>[~ProviderSpace]<~ProviderSpace>
2858 self
.results
= [ProviderSpace
.from_json(o
) for o
in results
or []]
2861 class ListSubnetsResults(Type
):
2862 _toSchema
= {'results': 'results'}
2863 _toPy
= {'results': 'results'}
2864 def __init__(self
, results
=None):
2866 results : typing.Sequence<+T_co>[~Subnet]<~Subnet>
2868 self
.results
= [Subnet
.from_json(o
) for o
in results
or []]
2871 class ProviderSpace(Type
):
2872 _toSchema
= {'error': 'error', 'name': 'name', 'provider_id': 'provider-id', 'subnets': 'subnets'}
2873 _toPy
= {'error': 'error', 'name': 'name', 'provider-id': 'provider_id', 'subnets': 'subnets'}
2874 def __init__(self
, error
=None, name
=None, provider_id
=None, subnets
=None):
2879 subnets : typing.Sequence<+T_co>[~Subnet]<~Subnet>
2881 self
.error
= Error
.from_json(error
) if error
else None
2883 self
.provider_id
= provider_id
2884 self
.subnets
= [Subnet
.from_json(o
) for o
in subnets
or []]
2888 _toSchema
= {'cidr': 'cidr', 'life': 'life', 'provider_id': 'provider-id', 'space_tag': 'space-tag', 'status': 'status', 'vlan_tag': 'vlan-tag', 'zones': 'zones'}
2889 _toPy
= {'cidr': 'cidr', 'life': 'life', 'provider-id': 'provider_id', 'space-tag': 'space_tag', 'status': 'status', 'vlan-tag': 'vlan_tag', 'zones': 'zones'}
2890 def __init__(self
, cidr
=None, life
=None, provider_id
=None, space_tag
=None, status
=None, vlan_tag
=None, zones
=None):
2898 zones : typing.Sequence<+T_co>[str]
2902 self
.provider_id
= provider_id
2903 self
.space_tag
= space_tag
2904 self
.status
= status
2905 self
.vlan_tag
= vlan_tag
2909 class SubnetsFilters(Type
):
2910 _toSchema
= {'space_tag': 'space-tag', 'zone': 'zone'}
2911 _toPy
= {'space-tag': 'space_tag', 'zone': 'zone'}
2912 def __init__(self
, space_tag
=None, zone
=None):
2917 self
.space_tag
= space_tag
2921 class BlockDevice(Type
):
2922 _toSchema
= {'busaddress': 'BusAddress', 'devicelinks': 'DeviceLinks', 'devicename': 'DeviceName', 'filesystemtype': 'FilesystemType', 'hardwareid': 'HardwareId', 'inuse': 'InUse', 'label': 'Label', 'mountpoint': 'MountPoint', 'size': 'Size', 'uuid': 'UUID'}
2923 _toPy
= {'BusAddress': 'busaddress', 'DeviceLinks': 'devicelinks', 'DeviceName': 'devicename', 'FilesystemType': 'filesystemtype', 'HardwareId': 'hardwareid', 'InUse': 'inuse', 'Label': 'label', 'MountPoint': 'mountpoint', 'Size': 'size', 'UUID': 'uuid'}
2924 def __init__(self
, busaddress
=None, devicelinks
=None, devicename
=None, filesystemtype
=None, hardwareid
=None, inuse
=None, label
=None, mountpoint
=None, size
=None, uuid
=None):
2927 devicelinks : typing.Sequence<+T_co>[str]
2929 filesystemtype : str
2937 self
.busaddress
= busaddress
2938 self
.devicelinks
= devicelinks
2939 self
.devicename
= devicename
2940 self
.filesystemtype
= filesystemtype
2941 self
.hardwareid
= hardwareid
2944 self
.mountpoint
= mountpoint
2949 class MachineBlockDevices(Type
):
2950 _toSchema
= {'block_devices': 'block-devices', 'machine': 'machine'}
2951 _toPy
= {'block-devices': 'block_devices', 'machine': 'machine'}
2952 def __init__(self
, block_devices
=None, machine
=None):
2954 block_devices : typing.Sequence<+T_co>[~BlockDevice]<~BlockDevice>
2957 self
.block_devices
= [BlockDevice
.from_json(o
) for o
in block_devices
or []]
2958 self
.machine
= machine
2961 class SetMachineBlockDevices(Type
):
2962 _toSchema
= {'machine_block_devices': 'machine-block-devices'}
2963 _toPy
= {'machine-block-devices': 'machine_block_devices'}
2964 def __init__(self
, machine_block_devices
=None):
2966 machine_block_devices : typing.Sequence<+T_co>[~MachineBlockDevices]<~MachineBlockDevices>
2968 self
.machine_block_devices
= [MachineBlockDevices
.from_json(o
) for o
in machine_block_devices
or []]
2971 class EntitiesWatchResult(Type
):
2972 _toSchema
= {'changes': 'changes', 'error': 'error', 'watcher_id': 'watcher-id'}
2973 _toPy
= {'changes': 'changes', 'error': 'error', 'watcher-id': 'watcher_id'}
2974 def __init__(self
, changes
=None, error
=None, watcher_id
=None):
2976 changes : typing.Sequence<+T_co>[str]
2980 self
.changes
= changes
2981 self
.error
= Error
.from_json(error
) if error
else None
2982 self
.watcher_id
= watcher_id
2985 class MachineStorageId(Type
):
2986 _toSchema
= {'attachment_tag': 'attachment-tag', 'machine_tag': 'machine-tag'}
2987 _toPy
= {'attachment-tag': 'attachment_tag', 'machine-tag': 'machine_tag'}
2988 def __init__(self
, attachment_tag
=None, machine_tag
=None):
2990 attachment_tag : str
2993 self
.attachment_tag
= attachment_tag
2994 self
.machine_tag
= machine_tag
2997 class MachineStorageIdsWatchResult(Type
):
2998 _toSchema
= {'changes': 'changes', 'error': 'error', 'watcher_id': 'watcher-id'}
2999 _toPy
= {'changes': 'changes', 'error': 'error', 'watcher-id': 'watcher_id'}
3000 def __init__(self
, changes
=None, error
=None, watcher_id
=None):
3002 changes : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
3006 self
.changes
= [MachineStorageId
.from_json(o
) for o
in changes
or []]
3007 self
.error
= Error
.from_json(error
) if error
else None
3008 self
.watcher_id
= watcher_id
3011 class BoolResult(Type
):
3012 _toSchema
= {'error': 'error', 'result': 'result'}
3013 _toPy
= {'error': 'error', 'result': 'result'}
3014 def __init__(self
, error
=None, result
=None):
3019 self
.error
= Error
.from_json(error
) if error
else None
3020 self
.result
= result
3023 class BoolResults(Type
):
3024 _toSchema
= {'results': 'results'}
3025 _toPy
= {'results': 'results'}
3026 def __init__(self
, results
=None):
3028 results : typing.Sequence<+T_co>[~BoolResult]<~BoolResult>
3030 self
.results
= [BoolResult
.from_json(o
) for o
in results
or []]
3033 class MachinePortRange(Type
):
3034 _toSchema
= {'port_range': 'port-range', 'relation_tag': 'relation-tag', 'unit_tag': 'unit-tag'}
3035 _toPy
= {'port-range': 'port_range', 'relation-tag': 'relation_tag', 'unit-tag': 'unit_tag'}
3036 def __init__(self
, port_range
=None, relation_tag
=None, unit_tag
=None):
3038 port_range : PortRange
3042 self
.port_range
= PortRange
.from_json(port_range
) if port_range
else None
3043 self
.relation_tag
= relation_tag
3044 self
.unit_tag
= unit_tag
3047 class MachinePorts(Type
):
3048 _toSchema
= {'machine_tag': 'machine-tag', 'subnet_tag': 'subnet-tag'}
3049 _toPy
= {'machine-tag': 'machine_tag', 'subnet-tag': 'subnet_tag'}
3050 def __init__(self
, machine_tag
=None, subnet_tag
=None):
3055 self
.machine_tag
= machine_tag
3056 self
.subnet_tag
= subnet_tag
3059 class MachinePortsParams(Type
):
3060 _toSchema
= {'params': 'params'}
3061 _toPy
= {'params': 'params'}
3062 def __init__(self
, params
=None):
3064 params : typing.Sequence<+T_co>[~MachinePorts]<~MachinePorts>
3066 self
.params
= [MachinePorts
.from_json(o
) for o
in params
or []]
3069 class MachinePortsResult(Type
):
3070 _toSchema
= {'error': 'error', 'ports': 'ports'}
3071 _toPy
= {'error': 'error', 'ports': 'ports'}
3072 def __init__(self
, error
=None, ports
=None):
3075 ports : typing.Sequence<+T_co>[~MachinePortRange]<~MachinePortRange>
3077 self
.error
= Error
.from_json(error
) if error
else None
3078 self
.ports
= [MachinePortRange
.from_json(o
) for o
in ports
or []]
3081 class MachinePortsResults(Type
):
3082 _toSchema
= {'results': 'results'}
3083 _toPy
= {'results': 'results'}
3084 def __init__(self
, results
=None):
3086 results : typing.Sequence<+T_co>[~MachinePortsResult]<~MachinePortsResult>
3088 self
.results
= [MachinePortsResult
.from_json(o
) for o
in results
or []]
3091 class PortRange(Type
):
3092 _toSchema
= {'from_port': 'from-port', 'protocol': 'protocol', 'to_port': 'to-port'}
3093 _toPy
= {'from-port': 'from_port', 'protocol': 'protocol', 'to-port': 'to_port'}
3094 def __init__(self
, from_port
=None, protocol
=None, to_port
=None):
3100 self
.from_port
= from_port
3101 self
.protocol
= protocol
3102 self
.to_port
= to_port
3105 class StringResults(Type
):
3106 _toSchema
= {'results': 'results'}
3107 _toPy
= {'results': 'results'}
3108 def __init__(self
, results
=None):
3110 results : typing.Sequence<+T_co>[~StringResult]<~StringResult>
3112 self
.results
= [StringResult
.from_json(o
) for o
in results
or []]
3115 class ControllersChangeResult(Type
):
3116 _toSchema
= {'error': 'error', 'result': 'result'}
3117 _toPy
= {'error': 'error', 'result': 'result'}
3118 def __init__(self
, error
=None, result
=None):
3121 result : ControllersChanges
3123 self
.error
= Error
.from_json(error
) if error
else None
3124 self
.result
= ControllersChanges
.from_json(result
) if result
else None
3127 class ControllersChangeResults(Type
):
3128 _toSchema
= {'results': 'results'}
3129 _toPy
= {'results': 'results'}
3130 def __init__(self
, results
=None):
3132 results : typing.Sequence<+T_co>[~ControllersChangeResult]<~ControllersChangeResult>
3134 self
.results
= [ControllersChangeResult
.from_json(o
) for o
in results
or []]
3137 class ControllersChanges(Type
):
3138 _toSchema
= {'added': 'added', 'converted': 'converted', 'demoted': 'demoted', 'maintained': 'maintained', 'promoted': 'promoted', 'removed': 'removed'}
3139 _toPy
= {'added': 'added', 'converted': 'converted', 'demoted': 'demoted', 'maintained': 'maintained', 'promoted': 'promoted', 'removed': 'removed'}
3140 def __init__(self
, added
=None, converted
=None, demoted
=None, maintained
=None, promoted
=None, removed
=None):
3142 added : typing.Sequence<+T_co>[str]
3143 converted : typing.Sequence<+T_co>[str]
3144 demoted : typing.Sequence<+T_co>[str]
3145 maintained : typing.Sequence<+T_co>[str]
3146 promoted : typing.Sequence<+T_co>[str]
3147 removed : typing.Sequence<+T_co>[str]
3150 self
.converted
= converted
3151 self
.demoted
= demoted
3152 self
.maintained
= maintained
3153 self
.promoted
= promoted
3154 self
.removed
= removed
3157 class ControllersSpec(Type
):
3158 _toSchema
= {'constraints': 'constraints', 'num_controllers': 'num-controllers', 'placement': 'placement', 'series': 'series'}
3159 _toPy
= {'constraints': 'constraints', 'num-controllers': 'num_controllers', 'placement': 'placement', 'series': 'series'}
3160 def __init__(self
, constraints
=None, num_controllers
=None, placement
=None, series
=None):
3163 num_controllers : int
3164 placement : typing.Sequence<+T_co>[str]
3167 self
.constraints
= Value
.from_json(constraints
) if constraints
else None
3168 self
.num_controllers
= num_controllers
3169 self
.placement
= placement
3170 self
.series
= series
3173 class ControllersSpecs(Type
):
3174 _toSchema
= {'specs': 'specs'}
3175 _toPy
= {'specs': 'specs'}
3176 def __init__(self
, specs
=None):
3178 specs : typing.Sequence<+T_co>[~ControllersSpec]<~ControllersSpec>
3180 self
.specs
= [ControllersSpec
.from_json(o
) for o
in specs
or []]
3183 class HAMember(Type
):
3184 _toSchema
= {'public_address': 'public-address', 'series': 'series', 'tag': 'tag'}
3185 _toPy
= {'public-address': 'public_address', 'series': 'series', 'tag': 'tag'}
3186 def __init__(self
, public_address
=None, series
=None, tag
=None):
3188 public_address : Address
3192 self
.public_address
= Address
.from_json(public_address
) if public_address
else None
3193 self
.series
= series
3198 _toSchema
= {'address': 'Address', 'arbiter': 'Arbiter', 'buildindexes': 'BuildIndexes', 'hidden': 'Hidden', 'id_': 'Id', 'priority': 'Priority', 'slavedelay': 'SlaveDelay', 'tags': 'Tags', 'votes': 'Votes'}
3199 _toPy
= {'Address': 'address', 'Arbiter': 'arbiter', 'BuildIndexes': 'buildindexes', 'Hidden': 'hidden', 'Id': 'id_', 'Priority': 'priority', 'SlaveDelay': 'slavedelay', 'Tags': 'tags', 'Votes': 'votes'}
3200 def __init__(self
, address
=None, arbiter
=None, buildindexes
=None, hidden
=None, id_
=None, priority
=None, slavedelay
=None, tags
=None, votes
=None):
3209 tags : typing.Mapping<~KT, +VT_co>[str, str]
3212 self
.address
= address
3213 self
.arbiter
= arbiter
3214 self
.buildindexes
= buildindexes
3215 self
.hidden
= hidden
3217 self
.priority
= priority
3218 self
.slavedelay
= slavedelay
3223 class MongoUpgradeResults(Type
):
3224 _toSchema
= {'ha_members': 'ha-members', 'master': 'master', 'rs_members': 'rs-members'}
3225 _toPy
= {'ha-members': 'ha_members', 'master': 'master', 'rs-members': 'rs_members'}
3226 def __init__(self
, ha_members
=None, master
=None, rs_members
=None):
3228 ha_members : typing.Sequence<+T_co>[~HAMember]<~HAMember>
3230 rs_members : typing.Sequence<+T_co>[~Member]<~Member>
3232 self
.ha_members
= [HAMember
.from_json(o
) for o
in ha_members
or []]
3233 self
.master
= HAMember
.from_json(master
) if master
else None
3234 self
.rs_members
= [Member
.from_json(o
) for o
in rs_members
or []]
3237 class MongoVersion(Type
):
3238 _toSchema
= {'engine': 'engine', 'major': 'major', 'minor': 'minor', 'patch': 'patch'}
3239 _toPy
= {'engine': 'engine', 'major': 'major', 'minor': 'minor', 'patch': 'patch'}
3240 def __init__(self
, engine
=None, major
=None, minor
=None, patch
=None):
3247 self
.engine
= engine
3253 class ResumeReplicationParams(Type
):
3254 _toSchema
= {'members': 'members'}
3255 _toPy
= {'members': 'members'}
3256 def __init__(self
, members
=None):
3258 members : typing.Sequence<+T_co>[~Member]<~Member>
3260 self
.members
= [Member
.from_json(o
) for o
in members
or []]
3263 class UpgradeMongoParams(Type
):
3264 _toSchema
= {'target': 'target'}
3265 _toPy
= {'target': 'target'}
3266 def __init__(self
, target
=None):
3268 target : MongoVersion
3270 self
.target
= MongoVersion
.from_json(target
) if target
else None
3273 class SSHHostKeySet(Type
):
3274 _toSchema
= {'entity_keys': 'entity-keys'}
3275 _toPy
= {'entity-keys': 'entity_keys'}
3276 def __init__(self
, entity_keys
=None):
3278 entity_keys : typing.Sequence<+T_co>[~SSHHostKeys]<~SSHHostKeys>
3280 self
.entity_keys
= [SSHHostKeys
.from_json(o
) for o
in entity_keys
or []]
3283 class SSHHostKeys(Type
):
3284 _toSchema
= {'public_keys': 'public-keys', 'tag': 'tag'}
3285 _toPy
= {'public-keys': 'public_keys', 'tag': 'tag'}
3286 def __init__(self
, public_keys
=None, tag
=None):
3288 public_keys : typing.Sequence<+T_co>[str]
3291 self
.public_keys
= public_keys
3295 class ImageFilterParams(Type
):
3296 _toSchema
= {'images': 'images'}
3297 _toPy
= {'images': 'images'}
3298 def __init__(self
, images
=None):
3300 images : typing.Sequence<+T_co>[~ImageSpec]<~ImageSpec>
3302 self
.images
= [ImageSpec
.from_json(o
) for o
in images
or []]
3305 class ImageMetadata(Type
):
3306 _toSchema
= {'arch': 'arch', 'created': 'created', 'kind': 'kind', 'series': 'series', 'url': 'url'}
3307 _toPy
= {'arch': 'arch', 'created': 'created', 'kind': 'kind', 'series': 'series', 'url': 'url'}
3308 def __init__(self
, arch
=None, created
=None, kind
=None, series
=None, url
=None):
3317 self
.created
= created
3319 self
.series
= series
3323 class ImageSpec(Type
):
3324 _toSchema
= {'arch': 'arch', 'kind': 'kind', 'series': 'series'}
3325 _toPy
= {'arch': 'arch', 'kind': 'kind', 'series': 'series'}
3326 def __init__(self
, arch
=None, kind
=None, series
=None):
3334 self
.series
= series
3337 class ListImageResult(Type
):
3338 _toSchema
= {'result': 'result'}
3339 _toPy
= {'result': 'result'}
3340 def __init__(self
, result
=None):
3342 result : typing.Sequence<+T_co>[~ImageMetadata]<~ImageMetadata>
3344 self
.result
= [ImageMetadata
.from_json(o
) for o
in result
or []]
3347 class CloudImageMetadata(Type
):
3348 _toSchema
= {'arch': 'arch', 'image_id': 'image-id', 'priority': 'priority', 'region': 'region', 'root_storage_size': 'root-storage-size', 'root_storage_type': 'root-storage-type', 'series': 'series', 'source': 'source', 'stream': 'stream', 'version': 'version', 'virt_type': 'virt-type'}
3349 _toPy
= {'arch': 'arch', 'image-id': 'image_id', 'priority': 'priority', 'region': 'region', 'root-storage-size': 'root_storage_size', 'root-storage-type': 'root_storage_type', 'series': 'series', 'source': 'source', 'stream': 'stream', 'version': 'version', 'virt-type': 'virt_type'}
3350 def __init__(self
, arch
=None, image_id
=None, priority
=None, region
=None, root_storage_size
=None, root_storage_type
=None, series
=None, source
=None, stream
=None, version
=None, virt_type
=None):
3356 root_storage_size : int
3357 root_storage_type : str
3365 self
.image_id
= image_id
3366 self
.priority
= priority
3367 self
.region
= region
3368 self
.root_storage_size
= root_storage_size
3369 self
.root_storage_type
= root_storage_type
3370 self
.series
= series
3371 self
.source
= source
3372 self
.stream
= stream
3373 self
.version
= version
3374 self
.virt_type
= virt_type
3377 class CloudImageMetadataList(Type
):
3378 _toSchema
= {'metadata': 'metadata'}
3379 _toPy
= {'metadata': 'metadata'}
3380 def __init__(self
, metadata
=None):
3382 metadata : typing.Sequence<+T_co>[~CloudImageMetadata]<~CloudImageMetadata>
3384 self
.metadata
= [CloudImageMetadata
.from_json(o
) for o
in metadata
or []]
3387 class ImageMetadataFilter(Type
):
3388 _toSchema
= {'arches': 'arches', 'region': 'region', 'root_storage_type': 'root-storage-type', 'series': 'series', 'stream': 'stream', 'virt_type': 'virt-type'}
3389 _toPy
= {'arches': 'arches', 'region': 'region', 'root-storage-type': 'root_storage_type', 'series': 'series', 'stream': 'stream', 'virt-type': 'virt_type'}
3390 def __init__(self
, arches
=None, region
=None, root_storage_type
=None, series
=None, stream
=None, virt_type
=None):
3392 arches : typing.Sequence<+T_co>[str]
3394 root_storage_type : str
3395 series : typing.Sequence<+T_co>[str]
3399 self
.arches
= arches
3400 self
.region
= region
3401 self
.root_storage_type
= root_storage_type
3402 self
.series
= series
3403 self
.stream
= stream
3404 self
.virt_type
= virt_type
3407 class ListCloudImageMetadataResult(Type
):
3408 _toSchema
= {'result': 'result'}
3409 _toPy
= {'result': 'result'}
3410 def __init__(self
, result
=None):
3412 result : typing.Sequence<+T_co>[~CloudImageMetadata]<~CloudImageMetadata>
3414 self
.result
= [CloudImageMetadata
.from_json(o
) for o
in result
or []]
3417 class MetadataImageIds(Type
):
3418 _toSchema
= {'image_ids': 'image-ids'}
3419 _toPy
= {'image-ids': 'image_ids'}
3420 def __init__(self
, image_ids
=None):
3422 image_ids : typing.Sequence<+T_co>[str]
3424 self
.image_ids
= image_ids
3427 class MetadataSaveParams(Type
):
3428 _toSchema
= {'metadata': 'metadata'}
3429 _toPy
= {'metadata': 'metadata'}
3430 def __init__(self
, metadata
=None):
3432 metadata : typing.Sequence<+T_co>[~CloudImageMetadataList]<~CloudImageMetadataList>
3434 self
.metadata
= [CloudImageMetadataList
.from_json(o
) for o
in metadata
or []]
3437 class MachineAddresses(Type
):
3438 _toSchema
= {'addresses': 'addresses', 'tag': 'tag'}
3439 _toPy
= {'addresses': 'addresses', 'tag': 'tag'}
3440 def __init__(self
, addresses
=None, tag
=None):
3442 addresses : typing.Sequence<+T_co>[~Address]<~Address>
3445 self
.addresses
= [Address
.from_json(o
) for o
in addresses
or []]
3449 class MachineAddressesResult(Type
):
3450 _toSchema
= {'addresses': 'addresses', 'error': 'error'}
3451 _toPy
= {'addresses': 'addresses', 'error': 'error'}
3452 def __init__(self
, addresses
=None, error
=None):
3454 addresses : typing.Sequence<+T_co>[~Address]<~Address>
3457 self
.addresses
= [Address
.from_json(o
) for o
in addresses
or []]
3458 self
.error
= Error
.from_json(error
) if error
else None
3461 class MachineAddressesResults(Type
):
3462 _toSchema
= {'results': 'results'}
3463 _toPy
= {'results': 'results'}
3464 def __init__(self
, results
=None):
3466 results : typing.Sequence<+T_co>[~MachineAddressesResult]<~MachineAddressesResult>
3468 self
.results
= [MachineAddressesResult
.from_json(o
) for o
in results
or []]
3471 class SetMachinesAddresses(Type
):
3472 _toSchema
= {'machine_addresses': 'machine-addresses'}
3473 _toPy
= {'machine-addresses': 'machine_addresses'}
3474 def __init__(self
, machine_addresses
=None):
3476 machine_addresses : typing.Sequence<+T_co>[~MachineAddresses]<~MachineAddresses>
3478 self
.machine_addresses
= [MachineAddresses
.from_json(o
) for o
in machine_addresses
or []]
3481 class StatusResult(Type
):
3482 _toSchema
= {'data': 'data', 'error': 'error', 'id_': 'id', 'info': 'info', 'life': 'life', 'since': 'since', 'status': 'status'}
3483 _toPy
= {'data': 'data', 'error': 'error', 'id': 'id_', 'info': 'info', 'life': 'life', 'since': 'since', 'status': 'status'}
3484 def __init__(self
, data
=None, error
=None, id_
=None, info
=None, life
=None, since
=None, status
=None):
3486 data : typing.Mapping<~KT, +VT_co>[str, typing.Any]
3495 self
.error
= Error
.from_json(error
) if error
else None
3500 self
.status
= status
3503 class StatusResults(Type
):
3504 _toSchema
= {'results': 'results'}
3505 _toPy
= {'results': 'results'}
3506 def __init__(self
, results
=None):
3508 results : typing.Sequence<+T_co>[~StatusResult]<~StatusResult>
3510 self
.results
= [StatusResult
.from_json(o
) for o
in results
or []]
3513 class ListSSHKeys(Type
):
3514 _toSchema
= {'entities': 'entities', 'mode': 'mode'}
3515 _toPy
= {'entities': 'entities', 'mode': 'mode'}
3516 def __init__(self
, entities
=None, mode
=None):
3521 self
.entities
= Entities
.from_json(entities
) if entities
else None
3525 class ModifyUserSSHKeys(Type
):
3526 _toSchema
= {'ssh_keys': 'ssh-keys', 'user': 'user'}
3527 _toPy
= {'ssh-keys': 'ssh_keys', 'user': 'user'}
3528 def __init__(self
, ssh_keys
=None, user
=None):
3530 ssh_keys : typing.Sequence<+T_co>[str]
3533 self
.ssh_keys
= ssh_keys
3537 class ApplicationTag(Type
):
3538 _toSchema
= {'name': 'Name'}
3539 _toPy
= {'Name': 'name'}
3540 def __init__(self
, name
=None):
3547 class ClaimLeadershipBulkParams(Type
):
3548 _toSchema
= {'params': 'params'}
3549 _toPy
= {'params': 'params'}
3550 def __init__(self
, params
=None):
3552 params : typing.Sequence<+T_co>[~ClaimLeadershipParams]<~ClaimLeadershipParams>
3554 self
.params
= [ClaimLeadershipParams
.from_json(o
) for o
in params
or []]
3557 class ClaimLeadershipBulkResults(Type
):
3558 _toSchema
= {'results': 'results'}
3559 _toPy
= {'results': 'results'}
3560 def __init__(self
, results
=None):
3562 results : typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3564 self
.results
= [ErrorResult
.from_json(o
) for o
in results
or []]
3567 class ClaimLeadershipParams(Type
):
3568 _toSchema
= {'application_tag': 'application-tag', 'duration': 'duration', 'unit_tag': 'unit-tag'}
3569 _toPy
= {'application-tag': 'application_tag', 'duration': 'duration', 'unit-tag': 'unit_tag'}
3570 def __init__(self
, application_tag
=None, duration
=None, unit_tag
=None):
3572 application_tag : str
3576 self
.application_tag
= application_tag
3577 self
.duration
= duration
3578 self
.unit_tag
= unit_tag
3581 class LogForwardingGetLastSentParams(Type
):
3582 _toSchema
= {'ids': 'ids'}
3583 _toPy
= {'ids': 'ids'}
3584 def __init__(self
, ids
=None):
3586 ids : typing.Sequence<+T_co>[~LogForwardingID]<~LogForwardingID>
3588 self
.ids
= [LogForwardingID
.from_json(o
) for o
in ids
or []]
3591 class LogForwardingGetLastSentResult(Type
):
3592 _toSchema
= {'err': 'err', 'record_id': 'record-id', 'record_timestamp': 'record-timestamp'}
3593 _toPy
= {'err': 'err', 'record-id': 'record_id', 'record-timestamp': 'record_timestamp'}
3594 def __init__(self
, err
=None, record_id
=None, record_timestamp
=None):
3598 record_timestamp : int
3600 self
.err
= Error
.from_json(err
) if err
else None
3601 self
.record_id
= record_id
3602 self
.record_timestamp
= record_timestamp
3605 class LogForwardingGetLastSentResults(Type
):
3606 _toSchema
= {'results': 'results'}
3607 _toPy
= {'results': 'results'}
3608 def __init__(self
, results
=None):
3610 results : typing.Sequence<+T_co>[~LogForwardingGetLastSentResult]<~LogForwardingGetLastSentResult>
3612 self
.results
= [LogForwardingGetLastSentResult
.from_json(o
) for o
in results
or []]
3615 class LogForwardingID(Type
):
3616 _toSchema
= {'model': 'model', 'sink': 'sink'}
3617 _toPy
= {'model': 'model', 'sink': 'sink'}
3618 def __init__(self
, model
=None, sink
=None):
3627 class LogForwardingSetLastSentParam(Type
):
3628 _toSchema
= {'logforwardingid': 'LogForwardingID', 'record_id': 'record-id', 'record_timestamp': 'record-timestamp'}
3629 _toPy
= {'LogForwardingID': 'logforwardingid', 'record-id': 'record_id', 'record-timestamp': 'record_timestamp'}
3630 def __init__(self
, logforwardingid
=None, record_id
=None, record_timestamp
=None):
3632 logforwardingid : LogForwardingID
3634 record_timestamp : int
3636 self
.logforwardingid
= LogForwardingID
.from_json(logforwardingid
) if logforwardingid
else None
3637 self
.record_id
= record_id
3638 self
.record_timestamp
= record_timestamp
3641 class LogForwardingSetLastSentParams(Type
):
3642 _toSchema
= {'params': 'params'}
3643 _toPy
= {'params': 'params'}
3644 def __init__(self
, params
=None):
3646 params : typing.Sequence<+T_co>[~LogForwardingSetLastSentParam]<~LogForwardingSetLastSentParam>
3648 self
.params
= [LogForwardingSetLastSentParam
.from_json(o
) for o
in params
or []]
3651 class ActionExecutionResult(Type
):
3652 _toSchema
= {'action_tag': 'action-tag', 'message': 'message', 'results': 'results', 'status': 'status'}
3653 _toPy
= {'action-tag': 'action_tag', 'message': 'message', 'results': 'results', 'status': 'status'}
3654 def __init__(self
, action_tag
=None, message
=None, results
=None, status
=None):
3658 results : typing.Mapping<~KT, +VT_co>[str, typing.Any]
3661 self
.action_tag
= action_tag
3662 self
.message
= message
3663 self
.results
= results
3664 self
.status
= status
3667 class ActionExecutionResults(Type
):
3668 _toSchema
= {'results': 'results'}
3669 _toPy
= {'results': 'results'}
3670 def __init__(self
, results
=None):
3672 results : typing.Sequence<+T_co>[~ActionExecutionResult]<~ActionExecutionResult>
3674 self
.results
= [ActionExecutionResult
.from_json(o
) for o
in results
or []]
3677 class EntitiesResult(Type
):
3678 _toSchema
= {'entities': 'entities', 'error': 'error'}
3679 _toPy
= {'entities': 'entities', 'error': 'error'}
3680 def __init__(self
, entities
=None, error
=None):
3682 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3685 self
.entities
= [Entity
.from_json(o
) for o
in entities
or []]
3686 self
.error
= Error
.from_json(error
) if error
else None
3689 class EntitiesResults(Type
):
3690 _toSchema
= {'results': 'results'}
3691 _toPy
= {'results': 'results'}
3692 def __init__(self
, results
=None):
3694 results : typing.Sequence<+T_co>[~EntitiesResult]<~EntitiesResult>
3696 self
.results
= [EntitiesResult
.from_json(o
) for o
in results
or []]
3699 class ProviderInterfaceInfo(Type
):
3700 _toSchema
= {'interface_name': 'interface-name', 'mac_address': 'mac-address', 'provider_id': 'provider-id'}
3701 _toPy
= {'interface-name': 'interface_name', 'mac-address': 'mac_address', 'provider-id': 'provider_id'}
3702 def __init__(self
, interface_name
=None, mac_address
=None, provider_id
=None):
3704 interface_name : str
3708 self
.interface_name
= interface_name
3709 self
.mac_address
= mac_address
3710 self
.provider_id
= provider_id
3713 class ProviderInterfaceInfoResult(Type
):
3714 _toSchema
= {'error': 'error', 'interfaces': 'interfaces', 'machine_tag': 'machine-tag'}
3715 _toPy
= {'error': 'error', 'interfaces': 'interfaces', 'machine-tag': 'machine_tag'}
3716 def __init__(self
, error
=None, interfaces
=None, machine_tag
=None):
3719 interfaces : typing.Sequence<+T_co>[~ProviderInterfaceInfo]<~ProviderInterfaceInfo>
3722 self
.error
= Error
.from_json(error
) if error
else None
3723 self
.interfaces
= [ProviderInterfaceInfo
.from_json(o
) for o
in interfaces
or []]
3724 self
.machine_tag
= machine_tag
3727 class ProviderInterfaceInfoResults(Type
):
3728 _toSchema
= {'results': 'results'}
3729 _toPy
= {'results': 'results'}
3730 def __init__(self
, results
=None):
3732 results : typing.Sequence<+T_co>[~ProviderInterfaceInfoResult]<~ProviderInterfaceInfoResult>
3734 self
.results
= [ProviderInterfaceInfoResult
.from_json(o
) for o
in results
or []]
3737 class JobsResult(Type
):
3738 _toSchema
= {'error': 'error', 'jobs': 'jobs'}
3739 _toPy
= {'error': 'error', 'jobs': 'jobs'}
3740 def __init__(self
, error
=None, jobs
=None):
3743 jobs : typing.Sequence<+T_co>[str]
3745 self
.error
= Error
.from_json(error
) if error
else None
3749 class JobsResults(Type
):
3750 _toSchema
= {'results': 'results'}
3751 _toPy
= {'results': 'results'}
3752 def __init__(self
, results
=None):
3754 results : typing.Sequence<+T_co>[~JobsResult]<~JobsResult>
3756 self
.results
= [JobsResult
.from_json(o
) for o
in results
or []]
3759 class NetworkConfig(Type
):
3760 _toSchema
= {'address': 'address', 'cidr': 'cidr', 'config_type': 'config-type', 'device_index': 'device-index', 'disabled': 'disabled', 'dns_search_domains': 'dns-search-domains', 'dns_servers': 'dns-servers', 'gateway_address': 'gateway-address', 'interface_name': 'interface-name', 'interface_type': 'interface-type', 'mac_address': 'mac-address', 'mtu': 'mtu', 'no_auto_start': 'no-auto-start', 'parent_interface_name': 'parent-interface-name', 'provider_address_id': 'provider-address-id', 'provider_id': 'provider-id', 'provider_space_id': 'provider-space-id', 'provider_subnet_id': 'provider-subnet-id', 'provider_vlan_id': 'provider-vlan-id', 'vlan_tag': 'vlan-tag'}
3761 _toPy
= {'address': 'address', 'cidr': 'cidr', 'config-type': 'config_type', 'device-index': 'device_index', 'disabled': 'disabled', 'dns-search-domains': 'dns_search_domains', 'dns-servers': 'dns_servers', 'gateway-address': 'gateway_address', 'interface-name': 'interface_name', 'interface-type': 'interface_type', 'mac-address': 'mac_address', 'mtu': 'mtu', 'no-auto-start': 'no_auto_start', 'parent-interface-name': 'parent_interface_name', 'provider-address-id': 'provider_address_id', 'provider-id': 'provider_id', 'provider-space-id': 'provider_space_id', 'provider-subnet-id': 'provider_subnet_id', 'provider-vlan-id': 'provider_vlan_id', 'vlan-tag': 'vlan_tag'}
3762 def __init__(self
, address
=None, cidr
=None, config_type
=None, device_index
=None, disabled
=None, dns_search_domains
=None, dns_servers
=None, gateway_address
=None, interface_name
=None, interface_type
=None, mac_address
=None, mtu
=None, no_auto_start
=None, parent_interface_name
=None, provider_address_id
=None, provider_id
=None, provider_space_id
=None, provider_subnet_id
=None, provider_vlan_id
=None, vlan_tag
=None):
3769 dns_search_domains : typing.Sequence<+T_co>[str]
3770 dns_servers : typing.Sequence<+T_co>[str]
3771 gateway_address : str
3772 interface_name : str
3773 interface_type : str
3776 no_auto_start : bool
3777 parent_interface_name : str
3778 provider_address_id : str
3780 provider_space_id : str
3781 provider_subnet_id : str
3782 provider_vlan_id : str
3785 self
.address
= address
3787 self
.config_type
= config_type
3788 self
.device_index
= device_index
3789 self
.disabled
= disabled
3790 self
.dns_search_domains
= dns_search_domains
3791 self
.dns_servers
= dns_servers
3792 self
.gateway_address
= gateway_address
3793 self
.interface_name
= interface_name
3794 self
.interface_type
= interface_type
3795 self
.mac_address
= mac_address
3797 self
.no_auto_start
= no_auto_start
3798 self
.parent_interface_name
= parent_interface_name
3799 self
.provider_address_id
= provider_address_id
3800 self
.provider_id
= provider_id
3801 self
.provider_space_id
= provider_space_id
3802 self
.provider_subnet_id
= provider_subnet_id
3803 self
.provider_vlan_id
= provider_vlan_id
3804 self
.vlan_tag
= vlan_tag
3807 class SetMachineNetworkConfig(Type
):
3808 _toSchema
= {'config': 'config', 'tag': 'tag'}
3809 _toPy
= {'config': 'config', 'tag': 'tag'}
3810 def __init__(self
, config
=None, tag
=None):
3812 config : typing.Sequence<+T_co>[~NetworkConfig]<~NetworkConfig>
3815 self
.config
= [NetworkConfig
.from_json(o
) for o
in config
or []]
3819 class MeterStatusResult(Type
):
3820 _toSchema
= {'code': 'code', 'error': 'error', 'info': 'info'}
3821 _toPy
= {'code': 'code', 'error': 'error', 'info': 'info'}
3822 def __init__(self
, code
=None, error
=None, info
=None):
3829 self
.error
= Error
.from_json(error
) if error
else None
3833 class MeterStatusResults(Type
):
3834 _toSchema
= {'results': 'results'}
3835 _toPy
= {'results': 'results'}
3836 def __init__(self
, results
=None):
3838 results : typing.Sequence<+T_co>[~MeterStatusResult]<~MeterStatusResult>
3840 self
.results
= [MeterStatusResult
.from_json(o
) for o
in results
or []]
3844 _toSchema
= {'key': 'key', 'time': 'time', 'value': 'value'}
3845 _toPy
= {'key': 'key', 'time': 'time', 'value': 'value'}
3846 def __init__(self
, key
=None, time
=None, value
=None):
3857 class MetricBatch(Type
):
3858 _toSchema
= {'charm_url': 'charm-url', 'created': 'created', 'metrics': 'metrics', 'uuid': 'uuid'}
3859 _toPy
= {'charm-url': 'charm_url', 'created': 'created', 'metrics': 'metrics', 'uuid': 'uuid'}
3860 def __init__(self
, charm_url
=None, created
=None, metrics
=None, uuid
=None):
3864 metrics : typing.Sequence<+T_co>[~Metric]<~Metric>
3867 self
.charm_url
= charm_url
3868 self
.created
= created
3869 self
.metrics
= [Metric
.from_json(o
) for o
in metrics
or []]
3873 class MetricBatchParam(Type
):
3874 _toSchema
= {'batch': 'batch', 'tag': 'tag'}
3875 _toPy
= {'batch': 'batch', 'tag': 'tag'}
3876 def __init__(self
, batch
=None, tag
=None):
3881 self
.batch
= MetricBatch
.from_json(batch
) if batch
else None
3885 class MetricBatchParams(Type
):
3886 _toSchema
= {'batches': 'batches'}
3887 _toPy
= {'batches': 'batches'}
3888 def __init__(self
, batches
=None):
3890 batches : typing.Sequence<+T_co>[~MetricBatchParam]<~MetricBatchParam>
3892 self
.batches
= [MetricBatchParam
.from_json(o
) for o
in batches
or []]
3895 class EntityMetrics(Type
):
3896 _toSchema
= {'error': 'error', 'metrics': 'metrics'}
3897 _toPy
= {'error': 'error', 'metrics': 'metrics'}
3898 def __init__(self
, error
=None, metrics
=None):
3901 metrics : typing.Sequence<+T_co>[~MetricResult]<~MetricResult>
3903 self
.error
= Error
.from_json(error
) if error
else None
3904 self
.metrics
= [MetricResult
.from_json(o
) for o
in metrics
or []]
3907 class MeterStatusParam(Type
):
3908 _toSchema
= {'code': 'code', 'info': 'info', 'tag': 'tag'}
3909 _toPy
= {'code': 'code', 'info': 'info', 'tag': 'tag'}
3910 def __init__(self
, code
=None, info
=None, tag
=None):
3921 class MeterStatusParams(Type
):
3922 _toSchema
= {'statues': 'statues'}
3923 _toPy
= {'statues': 'statues'}
3924 def __init__(self
, statues
=None):
3926 statues : typing.Sequence<+T_co>[~MeterStatusParam]<~MeterStatusParam>
3928 self
.statues
= [MeterStatusParam
.from_json(o
) for o
in statues
or []]
3931 class MetricResult(Type
):
3932 _toSchema
= {'key': 'key', 'time': 'time', 'unit': 'unit', 'value': 'value'}
3933 _toPy
= {'key': 'key', 'time': 'time', 'unit': 'unit', 'value': 'value'}
3934 def __init__(self
, key
=None, time
=None, unit
=None, value
=None):
3947 class MetricResults(Type
):
3948 _toSchema
= {'results': 'results'}
3949 _toPy
= {'results': 'results'}
3950 def __init__(self
, results
=None):
3952 results : typing.Sequence<+T_co>[~EntityMetrics]<~EntityMetrics>
3954 self
.results
= [EntityMetrics
.from_json(o
) for o
in results
or []]
3957 class PhaseResult(Type
):
3958 _toSchema
= {'error': 'error', 'phase': 'phase'}
3959 _toPy
= {'error': 'error', 'phase': 'phase'}
3960 def __init__(self
, error
=None, phase
=None):
3965 self
.error
= Error
.from_json(error
) if error
else None
3969 class PhaseResults(Type
):
3970 _toSchema
= {'results': 'results'}
3971 _toPy
= {'results': 'results'}
3972 def __init__(self
, results
=None):
3974 results : typing.Sequence<+T_co>[~PhaseResult]<~PhaseResult>
3976 self
.results
= [PhaseResult
.from_json(o
) for o
in results
or []]
3979 class MasterMigrationStatus(Type
):
3980 _toSchema
= {'migration_id': 'migration-id', 'phase': 'phase', 'phase_changed_time': 'phase-changed-time', 'spec': 'spec'}
3981 _toPy
= {'migration-id': 'migration_id', 'phase': 'phase', 'phase-changed-time': 'phase_changed_time', 'spec': 'spec'}
3982 def __init__(self
, migration_id
=None, phase
=None, phase_changed_time
=None, spec
=None):
3986 phase_changed_time : str
3987 spec : MigrationSpec
3989 self
.migration_id
= migration_id
3991 self
.phase_changed_time
= phase_changed_time
3992 self
.spec
= MigrationSpec
.from_json(spec
) if spec
else None
3995 class MigrationModelInfo(Type
):
3996 _toSchema
= {'agent_version': 'agent-version', 'name': 'name', 'owner_tag': 'owner-tag', 'uuid': 'uuid'}
3997 _toPy
= {'agent-version': 'agent_version', 'name': 'name', 'owner-tag': 'owner_tag', 'uuid': 'uuid'}
3998 def __init__(self
, agent_version
=None, name
=None, owner_tag
=None, uuid
=None):
4000 agent_version : Number
4005 self
.agent_version
= Number
.from_json(agent_version
) if agent_version
else None
4007 self
.owner_tag
= owner_tag
4011 class MinionReports(Type
):
4012 _toSchema
= {'failed': 'failed', 'migration_id': 'migration-id', 'phase': 'phase', 'success_count': 'success-count', 'unknown_count': 'unknown-count', 'unknown_sample': 'unknown-sample'}
4013 _toPy
= {'failed': 'failed', 'migration-id': 'migration_id', 'phase': 'phase', 'success-count': 'success_count', 'unknown-count': 'unknown_count', 'unknown-sample': 'unknown_sample'}
4014 def __init__(self
, failed
=None, migration_id
=None, phase
=None, success_count
=None, unknown_count
=None, unknown_sample
=None):
4016 failed : typing.Sequence<+T_co>[str]
4021 unknown_sample : typing.Sequence<+T_co>[str]
4023 self
.failed
= failed
4024 self
.migration_id
= migration_id
4026 self
.success_count
= success_count
4027 self
.unknown_count
= unknown_count
4028 self
.unknown_sample
= unknown_sample
4031 class SerializedModel(Type
):
4032 _toSchema
= {'bytes_': 'bytes', 'charms': 'charms', 'tools': 'tools'}
4033 _toPy
= {'bytes': 'bytes_', 'charms': 'charms', 'tools': 'tools'}
4034 def __init__(self
, bytes_
=None, charms
=None, tools
=None):
4036 bytes_ : typing.Sequence<+T_co>[int]
4037 charms : typing.Sequence<+T_co>[str]
4038 tools : typing.Sequence<+T_co>[~SerializedModelTools]<~SerializedModelTools>
4040 self
.bytes_
= bytes_
4041 self
.charms
= charms
4042 self
.tools
= [SerializedModelTools
.from_json(o
) for o
in tools
or []]
4045 class SerializedModelTools(Type
):
4046 _toSchema
= {'uri': 'uri', 'version': 'version'}
4047 _toPy
= {'uri': 'uri', 'version': 'version'}
4048 def __init__(self
, uri
=None, version
=None):
4054 self
.version
= version
4057 class SetMigrationPhaseArgs(Type
):
4058 _toSchema
= {'phase': 'phase'}
4059 _toPy
= {'phase': 'phase'}
4060 def __init__(self
, phase
=None):
4067 class SetMigrationStatusMessageArgs(Type
):
4068 _toSchema
= {'message': 'message'}
4069 _toPy
= {'message': 'message'}
4070 def __init__(self
, message
=None):
4074 self
.message
= message
4077 class MinionReport(Type
):
4078 _toSchema
= {'migration_id': 'migration-id', 'phase': 'phase', 'success': 'success'}
4079 _toPy
= {'migration-id': 'migration_id', 'phase': 'phase', 'success': 'success'}
4080 def __init__(self
, migration_id
=None, phase
=None, success
=None):
4086 self
.migration_id
= migration_id
4088 self
.success
= success
4091 class MigrationStatus(Type
):
4092 _toSchema
= {'attempt': 'attempt', 'external_control': 'external-control', 'migration_id': 'migration-id', 'phase': 'phase', 'source_api_addrs': 'source-api-addrs', 'source_ca_cert': 'source-ca-cert', 'target_api_addrs': 'target-api-addrs', 'target_ca_cert': 'target-ca-cert'}
4093 _toPy
= {'attempt': 'attempt', 'external-control': 'external_control', 'migration-id': 'migration_id', 'phase': 'phase', 'source-api-addrs': 'source_api_addrs', 'source-ca-cert': 'source_ca_cert', 'target-api-addrs': 'target_api_addrs', 'target-ca-cert': 'target_ca_cert'}
4094 def __init__(self
, attempt
=None, external_control
=None, migration_id
=None, phase
=None, source_api_addrs
=None, source_ca_cert
=None, target_api_addrs
=None, target_ca_cert
=None):
4097 external_control : bool
4100 source_api_addrs : typing.Sequence<+T_co>[str]
4101 source_ca_cert : str
4102 target_api_addrs : typing.Sequence<+T_co>[str]
4103 target_ca_cert : str
4105 self
.attempt
= attempt
4106 self
.external_control
= external_control
4107 self
.migration_id
= migration_id
4109 self
.source_api_addrs
= source_api_addrs
4110 self
.source_ca_cert
= source_ca_cert
4111 self
.target_api_addrs
= target_api_addrs
4112 self
.target_ca_cert
= target_ca_cert
4115 class ModelArgs(Type
):
4116 _toSchema
= {'model_tag': 'model-tag'}
4117 _toPy
= {'model-tag': 'model_tag'}
4118 def __init__(self
, model_tag
=None):
4122 self
.model_tag
= model_tag
4125 class MapResult(Type
):
4126 _toSchema
= {'error': 'error', 'result': 'result'}
4127 _toPy
= {'error': 'error', 'result': 'result'}
4128 def __init__(self
, error
=None, result
=None):
4131 result : typing.Mapping<~KT, +VT_co>[str, typing.Any]
4133 self
.error
= Error
.from_json(error
) if error
else None
4134 self
.result
= result
4137 class MapResults(Type
):
4138 _toSchema
= {'results': 'results'}
4139 _toPy
= {'results': 'results'}
4140 def __init__(self
, results
=None):
4142 results : typing.Sequence<+T_co>[~MapResult]<~MapResult>
4144 self
.results
= [MapResult
.from_json(o
) for o
in results
or []]
4147 class ModelCreateArgs(Type
):
4148 _toSchema
= {'cloud_tag': 'cloud-tag', 'config': 'config', 'credential': 'credential', 'name': 'name', 'owner_tag': 'owner-tag', 'region': 'region'}
4149 _toPy
= {'cloud-tag': 'cloud_tag', 'config': 'config', 'credential': 'credential', 'name': 'name', 'owner-tag': 'owner_tag', 'region': 'region'}
4150 def __init__(self
, cloud_tag
=None, config
=None, credential
=None, name
=None, owner_tag
=None, region
=None):
4153 config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
4159 self
.cloud_tag
= cloud_tag
4160 self
.config
= config
4161 self
.credential
= credential
4163 self
.owner_tag
= owner_tag
4164 self
.region
= region
4167 class ModelDefaultValues(Type
):
4168 _toSchema
= {'cloud_region': 'cloud-region', 'cloud_tag': 'cloud-tag', 'config': 'config'}
4169 _toPy
= {'cloud-region': 'cloud_region', 'cloud-tag': 'cloud_tag', 'config': 'config'}
4170 def __init__(self
, cloud_region
=None, cloud_tag
=None, config
=None):
4174 config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
4176 self
.cloud_region
= cloud_region
4177 self
.cloud_tag
= cloud_tag
4178 self
.config
= config
4181 class ModelDefaults(Type
):
4182 _toSchema
= {'controller': 'controller', 'default': 'default', 'regions': 'regions'}
4183 _toPy
= {'controller': 'controller', 'default': 'default', 'regions': 'regions'}
4184 def __init__(self
, controller
=None, default
=None, regions
=None):
4186 controller : typing.Mapping<~KT, +VT_co>[str, typing.Any]
4187 default : typing.Mapping<~KT, +VT_co>[str, typing.Any]
4188 regions : typing.Sequence<+T_co>[~RegionDefaults]<~RegionDefaults>
4190 self
.controller
= controller
4191 self
.default
= default
4192 self
.regions
= [RegionDefaults
.from_json(o
) for o
in regions
or []]
4195 class ModelDefaultsResult(Type
):
4196 _toSchema
= {'config': 'config'}
4197 _toPy
= {'config': 'config'}
4198 def __init__(self
, config
=None):
4200 config : typing.Mapping<~KT, +VT_co>[str, ~ModelDefaults]<~ModelDefaults>
4202 self
.config
= config
4205 class ModelInfoResult(Type
):
4206 _toSchema
= {'error': 'error', 'result': 'result'}
4207 _toPy
= {'error': 'error', 'result': 'result'}
4208 def __init__(self
, error
=None, result
=None):
4213 self
.error
= Error
.from_json(error
) if error
else None
4214 self
.result
= ModelInfo
.from_json(result
) if result
else None
4217 class ModelInfoResults(Type
):
4218 _toSchema
= {'results': 'results'}
4219 _toPy
= {'results': 'results'}
4220 def __init__(self
, results
=None):
4222 results : typing.Sequence<+T_co>[~ModelInfoResult]<~ModelInfoResult>
4224 self
.results
= [ModelInfoResult
.from_json(o
) for o
in results
or []]
4227 class ModelUnsetKeys(Type
):
4228 _toSchema
= {'cloud_region': 'cloud-region', 'cloud_tag': 'cloud-tag', 'keys': 'keys'}
4229 _toPy
= {'cloud-region': 'cloud_region', 'cloud-tag': 'cloud_tag', 'keys': 'keys'}
4230 def __init__(self
, cloud_region
=None, cloud_tag
=None, keys
=None):
4234 keys : typing.Sequence<+T_co>[str]
4236 self
.cloud_region
= cloud_region
4237 self
.cloud_tag
= cloud_tag
4241 class ModifyModelAccess(Type
):
4242 _toSchema
= {'access': 'access', 'action': 'action', 'model_tag': 'model-tag', 'user_tag': 'user-tag'}
4243 _toPy
= {'access': 'access', 'action': 'action', 'model-tag': 'model_tag', 'user-tag': 'user_tag'}
4244 def __init__(self
, access
=None, action
=None, model_tag
=None, user_tag
=None):
4251 self
.access
= access
4252 self
.action
= action
4253 self
.model_tag
= model_tag
4254 self
.user_tag
= user_tag
4257 class ModifyModelAccessRequest(Type
):
4258 _toSchema
= {'changes': 'changes'}
4259 _toPy
= {'changes': 'changes'}
4260 def __init__(self
, changes
=None):
4262 changes : typing.Sequence<+T_co>[~ModifyModelAccess]<~ModifyModelAccess>
4264 self
.changes
= [ModifyModelAccess
.from_json(o
) for o
in changes
or []]
4267 class RegionDefaults(Type
):
4268 _toSchema
= {'region_name': 'region-name', 'value': 'value'}
4269 _toPy
= {'region-name': 'region_name', 'value': 'value'}
4270 def __init__(self
, region_name
=None, value
=None):
4273 value : typing.Mapping<~KT, +VT_co>[str, typing.Any]
4275 self
.region_name
= region_name
4279 class SetModelDefaults(Type
):
4280 _toSchema
= {'config': 'config'}
4281 _toPy
= {'config': 'config'}
4282 def __init__(self
, config
=None):
4284 config : typing.Sequence<+T_co>[~ModelDefaultValues]<~ModelDefaultValues>
4286 self
.config
= [ModelDefaultValues
.from_json(o
) for o
in config
or []]
4289 class UnsetModelDefaults(Type
):
4290 _toSchema
= {'keys': 'keys'}
4291 _toPy
= {'keys': 'keys'}
4292 def __init__(self
, keys
=None):
4294 keys : typing.Sequence<+T_co>[~ModelUnsetKeys]<~ModelUnsetKeys>
4296 self
.keys
= [ModelUnsetKeys
.from_json(o
) for o
in keys
or []]
4299 class ConstraintsResult(Type
):
4300 _toSchema
= {'constraints': 'constraints', 'error': 'error'}
4301 _toPy
= {'constraints': 'constraints', 'error': 'error'}
4302 def __init__(self
, constraints
=None, error
=None):
4307 self
.constraints
= Value
.from_json(constraints
) if constraints
else None
4308 self
.error
= Error
.from_json(error
) if error
else None
4311 class ConstraintsResults(Type
):
4312 _toSchema
= {'results': 'results'}
4313 _toPy
= {'results': 'results'}
4314 def __init__(self
, results
=None):
4316 results : typing.Sequence<+T_co>[~ConstraintsResult]<~ConstraintsResult>
4318 self
.results
= [ConstraintsResult
.from_json(o
) for o
in results
or []]
4321 class ContainerConfig(Type
):
4322 _toSchema
= {'apt_mirror': 'apt-mirror', 'apt_proxy': 'apt-proxy', 'authorized_keys': 'authorized-keys', 'provider_type': 'provider-type', 'proxy': 'proxy', 'ssl_hostname_verification': 'ssl-hostname-verification', 'updatebehavior': 'UpdateBehavior'}
4323 _toPy
= {'UpdateBehavior': 'updatebehavior', 'apt-mirror': 'apt_mirror', 'apt-proxy': 'apt_proxy', 'authorized-keys': 'authorized_keys', 'provider-type': 'provider_type', 'proxy': 'proxy', 'ssl-hostname-verification': 'ssl_hostname_verification'}
4324 def __init__(self
, updatebehavior
=None, apt_mirror
=None, apt_proxy
=None, authorized_keys
=None, provider_type
=None, proxy
=None, ssl_hostname_verification
=None):
4326 updatebehavior : UpdateBehavior
4328 apt_proxy : Settings
4329 authorized_keys : str
4332 ssl_hostname_verification : bool
4334 self
.updatebehavior
= UpdateBehavior
.from_json(updatebehavior
) if updatebehavior
else None
4335 self
.apt_mirror
= apt_mirror
4336 self
.apt_proxy
= Settings
.from_json(apt_proxy
) if apt_proxy
else None
4337 self
.authorized_keys
= authorized_keys
4338 self
.provider_type
= provider_type
4339 self
.proxy
= Settings
.from_json(proxy
) if proxy
else None
4340 self
.ssl_hostname_verification
= ssl_hostname_verification
4343 class ContainerManagerConfig(Type
):
4344 _toSchema
= {'config': 'config'}
4345 _toPy
= {'config': 'config'}
4346 def __init__(self
, config
=None):
4348 config : typing.Mapping<~KT, +VT_co>[str, str]
4350 self
.config
= config
4353 class ContainerManagerConfigParams(Type
):
4354 _toSchema
= {'type_': 'type'}
4355 _toPy
= {'type': 'type_'}
4356 def __init__(self
, type_
=None):
4363 class DistributionGroupResult(Type
):
4364 _toSchema
= {'error': 'error', 'result': 'result'}
4365 _toPy
= {'error': 'error', 'result': 'result'}
4366 def __init__(self
, error
=None, result
=None):
4369 result : typing.Sequence<+T_co>[str]
4371 self
.error
= Error
.from_json(error
) if error
else None
4372 self
.result
= result
4375 class DistributionGroupResults(Type
):
4376 _toSchema
= {'results': 'results'}
4377 _toPy
= {'results': 'results'}
4378 def __init__(self
, results
=None):
4380 results : typing.Sequence<+T_co>[~DistributionGroupResult]<~DistributionGroupResult>
4382 self
.results
= [DistributionGroupResult
.from_json(o
) for o
in results
or []]
4385 class InstanceInfo(Type
):
4386 _toSchema
= {'characteristics': 'characteristics', 'instance_id': 'instance-id', 'network_config': 'network-config', 'nonce': 'nonce', 'tag': 'tag', 'volume_attachments': 'volume-attachments', 'volumes': 'volumes'}
4387 _toPy
= {'characteristics': 'characteristics', 'instance-id': 'instance_id', 'network-config': 'network_config', 'nonce': 'nonce', 'tag': 'tag', 'volume-attachments': 'volume_attachments', 'volumes': 'volumes'}
4388 def __init__(self
, characteristics
=None, instance_id
=None, network_config
=None, nonce
=None, tag
=None, volume_attachments
=None, volumes
=None):
4390 characteristics : HardwareCharacteristics
4392 network_config : typing.Sequence<+T_co>[~NetworkConfig]<~NetworkConfig>
4395 volume_attachments : typing.Mapping<~KT, +VT_co>[str, ~VolumeAttachmentInfo]<~VolumeAttachmentInfo>
4396 volumes : typing.Sequence<+T_co>[~Volume]<~Volume>
4398 self
.characteristics
= HardwareCharacteristics
.from_json(characteristics
) if characteristics
else None
4399 self
.instance_id
= instance_id
4400 self
.network_config
= [NetworkConfig
.from_json(o
) for o
in network_config
or []]
4403 self
.volume_attachments
= volume_attachments
4404 self
.volumes
= [Volume
.from_json(o
) for o
in volumes
or []]
4407 class InstancesInfo(Type
):
4408 _toSchema
= {'machines': 'machines'}
4409 _toPy
= {'machines': 'machines'}
4410 def __init__(self
, machines
=None):
4412 machines : typing.Sequence<+T_co>[~InstanceInfo]<~InstanceInfo>
4414 self
.machines
= [InstanceInfo
.from_json(o
) for o
in machines
or []]
4417 class MachineContainers(Type
):
4418 _toSchema
= {'container_types': 'container-types', 'machine_tag': 'machine-tag'}
4419 _toPy
= {'container-types': 'container_types', 'machine-tag': 'machine_tag'}
4420 def __init__(self
, container_types
=None, machine_tag
=None):
4422 container_types : typing.Sequence<+T_co>[str]
4425 self
.container_types
= container_types
4426 self
.machine_tag
= machine_tag
4429 class MachineContainersParams(Type
):
4430 _toSchema
= {'params': 'params'}
4431 _toPy
= {'params': 'params'}
4432 def __init__(self
, params
=None):
4434 params : typing.Sequence<+T_co>[~MachineContainers]<~MachineContainers>
4436 self
.params
= [MachineContainers
.from_json(o
) for o
in params
or []]
4439 class MachineNetworkConfigResult(Type
):
4440 _toSchema
= {'error': 'error', 'info': 'info'}
4441 _toPy
= {'error': 'error', 'info': 'info'}
4442 def __init__(self
, error
=None, info
=None):
4445 info : typing.Sequence<+T_co>[~NetworkConfig]<~NetworkConfig>
4447 self
.error
= Error
.from_json(error
) if error
else None
4448 self
.info
= [NetworkConfig
.from_json(o
) for o
in info
or []]
4451 class MachineNetworkConfigResults(Type
):
4452 _toSchema
= {'results': 'results'}
4453 _toPy
= {'results': 'results'}
4454 def __init__(self
, results
=None):
4456 results : typing.Sequence<+T_co>[~MachineNetworkConfigResult]<~MachineNetworkConfigResult>
4458 self
.results
= [MachineNetworkConfigResult
.from_json(o
) for o
in results
or []]
4461 class ProvisioningInfo(Type
):
4462 _toSchema
= {'constraints': 'constraints', 'controller_config': 'controller-config', 'endpoint_bindings': 'endpoint-bindings', 'image_metadata': 'image-metadata', 'jobs': 'jobs', 'placement': 'placement', 'series': 'series', 'subnets_to_zones': 'subnets-to-zones', 'tags': 'tags', 'volumes': 'volumes'}
4463 _toPy
= {'constraints': 'constraints', 'controller-config': 'controller_config', 'endpoint-bindings': 'endpoint_bindings', 'image-metadata': 'image_metadata', 'jobs': 'jobs', 'placement': 'placement', 'series': 'series', 'subnets-to-zones': 'subnets_to_zones', 'tags': 'tags', 'volumes': 'volumes'}
4464 def __init__(self
, constraints
=None, controller_config
=None, endpoint_bindings
=None, image_metadata
=None, jobs
=None, placement
=None, series
=None, subnets_to_zones
=None, tags
=None, volumes
=None):
4467 controller_config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
4468 endpoint_bindings : typing.Mapping<~KT, +VT_co>[str, str]
4469 image_metadata : typing.Sequence<+T_co>[~CloudImageMetadata]<~CloudImageMetadata>
4470 jobs : typing.Sequence<+T_co>[str]
4473 subnets_to_zones : typing.Sequence<+T_co>[str]
4474 tags : typing.Mapping<~KT, +VT_co>[str, str]
4475 volumes : typing.Sequence<+T_co>[~VolumeParams]<~VolumeParams>
4477 self
.constraints
= Value
.from_json(constraints
) if constraints
else None
4478 self
.controller_config
= controller_config
4479 self
.endpoint_bindings
= endpoint_bindings
4480 self
.image_metadata
= [CloudImageMetadata
.from_json(o
) for o
in image_metadata
or []]
4482 self
.placement
= placement
4483 self
.series
= series
4484 self
.subnets_to_zones
= subnets_to_zones
4486 self
.volumes
= [VolumeParams
.from_json(o
) for o
in volumes
or []]
4489 class ProvisioningInfoResult(Type
):
4490 _toSchema
= {'error': 'error', 'result': 'result'}
4491 _toPy
= {'error': 'error', 'result': 'result'}
4492 def __init__(self
, error
=None, result
=None):
4495 result : ProvisioningInfo
4497 self
.error
= Error
.from_json(error
) if error
else None
4498 self
.result
= ProvisioningInfo
.from_json(result
) if result
else None
4501 class ProvisioningInfoResults(Type
):
4502 _toSchema
= {'results': 'results'}
4503 _toPy
= {'results': 'results'}
4504 def __init__(self
, results
=None):
4506 results : typing.Sequence<+T_co>[~ProvisioningInfoResult]<~ProvisioningInfoResult>
4508 self
.results
= [ProvisioningInfoResult
.from_json(o
) for o
in results
or []]
4511 class Settings(Type
):
4512 _toSchema
= {'ftp': 'Ftp', 'http': 'Http', 'https': 'Https', 'noproxy': 'NoProxy'}
4513 _toPy
= {'Ftp': 'ftp', 'Http': 'http', 'Https': 'https', 'NoProxy': 'noproxy'}
4514 def __init__(self
, ftp
=None, http
=None, https
=None, noproxy
=None):
4524 self
.noproxy
= noproxy
4527 class ToolsResult(Type
):
4528 _toSchema
= {'disable_ssl_hostname_verification': 'disable-ssl-hostname-verification', 'error': 'error', 'tools': 'tools'}
4529 _toPy
= {'disable-ssl-hostname-verification': 'disable_ssl_hostname_verification', 'error': 'error', 'tools': 'tools'}
4530 def __init__(self
, disable_ssl_hostname_verification
=None, error
=None, tools
=None):
4532 disable_ssl_hostname_verification : bool
4534 tools : typing.Sequence<+T_co>[~Tools]<~Tools>
4536 self
.disable_ssl_hostname_verification
= disable_ssl_hostname_verification
4537 self
.error
= Error
.from_json(error
) if error
else None
4538 self
.tools
= [Tools
.from_json(o
) for o
in tools
or []]
4541 class ToolsResults(Type
):
4542 _toSchema
= {'results': 'results'}
4543 _toPy
= {'results': 'results'}
4544 def __init__(self
, results
=None):
4546 results : typing.Sequence<+T_co>[~ToolsResult]<~ToolsResult>
4548 self
.results
= [ToolsResult
.from_json(o
) for o
in results
or []]
4551 class UpdateBehavior(Type
):
4552 _toSchema
= {'enable_os_refresh_update': 'enable-os-refresh-update', 'enable_os_upgrade': 'enable-os-upgrade'}
4553 _toPy
= {'enable-os-refresh-update': 'enable_os_refresh_update', 'enable-os-upgrade': 'enable_os_upgrade'}
4554 def __init__(self
, enable_os_refresh_update
=None, enable_os_upgrade
=None):
4556 enable_os_refresh_update : bool
4557 enable_os_upgrade : bool
4559 self
.enable_os_refresh_update
= enable_os_refresh_update
4560 self
.enable_os_upgrade
= enable_os_upgrade
4564 _toSchema
= {'info': 'info', 'volume_tag': 'volume-tag'}
4565 _toPy
= {'info': 'info', 'volume-tag': 'volume_tag'}
4566 def __init__(self
, info
=None, volume_tag
=None):
4571 self
.info
= VolumeInfo
.from_json(info
) if info
else None
4572 self
.volume_tag
= volume_tag
4575 class VolumeAttachmentInfo(Type
):
4576 _toSchema
= {'bus_address': 'bus-address', 'device_link': 'device-link', 'device_name': 'device-name', 'read_only': 'read-only'}
4577 _toPy
= {'bus-address': 'bus_address', 'device-link': 'device_link', 'device-name': 'device_name', 'read-only': 'read_only'}
4578 def __init__(self
, bus_address
=None, device_link
=None, device_name
=None, read_only
=None):
4585 self
.bus_address
= bus_address
4586 self
.device_link
= device_link
4587 self
.device_name
= device_name
4588 self
.read_only
= read_only
4591 class VolumeAttachmentParams(Type
):
4592 _toSchema
= {'instance_id': 'instance-id', 'machine_tag': 'machine-tag', 'provider': 'provider', 'read_only': 'read-only', 'volume_id': 'volume-id', 'volume_tag': 'volume-tag'}
4593 _toPy
= {'instance-id': 'instance_id', 'machine-tag': 'machine_tag', 'provider': 'provider', 'read-only': 'read_only', 'volume-id': 'volume_id', 'volume-tag': 'volume_tag'}
4594 def __init__(self
, instance_id
=None, machine_tag
=None, provider
=None, read_only
=None, volume_id
=None, volume_tag
=None):
4603 self
.instance_id
= instance_id
4604 self
.machine_tag
= machine_tag
4605 self
.provider
= provider
4606 self
.read_only
= read_only
4607 self
.volume_id
= volume_id
4608 self
.volume_tag
= volume_tag
4611 class VolumeInfo(Type
):
4612 _toSchema
= {'hardware_id': 'hardware-id', 'persistent': 'persistent', 'size': 'size', 'volume_id': 'volume-id'}
4613 _toPy
= {'hardware-id': 'hardware_id', 'persistent': 'persistent', 'size': 'size', 'volume-id': 'volume_id'}
4614 def __init__(self
, hardware_id
=None, persistent
=None, size
=None, volume_id
=None):
4621 self
.hardware_id
= hardware_id
4622 self
.persistent
= persistent
4624 self
.volume_id
= volume_id
4627 class VolumeParams(Type
):
4628 _toSchema
= {'attachment': 'attachment', 'attributes': 'attributes', 'provider': 'provider', 'size': 'size', 'tags': 'tags', 'volume_tag': 'volume-tag'}
4629 _toPy
= {'attachment': 'attachment', 'attributes': 'attributes', 'provider': 'provider', 'size': 'size', 'tags': 'tags', 'volume-tag': 'volume_tag'}
4630 def __init__(self
, attachment
=None, attributes
=None, provider
=None, size
=None, tags
=None, volume_tag
=None):
4632 attachment : VolumeAttachmentParams
4633 attributes : typing.Mapping<~KT, +VT_co>[str, typing.Any]
4636 tags : typing.Mapping<~KT, +VT_co>[str, str]
4639 self
.attachment
= VolumeAttachmentParams
.from_json(attachment
) if attachment
else None
4640 self
.attributes
= attributes
4641 self
.provider
= provider
4644 self
.volume_tag
= volume_tag
4647 class WatchContainer(Type
):
4648 _toSchema
= {'container_type': 'container-type', 'machine_tag': 'machine-tag'}
4649 _toPy
= {'container-type': 'container_type', 'machine-tag': 'machine_tag'}
4650 def __init__(self
, container_type
=None, machine_tag
=None):
4652 container_type : str
4655 self
.container_type
= container_type
4656 self
.machine_tag
= machine_tag
4659 class WatchContainers(Type
):
4660 _toSchema
= {'params': 'params'}
4661 _toPy
= {'params': 'params'}
4662 def __init__(self
, params
=None):
4664 params : typing.Sequence<+T_co>[~WatchContainer]<~WatchContainer>
4666 self
.params
= [WatchContainer
.from_json(o
) for o
in params
or []]
4669 class ProxyConfig(Type
):
4670 _toSchema
= {'ftp': 'ftp', 'http': 'http', 'https': 'https', 'no_proxy': 'no-proxy'}
4671 _toPy
= {'ftp': 'ftp', 'http': 'http', 'https': 'https', 'no-proxy': 'no_proxy'}
4672 def __init__(self
, ftp
=None, http
=None, https
=None, no_proxy
=None):
4682 self
.no_proxy
= no_proxy
4685 class ProxyConfigResult(Type
):
4686 _toSchema
= {'apt_proxy_settings': 'apt-proxy-settings', 'error': 'error', 'proxy_settings': 'proxy-settings'}
4687 _toPy
= {'apt-proxy-settings': 'apt_proxy_settings', 'error': 'error', 'proxy-settings': 'proxy_settings'}
4688 def __init__(self
, apt_proxy_settings
=None, error
=None, proxy_settings
=None):
4690 apt_proxy_settings : ProxyConfig
4692 proxy_settings : ProxyConfig
4694 self
.apt_proxy_settings
= ProxyConfig
.from_json(apt_proxy_settings
) if apt_proxy_settings
else None
4695 self
.error
= Error
.from_json(error
) if error
else None
4696 self
.proxy_settings
= ProxyConfig
.from_json(proxy_settings
) if proxy_settings
else None
4699 class ProxyConfigResults(Type
):
4700 _toSchema
= {'results': 'results'}
4701 _toPy
= {'results': 'results'}
4702 def __init__(self
, results
=None):
4704 results : typing.Sequence<+T_co>[~ProxyConfigResult]<~ProxyConfigResult>
4706 self
.results
= [ProxyConfigResult
.from_json(o
) for o
in results
or []]
4709 class RebootActionResult(Type
):
4710 _toSchema
= {'error': 'error', 'result': 'result'}
4711 _toPy
= {'error': 'error', 'result': 'result'}
4712 def __init__(self
, error
=None, result
=None):
4717 self
.error
= Error
.from_json(error
) if error
else None
4718 self
.result
= result
4721 class RebootActionResults(Type
):
4722 _toSchema
= {'results': 'results'}
4723 _toPy
= {'results': 'results'}
4724 def __init__(self
, results
=None):
4726 results : typing.Sequence<+T_co>[~RebootActionResult]<~RebootActionResult>
4728 self
.results
= [RebootActionResult
.from_json(o
) for o
in results
or []]
4731 class RelationUnitsChange(Type
):
4732 _toSchema
= {'changed': 'changed', 'departed': 'departed'}
4733 _toPy
= {'changed': 'changed', 'departed': 'departed'}
4734 def __init__(self
, changed
=None, departed
=None):
4736 changed : typing.Mapping<~KT, +VT_co>[str, ~UnitSettings]<~UnitSettings>
4737 departed : typing.Sequence<+T_co>[str]
4739 self
.changed
= changed
4740 self
.departed
= departed
4743 class RelationUnitsWatchResult(Type
):
4744 _toSchema
= {'changes': 'changes', 'error': 'error', 'watcher_id': 'watcher-id'}
4745 _toPy
= {'changes': 'changes', 'error': 'error', 'watcher-id': 'watcher_id'}
4746 def __init__(self
, changes
=None, error
=None, watcher_id
=None):
4748 changes : RelationUnitsChange
4752 self
.changes
= RelationUnitsChange
.from_json(changes
) if changes
else None
4753 self
.error
= Error
.from_json(error
) if error
else None
4754 self
.watcher_id
= watcher_id
4757 class UnitSettings(Type
):
4758 _toSchema
= {'version': 'version'}
4759 _toPy
= {'version': 'version'}
4760 def __init__(self
, version
=None):
4764 self
.version
= version
4767 class RetryStrategy(Type
):
4768 _toSchema
= {'jitter_retry_time': 'jitter-retry-time', 'max_retry_time': 'max-retry-time', 'min_retry_time': 'min-retry-time', 'retry_time_factor': 'retry-time-factor', 'should_retry': 'should-retry'}
4769 _toPy
= {'jitter-retry-time': 'jitter_retry_time', 'max-retry-time': 'max_retry_time', 'min-retry-time': 'min_retry_time', 'retry-time-factor': 'retry_time_factor', 'should-retry': 'should_retry'}
4770 def __init__(self
, jitter_retry_time
=None, max_retry_time
=None, min_retry_time
=None, retry_time_factor
=None, should_retry
=None):
4772 jitter_retry_time : bool
4773 max_retry_time : int
4774 min_retry_time : int
4775 retry_time_factor : int
4778 self
.jitter_retry_time
= jitter_retry_time
4779 self
.max_retry_time
= max_retry_time
4780 self
.min_retry_time
= min_retry_time
4781 self
.retry_time_factor
= retry_time_factor
4782 self
.should_retry
= should_retry
4785 class RetryStrategyResult(Type
):
4786 _toSchema
= {'error': 'error', 'result': 'result'}
4787 _toPy
= {'error': 'error', 'result': 'result'}
4788 def __init__(self
, error
=None, result
=None):
4791 result : RetryStrategy
4793 self
.error
= Error
.from_json(error
) if error
else None
4794 self
.result
= RetryStrategy
.from_json(result
) if result
else None
4797 class RetryStrategyResults(Type
):
4798 _toSchema
= {'results': 'results'}
4799 _toPy
= {'results': 'results'}
4800 def __init__(self
, results
=None):
4802 results : typing.Sequence<+T_co>[~RetryStrategyResult]<~RetryStrategyResult>
4804 self
.results
= [RetryStrategyResult
.from_json(o
) for o
in results
or []]
4807 class SSHAddressResult(Type
):
4808 _toSchema
= {'address': 'address', 'error': 'error'}
4809 _toPy
= {'address': 'address', 'error': 'error'}
4810 def __init__(self
, address
=None, error
=None):
4815 self
.address
= address
4816 self
.error
= Error
.from_json(error
) if error
else None
4819 class SSHAddressResults(Type
):
4820 _toSchema
= {'results': 'results'}
4821 _toPy
= {'results': 'results'}
4822 def __init__(self
, results
=None):
4824 results : typing.Sequence<+T_co>[~SSHAddressResult]<~SSHAddressResult>
4826 self
.results
= [SSHAddressResult
.from_json(o
) for o
in results
or []]
4829 class SSHAddressesResult(Type
):
4830 _toSchema
= {'addresses': 'addresses', 'error': 'error'}
4831 _toPy
= {'addresses': 'addresses', 'error': 'error'}
4832 def __init__(self
, addresses
=None, error
=None):
4834 addresses : typing.Sequence<+T_co>[str]
4837 self
.addresses
= addresses
4838 self
.error
= Error
.from_json(error
) if error
else None
4841 class SSHAddressesResults(Type
):
4842 _toSchema
= {'results': 'results'}
4843 _toPy
= {'results': 'results'}
4844 def __init__(self
, results
=None):
4846 results : typing.Sequence<+T_co>[~SSHAddressesResult]<~SSHAddressesResult>
4848 self
.results
= [SSHAddressesResult
.from_json(o
) for o
in results
or []]
4851 class SSHProxyResult(Type
):
4852 _toSchema
= {'use_proxy': 'use-proxy'}
4853 _toPy
= {'use-proxy': 'use_proxy'}
4854 def __init__(self
, use_proxy
=None):
4858 self
.use_proxy
= use_proxy
4861 class SSHPublicKeysResult(Type
):
4862 _toSchema
= {'error': 'error', 'public_keys': 'public-keys'}
4863 _toPy
= {'error': 'error', 'public-keys': 'public_keys'}
4864 def __init__(self
, error
=None, public_keys
=None):
4867 public_keys : typing.Sequence<+T_co>[str]
4869 self
.error
= Error
.from_json(error
) if error
else None
4870 self
.public_keys
= public_keys
4873 class SSHPublicKeysResults(Type
):
4874 _toSchema
= {'results': 'results'}
4875 _toPy
= {'results': 'results'}
4876 def __init__(self
, results
=None):
4878 results : typing.Sequence<+T_co>[~SSHPublicKeysResult]<~SSHPublicKeysResult>
4880 self
.results
= [SSHPublicKeysResult
.from_json(o
) for o
in results
or []]
4883 class SingularClaim(Type
):
4884 _toSchema
= {'controller_tag': 'controller-tag', 'duration': 'duration', 'model_tag': 'model-tag'}
4885 _toPy
= {'controller-tag': 'controller_tag', 'duration': 'duration', 'model-tag': 'model_tag'}
4886 def __init__(self
, controller_tag
=None, duration
=None, model_tag
=None):
4888 controller_tag : str
4892 self
.controller_tag
= controller_tag
4893 self
.duration
= duration
4894 self
.model_tag
= model_tag
4897 class SingularClaims(Type
):
4898 _toSchema
= {'claims': 'claims'}
4899 _toPy
= {'claims': 'claims'}
4900 def __init__(self
, claims
=None):
4902 claims : typing.Sequence<+T_co>[~SingularClaim]<~SingularClaim>
4904 self
.claims
= [SingularClaim
.from_json(o
) for o
in claims
or []]
4907 class ListSpacesResults(Type
):
4908 _toSchema
= {'results': 'results'}
4909 _toPy
= {'results': 'results'}
4910 def __init__(self
, results
=None):
4912 results : typing.Sequence<+T_co>[~Space]<~Space>
4914 self
.results
= [Space
.from_json(o
) for o
in results
or []]
4918 _toSchema
= {'error': 'error', 'name': 'name', 'subnets': 'subnets'}
4919 _toPy
= {'error': 'error', 'name': 'name', 'subnets': 'subnets'}
4920 def __init__(self
, error
=None, name
=None, subnets
=None):
4924 subnets : typing.Sequence<+T_co>[~Subnet]<~Subnet>
4926 self
.error
= Error
.from_json(error
) if error
else None
4928 self
.subnets
= [Subnet
.from_json(o
) for o
in subnets
or []]
4931 class StatusHistoryPruneArgs(Type
):
4932 _toSchema
= {'max_history_mb': 'max-history-mb', 'max_history_time': 'max-history-time'}
4933 _toPy
= {'max-history-mb': 'max_history_mb', 'max-history-time': 'max_history_time'}
4934 def __init__(self
, max_history_mb
=None, max_history_time
=None):
4936 max_history_mb : int
4937 max_history_time : int
4939 self
.max_history_mb
= max_history_mb
4940 self
.max_history_time
= max_history_time
4943 class FilesystemAttachmentInfo(Type
):
4944 _toSchema
= {'mount_point': 'mount-point', 'read_only': 'read-only'}
4945 _toPy
= {'mount-point': 'mount_point', 'read-only': 'read_only'}
4946 def __init__(self
, mount_point
=None, read_only
=None):
4951 self
.mount_point
= mount_point
4952 self
.read_only
= read_only
4955 class FilesystemDetails(Type
):
4956 _toSchema
= {'filesystem_tag': 'filesystem-tag', 'info': 'info', 'machine_attachments': 'machine-attachments', 'status': 'status', 'storage': 'storage', 'volume_tag': 'volume-tag'}
4957 _toPy
= {'filesystem-tag': 'filesystem_tag', 'info': 'info', 'machine-attachments': 'machine_attachments', 'status': 'status', 'storage': 'storage', 'volume-tag': 'volume_tag'}
4958 def __init__(self
, filesystem_tag
=None, info
=None, machine_attachments
=None, status
=None, storage
=None, volume_tag
=None):
4960 filesystem_tag : str
4961 info : FilesystemInfo
4962 machine_attachments : typing.Mapping<~KT, +VT_co>[str, ~FilesystemAttachmentInfo]<~FilesystemAttachmentInfo>
4963 status : EntityStatus
4964 storage : StorageDetails
4967 self
.filesystem_tag
= filesystem_tag
4968 self
.info
= FilesystemInfo
.from_json(info
) if info
else None
4969 self
.machine_attachments
= machine_attachments
4970 self
.status
= EntityStatus
.from_json(status
) if status
else None
4971 self
.storage
= StorageDetails
.from_json(storage
) if storage
else None
4972 self
.volume_tag
= volume_tag
4975 class FilesystemDetailsListResult(Type
):
4976 _toSchema
= {'error': 'error', 'result': 'result'}
4977 _toPy
= {'error': 'error', 'result': 'result'}
4978 def __init__(self
, error
=None, result
=None):
4981 result : typing.Sequence<+T_co>[~FilesystemDetails]<~FilesystemDetails>
4983 self
.error
= Error
.from_json(error
) if error
else None
4984 self
.result
= [FilesystemDetails
.from_json(o
) for o
in result
or []]
4987 class FilesystemDetailsListResults(Type
):
4988 _toSchema
= {'results': 'results'}
4989 _toPy
= {'results': 'results'}
4990 def __init__(self
, results
=None):
4992 results : typing.Sequence<+T_co>[~FilesystemDetailsListResult]<~FilesystemDetailsListResult>
4994 self
.results
= [FilesystemDetailsListResult
.from_json(o
) for o
in results
or []]
4997 class FilesystemFilter(Type
):
4998 _toSchema
= {'machines': 'machines'}
4999 _toPy
= {'machines': 'machines'}
5000 def __init__(self
, machines
=None):
5002 machines : typing.Sequence<+T_co>[str]
5004 self
.machines
= machines
5007 class FilesystemFilters(Type
):
5008 _toSchema
= {'filters': 'filters'}
5009 _toPy
= {'filters': 'filters'}
5010 def __init__(self
, filters
=None):
5012 filters : typing.Sequence<+T_co>[~FilesystemFilter]<~FilesystemFilter>
5014 self
.filters
= [FilesystemFilter
.from_json(o
) for o
in filters
or []]
5017 class FilesystemInfo(Type
):
5018 _toSchema
= {'filesystem_id': 'filesystem-id', 'size': 'size'}
5019 _toPy
= {'filesystem-id': 'filesystem_id', 'size': 'size'}
5020 def __init__(self
, filesystem_id
=None, size
=None):
5025 self
.filesystem_id
= filesystem_id
5029 class StorageAddParams(Type
):
5030 _toSchema
= {'name': 'name', 'storage': 'storage', 'unit': 'unit'}
5031 _toPy
= {'name': 'name', 'storage': 'storage', 'unit': 'unit'}
5032 def __init__(self
, name
=None, storage
=None, unit
=None):
5035 storage : StorageConstraints
5039 self
.storage
= StorageConstraints
.from_json(storage
) if storage
else None
5043 class StorageAttachmentDetails(Type
):
5044 _toSchema
= {'location': 'location', 'machine_tag': 'machine-tag', 'storage_tag': 'storage-tag', 'unit_tag': 'unit-tag'}
5045 _toPy
= {'location': 'location', 'machine-tag': 'machine_tag', 'storage-tag': 'storage_tag', 'unit-tag': 'unit_tag'}
5046 def __init__(self
, location
=None, machine_tag
=None, storage_tag
=None, unit_tag
=None):
5053 self
.location
= location
5054 self
.machine_tag
= machine_tag
5055 self
.storage_tag
= storage_tag
5056 self
.unit_tag
= unit_tag
5059 class StorageDetails(Type
):
5060 _toSchema
= {'attachments': 'attachments', 'kind': 'kind', 'owner_tag': 'owner-tag', 'persistent': 'persistent', 'status': 'status', 'storage_tag': 'storage-tag'}
5061 _toPy
= {'attachments': 'attachments', 'kind': 'kind', 'owner-tag': 'owner_tag', 'persistent': 'persistent', 'status': 'status', 'storage-tag': 'storage_tag'}
5062 def __init__(self
, attachments
=None, kind
=None, owner_tag
=None, persistent
=None, status
=None, storage_tag
=None):
5064 attachments : typing.Mapping<~KT, +VT_co>[str, ~StorageAttachmentDetails]<~StorageAttachmentDetails>
5068 status : EntityStatus
5071 self
.attachments
= attachments
5073 self
.owner_tag
= owner_tag
5074 self
.persistent
= persistent
5075 self
.status
= EntityStatus
.from_json(status
) if status
else None
5076 self
.storage_tag
= storage_tag
5079 class StorageDetailsListResult(Type
):
5080 _toSchema
= {'error': 'error', 'result': 'result'}
5081 _toPy
= {'error': 'error', 'result': 'result'}
5082 def __init__(self
, error
=None, result
=None):
5085 result : typing.Sequence<+T_co>[~StorageDetails]<~StorageDetails>
5087 self
.error
= Error
.from_json(error
) if error
else None
5088 self
.result
= [StorageDetails
.from_json(o
) for o
in result
or []]
5091 class StorageDetailsListResults(Type
):
5092 _toSchema
= {'results': 'results'}
5093 _toPy
= {'results': 'results'}
5094 def __init__(self
, results
=None):
5096 results : typing.Sequence<+T_co>[~StorageDetailsListResult]<~StorageDetailsListResult>
5098 self
.results
= [StorageDetailsListResult
.from_json(o
) for o
in results
or []]
5101 class StorageDetailsResult(Type
):
5102 _toSchema
= {'error': 'error', 'result': 'result'}
5103 _toPy
= {'error': 'error', 'result': 'result'}
5104 def __init__(self
, error
=None, result
=None):
5107 result : StorageDetails
5109 self
.error
= Error
.from_json(error
) if error
else None
5110 self
.result
= StorageDetails
.from_json(result
) if result
else None
5113 class StorageDetailsResults(Type
):
5114 _toSchema
= {'results': 'results'}
5115 _toPy
= {'results': 'results'}
5116 def __init__(self
, results
=None):
5118 results : typing.Sequence<+T_co>[~StorageDetailsResult]<~StorageDetailsResult>
5120 self
.results
= [StorageDetailsResult
.from_json(o
) for o
in results
or []]
5123 class StorageFilter(Type
):
5133 class StorageFilters(Type
):
5134 _toSchema
= {'filters': 'filters'}
5135 _toPy
= {'filters': 'filters'}
5136 def __init__(self
, filters
=None):
5138 filters : typing.Sequence<+T_co>[~StorageFilter]<~StorageFilter>
5140 self
.filters
= [StorageFilter
.from_json(o
) for o
in filters
or []]
5143 class StoragePool(Type
):
5144 _toSchema
= {'attrs': 'attrs', 'name': 'name', 'provider': 'provider'}
5145 _toPy
= {'attrs': 'attrs', 'name': 'name', 'provider': 'provider'}
5146 def __init__(self
, attrs
=None, name
=None, provider
=None):
5148 attrs : typing.Mapping<~KT, +VT_co>[str, typing.Any]
5154 self
.provider
= provider
5157 class StoragePoolFilter(Type
):
5158 _toSchema
= {'names': 'names', 'providers': 'providers'}
5159 _toPy
= {'names': 'names', 'providers': 'providers'}
5160 def __init__(self
, names
=None, providers
=None):
5162 names : typing.Sequence<+T_co>[str]
5163 providers : typing.Sequence<+T_co>[str]
5166 self
.providers
= providers
5169 class StoragePoolFilters(Type
):
5170 _toSchema
= {'filters': 'filters'}
5171 _toPy
= {'filters': 'filters'}
5172 def __init__(self
, filters
=None):
5174 filters : typing.Sequence<+T_co>[~StoragePoolFilter]<~StoragePoolFilter>
5176 self
.filters
= [StoragePoolFilter
.from_json(o
) for o
in filters
or []]
5179 class StoragePoolsResult(Type
):
5180 _toSchema
= {'error': 'error', 'storage_pools': 'storage-pools'}
5181 _toPy
= {'error': 'error', 'storage-pools': 'storage_pools'}
5182 def __init__(self
, error
=None, storage_pools
=None):
5185 storage_pools : typing.Sequence<+T_co>[~StoragePool]<~StoragePool>
5187 self
.error
= Error
.from_json(error
) if error
else None
5188 self
.storage_pools
= [StoragePool
.from_json(o
) for o
in storage_pools
or []]
5191 class StoragePoolsResults(Type
):
5192 _toSchema
= {'results': 'results'}
5193 _toPy
= {'results': 'results'}
5194 def __init__(self
, results
=None):
5196 results : typing.Sequence<+T_co>[~StoragePoolsResult]<~StoragePoolsResult>
5198 self
.results
= [StoragePoolsResult
.from_json(o
) for o
in results
or []]
5201 class StoragesAddParams(Type
):
5202 _toSchema
= {'storages': 'storages'}
5203 _toPy
= {'storages': 'storages'}
5204 def __init__(self
, storages
=None):
5206 storages : typing.Sequence<+T_co>[~StorageAddParams]<~StorageAddParams>
5208 self
.storages
= [StorageAddParams
.from_json(o
) for o
in storages
or []]
5211 class VolumeDetails(Type
):
5212 _toSchema
= {'info': 'info', 'machine_attachments': 'machine-attachments', 'status': 'status', 'storage': 'storage', 'volume_tag': 'volume-tag'}
5213 _toPy
= {'info': 'info', 'machine-attachments': 'machine_attachments', 'status': 'status', 'storage': 'storage', 'volume-tag': 'volume_tag'}
5214 def __init__(self
, info
=None, machine_attachments
=None, status
=None, storage
=None, volume_tag
=None):
5217 machine_attachments : typing.Mapping<~KT, +VT_co>[str, ~VolumeAttachmentInfo]<~VolumeAttachmentInfo>
5218 status : EntityStatus
5219 storage : StorageDetails
5222 self
.info
= VolumeInfo
.from_json(info
) if info
else None
5223 self
.machine_attachments
= machine_attachments
5224 self
.status
= EntityStatus
.from_json(status
) if status
else None
5225 self
.storage
= StorageDetails
.from_json(storage
) if storage
else None
5226 self
.volume_tag
= volume_tag
5229 class VolumeDetailsListResult(Type
):
5230 _toSchema
= {'error': 'error', 'result': 'result'}
5231 _toPy
= {'error': 'error', 'result': 'result'}
5232 def __init__(self
, error
=None, result
=None):
5235 result : typing.Sequence<+T_co>[~VolumeDetails]<~VolumeDetails>
5237 self
.error
= Error
.from_json(error
) if error
else None
5238 self
.result
= [VolumeDetails
.from_json(o
) for o
in result
or []]
5241 class VolumeDetailsListResults(Type
):
5242 _toSchema
= {'results': 'results'}
5243 _toPy
= {'results': 'results'}
5244 def __init__(self
, results
=None):
5246 results : typing.Sequence<+T_co>[~VolumeDetailsListResult]<~VolumeDetailsListResult>
5248 self
.results
= [VolumeDetailsListResult
.from_json(o
) for o
in results
or []]
5251 class VolumeFilter(Type
):
5252 _toSchema
= {'machines': 'machines'}
5253 _toPy
= {'machines': 'machines'}
5254 def __init__(self
, machines
=None):
5256 machines : typing.Sequence<+T_co>[str]
5258 self
.machines
= machines
5261 class VolumeFilters(Type
):
5262 _toSchema
= {'filters': 'filters'}
5263 _toPy
= {'filters': 'filters'}
5264 def __init__(self
, filters
=None):
5266 filters : typing.Sequence<+T_co>[~VolumeFilter]<~VolumeFilter>
5268 self
.filters
= [VolumeFilter
.from_json(o
) for o
in filters
or []]
5271 class BlockDeviceResult(Type
):
5272 _toSchema
= {'error': 'error', 'result': 'result'}
5273 _toPy
= {'error': 'error', 'result': 'result'}
5274 def __init__(self
, error
=None, result
=None):
5277 result : BlockDevice
5279 self
.error
= Error
.from_json(error
) if error
else None
5280 self
.result
= BlockDevice
.from_json(result
) if result
else None
5283 class BlockDeviceResults(Type
):
5284 _toSchema
= {'results': 'results'}
5285 _toPy
= {'results': 'results'}
5286 def __init__(self
, results
=None):
5288 results : typing.Sequence<+T_co>[~BlockDeviceResult]<~BlockDeviceResult>
5290 self
.results
= [BlockDeviceResult
.from_json(o
) for o
in results
or []]
5293 class Filesystem(Type
):
5294 _toSchema
= {'filesystem_tag': 'filesystem-tag', 'info': 'info', 'volume_tag': 'volume-tag'}
5295 _toPy
= {'filesystem-tag': 'filesystem_tag', 'info': 'info', 'volume-tag': 'volume_tag'}
5296 def __init__(self
, filesystem_tag
=None, info
=None, volume_tag
=None):
5298 filesystem_tag : str
5299 info : FilesystemInfo
5302 self
.filesystem_tag
= filesystem_tag
5303 self
.info
= FilesystemInfo
.from_json(info
) if info
else None
5304 self
.volume_tag
= volume_tag
5307 class FilesystemAttachment(Type
):
5308 _toSchema
= {'filesystem_tag': 'filesystem-tag', 'info': 'info', 'machine_tag': 'machine-tag'}
5309 _toPy
= {'filesystem-tag': 'filesystem_tag', 'info': 'info', 'machine-tag': 'machine_tag'}
5310 def __init__(self
, filesystem_tag
=None, info
=None, machine_tag
=None):
5312 filesystem_tag : str
5313 info : FilesystemAttachmentInfo
5316 self
.filesystem_tag
= filesystem_tag
5317 self
.info
= FilesystemAttachmentInfo
.from_json(info
) if info
else None
5318 self
.machine_tag
= machine_tag
5321 class FilesystemAttachmentParams(Type
):
5322 _toSchema
= {'filesystem_id': 'filesystem-id', 'filesystem_tag': 'filesystem-tag', 'instance_id': 'instance-id', 'machine_tag': 'machine-tag', 'mount_point': 'mount-point', 'provider': 'provider', 'read_only': 'read-only'}
5323 _toPy
= {'filesystem-id': 'filesystem_id', 'filesystem-tag': 'filesystem_tag', 'instance-id': 'instance_id', 'machine-tag': 'machine_tag', 'mount-point': 'mount_point', 'provider': 'provider', 'read-only': 'read_only'}
5324 def __init__(self
, filesystem_id
=None, filesystem_tag
=None, instance_id
=None, machine_tag
=None, mount_point
=None, provider
=None, read_only
=None):
5327 filesystem_tag : str
5334 self
.filesystem_id
= filesystem_id
5335 self
.filesystem_tag
= filesystem_tag
5336 self
.instance_id
= instance_id
5337 self
.machine_tag
= machine_tag
5338 self
.mount_point
= mount_point
5339 self
.provider
= provider
5340 self
.read_only
= read_only
5343 class FilesystemAttachmentParamsResult(Type
):
5344 _toSchema
= {'error': 'error', 'result': 'result'}
5345 _toPy
= {'error': 'error', 'result': 'result'}
5346 def __init__(self
, error
=None, result
=None):
5349 result : FilesystemAttachmentParams
5351 self
.error
= Error
.from_json(error
) if error
else None
5352 self
.result
= FilesystemAttachmentParams
.from_json(result
) if result
else None
5355 class FilesystemAttachmentParamsResults(Type
):
5356 _toSchema
= {'results': 'results'}
5357 _toPy
= {'results': 'results'}
5358 def __init__(self
, results
=None):
5360 results : typing.Sequence<+T_co>[~FilesystemAttachmentParamsResult]<~FilesystemAttachmentParamsResult>
5362 self
.results
= [FilesystemAttachmentParamsResult
.from_json(o
) for o
in results
or []]
5365 class FilesystemAttachmentResult(Type
):
5366 _toSchema
= {'error': 'error', 'result': 'result'}
5367 _toPy
= {'error': 'error', 'result': 'result'}
5368 def __init__(self
, error
=None, result
=None):
5371 result : FilesystemAttachment
5373 self
.error
= Error
.from_json(error
) if error
else None
5374 self
.result
= FilesystemAttachment
.from_json(result
) if result
else None
5377 class FilesystemAttachmentResults(Type
):
5378 _toSchema
= {'results': 'results'}
5379 _toPy
= {'results': 'results'}
5380 def __init__(self
, results
=None):
5382 results : typing.Sequence<+T_co>[~FilesystemAttachmentResult]<~FilesystemAttachmentResult>
5384 self
.results
= [FilesystemAttachmentResult
.from_json(o
) for o
in results
or []]
5387 class FilesystemAttachments(Type
):
5388 _toSchema
= {'filesystem_attachments': 'filesystem-attachments'}
5389 _toPy
= {'filesystem-attachments': 'filesystem_attachments'}
5390 def __init__(self
, filesystem_attachments
=None):
5392 filesystem_attachments : typing.Sequence<+T_co>[~FilesystemAttachment]<~FilesystemAttachment>
5394 self
.filesystem_attachments
= [FilesystemAttachment
.from_json(o
) for o
in filesystem_attachments
or []]
5397 class FilesystemParams(Type
):
5398 _toSchema
= {'attachment': 'attachment', 'attributes': 'attributes', 'filesystem_tag': 'filesystem-tag', 'provider': 'provider', 'size': 'size', 'tags': 'tags', 'volume_tag': 'volume-tag'}
5399 _toPy
= {'attachment': 'attachment', 'attributes': 'attributes', 'filesystem-tag': 'filesystem_tag', 'provider': 'provider', 'size': 'size', 'tags': 'tags', 'volume-tag': 'volume_tag'}
5400 def __init__(self
, attachment
=None, attributes
=None, filesystem_tag
=None, provider
=None, size
=None, tags
=None, volume_tag
=None):
5402 attachment : FilesystemAttachmentParams
5403 attributes : typing.Mapping<~KT, +VT_co>[str, typing.Any]
5404 filesystem_tag : str
5407 tags : typing.Mapping<~KT, +VT_co>[str, str]
5410 self
.attachment
= FilesystemAttachmentParams
.from_json(attachment
) if attachment
else None
5411 self
.attributes
= attributes
5412 self
.filesystem_tag
= filesystem_tag
5413 self
.provider
= provider
5416 self
.volume_tag
= volume_tag
5419 class FilesystemParamsResult(Type
):
5420 _toSchema
= {'error': 'error', 'result': 'result'}
5421 _toPy
= {'error': 'error', 'result': 'result'}
5422 def __init__(self
, error
=None, result
=None):
5425 result : FilesystemParams
5427 self
.error
= Error
.from_json(error
) if error
else None
5428 self
.result
= FilesystemParams
.from_json(result
) if result
else None
5431 class FilesystemParamsResults(Type
):
5432 _toSchema
= {'results': 'results'}
5433 _toPy
= {'results': 'results'}
5434 def __init__(self
, results
=None):
5436 results : typing.Sequence<+T_co>[~FilesystemParamsResult]<~FilesystemParamsResult>
5438 self
.results
= [FilesystemParamsResult
.from_json(o
) for o
in results
or []]
5441 class FilesystemResult(Type
):
5442 _toSchema
= {'error': 'error', 'result': 'result'}
5443 _toPy
= {'error': 'error', 'result': 'result'}
5444 def __init__(self
, error
=None, result
=None):
5449 self
.error
= Error
.from_json(error
) if error
else None
5450 self
.result
= Filesystem
.from_json(result
) if result
else None
5453 class FilesystemResults(Type
):
5454 _toSchema
= {'results': 'results'}
5455 _toPy
= {'results': 'results'}
5456 def __init__(self
, results
=None):
5458 results : typing.Sequence<+T_co>[~FilesystemResult]<~FilesystemResult>
5460 self
.results
= [FilesystemResult
.from_json(o
) for o
in results
or []]
5463 class Filesystems(Type
):
5464 _toSchema
= {'filesystems': 'filesystems'}
5465 _toPy
= {'filesystems': 'filesystems'}
5466 def __init__(self
, filesystems
=None):
5468 filesystems : typing.Sequence<+T_co>[~Filesystem]<~Filesystem>
5470 self
.filesystems
= [Filesystem
.from_json(o
) for o
in filesystems
or []]
5473 class MachineStorageIds(Type
):
5474 _toSchema
= {'ids': 'ids'}
5475 _toPy
= {'ids': 'ids'}
5476 def __init__(self
, ids
=None):
5478 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
5480 self
.ids
= [MachineStorageId
.from_json(o
) for o
in ids
or []]
5483 class MachineStorageIdsWatchResults(Type
):
5484 _toSchema
= {'results': 'results'}
5485 _toPy
= {'results': 'results'}
5486 def __init__(self
, results
=None):
5488 results : typing.Sequence<+T_co>[~MachineStorageIdsWatchResult]<~MachineStorageIdsWatchResult>
5490 self
.results
= [MachineStorageIdsWatchResult
.from_json(o
) for o
in results
or []]
5493 class VolumeAttachment(Type
):
5494 _toSchema
= {'info': 'info', 'machine_tag': 'machine-tag', 'volume_tag': 'volume-tag'}
5495 _toPy
= {'info': 'info', 'machine-tag': 'machine_tag', 'volume-tag': 'volume_tag'}
5496 def __init__(self
, info
=None, machine_tag
=None, volume_tag
=None):
5498 info : VolumeAttachmentInfo
5502 self
.info
= VolumeAttachmentInfo
.from_json(info
) if info
else None
5503 self
.machine_tag
= machine_tag
5504 self
.volume_tag
= volume_tag
5507 class VolumeAttachmentParamsResult(Type
):
5508 _toSchema
= {'error': 'error', 'result': 'result'}
5509 _toPy
= {'error': 'error', 'result': 'result'}
5510 def __init__(self
, error
=None, result
=None):
5513 result : VolumeAttachmentParams
5515 self
.error
= Error
.from_json(error
) if error
else None
5516 self
.result
= VolumeAttachmentParams
.from_json(result
) if result
else None
5519 class VolumeAttachmentParamsResults(Type
):
5520 _toSchema
= {'results': 'results'}
5521 _toPy
= {'results': 'results'}
5522 def __init__(self
, results
=None):
5524 results : typing.Sequence<+T_co>[~VolumeAttachmentParamsResult]<~VolumeAttachmentParamsResult>
5526 self
.results
= [VolumeAttachmentParamsResult
.from_json(o
) for o
in results
or []]
5529 class VolumeAttachmentResult(Type
):
5530 _toSchema
= {'error': 'error', 'result': 'result'}
5531 _toPy
= {'error': 'error', 'result': 'result'}
5532 def __init__(self
, error
=None, result
=None):
5535 result : VolumeAttachment
5537 self
.error
= Error
.from_json(error
) if error
else None
5538 self
.result
= VolumeAttachment
.from_json(result
) if result
else None
5541 class VolumeAttachmentResults(Type
):
5542 _toSchema
= {'results': 'results'}
5543 _toPy
= {'results': 'results'}
5544 def __init__(self
, results
=None):
5546 results : typing.Sequence<+T_co>[~VolumeAttachmentResult]<~VolumeAttachmentResult>
5548 self
.results
= [VolumeAttachmentResult
.from_json(o
) for o
in results
or []]
5551 class VolumeAttachments(Type
):
5552 _toSchema
= {'volume_attachments': 'volume-attachments'}
5553 _toPy
= {'volume-attachments': 'volume_attachments'}
5554 def __init__(self
, volume_attachments
=None):
5556 volume_attachments : typing.Sequence<+T_co>[~VolumeAttachment]<~VolumeAttachment>
5558 self
.volume_attachments
= [VolumeAttachment
.from_json(o
) for o
in volume_attachments
or []]
5561 class VolumeParamsResult(Type
):
5562 _toSchema
= {'error': 'error', 'result': 'result'}
5563 _toPy
= {'error': 'error', 'result': 'result'}
5564 def __init__(self
, error
=None, result
=None):
5567 result : VolumeParams
5569 self
.error
= Error
.from_json(error
) if error
else None
5570 self
.result
= VolumeParams
.from_json(result
) if result
else None
5573 class VolumeParamsResults(Type
):
5574 _toSchema
= {'results': 'results'}
5575 _toPy
= {'results': 'results'}
5576 def __init__(self
, results
=None):
5578 results : typing.Sequence<+T_co>[~VolumeParamsResult]<~VolumeParamsResult>
5580 self
.results
= [VolumeParamsResult
.from_json(o
) for o
in results
or []]
5583 class VolumeResult(Type
):
5584 _toSchema
= {'error': 'error', 'result': 'result'}
5585 _toPy
= {'error': 'error', 'result': 'result'}
5586 def __init__(self
, error
=None, result
=None):
5591 self
.error
= Error
.from_json(error
) if error
else None
5592 self
.result
= Volume
.from_json(result
) if result
else None
5595 class VolumeResults(Type
):
5596 _toSchema
= {'results': 'results'}
5597 _toPy
= {'results': 'results'}
5598 def __init__(self
, results
=None):
5600 results : typing.Sequence<+T_co>[~VolumeResult]<~VolumeResult>
5602 self
.results
= [VolumeResult
.from_json(o
) for o
in results
or []]
5605 class Volumes(Type
):
5606 _toSchema
= {'volumes': 'volumes'}
5607 _toPy
= {'volumes': 'volumes'}
5608 def __init__(self
, volumes
=None):
5610 volumes : typing.Sequence<+T_co>[~Volume]<~Volume>
5612 self
.volumes
= [Volume
.from_json(o
) for o
in volumes
or []]
5615 class SpaceResult(Type
):
5616 _toSchema
= {'error': 'error', 'tag': 'tag'}
5617 _toPy
= {'error': 'error', 'tag': 'tag'}
5618 def __init__(self
, error
=None, tag
=None):
5623 self
.error
= Error
.from_json(error
) if error
else None
5627 class SpaceResults(Type
):
5628 _toSchema
= {'results': 'results'}
5629 _toPy
= {'results': 'results'}
5630 def __init__(self
, results
=None):
5632 results : typing.Sequence<+T_co>[~SpaceResult]<~SpaceResult>
5634 self
.results
= [SpaceResult
.from_json(o
) for o
in results
or []]
5637 class ZoneResult(Type
):
5638 _toSchema
= {'available': 'available', 'error': 'error', 'name': 'name'}
5639 _toPy
= {'available': 'available', 'error': 'error', 'name': 'name'}
5640 def __init__(self
, available
=None, error
=None, name
=None):
5646 self
.available
= available
5647 self
.error
= Error
.from_json(error
) if error
else None
5651 class ZoneResults(Type
):
5652 _toSchema
= {'results': 'results'}
5653 _toPy
= {'results': 'results'}
5654 def __init__(self
, results
=None):
5656 results : typing.Sequence<+T_co>[~ZoneResult]<~ZoneResult>
5658 self
.results
= [ZoneResult
.from_json(o
) for o
in results
or []]
5661 class UndertakerModelInfo(Type
):
5662 _toSchema
= {'global_name': 'global-name', 'is_system': 'is-system', 'life': 'life', 'name': 'name', 'uuid': 'uuid'}
5663 _toPy
= {'global-name': 'global_name', 'is-system': 'is_system', 'life': 'life', 'name': 'name', 'uuid': 'uuid'}
5664 def __init__(self
, global_name
=None, is_system
=None, life
=None, name
=None, uuid
=None):
5672 self
.global_name
= global_name
5673 self
.is_system
= is_system
5679 class UndertakerModelInfoResult(Type
):
5680 _toSchema
= {'error': 'error', 'result': 'result'}
5681 _toPy
= {'error': 'error', 'result': 'result'}
5682 def __init__(self
, error
=None, result
=None):
5685 result : UndertakerModelInfo
5687 self
.error
= Error
.from_json(error
) if error
else None
5688 self
.result
= UndertakerModelInfo
.from_json(result
) if result
else None
5691 class ApplicationStatusResult(Type
):
5692 _toSchema
= {'application': 'application', 'error': 'error', 'units': 'units'}
5693 _toPy
= {'application': 'application', 'error': 'error', 'units': 'units'}
5694 def __init__(self
, application
=None, error
=None, units
=None):
5696 application : StatusResult
5698 units : typing.Mapping<~KT, +VT_co>[str, ~StatusResult]<~StatusResult>
5700 self
.application
= StatusResult
.from_json(application
) if application
else None
5701 self
.error
= Error
.from_json(error
) if error
else None
5705 class ApplicationStatusResults(Type
):
5706 _toSchema
= {'results': 'results'}
5707 _toPy
= {'results': 'results'}
5708 def __init__(self
, results
=None):
5710 results : typing.Sequence<+T_co>[~ApplicationStatusResult]<~ApplicationStatusResult>
5712 self
.results
= [ApplicationStatusResult
.from_json(o
) for o
in results
or []]
5715 class CharmURLs(Type
):
5716 _toSchema
= {'urls': 'urls'}
5717 _toPy
= {'urls': 'urls'}
5718 def __init__(self
, urls
=None):
5720 urls : typing.Sequence<+T_co>[~CharmURL]<~CharmURL>
5722 self
.urls
= [CharmURL
.from_json(o
) for o
in urls
or []]
5725 class ConfigSettingsResult(Type
):
5726 _toSchema
= {'error': 'error', 'settings': 'settings'}
5727 _toPy
= {'error': 'error', 'settings': 'settings'}
5728 def __init__(self
, error
=None, settings
=None):
5731 settings : typing.Mapping<~KT, +VT_co>[str, typing.Any]
5733 self
.error
= Error
.from_json(error
) if error
else None
5734 self
.settings
= settings
5737 class ConfigSettingsResults(Type
):
5738 _toSchema
= {'results': 'results'}
5739 _toPy
= {'results': 'results'}
5740 def __init__(self
, results
=None):
5742 results : typing.Sequence<+T_co>[~ConfigSettingsResult]<~ConfigSettingsResult>
5744 self
.results
= [ConfigSettingsResult
.from_json(o
) for o
in results
or []]
5747 class Endpoint(Type
):
5748 _toSchema
= {'application_name': 'application-name', 'relation': 'relation'}
5749 _toPy
= {'application-name': 'application_name', 'relation': 'relation'}
5750 def __init__(self
, application_name
=None, relation
=None):
5752 application_name : str
5753 relation : CharmRelation
5755 self
.application_name
= application_name
5756 self
.relation
= CharmRelation
.from_json(relation
) if relation
else None
5759 class EntitiesCharmURL(Type
):
5760 _toSchema
= {'entities': 'entities'}
5761 _toPy
= {'entities': 'entities'}
5762 def __init__(self
, entities
=None):
5764 entities : typing.Sequence<+T_co>[~EntityCharmURL]<~EntityCharmURL>
5766 self
.entities
= [EntityCharmURL
.from_json(o
) for o
in entities
or []]
5769 class EntitiesPortRanges(Type
):
5770 _toSchema
= {'entities': 'entities'}
5771 _toPy
= {'entities': 'entities'}
5772 def __init__(self
, entities
=None):
5774 entities : typing.Sequence<+T_co>[~EntityPortRange]<~EntityPortRange>
5776 self
.entities
= [EntityPortRange
.from_json(o
) for o
in entities
or []]
5779 class EntityCharmURL(Type
):
5780 _toSchema
= {'charm_url': 'charm-url', 'tag': 'tag'}
5781 _toPy
= {'charm-url': 'charm_url', 'tag': 'tag'}
5782 def __init__(self
, charm_url
=None, tag
=None):
5787 self
.charm_url
= charm_url
5791 class EntityPortRange(Type
):
5792 _toSchema
= {'from_port': 'from-port', 'protocol': 'protocol', 'tag': 'tag', 'to_port': 'to-port'}
5793 _toPy
= {'from-port': 'from_port', 'protocol': 'protocol', 'tag': 'tag', 'to-port': 'to_port'}
5794 def __init__(self
, from_port
=None, protocol
=None, tag
=None, to_port
=None):
5801 self
.from_port
= from_port
5802 self
.protocol
= protocol
5804 self
.to_port
= to_port
5807 class EntityWorkloadVersion(Type
):
5808 _toSchema
= {'tag': 'tag', 'workload_version': 'workload-version'}
5809 _toPy
= {'tag': 'tag', 'workload-version': 'workload_version'}
5810 def __init__(self
, tag
=None, workload_version
=None):
5813 workload_version : str
5816 self
.workload_version
= workload_version
5819 class EntityWorkloadVersions(Type
):
5820 _toSchema
= {'entities': 'entities'}
5821 _toPy
= {'entities': 'entities'}
5822 def __init__(self
, entities
=None):
5824 entities : typing.Sequence<+T_co>[~EntityWorkloadVersion]<~EntityWorkloadVersion>
5826 self
.entities
= [EntityWorkloadVersion
.from_json(o
) for o
in entities
or []]
5829 class GetLeadershipSettingsBulkResults(Type
):
5830 _toSchema
= {'results': 'results'}
5831 _toPy
= {'results': 'results'}
5832 def __init__(self
, results
=None):
5834 results : typing.Sequence<+T_co>[~GetLeadershipSettingsResult]<~GetLeadershipSettingsResult>
5836 self
.results
= [GetLeadershipSettingsResult
.from_json(o
) for o
in results
or []]
5839 class GetLeadershipSettingsResult(Type
):
5840 _toSchema
= {'error': 'error', 'settings': 'settings'}
5841 _toPy
= {'error': 'error', 'settings': 'settings'}
5842 def __init__(self
, error
=None, settings
=None):
5845 settings : typing.Mapping<~KT, +VT_co>[str, str]
5847 self
.error
= Error
.from_json(error
) if error
else None
5848 self
.settings
= settings
5851 class IntResult(Type
):
5852 _toSchema
= {'error': 'error', 'result': 'result'}
5853 _toPy
= {'error': 'error', 'result': 'result'}
5854 def __init__(self
, error
=None, result
=None):
5859 self
.error
= Error
.from_json(error
) if error
else None
5860 self
.result
= result
5863 class IntResults(Type
):
5864 _toSchema
= {'results': 'results'}
5865 _toPy
= {'results': 'results'}
5866 def __init__(self
, results
=None):
5868 results : typing.Sequence<+T_co>[~IntResult]<~IntResult>
5870 self
.results
= [IntResult
.from_json(o
) for o
in results
or []]
5873 class MergeLeadershipSettingsBulkParams(Type
):
5874 _toSchema
= {'params': 'params'}
5875 _toPy
= {'params': 'params'}
5876 def __init__(self
, params
=None):
5878 params : typing.Sequence<+T_co>[~MergeLeadershipSettingsParam]<~MergeLeadershipSettingsParam>
5880 self
.params
= [MergeLeadershipSettingsParam
.from_json(o
) for o
in params
or []]
5883 class MergeLeadershipSettingsParam(Type
):
5884 _toSchema
= {'application_tag': 'application-tag', 'settings': 'settings'}
5885 _toPy
= {'application-tag': 'application_tag', 'settings': 'settings'}
5886 def __init__(self
, application_tag
=None, settings
=None):
5888 application_tag : str
5889 settings : typing.Mapping<~KT, +VT_co>[str, str]
5891 self
.application_tag
= application_tag
5892 self
.settings
= settings
5895 class ModelResult(Type
):
5896 _toSchema
= {'error': 'error', 'name': 'name', 'uuid': 'uuid'}
5897 _toPy
= {'error': 'error', 'name': 'name', 'uuid': 'uuid'}
5898 def __init__(self
, error
=None, name
=None, uuid
=None):
5904 self
.error
= Error
.from_json(error
) if error
else None
5909 class RelationIds(Type
):
5910 _toSchema
= {'relation_ids': 'relation-ids'}
5911 _toPy
= {'relation-ids': 'relation_ids'}
5912 def __init__(self
, relation_ids
=None):
5914 relation_ids : typing.Sequence<+T_co>[int]
5916 self
.relation_ids
= relation_ids
5919 class RelationResult(Type
):
5920 _toSchema
= {'endpoint': 'endpoint', 'error': 'error', 'id_': 'id', 'key': 'key', 'life': 'life'}
5921 _toPy
= {'endpoint': 'endpoint', 'error': 'error', 'id': 'id_', 'key': 'key', 'life': 'life'}
5922 def __init__(self
, endpoint
=None, error
=None, id_
=None, key
=None, life
=None):
5930 self
.endpoint
= Endpoint
.from_json(endpoint
) if endpoint
else None
5931 self
.error
= Error
.from_json(error
) if error
else None
5937 class RelationResults(Type
):
5938 _toSchema
= {'results': 'results'}
5939 _toPy
= {'results': 'results'}
5940 def __init__(self
, results
=None):
5942 results : typing.Sequence<+T_co>[~RelationResult]<~RelationResult>
5944 self
.results
= [RelationResult
.from_json(o
) for o
in results
or []]
5947 class RelationUnit(Type
):
5948 _toSchema
= {'relation': 'relation', 'unit': 'unit'}
5949 _toPy
= {'relation': 'relation', 'unit': 'unit'}
5950 def __init__(self
, relation
=None, unit
=None):
5955 self
.relation
= relation
5959 class RelationUnitPair(Type
):
5960 _toSchema
= {'local_unit': 'local-unit', 'relation': 'relation', 'remote_unit': 'remote-unit'}
5961 _toPy
= {'local-unit': 'local_unit', 'relation': 'relation', 'remote-unit': 'remote_unit'}
5962 def __init__(self
, local_unit
=None, relation
=None, remote_unit
=None):
5968 self
.local_unit
= local_unit
5969 self
.relation
= relation
5970 self
.remote_unit
= remote_unit
5973 class RelationUnitPairs(Type
):
5974 _toSchema
= {'relation_unit_pairs': 'relation-unit-pairs'}
5975 _toPy
= {'relation-unit-pairs': 'relation_unit_pairs'}
5976 def __init__(self
, relation_unit_pairs
=None):
5978 relation_unit_pairs : typing.Sequence<+T_co>[~RelationUnitPair]<~RelationUnitPair>
5980 self
.relation_unit_pairs
= [RelationUnitPair
.from_json(o
) for o
in relation_unit_pairs
or []]
5983 class RelationUnitSettings(Type
):
5984 _toSchema
= {'relation': 'relation', 'settings': 'settings', 'unit': 'unit'}
5985 _toPy
= {'relation': 'relation', 'settings': 'settings', 'unit': 'unit'}
5986 def __init__(self
, relation
=None, settings
=None, unit
=None):
5989 settings : typing.Mapping<~KT, +VT_co>[str, str]
5992 self
.relation
= relation
5993 self
.settings
= settings
5997 class RelationUnits(Type
):
5998 _toSchema
= {'relation_units': 'relation-units'}
5999 _toPy
= {'relation-units': 'relation_units'}
6000 def __init__(self
, relation_units
=None):
6002 relation_units : typing.Sequence<+T_co>[~RelationUnit]<~RelationUnit>
6004 self
.relation_units
= [RelationUnit
.from_json(o
) for o
in relation_units
or []]
6007 class RelationUnitsSettings(Type
):
6008 _toSchema
= {'relation_units': 'relation-units'}
6009 _toPy
= {'relation-units': 'relation_units'}
6010 def __init__(self
, relation_units
=None):
6012 relation_units : typing.Sequence<+T_co>[~RelationUnitSettings]<~RelationUnitSettings>
6014 self
.relation_units
= [RelationUnitSettings
.from_json(o
) for o
in relation_units
or []]
6017 class RelationUnitsWatchResults(Type
):
6018 _toSchema
= {'results': 'results'}
6019 _toPy
= {'results': 'results'}
6020 def __init__(self
, results
=None):
6022 results : typing.Sequence<+T_co>[~RelationUnitsWatchResult]<~RelationUnitsWatchResult>
6024 self
.results
= [RelationUnitsWatchResult
.from_json(o
) for o
in results
or []]
6027 class ResolvedModeResult(Type
):
6028 _toSchema
= {'error': 'error', 'mode': 'mode'}
6029 _toPy
= {'error': 'error', 'mode': 'mode'}
6030 def __init__(self
, error
=None, mode
=None):
6035 self
.error
= Error
.from_json(error
) if error
else None
6039 class ResolvedModeResults(Type
):
6040 _toSchema
= {'results': 'results'}
6041 _toPy
= {'results': 'results'}
6042 def __init__(self
, results
=None):
6044 results : typing.Sequence<+T_co>[~ResolvedModeResult]<~ResolvedModeResult>
6046 self
.results
= [ResolvedModeResult
.from_json(o
) for o
in results
or []]
6049 class SettingsResult(Type
):
6050 _toSchema
= {'error': 'error', 'settings': 'settings'}
6051 _toPy
= {'error': 'error', 'settings': 'settings'}
6052 def __init__(self
, error
=None, settings
=None):
6055 settings : typing.Mapping<~KT, +VT_co>[str, str]
6057 self
.error
= Error
.from_json(error
) if error
else None
6058 self
.settings
= settings
6061 class SettingsResults(Type
):
6062 _toSchema
= {'results': 'results'}
6063 _toPy
= {'results': 'results'}
6064 def __init__(self
, results
=None):
6066 results : typing.Sequence<+T_co>[~SettingsResult]<~SettingsResult>
6068 self
.results
= [SettingsResult
.from_json(o
) for o
in results
or []]
6071 class StorageAttachment(Type
):
6072 _toSchema
= {'kind': 'kind', 'life': 'life', 'location': 'location', 'owner_tag': 'owner-tag', 'storage_tag': 'storage-tag', 'unit_tag': 'unit-tag'}
6073 _toPy
= {'kind': 'kind', 'life': 'life', 'location': 'location', 'owner-tag': 'owner_tag', 'storage-tag': 'storage_tag', 'unit-tag': 'unit_tag'}
6074 def __init__(self
, kind
=None, life
=None, location
=None, owner_tag
=None, storage_tag
=None, unit_tag
=None):
6085 self
.location
= location
6086 self
.owner_tag
= owner_tag
6087 self
.storage_tag
= storage_tag
6088 self
.unit_tag
= unit_tag
6091 class StorageAttachmentId(Type
):
6092 _toSchema
= {'storage_tag': 'storage-tag', 'unit_tag': 'unit-tag'}
6093 _toPy
= {'storage-tag': 'storage_tag', 'unit-tag': 'unit_tag'}
6094 def __init__(self
, storage_tag
=None, unit_tag
=None):
6099 self
.storage_tag
= storage_tag
6100 self
.unit_tag
= unit_tag
6103 class StorageAttachmentIds(Type
):
6104 _toSchema
= {'ids': 'ids'}
6105 _toPy
= {'ids': 'ids'}
6106 def __init__(self
, ids
=None):
6108 ids : typing.Sequence<+T_co>[~StorageAttachmentId]<~StorageAttachmentId>
6110 self
.ids
= [StorageAttachmentId
.from_json(o
) for o
in ids
or []]
6113 class StorageAttachmentIdsResult(Type
):
6114 _toSchema
= {'error': 'error', 'result': 'result'}
6115 _toPy
= {'error': 'error', 'result': 'result'}
6116 def __init__(self
, error
=None, result
=None):
6119 result : StorageAttachmentIds
6121 self
.error
= Error
.from_json(error
) if error
else None
6122 self
.result
= StorageAttachmentIds
.from_json(result
) if result
else None
6125 class StorageAttachmentIdsResults(Type
):
6126 _toSchema
= {'results': 'results'}
6127 _toPy
= {'results': 'results'}
6128 def __init__(self
, results
=None):
6130 results : typing.Sequence<+T_co>[~StorageAttachmentIdsResult]<~StorageAttachmentIdsResult>
6132 self
.results
= [StorageAttachmentIdsResult
.from_json(o
) for o
in results
or []]
6135 class StorageAttachmentResult(Type
):
6136 _toSchema
= {'error': 'error', 'result': 'result'}
6137 _toPy
= {'error': 'error', 'result': 'result'}
6138 def __init__(self
, error
=None, result
=None):
6141 result : StorageAttachment
6143 self
.error
= Error
.from_json(error
) if error
else None
6144 self
.result
= StorageAttachment
.from_json(result
) if result
else None
6147 class StorageAttachmentResults(Type
):
6148 _toSchema
= {'results': 'results'}
6149 _toPy
= {'results': 'results'}
6150 def __init__(self
, results
=None):
6152 results : typing.Sequence<+T_co>[~StorageAttachmentResult]<~StorageAttachmentResult>
6154 self
.results
= [StorageAttachmentResult
.from_json(o
) for o
in results
or []]
6157 class StringBoolResult(Type
):
6158 _toSchema
= {'error': 'error', 'ok': 'ok', 'result': 'result'}
6159 _toPy
= {'error': 'error', 'ok': 'ok', 'result': 'result'}
6160 def __init__(self
, error
=None, ok
=None, result
=None):
6166 self
.error
= Error
.from_json(error
) if error
else None
6168 self
.result
= result
6171 class StringBoolResults(Type
):
6172 _toSchema
= {'results': 'results'}
6173 _toPy
= {'results': 'results'}
6174 def __init__(self
, results
=None):
6176 results : typing.Sequence<+T_co>[~StringBoolResult]<~StringBoolResult>
6178 self
.results
= [StringBoolResult
.from_json(o
) for o
in results
or []]
6181 class UnitNetworkConfig(Type
):
6182 _toSchema
= {'binding_name': 'binding-name', 'unit_tag': 'unit-tag'}
6183 _toPy
= {'binding-name': 'binding_name', 'unit-tag': 'unit_tag'}
6184 def __init__(self
, binding_name
=None, unit_tag
=None):
6189 self
.binding_name
= binding_name
6190 self
.unit_tag
= unit_tag
6193 class UnitNetworkConfigResult(Type
):
6194 _toSchema
= {'error': 'error', 'info': 'info'}
6195 _toPy
= {'error': 'error', 'info': 'info'}
6196 def __init__(self
, error
=None, info
=None):
6199 info : typing.Sequence<+T_co>[~NetworkConfig]<~NetworkConfig>
6201 self
.error
= Error
.from_json(error
) if error
else None
6202 self
.info
= [NetworkConfig
.from_json(o
) for o
in info
or []]
6205 class UnitNetworkConfigResults(Type
):
6206 _toSchema
= {'results': 'results'}
6207 _toPy
= {'results': 'results'}
6208 def __init__(self
, results
=None):
6210 results : typing.Sequence<+T_co>[~UnitNetworkConfigResult]<~UnitNetworkConfigResult>
6212 self
.results
= [UnitNetworkConfigResult
.from_json(o
) for o
in results
or []]
6215 class UnitsNetworkConfig(Type
):
6216 _toSchema
= {'args': 'args'}
6217 _toPy
= {'args': 'args'}
6218 def __init__(self
, args
=None):
6220 args : typing.Sequence<+T_co>[~UnitNetworkConfig]<~UnitNetworkConfig>
6222 self
.args
= [UnitNetworkConfig
.from_json(o
) for o
in args
or []]
6225 class EntitiesVersion(Type
):
6226 _toSchema
= {'agent_tools': 'agent-tools'}
6227 _toPy
= {'agent-tools': 'agent_tools'}
6228 def __init__(self
, agent_tools
=None):
6230 agent_tools : typing.Sequence<+T_co>[~EntityVersion]<~EntityVersion>
6232 self
.agent_tools
= [EntityVersion
.from_json(o
) for o
in agent_tools
or []]
6235 class EntityVersion(Type
):
6236 _toSchema
= {'tag': 'tag', 'tools': 'tools'}
6237 _toPy
= {'tag': 'tag', 'tools': 'tools'}
6238 def __init__(self
, tag
=None, tools
=None):
6244 self
.tools
= Version
.from_json(tools
) if tools
else None
6247 class Version(Type
):
6248 _toSchema
= {'version': 'version'}
6249 _toPy
= {'version': 'version'}
6250 def __init__(self
, version
=None):
6254 self
.version
= Binary
.from_json(version
) if version
else None
6257 class VersionResult(Type
):
6258 _toSchema
= {'error': 'error', 'version': 'version'}
6259 _toPy
= {'error': 'error', 'version': 'version'}
6260 def __init__(self
, error
=None, version
=None):
6265 self
.error
= Error
.from_json(error
) if error
else None
6266 self
.version
= Number
.from_json(version
) if version
else None
6269 class VersionResults(Type
):
6270 _toSchema
= {'results': 'results'}
6271 _toPy
= {'results': 'results'}
6272 def __init__(self
, results
=None):
6274 results : typing.Sequence<+T_co>[~VersionResult]<~VersionResult>
6276 self
.results
= [VersionResult
.from_json(o
) for o
in results
or []]
6279 class AddUser(Type
):
6280 _toSchema
= {'display_name': 'display-name', 'password': 'password', 'username': 'username'}
6281 _toPy
= {'display-name': 'display_name', 'password': 'password', 'username': 'username'}
6282 def __init__(self
, display_name
=None, password
=None, username
=None):
6288 self
.display_name
= display_name
6289 self
.password
= password
6290 self
.username
= username
6293 class AddUserResult(Type
):
6294 _toSchema
= {'error': 'error', 'secret_key': 'secret-key', 'tag': 'tag'}
6295 _toPy
= {'error': 'error', 'secret-key': 'secret_key', 'tag': 'tag'}
6296 def __init__(self
, error
=None, secret_key
=None, tag
=None):
6299 secret_key : typing.Sequence<+T_co>[int]
6302 self
.error
= Error
.from_json(error
) if error
else None
6303 self
.secret_key
= secret_key
6307 class AddUserResults(Type
):
6308 _toSchema
= {'results': 'results'}
6309 _toPy
= {'results': 'results'}
6310 def __init__(self
, results
=None):
6312 results : typing.Sequence<+T_co>[~AddUserResult]<~AddUserResult>
6314 self
.results
= [AddUserResult
.from_json(o
) for o
in results
or []]
6317 class AddUsers(Type
):
6318 _toSchema
= {'users': 'users'}
6319 _toPy
= {'users': 'users'}
6320 def __init__(self
, users
=None):
6322 users : typing.Sequence<+T_co>[~AddUser]<~AddUser>
6324 self
.users
= [AddUser
.from_json(o
) for o
in users
or []]
6327 class UserInfo(Type
):
6328 _toSchema
= {'access': 'access', 'created_by': 'created-by', 'date_created': 'date-created', 'disabled': 'disabled', 'display_name': 'display-name', 'last_connection': 'last-connection', 'username': 'username'}
6329 _toPy
= {'access': 'access', 'created-by': 'created_by', 'date-created': 'date_created', 'disabled': 'disabled', 'display-name': 'display_name', 'last-connection': 'last_connection', 'username': 'username'}
6330 def __init__(self
, access
=None, created_by
=None, date_created
=None, disabled
=None, display_name
=None, last_connection
=None, username
=None):
6337 last_connection : str
6340 self
.access
= access
6341 self
.created_by
= created_by
6342 self
.date_created
= date_created
6343 self
.disabled
= disabled
6344 self
.display_name
= display_name
6345 self
.last_connection
= last_connection
6346 self
.username
= username
6349 class UserInfoRequest(Type
):
6350 _toSchema
= {'entities': 'entities', 'include_disabled': 'include-disabled'}
6351 _toPy
= {'entities': 'entities', 'include-disabled': 'include_disabled'}
6352 def __init__(self
, entities
=None, include_disabled
=None):
6354 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6355 include_disabled : bool
6357 self
.entities
= [Entity
.from_json(o
) for o
in entities
or []]
6358 self
.include_disabled
= include_disabled
6361 class UserInfoResult(Type
):
6362 _toSchema
= {'error': 'error', 'result': 'result'}
6363 _toPy
= {'error': 'error', 'result': 'result'}
6364 def __init__(self
, error
=None, result
=None):
6369 self
.error
= Error
.from_json(error
) if error
else None
6370 self
.result
= UserInfo
.from_json(result
) if result
else None
6373 class UserInfoResults(Type
):
6374 _toSchema
= {'results': 'results'}
6375 _toPy
= {'results': 'results'}
6376 def __init__(self
, results
=None):
6378 results : typing.Sequence<+T_co>[~UserInfoResult]<~UserInfoResult>
6380 self
.results
= [UserInfoResult
.from_json(o
) for o
in results
or []]
6383 class ActionFacade(Type
):
6386 schema
= {'definitions': {'Action': {'additionalProperties': False,
6387 'properties': {'name': {'type': 'string'},
6388 'parameters': {'patternProperties': {'.*': {'additionalProperties': True,
6391 'receiver': {'type': 'string'},
6392 'tag': {'type': 'string'}},
6393 'required': ['tag', 'receiver', 'name'],
6395 'ActionResult': {'additionalProperties': False,
6396 'properties': {'action': {'$ref': '#/definitions/Action'},
6397 'completed': {'format': 'date-time',
6399 'enqueued': {'format': 'date-time',
6401 'error': {'$ref': '#/definitions/Error'},
6402 'message': {'type': 'string'},
6403 'output': {'patternProperties': {'.*': {'additionalProperties': True,
6406 'started': {'format': 'date-time',
6408 'status': {'type': 'string'}},
6410 'ActionResults': {'additionalProperties': False,
6411 'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'},
6414 'ActionSpec': {'additionalProperties': False,
6415 'properties': {'description': {'type': 'string'},
6416 'params': {'patternProperties': {'.*': {'additionalProperties': True,
6419 'required': ['description', 'params'],
6421 'Actions': {'additionalProperties': False,
6422 'properties': {'actions': {'items': {'$ref': '#/definitions/Action'},
6425 'ActionsByName': {'additionalProperties': False,
6426 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'},
6428 'error': {'$ref': '#/definitions/Error'},
6429 'name': {'type': 'string'}},
6431 'ActionsByNames': {'additionalProperties': False,
6432 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByName'},
6435 'ActionsByReceiver': {'additionalProperties': False,
6436 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'},
6438 'error': {'$ref': '#/definitions/Error'},
6439 'receiver': {'type': 'string'}},
6441 'ActionsByReceivers': {'additionalProperties': False,
6442 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByReceiver'},
6445 'ApplicationCharmActionsResult': {'additionalProperties': False,
6446 'properties': {'actions': {'patternProperties': {'.*': {'$ref': '#/definitions/ActionSpec'}},
6448 'application-tag': {'type': 'string'},
6449 'error': {'$ref': '#/definitions/Error'}},
6451 'ApplicationsCharmActionsResults': {'additionalProperties': False,
6452 'properties': {'results': {'items': {'$ref': '#/definitions/ApplicationCharmActionsResult'},
6455 'Entities': {'additionalProperties': False,
6456 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
6458 'required': ['entities'],
6460 'Entity': {'additionalProperties': False,
6461 'properties': {'tag': {'type': 'string'}},
6462 'required': ['tag'],
6464 'Error': {'additionalProperties': False,
6465 'properties': {'code': {'type': 'string'},
6466 'info': {'$ref': '#/definitions/ErrorInfo'},
6467 'message': {'type': 'string'}},
6468 'required': ['message', 'code'],
6470 'ErrorInfo': {'additionalProperties': False,
6471 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
6472 'macaroon-path': {'type': 'string'}},
6474 'FindActionsByNames': {'additionalProperties': False,
6475 'properties': {'names': {'items': {'type': 'string'},
6478 'FindTags': {'additionalProperties': False,
6479 'properties': {'prefixes': {'items': {'type': 'string'},
6481 'required': ['prefixes'],
6483 'FindTagsResults': {'additionalProperties': False,
6484 'properties': {'matches': {'patternProperties': {'.*': {'items': {'$ref': '#/definitions/Entity'},
6487 'required': ['matches'],
6489 'Macaroon': {'additionalProperties': False, 'type': 'object'},
6490 'RunParams': {'additionalProperties': False,
6491 'properties': {'applications': {'items': {'type': 'string'},
6493 'commands': {'type': 'string'},
6494 'machines': {'items': {'type': 'string'},
6496 'timeout': {'type': 'integer'},
6497 'units': {'items': {'type': 'string'},
6499 'required': ['commands', 'timeout'],
6501 'properties': {'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6502 'Result': {'$ref': '#/definitions/ActionResults'}},
6504 'ApplicationsCharmsActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6505 'Result': {'$ref': '#/definitions/ApplicationsCharmActionsResults'}},
6507 'Cancel': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6508 'Result': {'$ref': '#/definitions/ActionResults'}},
6510 'Enqueue': {'properties': {'Params': {'$ref': '#/definitions/Actions'},
6511 'Result': {'$ref': '#/definitions/ActionResults'}},
6513 'FindActionTagsByPrefix': {'properties': {'Params': {'$ref': '#/definitions/FindTags'},
6514 'Result': {'$ref': '#/definitions/FindTagsResults'}},
6516 'FindActionsByNames': {'properties': {'Params': {'$ref': '#/definitions/FindActionsByNames'},
6517 'Result': {'$ref': '#/definitions/ActionsByNames'}},
6519 'ListAll': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6520 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
6522 'ListCompleted': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6523 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
6525 'ListPending': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6526 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
6528 'ListRunning': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6529 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
6531 'Run': {'properties': {'Params': {'$ref': '#/definitions/RunParams'},
6532 'Result': {'$ref': '#/definitions/ActionResults'}},
6534 'RunOnAllMachines': {'properties': {'Params': {'$ref': '#/definitions/RunParams'},
6535 'Result': {'$ref': '#/definitions/ActionResults'}},
6540 @ReturnMapping(ActionResults
)
6541 async def Actions(self
, entities
):
6543 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6544 Returns -> typing.Sequence<+T_co>[~ActionResult]<~ActionResult>
6546 # map input types to rpc msg
6548 msg
= dict(type='Action', request
='Actions', version
=2, params
=_params
)
6549 _params
['entities'] = entities
6550 reply
= await self
.rpc(msg
)
6555 @ReturnMapping(ApplicationsCharmActionsResults
)
6556 async def ApplicationsCharmsActions(self
, entities
):
6558 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6559 Returns -> typing.Sequence<+T_co>[~ApplicationCharmActionsResult]<~ApplicationCharmActionsResult>
6561 # map input types to rpc msg
6563 msg
= dict(type='Action', request
='ApplicationsCharmsActions', version
=2, params
=_params
)
6564 _params
['entities'] = entities
6565 reply
= await self
.rpc(msg
)
6570 @ReturnMapping(ActionResults
)
6571 async def Cancel(self
, entities
):
6573 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6574 Returns -> typing.Sequence<+T_co>[~ActionResult]<~ActionResult>
6576 # map input types to rpc msg
6578 msg
= dict(type='Action', request
='Cancel', version
=2, params
=_params
)
6579 _params
['entities'] = entities
6580 reply
= await self
.rpc(msg
)
6585 @ReturnMapping(ActionResults
)
6586 async def Enqueue(self
, actions
):
6588 actions : typing.Sequence<+T_co>[~Action]<~Action>
6589 Returns -> typing.Sequence<+T_co>[~ActionResult]<~ActionResult>
6591 # map input types to rpc msg
6593 msg
= dict(type='Action', request
='Enqueue', version
=2, params
=_params
)
6594 _params
['actions'] = actions
6595 reply
= await self
.rpc(msg
)
6600 @ReturnMapping(FindTagsResults
)
6601 async def FindActionTagsByPrefix(self
, prefixes
):
6603 prefixes : typing.Sequence<+T_co>[str]
6604 Returns -> typing.Sequence<+T_co>[~Entity]<~Entity>
6606 # map input types to rpc msg
6608 msg
= dict(type='Action', request
='FindActionTagsByPrefix', version
=2, params
=_params
)
6609 _params
['prefixes'] = prefixes
6610 reply
= await self
.rpc(msg
)
6615 @ReturnMapping(ActionsByNames
)
6616 async def FindActionsByNames(self
, names
):
6618 names : typing.Sequence<+T_co>[str]
6619 Returns -> typing.Sequence<+T_co>[~ActionsByName]<~ActionsByName>
6621 # map input types to rpc msg
6623 msg
= dict(type='Action', request
='FindActionsByNames', version
=2, params
=_params
)
6624 _params
['names'] = names
6625 reply
= await self
.rpc(msg
)
6630 @ReturnMapping(ActionsByReceivers
)
6631 async def ListAll(self
, entities
):
6633 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6634 Returns -> typing.Sequence<+T_co>[~ActionsByReceiver]<~ActionsByReceiver>
6636 # map input types to rpc msg
6638 msg
= dict(type='Action', request
='ListAll', version
=2, params
=_params
)
6639 _params
['entities'] = entities
6640 reply
= await self
.rpc(msg
)
6645 @ReturnMapping(ActionsByReceivers
)
6646 async def ListCompleted(self
, entities
):
6648 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6649 Returns -> typing.Sequence<+T_co>[~ActionsByReceiver]<~ActionsByReceiver>
6651 # map input types to rpc msg
6653 msg
= dict(type='Action', request
='ListCompleted', version
=2, params
=_params
)
6654 _params
['entities'] = entities
6655 reply
= await self
.rpc(msg
)
6660 @ReturnMapping(ActionsByReceivers
)
6661 async def ListPending(self
, entities
):
6663 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6664 Returns -> typing.Sequence<+T_co>[~ActionsByReceiver]<~ActionsByReceiver>
6666 # map input types to rpc msg
6668 msg
= dict(type='Action', request
='ListPending', version
=2, params
=_params
)
6669 _params
['entities'] = entities
6670 reply
= await self
.rpc(msg
)
6675 @ReturnMapping(ActionsByReceivers
)
6676 async def ListRunning(self
, entities
):
6678 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6679 Returns -> typing.Sequence<+T_co>[~ActionsByReceiver]<~ActionsByReceiver>
6681 # map input types to rpc msg
6683 msg
= dict(type='Action', request
='ListRunning', version
=2, params
=_params
)
6684 _params
['entities'] = entities
6685 reply
= await self
.rpc(msg
)
6690 @ReturnMapping(ActionResults
)
6691 async def Run(self
, applications
, commands
, machines
, timeout
, units
):
6693 applications : typing.Sequence<+T_co>[str]
6695 machines : typing.Sequence<+T_co>[str]
6697 units : typing.Sequence<+T_co>[str]
6698 Returns -> typing.Sequence<+T_co>[~ActionResult]<~ActionResult>
6700 # map input types to rpc msg
6702 msg
= dict(type='Action', request
='Run', version
=2, params
=_params
)
6703 _params
['applications'] = applications
6704 _params
['commands'] = commands
6705 _params
['machines'] = machines
6706 _params
['timeout'] = timeout
6707 _params
['units'] = units
6708 reply
= await self
.rpc(msg
)
6713 @ReturnMapping(ActionResults
)
6714 async def RunOnAllMachines(self
, applications
, commands
, machines
, timeout
, units
):
6716 applications : typing.Sequence<+T_co>[str]
6718 machines : typing.Sequence<+T_co>[str]
6720 units : typing.Sequence<+T_co>[str]
6721 Returns -> typing.Sequence<+T_co>[~ActionResult]<~ActionResult>
6723 # map input types to rpc msg
6725 msg
= dict(type='Action', request
='RunOnAllMachines', version
=2, params
=_params
)
6726 _params
['applications'] = applications
6727 _params
['commands'] = commands
6728 _params
['machines'] = machines
6729 _params
['timeout'] = timeout
6730 _params
['units'] = units
6731 reply
= await self
.rpc(msg
)
6735 class AgentFacade(Type
):
6738 schema
= {'definitions': {'AgentGetEntitiesResult': {'additionalProperties': False,
6739 'properties': {'container-type': {'type': 'string'},
6740 'error': {'$ref': '#/definitions/Error'},
6741 'jobs': {'items': {'type': 'string'},
6743 'life': {'type': 'string'}},
6744 'required': ['life',
6748 'AgentGetEntitiesResults': {'additionalProperties': False,
6749 'properties': {'entities': {'items': {'$ref': '#/definitions/AgentGetEntitiesResult'},
6751 'required': ['entities'],
6753 'CloudCredential': {'additionalProperties': False,
6754 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}},
6756 'auth-type': {'type': 'string'},
6757 'redacted': {'items': {'type': 'string'},
6759 'required': ['auth-type'],
6761 'CloudSpec': {'additionalProperties': False,
6762 'properties': {'credential': {'$ref': '#/definitions/CloudCredential'},
6763 'endpoint': {'type': 'string'},
6764 'identity-endpoint': {'type': 'string'},
6765 'name': {'type': 'string'},
6766 'region': {'type': 'string'},
6767 'storage-endpoint': {'type': 'string'},
6768 'type': {'type': 'string'}},
6769 'required': ['type', 'name'],
6771 'CloudSpecResult': {'additionalProperties': False,
6772 'properties': {'error': {'$ref': '#/definitions/Error'},
6773 'result': {'$ref': '#/definitions/CloudSpec'}},
6775 'CloudSpecResults': {'additionalProperties': False,
6776 'properties': {'results': {'items': {'$ref': '#/definitions/CloudSpecResult'},
6779 'ControllerConfigResult': {'additionalProperties': False,
6780 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
6783 'required': ['config'],
6785 'Entities': {'additionalProperties': False,
6786 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
6788 'required': ['entities'],
6790 'Entity': {'additionalProperties': False,
6791 'properties': {'tag': {'type': 'string'}},
6792 'required': ['tag'],
6794 'EntityPassword': {'additionalProperties': False,
6795 'properties': {'password': {'type': 'string'},
6796 'tag': {'type': 'string'}},
6797 'required': ['tag', 'password'],
6799 'EntityPasswords': {'additionalProperties': False,
6800 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'},
6802 'required': ['changes'],
6804 'Error': {'additionalProperties': False,
6805 'properties': {'code': {'type': 'string'},
6806 'info': {'$ref': '#/definitions/ErrorInfo'},
6807 'message': {'type': 'string'}},
6808 'required': ['message', 'code'],
6810 'ErrorInfo': {'additionalProperties': False,
6811 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
6812 'macaroon-path': {'type': 'string'}},
6814 'ErrorResult': {'additionalProperties': False,
6815 'properties': {'error': {'$ref': '#/definitions/Error'}},
6817 'ErrorResults': {'additionalProperties': False,
6818 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
6820 'required': ['results'],
6822 'IsMasterResult': {'additionalProperties': False,
6823 'properties': {'master': {'type': 'boolean'}},
6824 'required': ['master'],
6826 'Macaroon': {'additionalProperties': False, 'type': 'object'},
6827 'ModelConfigResult': {'additionalProperties': False,
6828 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
6831 'required': ['config'],
6833 'ModelTag': {'additionalProperties': False, 'type': 'object'},
6834 'NotifyWatchResult': {'additionalProperties': False,
6835 'properties': {'NotifyWatcherId': {'type': 'string'},
6836 'error': {'$ref': '#/definitions/Error'}},
6837 'required': ['NotifyWatcherId'],
6839 'NotifyWatchResults': {'additionalProperties': False,
6840 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
6842 'required': ['results'],
6844 'StateServingInfo': {'additionalProperties': False,
6845 'properties': {'api-port': {'type': 'integer'},
6846 'ca-private-key': {'type': 'string'},
6847 'cert': {'type': 'string'},
6848 'private-key': {'type': 'string'},
6849 'shared-secret': {'type': 'string'},
6850 'state-port': {'type': 'integer'},
6851 'system-identity': {'type': 'string'}},
6852 'required': ['api-port',
6860 'properties': {'ClearReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6861 'Result': {'$ref': '#/definitions/ErrorResults'}},
6863 'CloudSpec': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6864 'Result': {'$ref': '#/definitions/CloudSpecResults'}},
6866 'ControllerConfig': {'properties': {'Result': {'$ref': '#/definitions/ControllerConfigResult'}},
6868 'GetCloudSpec': {'properties': {'Params': {'$ref': '#/definitions/ModelTag'},
6869 'Result': {'$ref': '#/definitions/CloudSpecResult'}},
6871 'GetEntities': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6872 'Result': {'$ref': '#/definitions/AgentGetEntitiesResults'}},
6874 'IsMaster': {'properties': {'Result': {'$ref': '#/definitions/IsMasterResult'}},
6876 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
6878 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
6879 'Result': {'$ref': '#/definitions/ErrorResults'}},
6881 'StateServingInfo': {'properties': {'Result': {'$ref': '#/definitions/StateServingInfo'}},
6883 'WatchCredentials': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6884 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
6886 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
6891 @ReturnMapping(ErrorResults
)
6892 async def ClearReboot(self
, entities
):
6894 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6895 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
6897 # map input types to rpc msg
6899 msg
= dict(type='Agent', request
='ClearReboot', version
=2, params
=_params
)
6900 _params
['entities'] = entities
6901 reply
= await self
.rpc(msg
)
6906 @ReturnMapping(CloudSpecResults
)
6907 async def CloudSpec(self
, entities
):
6909 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6910 Returns -> typing.Sequence<+T_co>[~CloudSpecResult]<~CloudSpecResult>
6912 # map input types to rpc msg
6914 msg
= dict(type='Agent', request
='CloudSpec', version
=2, params
=_params
)
6915 _params
['entities'] = entities
6916 reply
= await self
.rpc(msg
)
6921 @ReturnMapping(ControllerConfigResult
)
6922 async def ControllerConfig(self
):
6925 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
6927 # map input types to rpc msg
6929 msg
= dict(type='Agent', request
='ControllerConfig', version
=2, params
=_params
)
6931 reply
= await self
.rpc(msg
)
6936 @ReturnMapping(CloudSpecResult
)
6937 async def GetCloudSpec(self
):
6940 Returns -> typing.Union[_ForwardRef('Error'), _ForwardRef('CloudSpec')]
6942 # map input types to rpc msg
6944 msg
= dict(type='Agent', request
='GetCloudSpec', version
=2, params
=_params
)
6946 reply
= await self
.rpc(msg
)
6951 @ReturnMapping(AgentGetEntitiesResults
)
6952 async def GetEntities(self
, entities
):
6954 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6955 Returns -> typing.Sequence<+T_co>[~AgentGetEntitiesResult]<~AgentGetEntitiesResult>
6957 # map input types to rpc msg
6959 msg
= dict(type='Agent', request
='GetEntities', version
=2, params
=_params
)
6960 _params
['entities'] = entities
6961 reply
= await self
.rpc(msg
)
6966 @ReturnMapping(IsMasterResult
)
6967 async def IsMaster(self
):
6972 # map input types to rpc msg
6974 msg
= dict(type='Agent', request
='IsMaster', version
=2, params
=_params
)
6976 reply
= await self
.rpc(msg
)
6981 @ReturnMapping(ModelConfigResult
)
6982 async def ModelConfig(self
):
6985 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
6987 # map input types to rpc msg
6989 msg
= dict(type='Agent', request
='ModelConfig', version
=2, params
=_params
)
6991 reply
= await self
.rpc(msg
)
6996 @ReturnMapping(ErrorResults
)
6997 async def SetPasswords(self
, changes
):
6999 changes : typing.Sequence<+T_co>[~EntityPassword]<~EntityPassword>
7000 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
7002 # map input types to rpc msg
7004 msg
= dict(type='Agent', request
='SetPasswords', version
=2, params
=_params
)
7005 _params
['changes'] = changes
7006 reply
= await self
.rpc(msg
)
7011 @ReturnMapping(StateServingInfo
)
7012 async def StateServingInfo(self
):
7015 Returns -> typing.Union[int, str]
7017 # map input types to rpc msg
7019 msg
= dict(type='Agent', request
='StateServingInfo', version
=2, params
=_params
)
7021 reply
= await self
.rpc(msg
)
7026 @ReturnMapping(NotifyWatchResults
)
7027 async def WatchCredentials(self
, entities
):
7029 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
7030 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
7032 # map input types to rpc msg
7034 msg
= dict(type='Agent', request
='WatchCredentials', version
=2, params
=_params
)
7035 _params
['entities'] = entities
7036 reply
= await self
.rpc(msg
)
7041 @ReturnMapping(NotifyWatchResult
)
7042 async def WatchForModelConfigChanges(self
):
7045 Returns -> typing.Union[str, _ForwardRef('Error')]
7047 # map input types to rpc msg
7049 msg
= dict(type='Agent', request
='WatchForModelConfigChanges', version
=2, params
=_params
)
7051 reply
= await self
.rpc(msg
)
7055 class AgentToolsFacade(Type
):
7058 schema
= {'properties': {'UpdateToolsAvailable': {'type': 'object'}}, 'type': 'object'}
7061 @ReturnMapping(None)
7062 async def UpdateToolsAvailable(self
):
7067 # map input types to rpc msg
7069 msg
= dict(type='AgentTools', request
='UpdateToolsAvailable', version
=1, params
=_params
)
7071 reply
= await self
.rpc(msg
)
7075 class AllModelWatcherFacade(Type
):
7076 name
= 'AllModelWatcher'
7078 schema
= {'definitions': {'AllWatcherNextResults': {'additionalProperties': False,
7079 'properties': {'deltas': {'items': {'$ref': '#/definitions/Delta'},
7081 'required': ['deltas'],
7083 'Delta': {'additionalProperties': False,
7084 'properties': {'entity': {'additionalProperties': True,
7086 'removed': {'type': 'boolean'}},
7087 'required': ['removed', 'entity'],
7089 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherNextResults'}},
7091 'Stop': {'type': 'object'}},
7095 @ReturnMapping(AllWatcherNextResults
)
7096 async def Next(self
):
7099 Returns -> typing.Sequence<+T_co>[~Delta]<~Delta>
7101 # map input types to rpc msg
7103 msg
= dict(type='AllModelWatcher', request
='Next', version
=2, params
=_params
)
7105 reply
= await self
.rpc(msg
)
7110 @ReturnMapping(None)
7111 async def Stop(self
):
7116 # map input types to rpc msg
7118 msg
= dict(type='AllModelWatcher', request
='Stop', version
=2, params
=_params
)
7120 reply
= await self
.rpc(msg
)
7124 class AllWatcherFacade(Type
):
7127 schema
= {'definitions': {'AllWatcherNextResults': {'additionalProperties': False,
7128 'properties': {'deltas': {'items': {'$ref': '#/definitions/Delta'},
7130 'required': ['deltas'],
7132 'Delta': {'additionalProperties': False,
7133 'properties': {'entity': {'additionalProperties': True,
7135 'removed': {'type': 'boolean'}},
7136 'required': ['removed', 'entity'],
7138 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherNextResults'}},
7140 'Stop': {'type': 'object'}},
7144 @ReturnMapping(AllWatcherNextResults
)
7145 async def Next(self
):
7148 Returns -> typing.Sequence<+T_co>[~Delta]<~Delta>
7150 # map input types to rpc msg
7152 msg
= dict(type='AllWatcher', request
='Next', version
=1, params
=_params
)
7154 reply
= await self
.rpc(msg
)
7159 @ReturnMapping(None)
7160 async def Stop(self
):
7165 # map input types to rpc msg
7167 msg
= dict(type='AllWatcher', request
='Stop', version
=1, params
=_params
)
7169 reply
= await self
.rpc(msg
)
7173 class AnnotationsFacade(Type
):
7174 name
= 'Annotations'
7176 schema
= {'definitions': {'AnnotationsGetResult': {'additionalProperties': False,
7177 'properties': {'annotations': {'patternProperties': {'.*': {'type': 'string'}},
7179 'entity': {'type': 'string'},
7180 'error': {'$ref': '#/definitions/ErrorResult'}},
7181 'required': ['entity', 'annotations'],
7183 'AnnotationsGetResults': {'additionalProperties': False,
7184 'properties': {'results': {'items': {'$ref': '#/definitions/AnnotationsGetResult'},
7186 'required': ['results'],
7188 'AnnotationsSet': {'additionalProperties': False,
7189 'properties': {'annotations': {'items': {'$ref': '#/definitions/EntityAnnotations'},
7191 'required': ['annotations'],
7193 'Entities': {'additionalProperties': False,
7194 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
7196 'required': ['entities'],
7198 'Entity': {'additionalProperties': False,
7199 'properties': {'tag': {'type': 'string'}},
7200 'required': ['tag'],
7202 'EntityAnnotations': {'additionalProperties': False,
7203 'properties': {'annotations': {'patternProperties': {'.*': {'type': 'string'}},
7205 'entity': {'type': 'string'}},
7206 'required': ['entity', 'annotations'],
7208 'Error': {'additionalProperties': False,
7209 'properties': {'code': {'type': 'string'},
7210 'info': {'$ref': '#/definitions/ErrorInfo'},
7211 'message': {'type': 'string'}},
7212 'required': ['message', 'code'],
7214 'ErrorInfo': {'additionalProperties': False,
7215 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
7216 'macaroon-path': {'type': 'string'}},
7218 'ErrorResult': {'additionalProperties': False,
7219 'properties': {'error': {'$ref': '#/definitions/Error'}},
7221 'ErrorResults': {'additionalProperties': False,
7222 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
7224 'required': ['results'],
7226 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
7227 'properties': {'Get': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
7228 'Result': {'$ref': '#/definitions/AnnotationsGetResults'}},
7230 'Set': {'properties': {'Params': {'$ref': '#/definitions/AnnotationsSet'},
7231 'Result': {'$ref': '#/definitions/ErrorResults'}},
7236 @ReturnMapping(AnnotationsGetResults
)
7237 async def Get(self
, entities
):
7239 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
7240 Returns -> typing.Sequence<+T_co>[~AnnotationsGetResult]<~AnnotationsGetResult>
7242 # map input types to rpc msg
7244 msg
= dict(type='Annotations', request
='Get', version
=2, params
=_params
)
7245 _params
['entities'] = entities
7246 reply
= await self
.rpc(msg
)
7251 @ReturnMapping(ErrorResults
)
7252 async def Set(self
, annotations
):
7254 annotations : typing.Sequence<+T_co>[~EntityAnnotations]<~EntityAnnotations>
7255 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
7257 # map input types to rpc msg
7259 msg
= dict(type='Annotations', request
='Set', version
=2, params
=_params
)
7260 _params
['annotations'] = annotations
7261 reply
= await self
.rpc(msg
)
7265 class ApplicationFacade(Type
):
7266 name
= 'Application'
7268 schema
= {'definitions': {'AddApplicationUnits': {'additionalProperties': False,
7269 'properties': {'application': {'type': 'string'},
7270 'num-units': {'type': 'integer'},
7271 'placement': {'items': {'$ref': '#/definitions/Placement'},
7273 'required': ['application',
7277 'AddApplicationUnitsResults': {'additionalProperties': False,
7278 'properties': {'units': {'items': {'type': 'string'},
7280 'required': ['units'],
7282 'AddRelation': {'additionalProperties': False,
7283 'properties': {'endpoints': {'items': {'type': 'string'},
7285 'required': ['endpoints'],
7287 'AddRelationResults': {'additionalProperties': False,
7288 'properties': {'endpoints': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}},
7290 'required': ['endpoints'],
7292 'ApplicationCharmRelations': {'additionalProperties': False,
7293 'properties': {'application': {'type': 'string'}},
7294 'required': ['application'],
7296 'ApplicationCharmRelationsResults': {'additionalProperties': False,
7297 'properties': {'charm-relations': {'items': {'type': 'string'},
7299 'required': ['charm-relations'],
7301 'ApplicationDeploy': {'additionalProperties': False,
7302 'properties': {'application': {'type': 'string'},
7303 'channel': {'type': 'string'},
7304 'charm-url': {'type': 'string'},
7305 'config': {'patternProperties': {'.*': {'type': 'string'}},
7307 'config-yaml': {'type': 'string'},
7308 'constraints': {'$ref': '#/definitions/Value'},
7309 'endpoint-bindings': {'patternProperties': {'.*': {'type': 'string'}},
7311 'num-units': {'type': 'integer'},
7312 'placement': {'items': {'$ref': '#/definitions/Placement'},
7314 'resources': {'patternProperties': {'.*': {'type': 'string'}},
7316 'series': {'type': 'string'},
7317 'storage': {'patternProperties': {'.*': {'$ref': '#/definitions/Constraints'}},
7319 'required': ['application',
7327 'ApplicationDestroy': {'additionalProperties': False,
7328 'properties': {'application': {'type': 'string'}},
7329 'required': ['application'],
7331 'ApplicationExpose': {'additionalProperties': False,
7332 'properties': {'application': {'type': 'string'}},
7333 'required': ['application'],
7335 'ApplicationGet': {'additionalProperties': False,
7336 'properties': {'application': {'type': 'string'}},
7337 'required': ['application'],
7339 'ApplicationGetResults': {'additionalProperties': False,
7340 'properties': {'application': {'type': 'string'},
7341 'charm': {'type': 'string'},
7342 'config': {'patternProperties': {'.*': {'additionalProperties': True,
7345 'constraints': {'$ref': '#/definitions/Value'},
7346 'series': {'type': 'string'}},
7347 'required': ['application',
7353 'ApplicationMetricCredential': {'additionalProperties': False,
7354 'properties': {'application': {'type': 'string'},
7355 'metrics-credentials': {'items': {'type': 'integer'},
7357 'required': ['application',
7358 'metrics-credentials'],
7360 'ApplicationMetricCredentials': {'additionalProperties': False,
7361 'properties': {'creds': {'items': {'$ref': '#/definitions/ApplicationMetricCredential'},
7363 'required': ['creds'],
7365 'ApplicationSet': {'additionalProperties': False,
7366 'properties': {'application': {'type': 'string'},
7367 'options': {'patternProperties': {'.*': {'type': 'string'}},
7369 'required': ['application', 'options'],
7371 'ApplicationSetCharm': {'additionalProperties': False,
7372 'properties': {'application': {'type': 'string'},
7373 'channel': {'type': 'string'},
7374 'charm-url': {'type': 'string'},
7375 'config-settings': {'patternProperties': {'.*': {'type': 'string'}},
7377 'config-settings-yaml': {'type': 'string'},
7378 'force-series': {'type': 'boolean'},
7379 'force-units': {'type': 'boolean'},
7380 'resource-ids': {'patternProperties': {'.*': {'type': 'string'}},
7382 'storage-constraints': {'patternProperties': {'.*': {'$ref': '#/definitions/StorageConstraints'}},
7384 'required': ['application',
7390 'ApplicationUnexpose': {'additionalProperties': False,
7391 'properties': {'application': {'type': 'string'}},
7392 'required': ['application'],
7394 'ApplicationUnset': {'additionalProperties': False,
7395 'properties': {'application': {'type': 'string'},
7396 'options': {'items': {'type': 'string'},
7398 'required': ['application', 'options'],
7400 'ApplicationUpdate': {'additionalProperties': False,
7401 'properties': {'application': {'type': 'string'},
7402 'charm-url': {'type': 'string'},
7403 'constraints': {'$ref': '#/definitions/Value'},
7404 'force-charm-url': {'type': 'boolean'},
7405 'force-series': {'type': 'boolean'},
7406 'min-units': {'type': 'integer'},
7407 'settings': {'patternProperties': {'.*': {'type': 'string'}},
7409 'settings-yaml': {'type': 'string'}},
7410 'required': ['application',
7416 'ApplicationsDeploy': {'additionalProperties': False,
7417 'properties': {'applications': {'items': {'$ref': '#/definitions/ApplicationDeploy'},
7419 'required': ['applications'],
7421 'CharmRelation': {'additionalProperties': False,
7422 'properties': {'interface': {'type': 'string'},
7423 'limit': {'type': 'integer'},
7424 'name': {'type': 'string'},
7425 'optional': {'type': 'boolean'},
7426 'role': {'type': 'string'},
7427 'scope': {'type': 'string'}},
7428 'required': ['name',
7435 'Constraints': {'additionalProperties': False,
7436 'properties': {'Count': {'type': 'integer'},
7437 'Pool': {'type': 'string'},
7438 'Size': {'type': 'integer'}},
7439 'required': ['Pool', 'Size', 'Count'],
7441 'DestroyApplicationUnits': {'additionalProperties': False,
7442 'properties': {'unit-names': {'items': {'type': 'string'},
7444 'required': ['unit-names'],
7446 'DestroyRelation': {'additionalProperties': False,
7447 'properties': {'endpoints': {'items': {'type': 'string'},
7449 'required': ['endpoints'],
7451 'Error': {'additionalProperties': False,
7452 'properties': {'code': {'type': 'string'},
7453 'info': {'$ref': '#/definitions/ErrorInfo'},
7454 'message': {'type': 'string'}},
7455 'required': ['message', 'code'],
7457 'ErrorInfo': {'additionalProperties': False,
7458 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
7459 'macaroon-path': {'type': 'string'}},
7461 'ErrorResult': {'additionalProperties': False,
7462 'properties': {'error': {'$ref': '#/definitions/Error'}},
7464 'ErrorResults': {'additionalProperties': False,
7465 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
7467 'required': ['results'],
7469 'GetApplicationConstraints': {'additionalProperties': False,
7470 'properties': {'application': {'type': 'string'}},
7471 'required': ['application'],
7473 'GetConstraintsResults': {'additionalProperties': False,
7474 'properties': {'constraints': {'$ref': '#/definitions/Value'}},
7475 'required': ['constraints'],
7477 'Macaroon': {'additionalProperties': False, 'type': 'object'},
7478 'Placement': {'additionalProperties': False,
7479 'properties': {'directive': {'type': 'string'},
7480 'scope': {'type': 'string'}},
7481 'required': ['scope', 'directive'],
7483 'SetConstraints': {'additionalProperties': False,
7484 'properties': {'application': {'type': 'string'},
7485 'constraints': {'$ref': '#/definitions/Value'}},
7486 'required': ['application', 'constraints'],
7488 'StorageConstraints': {'additionalProperties': False,
7489 'properties': {'count': {'type': 'integer'},
7490 'pool': {'type': 'string'},
7491 'size': {'type': 'integer'}},
7493 'StringResult': {'additionalProperties': False,
7494 'properties': {'error': {'$ref': '#/definitions/Error'},
7495 'result': {'type': 'string'}},
7496 'required': ['result'],
7498 'Value': {'additionalProperties': False,
7499 'properties': {'arch': {'type': 'string'},
7500 'container': {'type': 'string'},
7501 'cores': {'type': 'integer'},
7502 'cpu-power': {'type': 'integer'},
7503 'instance-type': {'type': 'string'},
7504 'mem': {'type': 'integer'},
7505 'root-disk': {'type': 'integer'},
7506 'spaces': {'items': {'type': 'string'},
7508 'tags': {'items': {'type': 'string'},
7510 'virt-type': {'type': 'string'}},
7512 'properties': {'AddRelation': {'properties': {'Params': {'$ref': '#/definitions/AddRelation'},
7513 'Result': {'$ref': '#/definitions/AddRelationResults'}},
7515 'AddUnits': {'properties': {'Params': {'$ref': '#/definitions/AddApplicationUnits'},
7516 'Result': {'$ref': '#/definitions/AddApplicationUnitsResults'}},
7518 'CharmRelations': {'properties': {'Params': {'$ref': '#/definitions/ApplicationCharmRelations'},
7519 'Result': {'$ref': '#/definitions/ApplicationCharmRelationsResults'}},
7521 'Deploy': {'properties': {'Params': {'$ref': '#/definitions/ApplicationsDeploy'},
7522 'Result': {'$ref': '#/definitions/ErrorResults'}},
7524 'Destroy': {'properties': {'Params': {'$ref': '#/definitions/ApplicationDestroy'}},
7526 'DestroyRelation': {'properties': {'Params': {'$ref': '#/definitions/DestroyRelation'}},
7528 'DestroyUnits': {'properties': {'Params': {'$ref': '#/definitions/DestroyApplicationUnits'}},
7530 'Expose': {'properties': {'Params': {'$ref': '#/definitions/ApplicationExpose'}},
7532 'Get': {'properties': {'Params': {'$ref': '#/definitions/ApplicationGet'},
7533 'Result': {'$ref': '#/definitions/ApplicationGetResults'}},
7535 'GetCharmURL': {'properties': {'Params': {'$ref': '#/definitions/ApplicationGet'},
7536 'Result': {'$ref': '#/definitions/StringResult'}},
7538 'GetConstraints': {'properties': {'Params': {'$ref': '#/definitions/GetApplicationConstraints'},
7539 'Result': {'$ref': '#/definitions/GetConstraintsResults'}},
7541 'Set': {'properties': {'Params': {'$ref': '#/definitions/ApplicationSet'}},
7543 'SetCharm': {'properties': {'Params': {'$ref': '#/definitions/ApplicationSetCharm'}},
7545 'SetConstraints': {'properties': {'Params': {'$ref': '#/definitions/SetConstraints'}},
7547 'SetMetricCredentials': {'properties': {'Params': {'$ref': '#/definitions/ApplicationMetricCredentials'},
7548 'Result': {'$ref': '#/definitions/ErrorResults'}},
7550 'Unexpose': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUnexpose'}},
7552 'Unset': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUnset'}},
7554 'Update': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUpdate'}},
7559 @ReturnMapping(AddRelationResults
)
7560 async def AddRelation(self
, endpoints
):
7562 endpoints : typing.Sequence<+T_co>[str]
7563 Returns -> typing.Mapping<~KT, +VT_co>[str, ~CharmRelation]<~CharmRelation>
7565 # map input types to rpc msg
7567 msg
= dict(type='Application', request
='AddRelation', version
=3, params
=_params
)
7568 _params
['endpoints'] = endpoints
7569 reply
= await self
.rpc(msg
)
7574 @ReturnMapping(AddApplicationUnitsResults
)
7575 async def AddUnits(self
, application
, num_units
, placement
):
7579 placement : typing.Sequence<+T_co>[~Placement]<~Placement>
7580 Returns -> typing.Sequence<+T_co>[str]
7582 # map input types to rpc msg
7584 msg
= dict(type='Application', request
='AddUnits', version
=3, params
=_params
)
7585 _params
['application'] = application
7586 _params
['num-units'] = num_units
7587 _params
['placement'] = placement
7588 reply
= await self
.rpc(msg
)
7593 @ReturnMapping(ApplicationCharmRelationsResults
)
7594 async def CharmRelations(self
, application
):
7597 Returns -> typing.Sequence<+T_co>[str]
7599 # map input types to rpc msg
7601 msg
= dict(type='Application', request
='CharmRelations', version
=3, params
=_params
)
7602 _params
['application'] = application
7603 reply
= await self
.rpc(msg
)
7608 @ReturnMapping(ErrorResults
)
7609 async def Deploy(self
, applications
):
7611 applications : typing.Sequence<+T_co>[~ApplicationDeploy]<~ApplicationDeploy>
7612 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
7614 # map input types to rpc msg
7616 msg
= dict(type='Application', request
='Deploy', version
=3, params
=_params
)
7617 _params
['applications'] = applications
7618 reply
= await self
.rpc(msg
)
7623 @ReturnMapping(None)
7624 async def Destroy(self
, application
):
7629 # map input types to rpc msg
7631 msg
= dict(type='Application', request
='Destroy', version
=3, params
=_params
)
7632 _params
['application'] = application
7633 reply
= await self
.rpc(msg
)
7638 @ReturnMapping(None)
7639 async def DestroyRelation(self
, endpoints
):
7641 endpoints : typing.Sequence<+T_co>[str]
7644 # map input types to rpc msg
7646 msg
= dict(type='Application', request
='DestroyRelation', version
=3, params
=_params
)
7647 _params
['endpoints'] = endpoints
7648 reply
= await self
.rpc(msg
)
7653 @ReturnMapping(None)
7654 async def DestroyUnits(self
, unit_names
):
7656 unit_names : typing.Sequence<+T_co>[str]
7659 # map input types to rpc msg
7661 msg
= dict(type='Application', request
='DestroyUnits', version
=3, params
=_params
)
7662 _params
['unit-names'] = unit_names
7663 reply
= await self
.rpc(msg
)
7668 @ReturnMapping(None)
7669 async def Expose(self
, application
):
7674 # map input types to rpc msg
7676 msg
= dict(type='Application', request
='Expose', version
=3, params
=_params
)
7677 _params
['application'] = application
7678 reply
= await self
.rpc(msg
)
7683 @ReturnMapping(ApplicationGetResults
)
7684 async def Get(self
, application
):
7687 Returns -> typing.Union[str, typing.Mapping<~KT, +VT_co>[str, typing.Any], _ForwardRef('Value')]
7689 # map input types to rpc msg
7691 msg
= dict(type='Application', request
='Get', version
=3, params
=_params
)
7692 _params
['application'] = application
7693 reply
= await self
.rpc(msg
)
7698 @ReturnMapping(StringResult
)
7699 async def GetCharmURL(self
, application
):
7702 Returns -> typing.Union[_ForwardRef('Error'), str]
7704 # map input types to rpc msg
7706 msg
= dict(type='Application', request
='GetCharmURL', version
=3, params
=_params
)
7707 _params
['application'] = application
7708 reply
= await self
.rpc(msg
)
7713 @ReturnMapping(GetConstraintsResults
)
7714 async def GetConstraints(self
, application
):
7719 # map input types to rpc msg
7721 msg
= dict(type='Application', request
='GetConstraints', version
=3, params
=_params
)
7722 _params
['application'] = application
7723 reply
= await self
.rpc(msg
)
7728 @ReturnMapping(None)
7729 async def Set(self
, application
, options
):
7732 options : typing.Mapping<~KT, +VT_co>[str, str]
7735 # map input types to rpc msg
7737 msg
= dict(type='Application', request
='Set', version
=3, params
=_params
)
7738 _params
['application'] = application
7739 _params
['options'] = options
7740 reply
= await self
.rpc(msg
)
7745 @ReturnMapping(None)
7746 async def SetCharm(self
, application
, channel
, charm_url
, config_settings
, config_settings_yaml
, force_series
, force_units
, resource_ids
, storage_constraints
):
7751 config_settings : typing.Mapping<~KT, +VT_co>[str, str]
7752 config_settings_yaml : str
7755 resource_ids : typing.Mapping<~KT, +VT_co>[str, str]
7756 storage_constraints : typing.Mapping<~KT, +VT_co>[str, ~StorageConstraints]<~StorageConstraints>
7759 # map input types to rpc msg
7761 msg
= dict(type='Application', request
='SetCharm', version
=3, params
=_params
)
7762 _params
['application'] = application
7763 _params
['channel'] = channel
7764 _params
['charm-url'] = charm_url
7765 _params
['config-settings'] = config_settings
7766 _params
['config-settings-yaml'] = config_settings_yaml
7767 _params
['force-series'] = force_series
7768 _params
['force-units'] = force_units
7769 _params
['resource-ids'] = resource_ids
7770 _params
['storage-constraints'] = storage_constraints
7771 reply
= await self
.rpc(msg
)
7776 @ReturnMapping(None)
7777 async def SetConstraints(self
, application
, constraints
):
7783 # map input types to rpc msg
7785 msg
= dict(type='Application', request
='SetConstraints', version
=3, params
=_params
)
7786 _params
['application'] = application
7787 _params
['constraints'] = constraints
7788 reply
= await self
.rpc(msg
)
7793 @ReturnMapping(ErrorResults
)
7794 async def SetMetricCredentials(self
, creds
):
7796 creds : typing.Sequence<+T_co>[~ApplicationMetricCredential]<~ApplicationMetricCredential>
7797 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
7799 # map input types to rpc msg
7801 msg
= dict(type='Application', request
='SetMetricCredentials', version
=3, params
=_params
)
7802 _params
['creds'] = creds
7803 reply
= await self
.rpc(msg
)
7808 @ReturnMapping(None)
7809 async def Unexpose(self
, application
):
7814 # map input types to rpc msg
7816 msg
= dict(type='Application', request
='Unexpose', version
=3, params
=_params
)
7817 _params
['application'] = application
7818 reply
= await self
.rpc(msg
)
7823 @ReturnMapping(None)
7824 async def Unset(self
, application
, options
):
7827 options : typing.Sequence<+T_co>[str]
7830 # map input types to rpc msg
7832 msg
= dict(type='Application', request
='Unset', version
=3, params
=_params
)
7833 _params
['application'] = application
7834 _params
['options'] = options
7835 reply
= await self
.rpc(msg
)
7840 @ReturnMapping(None)
7841 async def Update(self
, application
, charm_url
, constraints
, force_charm_url
, force_series
, min_units
, settings
, settings_yaml
):
7846 force_charm_url : bool
7849 settings : typing.Mapping<~KT, +VT_co>[str, str]
7853 # map input types to rpc msg
7855 msg
= dict(type='Application', request
='Update', version
=3, params
=_params
)
7856 _params
['application'] = application
7857 _params
['charm-url'] = charm_url
7858 _params
['constraints'] = constraints
7859 _params
['force-charm-url'] = force_charm_url
7860 _params
['force-series'] = force_series
7861 _params
['min-units'] = min_units
7862 _params
['settings'] = settings
7863 _params
['settings-yaml'] = settings_yaml
7864 reply
= await self
.rpc(msg
)
7868 class ApplicationRelationsWatcherFacade(Type
):
7869 name
= 'ApplicationRelationsWatcher'
7871 schema
= {'definitions': {'ApplicationRelationsChange': {'additionalProperties': False,
7872 'properties': {'changed': {'items': {'$ref': '#/definitions/RelationChange'},
7874 'removed': {'items': {'type': 'integer'},
7877 'ApplicationRelationsWatchResult': {'additionalProperties': False,
7878 'properties': {'ApplicationRelationsWatcherId': {'type': 'string'},
7879 'changes': {'$ref': '#/definitions/ApplicationRelationsChange'},
7880 'error': {'$ref': '#/definitions/Error'}},
7881 'required': ['ApplicationRelationsWatcherId'],
7883 'Error': {'additionalProperties': False,
7884 'properties': {'code': {'type': 'string'},
7885 'info': {'$ref': '#/definitions/ErrorInfo'},
7886 'message': {'type': 'string'}},
7887 'required': ['message', 'code'],
7889 'ErrorInfo': {'additionalProperties': False,
7890 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
7891 'macaroon-path': {'type': 'string'}},
7893 'Macaroon': {'additionalProperties': False, 'type': 'object'},
7894 'RelationChange': {'additionalProperties': False,
7895 'properties': {'changedunits': {'patternProperties': {'.*': {'$ref': '#/definitions/RelationUnitChange'}},
7897 'departedunits': {'items': {'type': 'string'},
7899 'id': {'type': 'integer'},
7900 'life': {'type': 'string'}},
7901 'required': ['id', 'life'],
7903 'RelationUnitChange': {'additionalProperties': False,
7904 'properties': {'settings': {'patternProperties': {'.*': {'additionalProperties': True,
7908 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/ApplicationRelationsWatchResult'}},
7910 'Stop': {'type': 'object'}},
7914 @ReturnMapping(ApplicationRelationsWatchResult
)
7915 async def Next(self
):
7918 Returns -> typing.Union[str, _ForwardRef('ApplicationRelationsChange'), _ForwardRef('Error')]
7920 # map input types to rpc msg
7922 msg
= dict(type='ApplicationRelationsWatcher', request
='Next', version
=1, params
=_params
)
7924 reply
= await self
.rpc(msg
)
7929 @ReturnMapping(None)
7930 async def Stop(self
):
7935 # map input types to rpc msg
7937 msg
= dict(type='ApplicationRelationsWatcher', request
='Stop', version
=1, params
=_params
)
7939 reply
= await self
.rpc(msg
)
7943 class ApplicationScalerFacade(Type
):
7944 name
= 'ApplicationScaler'
7946 schema
= {'definitions': {'Entities': {'additionalProperties': False,
7947 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
7949 'required': ['entities'],
7951 'Entity': {'additionalProperties': False,
7952 'properties': {'tag': {'type': 'string'}},
7953 'required': ['tag'],
7955 'Error': {'additionalProperties': False,
7956 'properties': {'code': {'type': 'string'},
7957 'info': {'$ref': '#/definitions/ErrorInfo'},
7958 'message': {'type': 'string'}},
7959 'required': ['message', 'code'],
7961 'ErrorInfo': {'additionalProperties': False,
7962 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
7963 'macaroon-path': {'type': 'string'}},
7965 'ErrorResult': {'additionalProperties': False,
7966 'properties': {'error': {'$ref': '#/definitions/Error'}},
7968 'ErrorResults': {'additionalProperties': False,
7969 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
7971 'required': ['results'],
7973 'Macaroon': {'additionalProperties': False, 'type': 'object'},
7974 'StringsWatchResult': {'additionalProperties': False,
7975 'properties': {'changes': {'items': {'type': 'string'},
7977 'error': {'$ref': '#/definitions/Error'},
7978 'watcher-id': {'type': 'string'}},
7979 'required': ['watcher-id'],
7981 'properties': {'Rescale': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
7982 'Result': {'$ref': '#/definitions/ErrorResults'}},
7984 'Watch': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
7989 @ReturnMapping(ErrorResults
)
7990 async def Rescale(self
, entities
):
7992 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
7993 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
7995 # map input types to rpc msg
7997 msg
= dict(type='ApplicationScaler', request
='Rescale', version
=1, params
=_params
)
7998 _params
['entities'] = entities
7999 reply
= await self
.rpc(msg
)
8004 @ReturnMapping(StringsWatchResult
)
8005 async def Watch(self
):
8008 Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')]
8010 # map input types to rpc msg
8012 msg
= dict(type='ApplicationScaler', request
='Watch', version
=1, params
=_params
)
8014 reply
= await self
.rpc(msg
)
8018 class BackupsFacade(Type
):
8021 schema
= {'definitions': {'BackupsCreateArgs': {'additionalProperties': False,
8022 'properties': {'notes': {'type': 'string'}},
8023 'required': ['notes'],
8025 'BackupsInfoArgs': {'additionalProperties': False,
8026 'properties': {'id': {'type': 'string'}},
8029 'BackupsListArgs': {'additionalProperties': False,
8031 'BackupsListResult': {'additionalProperties': False,
8032 'properties': {'list': {'items': {'$ref': '#/definitions/BackupsMetadataResult'},
8034 'required': ['list'],
8036 'BackupsMetadataResult': {'additionalProperties': False,
8037 'properties': {'ca-cert': {'type': 'string'},
8038 'ca-private-key': {'type': 'string'},
8039 'checksum': {'type': 'string'},
8040 'checksum-format': {'type': 'string'},
8041 'finished': {'format': 'date-time',
8043 'hostname': {'type': 'string'},
8044 'id': {'type': 'string'},
8045 'machine': {'type': 'string'},
8046 'model': {'type': 'string'},
8047 'notes': {'type': 'string'},
8048 'series': {'type': 'string'},
8049 'size': {'type': 'integer'},
8050 'started': {'format': 'date-time',
8052 'stored': {'format': 'date-time',
8054 'version': {'$ref': '#/definitions/Number'}},
8071 'BackupsRemoveArgs': {'additionalProperties': False,
8072 'properties': {'id': {'type': 'string'}},
8075 'Number': {'additionalProperties': False,
8076 'properties': {'Build': {'type': 'integer'},
8077 'Major': {'type': 'integer'},
8078 'Minor': {'type': 'integer'},
8079 'Patch': {'type': 'integer'},
8080 'Tag': {'type': 'string'}},
8081 'required': ['Major',
8087 'RestoreArgs': {'additionalProperties': False,
8088 'properties': {'backup-id': {'type': 'string'}},
8089 'required': ['backup-id'],
8091 'properties': {'Create': {'properties': {'Params': {'$ref': '#/definitions/BackupsCreateArgs'},
8092 'Result': {'$ref': '#/definitions/BackupsMetadataResult'}},
8094 'FinishRestore': {'type': 'object'},
8095 'Info': {'properties': {'Params': {'$ref': '#/definitions/BackupsInfoArgs'},
8096 'Result': {'$ref': '#/definitions/BackupsMetadataResult'}},
8098 'List': {'properties': {'Params': {'$ref': '#/definitions/BackupsListArgs'},
8099 'Result': {'$ref': '#/definitions/BackupsListResult'}},
8101 'PrepareRestore': {'type': 'object'},
8102 'Remove': {'properties': {'Params': {'$ref': '#/definitions/BackupsRemoveArgs'}},
8104 'Restore': {'properties': {'Params': {'$ref': '#/definitions/RestoreArgs'}},
8109 @ReturnMapping(BackupsMetadataResult
)
8110 async def Create(self
, notes
):
8113 Returns -> typing.Union[str, int, _ForwardRef('Number')]
8115 # map input types to rpc msg
8117 msg
= dict(type='Backups', request
='Create', version
=1, params
=_params
)
8118 _params
['notes'] = notes
8119 reply
= await self
.rpc(msg
)
8124 @ReturnMapping(None)
8125 async def FinishRestore(self
):
8130 # map input types to rpc msg
8132 msg
= dict(type='Backups', request
='FinishRestore', version
=1, params
=_params
)
8134 reply
= await self
.rpc(msg
)
8139 @ReturnMapping(BackupsMetadataResult
)
8140 async def Info(self
, id_
):
8143 Returns -> typing.Union[str, int, _ForwardRef('Number')]
8145 # map input types to rpc msg
8147 msg
= dict(type='Backups', request
='Info', version
=1, params
=_params
)
8149 reply
= await self
.rpc(msg
)
8154 @ReturnMapping(BackupsListResult
)
8155 async def List(self
):
8158 Returns -> typing.Sequence<+T_co>[~BackupsMetadataResult]<~BackupsMetadataResult>
8160 # map input types to rpc msg
8162 msg
= dict(type='Backups', request
='List', version
=1, params
=_params
)
8164 reply
= await self
.rpc(msg
)
8169 @ReturnMapping(None)
8170 async def PrepareRestore(self
):
8175 # map input types to rpc msg
8177 msg
= dict(type='Backups', request
='PrepareRestore', version
=1, params
=_params
)
8179 reply
= await self
.rpc(msg
)
8184 @ReturnMapping(None)
8185 async def Remove(self
, id_
):
8190 # map input types to rpc msg
8192 msg
= dict(type='Backups', request
='Remove', version
=1, params
=_params
)
8194 reply
= await self
.rpc(msg
)
8199 @ReturnMapping(None)
8200 async def Restore(self
, backup_id
):
8205 # map input types to rpc msg
8207 msg
= dict(type='Backups', request
='Restore', version
=1, params
=_params
)
8208 _params
['backup-id'] = backup_id
8209 reply
= await self
.rpc(msg
)
8213 class BlockFacade(Type
):
8216 schema
= {'definitions': {'Block': {'additionalProperties': False,
8217 'properties': {'id': {'type': 'string'},
8218 'message': {'type': 'string'},
8219 'tag': {'type': 'string'},
8220 'type': {'type': 'string'}},
8221 'required': ['id', 'tag', 'type'],
8223 'BlockResult': {'additionalProperties': False,
8224 'properties': {'error': {'$ref': '#/definitions/Error'},
8225 'result': {'$ref': '#/definitions/Block'}},
8226 'required': ['result'],
8228 'BlockResults': {'additionalProperties': False,
8229 'properties': {'results': {'items': {'$ref': '#/definitions/BlockResult'},
8232 'BlockSwitchParams': {'additionalProperties': False,
8233 'properties': {'message': {'type': 'string'},
8234 'type': {'type': 'string'}},
8235 'required': ['type'],
8237 'Error': {'additionalProperties': False,
8238 'properties': {'code': {'type': 'string'},
8239 'info': {'$ref': '#/definitions/ErrorInfo'},
8240 'message': {'type': 'string'}},
8241 'required': ['message', 'code'],
8243 'ErrorInfo': {'additionalProperties': False,
8244 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
8245 'macaroon-path': {'type': 'string'}},
8247 'ErrorResult': {'additionalProperties': False,
8248 'properties': {'error': {'$ref': '#/definitions/Error'}},
8250 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
8251 'properties': {'List': {'properties': {'Result': {'$ref': '#/definitions/BlockResults'}},
8253 'SwitchBlockOff': {'properties': {'Params': {'$ref': '#/definitions/BlockSwitchParams'},
8254 'Result': {'$ref': '#/definitions/ErrorResult'}},
8256 'SwitchBlockOn': {'properties': {'Params': {'$ref': '#/definitions/BlockSwitchParams'},
8257 'Result': {'$ref': '#/definitions/ErrorResult'}},
8262 @ReturnMapping(BlockResults
)
8263 async def List(self
):
8266 Returns -> typing.Sequence<+T_co>[~BlockResult]<~BlockResult>
8268 # map input types to rpc msg
8270 msg
= dict(type='Block', request
='List', version
=2, params
=_params
)
8272 reply
= await self
.rpc(msg
)
8277 @ReturnMapping(ErrorResult
)
8278 async def SwitchBlockOff(self
, message
, type_
):
8284 # map input types to rpc msg
8286 msg
= dict(type='Block', request
='SwitchBlockOff', version
=2, params
=_params
)
8287 _params
['message'] = message
8288 _params
['type'] = type_
8289 reply
= await self
.rpc(msg
)
8294 @ReturnMapping(ErrorResult
)
8295 async def SwitchBlockOn(self
, message
, type_
):
8301 # map input types to rpc msg
8303 msg
= dict(type='Block', request
='SwitchBlockOn', version
=2, params
=_params
)
8304 _params
['message'] = message
8305 _params
['type'] = type_
8306 reply
= await self
.rpc(msg
)
8310 class BundleFacade(Type
):
8313 schema
= {'definitions': {'BundleChange': {'additionalProperties': False,
8314 'properties': {'args': {'items': {'additionalProperties': True,
8317 'id': {'type': 'string'},
8318 'method': {'type': 'string'},
8319 'requires': {'items': {'type': 'string'},
8326 'BundleChangesParams': {'additionalProperties': False,
8327 'properties': {'yaml': {'type': 'string'}},
8328 'required': ['yaml'],
8330 'BundleChangesResults': {'additionalProperties': False,
8331 'properties': {'changes': {'items': {'$ref': '#/definitions/BundleChange'},
8333 'errors': {'items': {'type': 'string'},
8336 'properties': {'GetChanges': {'properties': {'Params': {'$ref': '#/definitions/BundleChangesParams'},
8337 'Result': {'$ref': '#/definitions/BundleChangesResults'}},
8342 @ReturnMapping(BundleChangesResults
)
8343 async def GetChanges(self
, yaml
):
8346 Returns -> typing.Sequence<+T_co>[~BundleChange]<~BundleChange>
8348 # map input types to rpc msg
8350 msg
= dict(type='Bundle', request
='GetChanges', version
=1, params
=_params
)
8351 _params
['yaml'] = yaml
8352 reply
= await self
.rpc(msg
)
8356 class CharmRevisionUpdaterFacade(Type
):
8357 name
= 'CharmRevisionUpdater'
8359 schema
= {'definitions': {'Error': {'additionalProperties': False,
8360 'properties': {'code': {'type': 'string'},
8361 'info': {'$ref': '#/definitions/ErrorInfo'},
8362 'message': {'type': 'string'}},
8363 'required': ['message', 'code'],
8365 'ErrorInfo': {'additionalProperties': False,
8366 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
8367 'macaroon-path': {'type': 'string'}},
8369 'ErrorResult': {'additionalProperties': False,
8370 'properties': {'error': {'$ref': '#/definitions/Error'}},
8372 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
8373 'properties': {'UpdateLatestRevisions': {'properties': {'Result': {'$ref': '#/definitions/ErrorResult'}},
8378 @ReturnMapping(ErrorResult
)
8379 async def UpdateLatestRevisions(self
):
8384 # map input types to rpc msg
8386 msg
= dict(type='CharmRevisionUpdater', request
='UpdateLatestRevisions', version
=2, params
=_params
)
8388 reply
= await self
.rpc(msg
)
8392 class CharmsFacade(Type
):
8395 schema
= {'definitions': {'CharmActionSpec': {'additionalProperties': False,
8396 'properties': {'description': {'type': 'string'},
8397 'params': {'patternProperties': {'.*': {'additionalProperties': True,
8400 'required': ['description', 'params'],
8402 'CharmActions': {'additionalProperties': False,
8403 'properties': {'specs': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmActionSpec'}},
8406 'CharmInfo': {'additionalProperties': False,
8407 'properties': {'actions': {'$ref': '#/definitions/CharmActions'},
8408 'config': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmOption'}},
8410 'meta': {'$ref': '#/definitions/CharmMeta'},
8411 'metrics': {'$ref': '#/definitions/CharmMetrics'},
8412 'revision': {'type': 'integer'},
8413 'url': {'type': 'string'}},
8414 'required': ['revision', 'url', 'config'],
8416 'CharmMeta': {'additionalProperties': False,
8417 'properties': {'categories': {'items': {'type': 'string'},
8419 'description': {'type': 'string'},
8420 'extra-bindings': {'patternProperties': {'.*': {'type': 'string'}},
8422 'min-juju-version': {'type': 'string'},
8423 'name': {'type': 'string'},
8424 'payload-classes': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmPayloadClass'}},
8426 'peers': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}},
8428 'provides': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}},
8430 'requires': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}},
8432 'resources': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmResourceMeta'}},
8434 'series': {'items': {'type': 'string'},
8436 'storage': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmStorage'}},
8438 'subordinate': {'type': 'boolean'},
8439 'summary': {'type': 'string'},
8440 'tags': {'items': {'type': 'string'},
8442 'terms': {'items': {'type': 'string'},
8444 'required': ['name',
8449 'CharmMetric': {'additionalProperties': False,
8450 'properties': {'description': {'type': 'string'},
8451 'type': {'type': 'string'}},
8452 'required': ['type', 'description'],
8454 'CharmMetrics': {'additionalProperties': False,
8455 'properties': {'metrics': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmMetric'}},
8457 'plan': {'$ref': '#/definitions/CharmPlan'}},
8458 'required': ['metrics', 'plan'],
8460 'CharmOption': {'additionalProperties': False,
8461 'properties': {'default': {'additionalProperties': True,
8463 'description': {'type': 'string'},
8464 'type': {'type': 'string'}},
8465 'required': ['type'],
8467 'CharmPayloadClass': {'additionalProperties': False,
8468 'properties': {'name': {'type': 'string'},
8469 'type': {'type': 'string'}},
8470 'required': ['name', 'type'],
8472 'CharmPlan': {'additionalProperties': False,
8473 'properties': {'required': {'type': 'boolean'}},
8474 'required': ['required'],
8476 'CharmRelation': {'additionalProperties': False,
8477 'properties': {'interface': {'type': 'string'},
8478 'limit': {'type': 'integer'},
8479 'name': {'type': 'string'},
8480 'optional': {'type': 'boolean'},
8481 'role': {'type': 'string'},
8482 'scope': {'type': 'string'}},
8483 'required': ['name',
8490 'CharmResourceMeta': {'additionalProperties': False,
8491 'properties': {'description': {'type': 'string'},
8492 'name': {'type': 'string'},
8493 'path': {'type': 'string'},
8494 'type': {'type': 'string'}},
8495 'required': ['name',
8500 'CharmStorage': {'additionalProperties': False,
8501 'properties': {'count-max': {'type': 'integer'},
8502 'count-min': {'type': 'integer'},
8503 'description': {'type': 'string'},
8504 'location': {'type': 'string'},
8505 'minimum-size': {'type': 'integer'},
8506 'name': {'type': 'string'},
8507 'properties': {'items': {'type': 'string'},
8509 'read-only': {'type': 'boolean'},
8510 'shared': {'type': 'boolean'},
8511 'type': {'type': 'string'}},
8512 'required': ['name',
8521 'CharmURL': {'additionalProperties': False,
8522 'properties': {'url': {'type': 'string'}},
8523 'required': ['url'],
8525 'CharmsList': {'additionalProperties': False,
8526 'properties': {'names': {'items': {'type': 'string'},
8528 'required': ['names'],
8530 'CharmsListResult': {'additionalProperties': False,
8531 'properties': {'charm-urls': {'items': {'type': 'string'},
8533 'required': ['charm-urls'],
8535 'IsMeteredResult': {'additionalProperties': False,
8536 'properties': {'metered': {'type': 'boolean'}},
8537 'required': ['metered'],
8539 'properties': {'CharmInfo': {'properties': {'Params': {'$ref': '#/definitions/CharmURL'},
8540 'Result': {'$ref': '#/definitions/CharmInfo'}},
8542 'IsMetered': {'properties': {'Params': {'$ref': '#/definitions/CharmURL'},
8543 'Result': {'$ref': '#/definitions/IsMeteredResult'}},
8545 'List': {'properties': {'Params': {'$ref': '#/definitions/CharmsList'},
8546 'Result': {'$ref': '#/definitions/CharmsListResult'}},
8551 @ReturnMapping(CharmInfo
)
8552 async def CharmInfo(self
, url
):
8555 Returns -> typing.Union[_ForwardRef('CharmActions'), typing.Mapping<~KT, +VT_co>[str, ~CharmOption]<~CharmOption>, _ForwardRef('CharmMeta'), _ForwardRef('CharmMetrics'), int, str]
8557 # map input types to rpc msg
8559 msg
= dict(type='Charms', request
='CharmInfo', version
=2, params
=_params
)
8560 _params
['url'] = url
8561 reply
= await self
.rpc(msg
)
8566 @ReturnMapping(IsMeteredResult
)
8567 async def IsMetered(self
, url
):
8572 # map input types to rpc msg
8574 msg
= dict(type='Charms', request
='IsMetered', version
=2, params
=_params
)
8575 _params
['url'] = url
8576 reply
= await self
.rpc(msg
)
8581 @ReturnMapping(CharmsListResult
)
8582 async def List(self
, names
):
8584 names : typing.Sequence<+T_co>[str]
8585 Returns -> typing.Sequence<+T_co>[str]
8587 # map input types to rpc msg
8589 msg
= dict(type='Charms', request
='List', version
=2, params
=_params
)
8590 _params
['names'] = names
8591 reply
= await self
.rpc(msg
)
8595 class CleanerFacade(Type
):
8598 schema
= {'definitions': {'Error': {'additionalProperties': False,
8599 'properties': {'code': {'type': 'string'},
8600 'info': {'$ref': '#/definitions/ErrorInfo'},
8601 'message': {'type': 'string'}},
8602 'required': ['message', 'code'],
8604 'ErrorInfo': {'additionalProperties': False,
8605 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
8606 'macaroon-path': {'type': 'string'}},
8608 'Macaroon': {'additionalProperties': False, 'type': 'object'},
8609 'NotifyWatchResult': {'additionalProperties': False,
8610 'properties': {'NotifyWatcherId': {'type': 'string'},
8611 'error': {'$ref': '#/definitions/Error'}},
8612 'required': ['NotifyWatcherId'],
8614 'properties': {'Cleanup': {'type': 'object'},
8615 'WatchCleanups': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
8620 @ReturnMapping(None)
8621 async def Cleanup(self
):
8626 # map input types to rpc msg
8628 msg
= dict(type='Cleaner', request
='Cleanup', version
=2, params
=_params
)
8630 reply
= await self
.rpc(msg
)
8635 @ReturnMapping(NotifyWatchResult
)
8636 async def WatchCleanups(self
):
8639 Returns -> typing.Union[str, _ForwardRef('Error')]
8641 # map input types to rpc msg
8643 msg
= dict(type='Cleaner', request
='WatchCleanups', version
=2, params
=_params
)
8645 reply
= await self
.rpc(msg
)
8649 class ClientFacade(Type
):
8652 schema
= {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
8653 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
8656 'required': ['servers'],
8658 'AddCharm': {'additionalProperties': False,
8659 'properties': {'channel': {'type': 'string'},
8660 'url': {'type': 'string'}},
8661 'required': ['url', 'channel'],
8663 'AddCharmWithAuthorization': {'additionalProperties': False,
8664 'properties': {'channel': {'type': 'string'},
8665 'macaroon': {'$ref': '#/definitions/Macaroon'},
8666 'url': {'type': 'string'}},
8671 'AddMachineParams': {'additionalProperties': False,
8672 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
8674 'constraints': {'$ref': '#/definitions/Value'},
8675 'container-type': {'type': 'string'},
8676 'disks': {'items': {'$ref': '#/definitions/Constraints'},
8678 'hardware-characteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
8679 'instance-id': {'type': 'string'},
8680 'jobs': {'items': {'type': 'string'},
8682 'nonce': {'type': 'string'},
8683 'parent-id': {'type': 'string'},
8684 'placement': {'$ref': '#/definitions/Placement'},
8685 'series': {'type': 'string'}},
8686 'required': ['series',
8693 'hardware-characteristics',
8696 'AddMachines': {'additionalProperties': False,
8697 'properties': {'params': {'items': {'$ref': '#/definitions/AddMachineParams'},
8699 'required': ['params'],
8701 'AddMachinesResult': {'additionalProperties': False,
8702 'properties': {'error': {'$ref': '#/definitions/Error'},
8703 'machine': {'type': 'string'}},
8704 'required': ['machine'],
8706 'AddMachinesResults': {'additionalProperties': False,
8707 'properties': {'machines': {'items': {'$ref': '#/definitions/AddMachinesResult'},
8709 'required': ['machines'],
8711 'Address': {'additionalProperties': False,
8712 'properties': {'scope': {'type': 'string'},
8713 'space-name': {'type': 'string'},
8714 'type': {'type': 'string'},
8715 'value': {'type': 'string'}},
8716 'required': ['value', 'type', 'scope'],
8718 'AgentVersionResult': {'additionalProperties': False,
8719 'properties': {'version': {'$ref': '#/definitions/Number'}},
8720 'required': ['version'],
8722 'AllWatcherId': {'additionalProperties': False,
8723 'properties': {'watcher-id': {'type': 'string'}},
8724 'required': ['watcher-id'],
8726 'ApplicationStatus': {'additionalProperties': False,
8727 'properties': {'can-upgrade-to': {'type': 'string'},
8728 'charm': {'type': 'string'},
8729 'err': {'additionalProperties': True,
8731 'exposed': {'type': 'boolean'},
8732 'life': {'type': 'string'},
8733 'meter-statuses': {'patternProperties': {'.*': {'$ref': '#/definitions/MeterStatus'}},
8735 'relations': {'patternProperties': {'.*': {'items': {'type': 'string'},
8738 'series': {'type': 'string'},
8739 'status': {'$ref': '#/definitions/DetailedStatus'},
8740 'subordinate-to': {'items': {'type': 'string'},
8742 'units': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitStatus'}},
8744 'workload-version': {'type': 'string'}},
8745 'required': ['charm',
8755 'workload-version'],
8757 'Binary': {'additionalProperties': False,
8758 'properties': {'Arch': {'type': 'string'},
8759 'Number': {'$ref': '#/definitions/Number'},
8760 'Series': {'type': 'string'}},
8761 'required': ['Number', 'Series', 'Arch'],
8763 'BundleChange': {'additionalProperties': False,
8764 'properties': {'args': {'items': {'additionalProperties': True,
8767 'id': {'type': 'string'},
8768 'method': {'type': 'string'},
8769 'requires': {'items': {'type': 'string'},
8776 'BundleChangesParams': {'additionalProperties': False,
8777 'properties': {'yaml': {'type': 'string'}},
8778 'required': ['yaml'],
8780 'BundleChangesResults': {'additionalProperties': False,
8781 'properties': {'changes': {'items': {'$ref': '#/definitions/BundleChange'},
8783 'errors': {'items': {'type': 'string'},
8786 'ConfigValue': {'additionalProperties': False,
8787 'properties': {'source': {'type': 'string'},
8788 'value': {'additionalProperties': True,
8790 'required': ['value', 'source'],
8792 'Constraints': {'additionalProperties': False,
8793 'properties': {'Count': {'type': 'integer'},
8794 'Pool': {'type': 'string'},
8795 'Size': {'type': 'integer'}},
8796 'required': ['Pool', 'Size', 'Count'],
8798 'DestroyMachines': {'additionalProperties': False,
8799 'properties': {'force': {'type': 'boolean'},
8800 'machine-names': {'items': {'type': 'string'},
8802 'required': ['machine-names', 'force'],
8804 'DetailedStatus': {'additionalProperties': False,
8805 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
8808 'err': {'additionalProperties': True,
8810 'info': {'type': 'string'},
8811 'kind': {'type': 'string'},
8812 'life': {'type': 'string'},
8813 'since': {'format': 'date-time',
8815 'status': {'type': 'string'},
8816 'version': {'type': 'string'}},
8817 'required': ['status',
8825 'EndpointStatus': {'additionalProperties': False,
8826 'properties': {'application': {'type': 'string'},
8827 'name': {'type': 'string'},
8828 'role': {'type': 'string'},
8829 'subordinate': {'type': 'boolean'}},
8830 'required': ['application',
8835 'Entities': {'additionalProperties': False,
8836 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
8838 'required': ['entities'],
8840 'Entity': {'additionalProperties': False,
8841 'properties': {'tag': {'type': 'string'}},
8842 'required': ['tag'],
8844 'EntityStatus': {'additionalProperties': False,
8845 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
8848 'info': {'type': 'string'},
8849 'since': {'format': 'date-time',
8851 'status': {'type': 'string'}},
8852 'required': ['status', 'info', 'since'],
8854 'Error': {'additionalProperties': False,
8855 'properties': {'code': {'type': 'string'},
8856 'info': {'$ref': '#/definitions/ErrorInfo'},
8857 'message': {'type': 'string'}},
8858 'required': ['message', 'code'],
8860 'ErrorInfo': {'additionalProperties': False,
8861 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
8862 'macaroon-path': {'type': 'string'}},
8864 'ErrorResult': {'additionalProperties': False,
8865 'properties': {'error': {'$ref': '#/definitions/Error'}},
8867 'ErrorResults': {'additionalProperties': False,
8868 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
8870 'required': ['results'],
8872 'FindToolsParams': {'additionalProperties': False,
8873 'properties': {'arch': {'type': 'string'},
8874 'major': {'type': 'integer'},
8875 'minor': {'type': 'integer'},
8876 'number': {'$ref': '#/definitions/Number'},
8877 'series': {'type': 'string'}},
8878 'required': ['number',
8884 'FindToolsResult': {'additionalProperties': False,
8885 'properties': {'error': {'$ref': '#/definitions/Error'},
8886 'list': {'items': {'$ref': '#/definitions/Tools'},
8888 'required': ['list'],
8890 'FullStatus': {'additionalProperties': False,
8891 'properties': {'applications': {'patternProperties': {'.*': {'$ref': '#/definitions/ApplicationStatus'}},
8893 'machines': {'patternProperties': {'.*': {'$ref': '#/definitions/MachineStatus'}},
8895 'model': {'$ref': '#/definitions/ModelStatusInfo'},
8896 'relations': {'items': {'$ref': '#/definitions/RelationStatus'},
8898 'remote-applications': {'patternProperties': {'.*': {'$ref': '#/definitions/RemoteApplicationStatus'}},
8900 'required': ['model',
8903 'remote-applications',
8906 'GetConstraintsResults': {'additionalProperties': False,
8907 'properties': {'constraints': {'$ref': '#/definitions/Value'}},
8908 'required': ['constraints'],
8910 'HardwareCharacteristics': {'additionalProperties': False,
8911 'properties': {'arch': {'type': 'string'},
8912 'availability-zone': {'type': 'string'},
8913 'cpu-cores': {'type': 'integer'},
8914 'cpu-power': {'type': 'integer'},
8915 'mem': {'type': 'integer'},
8916 'root-disk': {'type': 'integer'},
8917 'tags': {'items': {'type': 'string'},
8920 'History': {'additionalProperties': False,
8921 'properties': {'error': {'$ref': '#/definitions/Error'},
8922 'statuses': {'items': {'$ref': '#/definitions/DetailedStatus'},
8924 'required': ['statuses'],
8926 'HostPort': {'additionalProperties': False,
8927 'properties': {'Address': {'$ref': '#/definitions/Address'},
8928 'port': {'type': 'integer'}},
8929 'required': ['Address', 'port'],
8931 'Macaroon': {'additionalProperties': False, 'type': 'object'},
8932 'MachineHardware': {'additionalProperties': False,
8933 'properties': {'arch': {'type': 'string'},
8934 'availability-zone': {'type': 'string'},
8935 'cores': {'type': 'integer'},
8936 'cpu-power': {'type': 'integer'},
8937 'mem': {'type': 'integer'},
8938 'root-disk': {'type': 'integer'},
8939 'tags': {'items': {'type': 'string'},
8942 'MachineStatus': {'additionalProperties': False,
8943 'properties': {'agent-status': {'$ref': '#/definitions/DetailedStatus'},
8944 'containers': {'patternProperties': {'.*': {'$ref': '#/definitions/MachineStatus'}},
8946 'dns-name': {'type': 'string'},
8947 'hardware': {'type': 'string'},
8948 'has-vote': {'type': 'boolean'},
8949 'id': {'type': 'string'},
8950 'instance-id': {'type': 'string'},
8951 'instance-status': {'$ref': '#/definitions/DetailedStatus'},
8952 'ip-addresses': {'items': {'type': 'string'},
8954 'jobs': {'items': {'type': 'string'},
8956 'series': {'type': 'string'},
8957 'wants-vote': {'type': 'boolean'}},
8958 'required': ['agent-status',
8971 'MeterStatus': {'additionalProperties': False,
8972 'properties': {'color': {'type': 'string'},
8973 'message': {'type': 'string'}},
8974 'required': ['color', 'message'],
8976 'ModelConfigResults': {'additionalProperties': False,
8977 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ConfigValue'}},
8979 'required': ['config'],
8981 'ModelInfo': {'additionalProperties': False,
8982 'properties': {'cloud-credential-tag': {'type': 'string'},
8983 'cloud-region': {'type': 'string'},
8984 'cloud-tag': {'type': 'string'},
8985 'controller-uuid': {'type': 'string'},
8986 'default-series': {'type': 'string'},
8987 'life': {'type': 'string'},
8988 'machines': {'items': {'$ref': '#/definitions/ModelMachineInfo'},
8990 'name': {'type': 'string'},
8991 'owner-tag': {'type': 'string'},
8992 'provider-type': {'type': 'string'},
8993 'status': {'$ref': '#/definitions/EntityStatus'},
8994 'users': {'items': {'$ref': '#/definitions/ModelUserInfo'},
8996 'uuid': {'type': 'string'}},
8997 'required': ['name',
9009 'ModelMachineInfo': {'additionalProperties': False,
9010 'properties': {'hardware': {'$ref': '#/definitions/MachineHardware'},
9011 'has-vote': {'type': 'boolean'},
9012 'id': {'type': 'string'},
9013 'instance-id': {'type': 'string'},
9014 'status': {'type': 'string'},
9015 'wants-vote': {'type': 'boolean'}},
9018 'ModelSet': {'additionalProperties': False,
9019 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
9022 'required': ['config'],
9024 'ModelStatusInfo': {'additionalProperties': False,
9025 'properties': {'available-version': {'type': 'string'},
9026 'cloud-tag': {'type': 'string'},
9027 'migration': {'type': 'string'},
9028 'name': {'type': 'string'},
9029 'region': {'type': 'string'},
9030 'version': {'type': 'string'}},
9031 'required': ['name',
9034 'available-version'],
9036 'ModelUnset': {'additionalProperties': False,
9037 'properties': {'keys': {'items': {'type': 'string'},
9039 'required': ['keys'],
9041 'ModelUserInfo': {'additionalProperties': False,
9042 'properties': {'access': {'type': 'string'},
9043 'display-name': {'type': 'string'},
9044 'last-connection': {'format': 'date-time',
9046 'user': {'type': 'string'}},
9047 'required': ['user',
9052 'ModelUserInfoResult': {'additionalProperties': False,
9053 'properties': {'error': {'$ref': '#/definitions/Error'},
9054 'result': {'$ref': '#/definitions/ModelUserInfo'}},
9056 'ModelUserInfoResults': {'additionalProperties': False,
9057 'properties': {'results': {'items': {'$ref': '#/definitions/ModelUserInfoResult'},
9059 'required': ['results'],
9061 'Number': {'additionalProperties': False,
9062 'properties': {'Build': {'type': 'integer'},
9063 'Major': {'type': 'integer'},
9064 'Minor': {'type': 'integer'},
9065 'Patch': {'type': 'integer'},
9066 'Tag': {'type': 'string'}},
9067 'required': ['Major',
9073 'Placement': {'additionalProperties': False,
9074 'properties': {'directive': {'type': 'string'},
9075 'scope': {'type': 'string'}},
9076 'required': ['scope', 'directive'],
9078 'PrivateAddress': {'additionalProperties': False,
9079 'properties': {'target': {'type': 'string'}},
9080 'required': ['target'],
9082 'PrivateAddressResults': {'additionalProperties': False,
9083 'properties': {'private-address': {'type': 'string'}},
9084 'required': ['private-address'],
9086 'ProvisioningScriptParams': {'additionalProperties': False,
9087 'properties': {'data-dir': {'type': 'string'},
9088 'disable-package-commands': {'type': 'boolean'},
9089 'machine-id': {'type': 'string'},
9090 'nonce': {'type': 'string'}},
9091 'required': ['machine-id',
9094 'disable-package-commands'],
9096 'ProvisioningScriptResult': {'additionalProperties': False,
9097 'properties': {'script': {'type': 'string'}},
9098 'required': ['script'],
9100 'PublicAddress': {'additionalProperties': False,
9101 'properties': {'target': {'type': 'string'}},
9102 'required': ['target'],
9104 'PublicAddressResults': {'additionalProperties': False,
9105 'properties': {'public-address': {'type': 'string'}},
9106 'required': ['public-address'],
9108 'RelationStatus': {'additionalProperties': False,
9109 'properties': {'endpoints': {'items': {'$ref': '#/definitions/EndpointStatus'},
9111 'id': {'type': 'integer'},
9112 'interface': {'type': 'string'},
9113 'key': {'type': 'string'},
9114 'scope': {'type': 'string'}},
9121 'RemoteApplicationStatus': {'additionalProperties': False,
9122 'properties': {'application-name': {'type': 'string'},
9123 'application-url': {'type': 'string'},
9124 'endpoints': {'items': {'$ref': '#/definitions/RemoteEndpoint'},
9126 'err': {'additionalProperties': True,
9128 'life': {'type': 'string'},
9129 'relations': {'patternProperties': {'.*': {'items': {'type': 'string'},
9132 'status': {'$ref': '#/definitions/DetailedStatus'}},
9133 'required': ['application-url',
9140 'RemoteEndpoint': {'additionalProperties': False,
9141 'properties': {'interface': {'type': 'string'},
9142 'limit': {'type': 'integer'},
9143 'name': {'type': 'string'},
9144 'role': {'type': 'string'},
9145 'scope': {'type': 'string'}},
9146 'required': ['name',
9152 'ResolveCharmResult': {'additionalProperties': False,
9153 'properties': {'error': {'type': 'string'},
9154 'url': {'type': 'string'}},
9156 'ResolveCharmResults': {'additionalProperties': False,
9157 'properties': {'urls': {'items': {'$ref': '#/definitions/ResolveCharmResult'},
9159 'required': ['urls'],
9161 'ResolveCharms': {'additionalProperties': False,
9162 'properties': {'references': {'items': {'type': 'string'},
9164 'required': ['references'],
9166 'Resolved': {'additionalProperties': False,
9167 'properties': {'retry': {'type': 'boolean'},
9168 'unit-name': {'type': 'string'}},
9169 'required': ['unit-name', 'retry'],
9171 'SetConstraints': {'additionalProperties': False,
9172 'properties': {'application': {'type': 'string'},
9173 'constraints': {'$ref': '#/definitions/Value'}},
9174 'required': ['application', 'constraints'],
9176 'SetModelAgentVersion': {'additionalProperties': False,
9177 'properties': {'version': {'$ref': '#/definitions/Number'}},
9178 'required': ['version'],
9180 'StatusHistoryFilter': {'additionalProperties': False,
9181 'properties': {'date': {'format': 'date-time',
9183 'delta': {'type': 'integer'},
9184 'size': {'type': 'integer'}},
9185 'required': ['size', 'date', 'delta'],
9187 'StatusHistoryRequest': {'additionalProperties': False,
9188 'properties': {'filter': {'$ref': '#/definitions/StatusHistoryFilter'},
9189 'historyKind': {'type': 'string'},
9190 'size': {'type': 'integer'},
9191 'tag': {'type': 'string'}},
9192 'required': ['historyKind',
9197 'StatusHistoryRequests': {'additionalProperties': False,
9198 'properties': {'requests': {'items': {'$ref': '#/definitions/StatusHistoryRequest'},
9200 'required': ['requests'],
9202 'StatusHistoryResult': {'additionalProperties': False,
9203 'properties': {'error': {'$ref': '#/definitions/Error'},
9204 'history': {'$ref': '#/definitions/History'}},
9205 'required': ['history'],
9207 'StatusHistoryResults': {'additionalProperties': False,
9208 'properties': {'results': {'items': {'$ref': '#/definitions/StatusHistoryResult'},
9210 'required': ['results'],
9212 'StatusParams': {'additionalProperties': False,
9213 'properties': {'patterns': {'items': {'type': 'string'},
9215 'required': ['patterns'],
9217 'Tools': {'additionalProperties': False,
9218 'properties': {'sha256': {'type': 'string'},
9219 'size': {'type': 'integer'},
9220 'url': {'type': 'string'},
9221 'version': {'$ref': '#/definitions/Binary'}},
9222 'required': ['version', 'url', 'size'],
9224 'UnitStatus': {'additionalProperties': False,
9225 'properties': {'agent-status': {'$ref': '#/definitions/DetailedStatus'},
9226 'charm': {'type': 'string'},
9227 'leader': {'type': 'boolean'},
9228 'machine': {'type': 'string'},
9229 'opened-ports': {'items': {'type': 'string'},
9231 'public-address': {'type': 'string'},
9232 'subordinates': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitStatus'}},
9234 'workload-status': {'$ref': '#/definitions/DetailedStatus'},
9235 'workload-version': {'type': 'string'}},
9236 'required': ['agent-status',
9245 'Value': {'additionalProperties': False,
9246 'properties': {'arch': {'type': 'string'},
9247 'container': {'type': 'string'},
9248 'cores': {'type': 'integer'},
9249 'cpu-power': {'type': 'integer'},
9250 'instance-type': {'type': 'string'},
9251 'mem': {'type': 'integer'},
9252 'root-disk': {'type': 'integer'},
9253 'spaces': {'items': {'type': 'string'},
9255 'tags': {'items': {'type': 'string'},
9257 'virt-type': {'type': 'string'}},
9259 'properties': {'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
9261 'AbortCurrentUpgrade': {'type': 'object'},
9262 'AddCharm': {'properties': {'Params': {'$ref': '#/definitions/AddCharm'}},
9264 'AddCharmWithAuthorization': {'properties': {'Params': {'$ref': '#/definitions/AddCharmWithAuthorization'}},
9266 'AddMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
9267 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
9269 'AddMachinesV2': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
9270 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
9272 'AgentVersion': {'properties': {'Result': {'$ref': '#/definitions/AgentVersionResult'}},
9274 'DestroyMachines': {'properties': {'Params': {'$ref': '#/definitions/DestroyMachines'}},
9276 'FindTools': {'properties': {'Params': {'$ref': '#/definitions/FindToolsParams'},
9277 'Result': {'$ref': '#/definitions/FindToolsResult'}},
9279 'FullStatus': {'properties': {'Params': {'$ref': '#/definitions/StatusParams'},
9280 'Result': {'$ref': '#/definitions/FullStatus'}},
9282 'GetBundleChanges': {'properties': {'Params': {'$ref': '#/definitions/BundleChangesParams'},
9283 'Result': {'$ref': '#/definitions/BundleChangesResults'}},
9285 'GetModelConstraints': {'properties': {'Result': {'$ref': '#/definitions/GetConstraintsResults'}},
9287 'InjectMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
9288 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
9290 'ModelGet': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}},
9292 'ModelInfo': {'properties': {'Result': {'$ref': '#/definitions/ModelInfo'}},
9294 'ModelSet': {'properties': {'Params': {'$ref': '#/definitions/ModelSet'}},
9296 'ModelUnset': {'properties': {'Params': {'$ref': '#/definitions/ModelUnset'}},
9298 'ModelUserInfo': {'properties': {'Result': {'$ref': '#/definitions/ModelUserInfoResults'}},
9300 'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/PrivateAddress'},
9301 'Result': {'$ref': '#/definitions/PrivateAddressResults'}},
9303 'ProvisioningScript': {'properties': {'Params': {'$ref': '#/definitions/ProvisioningScriptParams'},
9304 'Result': {'$ref': '#/definitions/ProvisioningScriptResult'}},
9306 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/PublicAddress'},
9307 'Result': {'$ref': '#/definitions/PublicAddressResults'}},
9309 'ResolveCharms': {'properties': {'Params': {'$ref': '#/definitions/ResolveCharms'},
9310 'Result': {'$ref': '#/definitions/ResolveCharmResults'}},
9312 'Resolved': {'properties': {'Params': {'$ref': '#/definitions/Resolved'}},
9314 'RetryProvisioning': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9315 'Result': {'$ref': '#/definitions/ErrorResults'}},
9317 'SetModelAgentVersion': {'properties': {'Params': {'$ref': '#/definitions/SetModelAgentVersion'}},
9319 'SetModelConstraints': {'properties': {'Params': {'$ref': '#/definitions/SetConstraints'}},
9321 'StatusHistory': {'properties': {'Params': {'$ref': '#/definitions/StatusHistoryRequests'},
9322 'Result': {'$ref': '#/definitions/StatusHistoryResults'}},
9324 'WatchAll': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherId'}},
9329 @ReturnMapping(APIHostPortsResult
)
9330 async def APIHostPorts(self
):
9333 Returns -> typing.Sequence<+T_co>[~HostPort]<~HostPort>
9335 # map input types to rpc msg
9337 msg
= dict(type='Client', request
='APIHostPorts', version
=1, params
=_params
)
9339 reply
= await self
.rpc(msg
)
9344 @ReturnMapping(None)
9345 async def AbortCurrentUpgrade(self
):
9350 # map input types to rpc msg
9352 msg
= dict(type='Client', request
='AbortCurrentUpgrade', version
=1, params
=_params
)
9354 reply
= await self
.rpc(msg
)
9359 @ReturnMapping(None)
9360 async def AddCharm(self
, channel
, url
):
9366 # map input types to rpc msg
9368 msg
= dict(type='Client', request
='AddCharm', version
=1, params
=_params
)
9369 _params
['channel'] = channel
9370 _params
['url'] = url
9371 reply
= await self
.rpc(msg
)
9376 @ReturnMapping(None)
9377 async def AddCharmWithAuthorization(self
, channel
, macaroon
, url
):
9384 # map input types to rpc msg
9386 msg
= dict(type='Client', request
='AddCharmWithAuthorization', version
=1, params
=_params
)
9387 _params
['channel'] = channel
9388 _params
['macaroon'] = macaroon
9389 _params
['url'] = url
9390 reply
= await self
.rpc(msg
)
9395 @ReturnMapping(AddMachinesResults
)
9396 async def AddMachines(self
, params
):
9398 params : typing.Sequence<+T_co>[~AddMachineParams]<~AddMachineParams>
9399 Returns -> typing.Sequence<+T_co>[~AddMachinesResult]<~AddMachinesResult>
9401 # map input types to rpc msg
9403 msg
= dict(type='Client', request
='AddMachines', version
=1, params
=_params
)
9404 _params
['params'] = params
9405 reply
= await self
.rpc(msg
)
9410 @ReturnMapping(AddMachinesResults
)
9411 async def AddMachinesV2(self
, params
):
9413 params : typing.Sequence<+T_co>[~AddMachineParams]<~AddMachineParams>
9414 Returns -> typing.Sequence<+T_co>[~AddMachinesResult]<~AddMachinesResult>
9416 # map input types to rpc msg
9418 msg
= dict(type='Client', request
='AddMachinesV2', version
=1, params
=_params
)
9419 _params
['params'] = params
9420 reply
= await self
.rpc(msg
)
9425 @ReturnMapping(AgentVersionResult
)
9426 async def AgentVersion(self
):
9431 # map input types to rpc msg
9433 msg
= dict(type='Client', request
='AgentVersion', version
=1, params
=_params
)
9435 reply
= await self
.rpc(msg
)
9440 @ReturnMapping(None)
9441 async def DestroyMachines(self
, force
, machine_names
):
9444 machine_names : typing.Sequence<+T_co>[str]
9447 # map input types to rpc msg
9449 msg
= dict(type='Client', request
='DestroyMachines', version
=1, params
=_params
)
9450 _params
['force'] = force
9451 _params
['machine-names'] = machine_names
9452 reply
= await self
.rpc(msg
)
9457 @ReturnMapping(FindToolsResult
)
9458 async def FindTools(self
, arch
, major
, minor
, number
, series
):
9465 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[~Tools]<~Tools>]
9467 # map input types to rpc msg
9469 msg
= dict(type='Client', request
='FindTools', version
=1, params
=_params
)
9470 _params
['arch'] = arch
9471 _params
['major'] = major
9472 _params
['minor'] = minor
9473 _params
['number'] = number
9474 _params
['series'] = series
9475 reply
= await self
.rpc(msg
)
9480 @ReturnMapping(FullStatus
)
9481 async def FullStatus(self
, patterns
):
9483 patterns : typing.Sequence<+T_co>[str]
9484 Returns -> typing.Union[_ForwardRef('ModelStatusInfo'), typing.Sequence<+T_co>[~RelationStatus]<~RelationStatus>, typing.Mapping<~KT, +VT_co>[str, ~RemoteApplicationStatus]<~RemoteApplicationStatus>]
9486 # map input types to rpc msg
9488 msg
= dict(type='Client', request
='FullStatus', version
=1, params
=_params
)
9489 _params
['patterns'] = patterns
9490 reply
= await self
.rpc(msg
)
9495 @ReturnMapping(BundleChangesResults
)
9496 async def GetBundleChanges(self
, yaml
):
9499 Returns -> typing.Sequence<+T_co>[~BundleChange]<~BundleChange>
9501 # map input types to rpc msg
9503 msg
= dict(type='Client', request
='GetBundleChanges', version
=1, params
=_params
)
9504 _params
['yaml'] = yaml
9505 reply
= await self
.rpc(msg
)
9510 @ReturnMapping(GetConstraintsResults
)
9511 async def GetModelConstraints(self
):
9516 # map input types to rpc msg
9518 msg
= dict(type='Client', request
='GetModelConstraints', version
=1, params
=_params
)
9520 reply
= await self
.rpc(msg
)
9525 @ReturnMapping(AddMachinesResults
)
9526 async def InjectMachines(self
, params
):
9528 params : typing.Sequence<+T_co>[~AddMachineParams]<~AddMachineParams>
9529 Returns -> typing.Sequence<+T_co>[~AddMachinesResult]<~AddMachinesResult>
9531 # map input types to rpc msg
9533 msg
= dict(type='Client', request
='InjectMachines', version
=1, params
=_params
)
9534 _params
['params'] = params
9535 reply
= await self
.rpc(msg
)
9540 @ReturnMapping(ModelConfigResults
)
9541 async def ModelGet(self
):
9544 Returns -> typing.Mapping<~KT, +VT_co>[str, ~ConfigValue]<~ConfigValue>
9546 # map input types to rpc msg
9548 msg
= dict(type='Client', request
='ModelGet', version
=1, params
=_params
)
9550 reply
= await self
.rpc(msg
)
9555 @ReturnMapping(ModelInfo
)
9556 async def ModelInfo(self
):
9559 Returns -> typing.Union[_ForwardRef('EntityStatus'), typing.Sequence<+T_co>[~ModelUserInfo]<~ModelUserInfo>]
9561 # map input types to rpc msg
9563 msg
= dict(type='Client', request
='ModelInfo', version
=1, params
=_params
)
9565 reply
= await self
.rpc(msg
)
9570 @ReturnMapping(None)
9571 async def ModelSet(self
, config
):
9573 config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
9576 # map input types to rpc msg
9578 msg
= dict(type='Client', request
='ModelSet', version
=1, params
=_params
)
9579 _params
['config'] = config
9580 reply
= await self
.rpc(msg
)
9585 @ReturnMapping(None)
9586 async def ModelUnset(self
, keys
):
9588 keys : typing.Sequence<+T_co>[str]
9591 # map input types to rpc msg
9593 msg
= dict(type='Client', request
='ModelUnset', version
=1, params
=_params
)
9594 _params
['keys'] = keys
9595 reply
= await self
.rpc(msg
)
9600 @ReturnMapping(ModelUserInfoResults
)
9601 async def ModelUserInfo(self
):
9604 Returns -> typing.Sequence<+T_co>[~ModelUserInfoResult]<~ModelUserInfoResult>
9606 # map input types to rpc msg
9608 msg
= dict(type='Client', request
='ModelUserInfo', version
=1, params
=_params
)
9610 reply
= await self
.rpc(msg
)
9615 @ReturnMapping(PrivateAddressResults
)
9616 async def PrivateAddress(self
, target
):
9621 # map input types to rpc msg
9623 msg
= dict(type='Client', request
='PrivateAddress', version
=1, params
=_params
)
9624 _params
['target'] = target
9625 reply
= await self
.rpc(msg
)
9630 @ReturnMapping(ProvisioningScriptResult
)
9631 async def ProvisioningScript(self
, data_dir
, disable_package_commands
, machine_id
, nonce
):
9634 disable_package_commands : bool
9639 # map input types to rpc msg
9641 msg
= dict(type='Client', request
='ProvisioningScript', version
=1, params
=_params
)
9642 _params
['data-dir'] = data_dir
9643 _params
['disable-package-commands'] = disable_package_commands
9644 _params
['machine-id'] = machine_id
9645 _params
['nonce'] = nonce
9646 reply
= await self
.rpc(msg
)
9651 @ReturnMapping(PublicAddressResults
)
9652 async def PublicAddress(self
, target
):
9657 # map input types to rpc msg
9659 msg
= dict(type='Client', request
='PublicAddress', version
=1, params
=_params
)
9660 _params
['target'] = target
9661 reply
= await self
.rpc(msg
)
9666 @ReturnMapping(ResolveCharmResults
)
9667 async def ResolveCharms(self
, references
):
9669 references : typing.Sequence<+T_co>[str]
9670 Returns -> typing.Sequence<+T_co>[~ResolveCharmResult]<~ResolveCharmResult>
9672 # map input types to rpc msg
9674 msg
= dict(type='Client', request
='ResolveCharms', version
=1, params
=_params
)
9675 _params
['references'] = references
9676 reply
= await self
.rpc(msg
)
9681 @ReturnMapping(None)
9682 async def Resolved(self
, retry
, unit_name
):
9688 # map input types to rpc msg
9690 msg
= dict(type='Client', request
='Resolved', version
=1, params
=_params
)
9691 _params
['retry'] = retry
9692 _params
['unit-name'] = unit_name
9693 reply
= await self
.rpc(msg
)
9698 @ReturnMapping(ErrorResults
)
9699 async def RetryProvisioning(self
, entities
):
9701 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
9702 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
9704 # map input types to rpc msg
9706 msg
= dict(type='Client', request
='RetryProvisioning', version
=1, params
=_params
)
9707 _params
['entities'] = entities
9708 reply
= await self
.rpc(msg
)
9713 @ReturnMapping(None)
9714 async def SetModelAgentVersion(self
, version
):
9719 # map input types to rpc msg
9721 msg
= dict(type='Client', request
='SetModelAgentVersion', version
=1, params
=_params
)
9722 _params
['version'] = version
9723 reply
= await self
.rpc(msg
)
9728 @ReturnMapping(None)
9729 async def SetModelConstraints(self
, application
, constraints
):
9735 # map input types to rpc msg
9737 msg
= dict(type='Client', request
='SetModelConstraints', version
=1, params
=_params
)
9738 _params
['application'] = application
9739 _params
['constraints'] = constraints
9740 reply
= await self
.rpc(msg
)
9745 @ReturnMapping(StatusHistoryResults
)
9746 async def StatusHistory(self
, requests
):
9748 requests : typing.Sequence<+T_co>[~StatusHistoryRequest]<~StatusHistoryRequest>
9749 Returns -> typing.Sequence<+T_co>[~StatusHistoryResult]<~StatusHistoryResult>
9751 # map input types to rpc msg
9753 msg
= dict(type='Client', request
='StatusHistory', version
=1, params
=_params
)
9754 _params
['requests'] = requests
9755 reply
= await self
.rpc(msg
)
9760 @ReturnMapping(AllWatcherId
)
9761 async def WatchAll(self
):
9766 # map input types to rpc msg
9768 msg
= dict(type='Client', request
='WatchAll', version
=1, params
=_params
)
9770 reply
= await self
.rpc(msg
)
9774 class CloudFacade(Type
):
9777 schema
= {'definitions': {'Cloud': {'additionalProperties': False,
9778 'properties': {'auth-types': {'items': {'type': 'string'},
9780 'endpoint': {'type': 'string'},
9781 'identity-endpoint': {'type': 'string'},
9782 'regions': {'items': {'$ref': '#/definitions/CloudRegion'},
9784 'storage-endpoint': {'type': 'string'},
9785 'type': {'type': 'string'}},
9786 'required': ['type'],
9788 'CloudCredential': {'additionalProperties': False,
9789 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}},
9791 'auth-type': {'type': 'string'},
9792 'redacted': {'items': {'type': 'string'},
9794 'required': ['auth-type'],
9796 'CloudCredentialResult': {'additionalProperties': False,
9797 'properties': {'error': {'$ref': '#/definitions/Error'},
9798 'result': {'$ref': '#/definitions/CloudCredential'}},
9800 'CloudCredentialResults': {'additionalProperties': False,
9801 'properties': {'results': {'items': {'$ref': '#/definitions/CloudCredentialResult'},
9804 'CloudRegion': {'additionalProperties': False,
9805 'properties': {'endpoint': {'type': 'string'},
9806 'identity-endpoint': {'type': 'string'},
9807 'name': {'type': 'string'},
9808 'storage-endpoint': {'type': 'string'}},
9809 'required': ['name'],
9811 'CloudResult': {'additionalProperties': False,
9812 'properties': {'cloud': {'$ref': '#/definitions/Cloud'},
9813 'error': {'$ref': '#/definitions/Error'}},
9815 'CloudResults': {'additionalProperties': False,
9816 'properties': {'results': {'items': {'$ref': '#/definitions/CloudResult'},
9819 'CloudsResult': {'additionalProperties': False,
9820 'properties': {'clouds': {'patternProperties': {'.*': {'$ref': '#/definitions/Cloud'}},
9823 'Entities': {'additionalProperties': False,
9824 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
9826 'required': ['entities'],
9828 'Entity': {'additionalProperties': False,
9829 'properties': {'tag': {'type': 'string'}},
9830 'required': ['tag'],
9832 'Error': {'additionalProperties': False,
9833 'properties': {'code': {'type': 'string'},
9834 'info': {'$ref': '#/definitions/ErrorInfo'},
9835 'message': {'type': 'string'}},
9836 'required': ['message', 'code'],
9838 'ErrorInfo': {'additionalProperties': False,
9839 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
9840 'macaroon-path': {'type': 'string'}},
9842 'ErrorResult': {'additionalProperties': False,
9843 'properties': {'error': {'$ref': '#/definitions/Error'}},
9845 'ErrorResults': {'additionalProperties': False,
9846 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
9848 'required': ['results'],
9850 'Macaroon': {'additionalProperties': False, 'type': 'object'},
9851 'StringResult': {'additionalProperties': False,
9852 'properties': {'error': {'$ref': '#/definitions/Error'},
9853 'result': {'type': 'string'}},
9854 'required': ['result'],
9856 'StringsResult': {'additionalProperties': False,
9857 'properties': {'error': {'$ref': '#/definitions/Error'},
9858 'result': {'items': {'type': 'string'},
9861 'StringsResults': {'additionalProperties': False,
9862 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
9864 'required': ['results'],
9866 'UpdateCloudCredential': {'additionalProperties': False,
9867 'properties': {'credential': {'$ref': '#/definitions/CloudCredential'},
9868 'tag': {'type': 'string'}},
9869 'required': ['tag', 'credential'],
9871 'UpdateCloudCredentials': {'additionalProperties': False,
9872 'properties': {'credentials': {'items': {'$ref': '#/definitions/UpdateCloudCredential'},
9875 'UserCloud': {'additionalProperties': False,
9876 'properties': {'cloud-tag': {'type': 'string'},
9877 'user-tag': {'type': 'string'}},
9878 'required': ['user-tag', 'cloud-tag'],
9880 'UserClouds': {'additionalProperties': False,
9881 'properties': {'user-clouds': {'items': {'$ref': '#/definitions/UserCloud'},
9884 'properties': {'Cloud': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9885 'Result': {'$ref': '#/definitions/CloudResults'}},
9887 'Clouds': {'properties': {'Result': {'$ref': '#/definitions/CloudsResult'}},
9889 'Credential': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9890 'Result': {'$ref': '#/definitions/CloudCredentialResults'}},
9892 'DefaultCloud': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
9894 'RevokeCredentials': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9895 'Result': {'$ref': '#/definitions/ErrorResults'}},
9897 'UpdateCredentials': {'properties': {'Params': {'$ref': '#/definitions/UpdateCloudCredentials'},
9898 'Result': {'$ref': '#/definitions/ErrorResults'}},
9900 'UserCredentials': {'properties': {'Params': {'$ref': '#/definitions/UserClouds'},
9901 'Result': {'$ref': '#/definitions/StringsResults'}},
9906 @ReturnMapping(CloudResults
)
9907 async def Cloud(self
, entities
):
9909 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
9910 Returns -> typing.Sequence<+T_co>[~CloudResult]<~CloudResult>
9912 # map input types to rpc msg
9914 msg
= dict(type='Cloud', request
='Cloud', version
=1, params
=_params
)
9915 _params
['entities'] = entities
9916 reply
= await self
.rpc(msg
)
9921 @ReturnMapping(CloudsResult
)
9922 async def Clouds(self
):
9925 Returns -> typing.Mapping<~KT, +VT_co>[str, ~Cloud]<~Cloud>
9927 # map input types to rpc msg
9929 msg
= dict(type='Cloud', request
='Clouds', version
=1, params
=_params
)
9931 reply
= await self
.rpc(msg
)
9936 @ReturnMapping(CloudCredentialResults
)
9937 async def Credential(self
, entities
):
9939 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
9940 Returns -> typing.Sequence<+T_co>[~CloudCredentialResult]<~CloudCredentialResult>
9942 # map input types to rpc msg
9944 msg
= dict(type='Cloud', request
='Credential', version
=1, params
=_params
)
9945 _params
['entities'] = entities
9946 reply
= await self
.rpc(msg
)
9951 @ReturnMapping(StringResult
)
9952 async def DefaultCloud(self
):
9955 Returns -> typing.Union[_ForwardRef('Error'), str]
9957 # map input types to rpc msg
9959 msg
= dict(type='Cloud', request
='DefaultCloud', version
=1, params
=_params
)
9961 reply
= await self
.rpc(msg
)
9966 @ReturnMapping(ErrorResults
)
9967 async def RevokeCredentials(self
, entities
):
9969 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
9970 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
9972 # map input types to rpc msg
9974 msg
= dict(type='Cloud', request
='RevokeCredentials', version
=1, params
=_params
)
9975 _params
['entities'] = entities
9976 reply
= await self
.rpc(msg
)
9981 @ReturnMapping(ErrorResults
)
9982 async def UpdateCredentials(self
, credentials
):
9984 credentials : typing.Sequence<+T_co>[~UpdateCloudCredential]<~UpdateCloudCredential>
9985 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
9987 # map input types to rpc msg
9989 msg
= dict(type='Cloud', request
='UpdateCredentials', version
=1, params
=_params
)
9990 _params
['credentials'] = credentials
9991 reply
= await self
.rpc(msg
)
9996 @ReturnMapping(StringsResults
)
9997 async def UserCredentials(self
, user_clouds
):
9999 user_clouds : typing.Sequence<+T_co>[~UserCloud]<~UserCloud>
10000 Returns -> typing.Sequence<+T_co>[~StringsResult]<~StringsResult>
10002 # map input types to rpc msg
10004 msg
= dict(type='Cloud', request
='UserCredentials', version
=1, params
=_params
)
10005 _params
['user-clouds'] = user_clouds
10006 reply
= await self
.rpc(msg
)
10010 class ControllerFacade(Type
):
10011 name
= 'Controller'
10013 schema
= {'definitions': {'AllWatcherId': {'additionalProperties': False,
10014 'properties': {'watcher-id': {'type': 'string'}},
10015 'required': ['watcher-id'],
10017 'CloudCredential': {'additionalProperties': False,
10018 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}},
10020 'auth-type': {'type': 'string'},
10021 'redacted': {'items': {'type': 'string'},
10023 'required': ['auth-type'],
10025 'CloudSpec': {'additionalProperties': False,
10026 'properties': {'credential': {'$ref': '#/definitions/CloudCredential'},
10027 'endpoint': {'type': 'string'},
10028 'identity-endpoint': {'type': 'string'},
10029 'name': {'type': 'string'},
10030 'region': {'type': 'string'},
10031 'storage-endpoint': {'type': 'string'},
10032 'type': {'type': 'string'}},
10033 'required': ['type', 'name'],
10035 'CloudSpecResult': {'additionalProperties': False,
10036 'properties': {'error': {'$ref': '#/definitions/Error'},
10037 'result': {'$ref': '#/definitions/CloudSpec'}},
10039 'CloudSpecResults': {'additionalProperties': False,
10040 'properties': {'results': {'items': {'$ref': '#/definitions/CloudSpecResult'},
10043 'ConfigValue': {'additionalProperties': False,
10044 'properties': {'source': {'type': 'string'},
10045 'value': {'additionalProperties': True,
10046 'type': 'object'}},
10047 'required': ['value', 'source'],
10049 'ControllerConfigResult': {'additionalProperties': False,
10050 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
10051 'type': 'object'}},
10052 'type': 'object'}},
10053 'required': ['config'],
10055 'DestroyControllerArgs': {'additionalProperties': False,
10056 'properties': {'destroy-models': {'type': 'boolean'}},
10057 'required': ['destroy-models'],
10059 'Entities': {'additionalProperties': False,
10060 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
10062 'required': ['entities'],
10064 'Entity': {'additionalProperties': False,
10065 'properties': {'tag': {'type': 'string'}},
10066 'required': ['tag'],
10068 'Error': {'additionalProperties': False,
10069 'properties': {'code': {'type': 'string'},
10070 'info': {'$ref': '#/definitions/ErrorInfo'},
10071 'message': {'type': 'string'}},
10072 'required': ['message', 'code'],
10074 'ErrorInfo': {'additionalProperties': False,
10075 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
10076 'macaroon-path': {'type': 'string'}},
10078 'ErrorResult': {'additionalProperties': False,
10079 'properties': {'error': {'$ref': '#/definitions/Error'}},
10081 'ErrorResults': {'additionalProperties': False,
10082 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
10084 'required': ['results'],
10086 'HostedModelConfig': {'additionalProperties': False,
10087 'properties': {'cloud-spec': {'$ref': '#/definitions/CloudSpec'},
10088 'config': {'patternProperties': {'.*': {'additionalProperties': True,
10089 'type': 'object'}},
10091 'error': {'$ref': '#/definitions/Error'},
10092 'name': {'type': 'string'},
10093 'owner': {'type': 'string'}},
10094 'required': ['name', 'owner'],
10096 'HostedModelConfigsResults': {'additionalProperties': False,
10097 'properties': {'models': {'items': {'$ref': '#/definitions/HostedModelConfig'},
10099 'required': ['models'],
10101 'InitiateMigrationArgs': {'additionalProperties': False,
10102 'properties': {'specs': {'items': {'$ref': '#/definitions/MigrationSpec'},
10104 'required': ['specs'],
10106 'InitiateMigrationResult': {'additionalProperties': False,
10107 'properties': {'error': {'$ref': '#/definitions/Error'},
10108 'migration-id': {'type': 'string'},
10109 'model-tag': {'type': 'string'}},
10110 'required': ['model-tag',
10113 'InitiateMigrationResults': {'additionalProperties': False,
10114 'properties': {'results': {'items': {'$ref': '#/definitions/InitiateMigrationResult'},
10116 'required': ['results'],
10118 'Macaroon': {'additionalProperties': False, 'type': 'object'},
10119 'MachineHardware': {'additionalProperties': False,
10120 'properties': {'arch': {'type': 'string'},
10121 'availability-zone': {'type': 'string'},
10122 'cores': {'type': 'integer'},
10123 'cpu-power': {'type': 'integer'},
10124 'mem': {'type': 'integer'},
10125 'root-disk': {'type': 'integer'},
10126 'tags': {'items': {'type': 'string'},
10129 'MigrationSpec': {'additionalProperties': False,
10130 'properties': {'external-control': {'type': 'boolean'},
10131 'model-tag': {'type': 'string'},
10132 'skip-initial-prechecks': {'type': 'boolean'},
10133 'target-info': {'$ref': '#/definitions/MigrationTargetInfo'}},
10134 'required': ['model-tag',
10136 'external-control',
10137 'skip-initial-prechecks'],
10139 'MigrationTargetInfo': {'additionalProperties': False,
10140 'properties': {'addrs': {'items': {'type': 'string'},
10142 'auth-tag': {'type': 'string'},
10143 'ca-cert': {'type': 'string'},
10144 'controller-tag': {'type': 'string'},
10145 'macaroons': {'type': 'string'},
10146 'password': {'type': 'string'}},
10147 'required': ['controller-tag',
10152 'Model': {'additionalProperties': False,
10153 'properties': {'name': {'type': 'string'},
10154 'owner-tag': {'type': 'string'},
10155 'uuid': {'type': 'string'}},
10156 'required': ['name', 'uuid', 'owner-tag'],
10158 'ModelBlockInfo': {'additionalProperties': False,
10159 'properties': {'blocks': {'items': {'type': 'string'},
10161 'model-uuid': {'type': 'string'},
10162 'name': {'type': 'string'},
10163 'owner-tag': {'type': 'string'}},
10164 'required': ['name',
10169 'ModelBlockInfoList': {'additionalProperties': False,
10170 'properties': {'models': {'items': {'$ref': '#/definitions/ModelBlockInfo'},
10173 'ModelConfigResults': {'additionalProperties': False,
10174 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ConfigValue'}},
10175 'type': 'object'}},
10176 'required': ['config'],
10178 'ModelMachineInfo': {'additionalProperties': False,
10179 'properties': {'hardware': {'$ref': '#/definitions/MachineHardware'},
10180 'has-vote': {'type': 'boolean'},
10181 'id': {'type': 'string'},
10182 'instance-id': {'type': 'string'},
10183 'status': {'type': 'string'},
10184 'wants-vote': {'type': 'boolean'}},
10185 'required': ['id'],
10187 'ModelStatus': {'additionalProperties': False,
10188 'properties': {'application-count': {'type': 'integer'},
10189 'hosted-machine-count': {'type': 'integer'},
10190 'life': {'type': 'string'},
10191 'machines': {'items': {'$ref': '#/definitions/ModelMachineInfo'},
10193 'model-tag': {'type': 'string'},
10194 'owner-tag': {'type': 'string'}},
10195 'required': ['model-tag',
10197 'hosted-machine-count',
10198 'application-count',
10201 'ModelStatusResults': {'additionalProperties': False,
10202 'properties': {'models': {'items': {'$ref': '#/definitions/ModelStatus'},
10204 'required': ['models'],
10206 'ModelTag': {'additionalProperties': False, 'type': 'object'},
10207 'ModifyControllerAccess': {'additionalProperties': False,
10208 'properties': {'access': {'type': 'string'},
10209 'action': {'type': 'string'},
10210 'user-tag': {'type': 'string'}},
10211 'required': ['user-tag',
10215 'ModifyControllerAccessRequest': {'additionalProperties': False,
10216 'properties': {'changes': {'items': {'$ref': '#/definitions/ModifyControllerAccess'},
10218 'required': ['changes'],
10220 'RemoveBlocksArgs': {'additionalProperties': False,
10221 'properties': {'all': {'type': 'boolean'}},
10222 'required': ['all'],
10224 'UserAccess': {'additionalProperties': False,
10225 'properties': {'access': {'type': 'string'},
10226 'user-tag': {'type': 'string'}},
10227 'required': ['user-tag', 'access'],
10229 'UserAccessResult': {'additionalProperties': False,
10230 'properties': {'error': {'$ref': '#/definitions/Error'},
10231 'result': {'$ref': '#/definitions/UserAccess'}},
10233 'UserAccessResults': {'additionalProperties': False,
10234 'properties': {'results': {'items': {'$ref': '#/definitions/UserAccessResult'},
10237 'UserModel': {'additionalProperties': False,
10238 'properties': {'last-connection': {'format': 'date-time',
10240 'model': {'$ref': '#/definitions/Model'}},
10241 'required': ['model', 'last-connection'],
10243 'UserModelList': {'additionalProperties': False,
10244 'properties': {'user-models': {'items': {'$ref': '#/definitions/UserModel'},
10246 'required': ['user-models'],
10247 'type': 'object'}},
10248 'properties': {'AllModels': {'properties': {'Result': {'$ref': '#/definitions/UserModelList'}},
10250 'CloudSpec': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10251 'Result': {'$ref': '#/definitions/CloudSpecResults'}},
10253 'ControllerConfig': {'properties': {'Result': {'$ref': '#/definitions/ControllerConfigResult'}},
10255 'DestroyController': {'properties': {'Params': {'$ref': '#/definitions/DestroyControllerArgs'}},
10257 'GetCloudSpec': {'properties': {'Params': {'$ref': '#/definitions/ModelTag'},
10258 'Result': {'$ref': '#/definitions/CloudSpecResult'}},
10260 'GetControllerAccess': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10261 'Result': {'$ref': '#/definitions/UserAccessResults'}},
10263 'HostedModelConfigs': {'properties': {'Result': {'$ref': '#/definitions/HostedModelConfigsResults'}},
10265 'InitiateMigration': {'properties': {'Params': {'$ref': '#/definitions/InitiateMigrationArgs'},
10266 'Result': {'$ref': '#/definitions/InitiateMigrationResults'}},
10268 'ListBlockedModels': {'properties': {'Result': {'$ref': '#/definitions/ModelBlockInfoList'}},
10270 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}},
10272 'ModelStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10273 'Result': {'$ref': '#/definitions/ModelStatusResults'}},
10275 'ModifyControllerAccess': {'properties': {'Params': {'$ref': '#/definitions/ModifyControllerAccessRequest'},
10276 'Result': {'$ref': '#/definitions/ErrorResults'}},
10278 'RemoveBlocks': {'properties': {'Params': {'$ref': '#/definitions/RemoveBlocksArgs'}},
10280 'WatchAllModels': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherId'}},
10281 'type': 'object'}},
10285 @ReturnMapping(UserModelList
)
10286 async def AllModels(self
):
10289 Returns -> typing.Sequence<+T_co>[~UserModel]<~UserModel>
10291 # map input types to rpc msg
10293 msg
= dict(type='Controller', request
='AllModels', version
=3, params
=_params
)
10295 reply
= await self
.rpc(msg
)
10300 @ReturnMapping(CloudSpecResults
)
10301 async def CloudSpec(self
, entities
):
10303 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
10304 Returns -> typing.Sequence<+T_co>[~CloudSpecResult]<~CloudSpecResult>
10306 # map input types to rpc msg
10308 msg
= dict(type='Controller', request
='CloudSpec', version
=3, params
=_params
)
10309 _params
['entities'] = entities
10310 reply
= await self
.rpc(msg
)
10315 @ReturnMapping(ControllerConfigResult
)
10316 async def ControllerConfig(self
):
10319 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
10321 # map input types to rpc msg
10323 msg
= dict(type='Controller', request
='ControllerConfig', version
=3, params
=_params
)
10325 reply
= await self
.rpc(msg
)
10330 @ReturnMapping(None)
10331 async def DestroyController(self
, destroy_models
):
10333 destroy_models : bool
10336 # map input types to rpc msg
10338 msg
= dict(type='Controller', request
='DestroyController', version
=3, params
=_params
)
10339 _params
['destroy-models'] = destroy_models
10340 reply
= await self
.rpc(msg
)
10345 @ReturnMapping(CloudSpecResult
)
10346 async def GetCloudSpec(self
):
10349 Returns -> typing.Union[_ForwardRef('Error'), _ForwardRef('CloudSpec')]
10351 # map input types to rpc msg
10353 msg
= dict(type='Controller', request
='GetCloudSpec', version
=3, params
=_params
)
10355 reply
= await self
.rpc(msg
)
10360 @ReturnMapping(UserAccessResults
)
10361 async def GetControllerAccess(self
, entities
):
10363 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
10364 Returns -> typing.Sequence<+T_co>[~UserAccessResult]<~UserAccessResult>
10366 # map input types to rpc msg
10368 msg
= dict(type='Controller', request
='GetControllerAccess', version
=3, params
=_params
)
10369 _params
['entities'] = entities
10370 reply
= await self
.rpc(msg
)
10375 @ReturnMapping(HostedModelConfigsResults
)
10376 async def HostedModelConfigs(self
):
10379 Returns -> typing.Sequence<+T_co>[~HostedModelConfig]<~HostedModelConfig>
10381 # map input types to rpc msg
10383 msg
= dict(type='Controller', request
='HostedModelConfigs', version
=3, params
=_params
)
10385 reply
= await self
.rpc(msg
)
10390 @ReturnMapping(InitiateMigrationResults
)
10391 async def InitiateMigration(self
, specs
):
10393 specs : typing.Sequence<+T_co>[~MigrationSpec]<~MigrationSpec>
10394 Returns -> typing.Sequence<+T_co>[~InitiateMigrationResult]<~InitiateMigrationResult>
10396 # map input types to rpc msg
10398 msg
= dict(type='Controller', request
='InitiateMigration', version
=3, params
=_params
)
10399 _params
['specs'] = specs
10400 reply
= await self
.rpc(msg
)
10405 @ReturnMapping(ModelBlockInfoList
)
10406 async def ListBlockedModels(self
):
10409 Returns -> typing.Sequence<+T_co>[~ModelBlockInfo]<~ModelBlockInfo>
10411 # map input types to rpc msg
10413 msg
= dict(type='Controller', request
='ListBlockedModels', version
=3, params
=_params
)
10415 reply
= await self
.rpc(msg
)
10420 @ReturnMapping(ModelConfigResults
)
10421 async def ModelConfig(self
):
10424 Returns -> typing.Mapping<~KT, +VT_co>[str, ~ConfigValue]<~ConfigValue>
10426 # map input types to rpc msg
10428 msg
= dict(type='Controller', request
='ModelConfig', version
=3, params
=_params
)
10430 reply
= await self
.rpc(msg
)
10435 @ReturnMapping(ModelStatusResults
)
10436 async def ModelStatus(self
, entities
):
10438 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
10439 Returns -> typing.Sequence<+T_co>[~ModelStatus]<~ModelStatus>
10441 # map input types to rpc msg
10443 msg
= dict(type='Controller', request
='ModelStatus', version
=3, params
=_params
)
10444 _params
['entities'] = entities
10445 reply
= await self
.rpc(msg
)
10450 @ReturnMapping(ErrorResults
)
10451 async def ModifyControllerAccess(self
, changes
):
10453 changes : typing.Sequence<+T_co>[~ModifyControllerAccess]<~ModifyControllerAccess>
10454 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
10456 # map input types to rpc msg
10458 msg
= dict(type='Controller', request
='ModifyControllerAccess', version
=3, params
=_params
)
10459 _params
['changes'] = changes
10460 reply
= await self
.rpc(msg
)
10465 @ReturnMapping(None)
10466 async def RemoveBlocks(self
, all_
):
10471 # map input types to rpc msg
10473 msg
= dict(type='Controller', request
='RemoveBlocks', version
=3, params
=_params
)
10474 _params
['all'] = all_
10475 reply
= await self
.rpc(msg
)
10480 @ReturnMapping(AllWatcherId
)
10481 async def WatchAllModels(self
):
10486 # map input types to rpc msg
10488 msg
= dict(type='Controller', request
='WatchAllModels', version
=3, params
=_params
)
10490 reply
= await self
.rpc(msg
)
10494 class DeployerFacade(Type
):
10497 schema
= {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
10498 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
10501 'required': ['servers'],
10503 'Address': {'additionalProperties': False,
10504 'properties': {'scope': {'type': 'string'},
10505 'space-name': {'type': 'string'},
10506 'type': {'type': 'string'},
10507 'value': {'type': 'string'}},
10508 'required': ['value', 'type', 'scope'],
10510 'BytesResult': {'additionalProperties': False,
10511 'properties': {'result': {'items': {'type': 'integer'},
10513 'required': ['result'],
10515 'DeployerConnectionValues': {'additionalProperties': False,
10516 'properties': {'api-addresses': {'items': {'type': 'string'},
10518 'state-addresses': {'items': {'type': 'string'},
10520 'required': ['state-addresses',
10523 'Entities': {'additionalProperties': False,
10524 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
10526 'required': ['entities'],
10528 'Entity': {'additionalProperties': False,
10529 'properties': {'tag': {'type': 'string'}},
10530 'required': ['tag'],
10532 'EntityPassword': {'additionalProperties': False,
10533 'properties': {'password': {'type': 'string'},
10534 'tag': {'type': 'string'}},
10535 'required': ['tag', 'password'],
10537 'EntityPasswords': {'additionalProperties': False,
10538 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'},
10540 'required': ['changes'],
10542 'EntityStatusArgs': {'additionalProperties': False,
10543 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
10544 'type': 'object'}},
10546 'info': {'type': 'string'},
10547 'status': {'type': 'string'},
10548 'tag': {'type': 'string'}},
10549 'required': ['tag',
10554 'Error': {'additionalProperties': False,
10555 'properties': {'code': {'type': 'string'},
10556 'info': {'$ref': '#/definitions/ErrorInfo'},
10557 'message': {'type': 'string'}},
10558 'required': ['message', 'code'],
10560 'ErrorInfo': {'additionalProperties': False,
10561 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
10562 'macaroon-path': {'type': 'string'}},
10564 'ErrorResult': {'additionalProperties': False,
10565 'properties': {'error': {'$ref': '#/definitions/Error'}},
10567 'ErrorResults': {'additionalProperties': False,
10568 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
10570 'required': ['results'],
10572 'HostPort': {'additionalProperties': False,
10573 'properties': {'Address': {'$ref': '#/definitions/Address'},
10574 'port': {'type': 'integer'}},
10575 'required': ['Address', 'port'],
10577 'LifeResult': {'additionalProperties': False,
10578 'properties': {'error': {'$ref': '#/definitions/Error'},
10579 'life': {'type': 'string'}},
10580 'required': ['life'],
10582 'LifeResults': {'additionalProperties': False,
10583 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
10585 'required': ['results'],
10587 'Macaroon': {'additionalProperties': False, 'type': 'object'},
10588 'NotifyWatchResult': {'additionalProperties': False,
10589 'properties': {'NotifyWatcherId': {'type': 'string'},
10590 'error': {'$ref': '#/definitions/Error'}},
10591 'required': ['NotifyWatcherId'],
10593 'SetStatus': {'additionalProperties': False,
10594 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
10596 'required': ['entities'],
10598 'StringResult': {'additionalProperties': False,
10599 'properties': {'error': {'$ref': '#/definitions/Error'},
10600 'result': {'type': 'string'}},
10601 'required': ['result'],
10603 'StringsResult': {'additionalProperties': False,
10604 'properties': {'error': {'$ref': '#/definitions/Error'},
10605 'result': {'items': {'type': 'string'},
10608 'StringsWatchResult': {'additionalProperties': False,
10609 'properties': {'changes': {'items': {'type': 'string'},
10611 'error': {'$ref': '#/definitions/Error'},
10612 'watcher-id': {'type': 'string'}},
10613 'required': ['watcher-id'],
10615 'StringsWatchResults': {'additionalProperties': False,
10616 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
10618 'required': ['results'],
10619 'type': 'object'}},
10620 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
10622 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
10624 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
10626 'ConnectionInfo': {'properties': {'Result': {'$ref': '#/definitions/DeployerConnectionValues'}},
10628 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10629 'Result': {'$ref': '#/definitions/LifeResults'}},
10631 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
10633 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10634 'Result': {'$ref': '#/definitions/ErrorResults'}},
10636 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
10637 'Result': {'$ref': '#/definitions/ErrorResults'}},
10639 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
10640 'Result': {'$ref': '#/definitions/ErrorResults'}},
10642 'StateAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
10644 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
10645 'Result': {'$ref': '#/definitions/ErrorResults'}},
10647 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
10649 'WatchUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10650 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
10651 'type': 'object'}},
10655 @ReturnMapping(StringsResult
)
10656 async def APIAddresses(self
):
10659 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[str]]
10661 # map input types to rpc msg
10663 msg
= dict(type='Deployer', request
='APIAddresses', version
=1, params
=_params
)
10665 reply
= await self
.rpc(msg
)
10670 @ReturnMapping(APIHostPortsResult
)
10671 async def APIHostPorts(self
):
10674 Returns -> typing.Sequence<+T_co>[~HostPort]<~HostPort>
10676 # map input types to rpc msg
10678 msg
= dict(type='Deployer', request
='APIHostPorts', version
=1, params
=_params
)
10680 reply
= await self
.rpc(msg
)
10685 @ReturnMapping(BytesResult
)
10686 async def CACert(self
):
10689 Returns -> typing.Sequence<+T_co>[int]
10691 # map input types to rpc msg
10693 msg
= dict(type='Deployer', request
='CACert', version
=1, params
=_params
)
10695 reply
= await self
.rpc(msg
)
10700 @ReturnMapping(DeployerConnectionValues
)
10701 async def ConnectionInfo(self
):
10704 Returns -> typing.Sequence<+T_co>[str]
10706 # map input types to rpc msg
10708 msg
= dict(type='Deployer', request
='ConnectionInfo', version
=1, params
=_params
)
10710 reply
= await self
.rpc(msg
)
10715 @ReturnMapping(LifeResults
)
10716 async def Life(self
, entities
):
10718 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
10719 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
10721 # map input types to rpc msg
10723 msg
= dict(type='Deployer', request
='Life', version
=1, params
=_params
)
10724 _params
['entities'] = entities
10725 reply
= await self
.rpc(msg
)
10730 @ReturnMapping(StringResult
)
10731 async def ModelUUID(self
):
10734 Returns -> typing.Union[_ForwardRef('Error'), str]
10736 # map input types to rpc msg
10738 msg
= dict(type='Deployer', request
='ModelUUID', version
=1, params
=_params
)
10740 reply
= await self
.rpc(msg
)
10745 @ReturnMapping(ErrorResults
)
10746 async def Remove(self
, entities
):
10748 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
10749 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
10751 # map input types to rpc msg
10753 msg
= dict(type='Deployer', request
='Remove', version
=1, params
=_params
)
10754 _params
['entities'] = entities
10755 reply
= await self
.rpc(msg
)
10760 @ReturnMapping(ErrorResults
)
10761 async def SetPasswords(self
, changes
):
10763 changes : typing.Sequence<+T_co>[~EntityPassword]<~EntityPassword>
10764 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
10766 # map input types to rpc msg
10768 msg
= dict(type='Deployer', request
='SetPasswords', version
=1, params
=_params
)
10769 _params
['changes'] = changes
10770 reply
= await self
.rpc(msg
)
10775 @ReturnMapping(ErrorResults
)
10776 async def SetStatus(self
, entities
):
10778 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
10779 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
10781 # map input types to rpc msg
10783 msg
= dict(type='Deployer', request
='SetStatus', version
=1, params
=_params
)
10784 _params
['entities'] = entities
10785 reply
= await self
.rpc(msg
)
10790 @ReturnMapping(StringsResult
)
10791 async def StateAddresses(self
):
10794 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[str]]
10796 # map input types to rpc msg
10798 msg
= dict(type='Deployer', request
='StateAddresses', version
=1, params
=_params
)
10800 reply
= await self
.rpc(msg
)
10805 @ReturnMapping(ErrorResults
)
10806 async def UpdateStatus(self
, entities
):
10808 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
10809 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
10811 # map input types to rpc msg
10813 msg
= dict(type='Deployer', request
='UpdateStatus', version
=1, params
=_params
)
10814 _params
['entities'] = entities
10815 reply
= await self
.rpc(msg
)
10820 @ReturnMapping(NotifyWatchResult
)
10821 async def WatchAPIHostPorts(self
):
10824 Returns -> typing.Union[str, _ForwardRef('Error')]
10826 # map input types to rpc msg
10828 msg
= dict(type='Deployer', request
='WatchAPIHostPorts', version
=1, params
=_params
)
10830 reply
= await self
.rpc(msg
)
10835 @ReturnMapping(StringsWatchResults
)
10836 async def WatchUnits(self
, entities
):
10838 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
10839 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
10841 # map input types to rpc msg
10843 msg
= dict(type='Deployer', request
='WatchUnits', version
=1, params
=_params
)
10844 _params
['entities'] = entities
10845 reply
= await self
.rpc(msg
)
10849 class DiscoverSpacesFacade(Type
):
10850 name
= 'DiscoverSpaces'
10852 schema
= {'definitions': {'AddSubnetParams': {'additionalProperties': False,
10853 'properties': {'space-tag': {'type': 'string'},
10854 'subnet-provider-id': {'type': 'string'},
10855 'subnet-tag': {'type': 'string'},
10856 'zones': {'items': {'type': 'string'},
10858 'required': ['space-tag'],
10860 'AddSubnetsParams': {'additionalProperties': False,
10861 'properties': {'subnets': {'items': {'$ref': '#/definitions/AddSubnetParams'},
10863 'required': ['subnets'],
10865 'CreateSpaceParams': {'additionalProperties': False,
10866 'properties': {'provider-id': {'type': 'string'},
10867 'public': {'type': 'boolean'},
10868 'space-tag': {'type': 'string'},
10869 'subnet-tags': {'items': {'type': 'string'},
10871 'required': ['subnet-tags',
10875 'CreateSpacesParams': {'additionalProperties': False,
10876 'properties': {'spaces': {'items': {'$ref': '#/definitions/CreateSpaceParams'},
10878 'required': ['spaces'],
10880 'DiscoverSpacesResults': {'additionalProperties': False,
10881 'properties': {'results': {'items': {'$ref': '#/definitions/ProviderSpace'},
10883 'required': ['results'],
10885 'Error': {'additionalProperties': False,
10886 'properties': {'code': {'type': 'string'},
10887 'info': {'$ref': '#/definitions/ErrorInfo'},
10888 'message': {'type': 'string'}},
10889 'required': ['message', 'code'],
10891 'ErrorInfo': {'additionalProperties': False,
10892 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
10893 'macaroon-path': {'type': 'string'}},
10895 'ErrorResult': {'additionalProperties': False,
10896 'properties': {'error': {'$ref': '#/definitions/Error'}},
10898 'ErrorResults': {'additionalProperties': False,
10899 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
10901 'required': ['results'],
10903 'ListSubnetsResults': {'additionalProperties': False,
10904 'properties': {'results': {'items': {'$ref': '#/definitions/Subnet'},
10906 'required': ['results'],
10908 'Macaroon': {'additionalProperties': False, 'type': 'object'},
10909 'ModelConfigResult': {'additionalProperties': False,
10910 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
10911 'type': 'object'}},
10912 'type': 'object'}},
10913 'required': ['config'],
10915 'ProviderSpace': {'additionalProperties': False,
10916 'properties': {'error': {'$ref': '#/definitions/Error'},
10917 'name': {'type': 'string'},
10918 'provider-id': {'type': 'string'},
10919 'subnets': {'items': {'$ref': '#/definitions/Subnet'},
10921 'required': ['name',
10925 'Subnet': {'additionalProperties': False,
10926 'properties': {'cidr': {'type': 'string'},
10927 'life': {'type': 'string'},
10928 'provider-id': {'type': 'string'},
10929 'space-tag': {'type': 'string'},
10930 'status': {'type': 'string'},
10931 'vlan-tag': {'type': 'integer'},
10932 'zones': {'items': {'type': 'string'},
10934 'required': ['cidr',
10940 'SubnetsFilters': {'additionalProperties': False,
10941 'properties': {'space-tag': {'type': 'string'},
10942 'zone': {'type': 'string'}},
10943 'type': 'object'}},
10944 'properties': {'AddSubnets': {'properties': {'Params': {'$ref': '#/definitions/AddSubnetsParams'},
10945 'Result': {'$ref': '#/definitions/ErrorResults'}},
10947 'CreateSpaces': {'properties': {'Params': {'$ref': '#/definitions/CreateSpacesParams'},
10948 'Result': {'$ref': '#/definitions/ErrorResults'}},
10950 'ListSpaces': {'properties': {'Result': {'$ref': '#/definitions/DiscoverSpacesResults'}},
10952 'ListSubnets': {'properties': {'Params': {'$ref': '#/definitions/SubnetsFilters'},
10953 'Result': {'$ref': '#/definitions/ListSubnetsResults'}},
10955 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
10956 'type': 'object'}},
10960 @ReturnMapping(ErrorResults
)
10961 async def AddSubnets(self
, subnets
):
10963 subnets : typing.Sequence<+T_co>[~AddSubnetParams]<~AddSubnetParams>
10964 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
10966 # map input types to rpc msg
10968 msg
= dict(type='DiscoverSpaces', request
='AddSubnets', version
=2, params
=_params
)
10969 _params
['subnets'] = subnets
10970 reply
= await self
.rpc(msg
)
10975 @ReturnMapping(ErrorResults
)
10976 async def CreateSpaces(self
, spaces
):
10978 spaces : typing.Sequence<+T_co>[~CreateSpaceParams]<~CreateSpaceParams>
10979 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
10981 # map input types to rpc msg
10983 msg
= dict(type='DiscoverSpaces', request
='CreateSpaces', version
=2, params
=_params
)
10984 _params
['spaces'] = spaces
10985 reply
= await self
.rpc(msg
)
10990 @ReturnMapping(DiscoverSpacesResults
)
10991 async def ListSpaces(self
):
10994 Returns -> typing.Sequence<+T_co>[~ProviderSpace]<~ProviderSpace>
10996 # map input types to rpc msg
10998 msg
= dict(type='DiscoverSpaces', request
='ListSpaces', version
=2, params
=_params
)
11000 reply
= await self
.rpc(msg
)
11005 @ReturnMapping(ListSubnetsResults
)
11006 async def ListSubnets(self
, space_tag
, zone
):
11010 Returns -> typing.Sequence<+T_co>[~Subnet]<~Subnet>
11012 # map input types to rpc msg
11014 msg
= dict(type='DiscoverSpaces', request
='ListSubnets', version
=2, params
=_params
)
11015 _params
['space-tag'] = space_tag
11016 _params
['zone'] = zone
11017 reply
= await self
.rpc(msg
)
11022 @ReturnMapping(ModelConfigResult
)
11023 async def ModelConfig(self
):
11026 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
11028 # map input types to rpc msg
11030 msg
= dict(type='DiscoverSpaces', request
='ModelConfig', version
=2, params
=_params
)
11032 reply
= await self
.rpc(msg
)
11036 class DiskManagerFacade(Type
):
11037 name
= 'DiskManager'
11039 schema
= {'definitions': {'BlockDevice': {'additionalProperties': False,
11040 'properties': {'BusAddress': {'type': 'string'},
11041 'DeviceLinks': {'items': {'type': 'string'},
11043 'DeviceName': {'type': 'string'},
11044 'FilesystemType': {'type': 'string'},
11045 'HardwareId': {'type': 'string'},
11046 'InUse': {'type': 'boolean'},
11047 'Label': {'type': 'string'},
11048 'MountPoint': {'type': 'string'},
11049 'Size': {'type': 'integer'},
11050 'UUID': {'type': 'string'}},
11051 'required': ['DeviceName',
11062 'Error': {'additionalProperties': False,
11063 'properties': {'code': {'type': 'string'},
11064 'info': {'$ref': '#/definitions/ErrorInfo'},
11065 'message': {'type': 'string'}},
11066 'required': ['message', 'code'],
11068 'ErrorInfo': {'additionalProperties': False,
11069 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
11070 'macaroon-path': {'type': 'string'}},
11072 'ErrorResult': {'additionalProperties': False,
11073 'properties': {'error': {'$ref': '#/definitions/Error'}},
11075 'ErrorResults': {'additionalProperties': False,
11076 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
11078 'required': ['results'],
11080 'Macaroon': {'additionalProperties': False, 'type': 'object'},
11081 'MachineBlockDevices': {'additionalProperties': False,
11082 'properties': {'block-devices': {'items': {'$ref': '#/definitions/BlockDevice'},
11084 'machine': {'type': 'string'}},
11085 'required': ['machine'],
11087 'SetMachineBlockDevices': {'additionalProperties': False,
11088 'properties': {'machine-block-devices': {'items': {'$ref': '#/definitions/MachineBlockDevices'},
11090 'required': ['machine-block-devices'],
11091 'type': 'object'}},
11092 'properties': {'SetMachineBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/SetMachineBlockDevices'},
11093 'Result': {'$ref': '#/definitions/ErrorResults'}},
11094 'type': 'object'}},
11098 @ReturnMapping(ErrorResults
)
11099 async def SetMachineBlockDevices(self
, machine_block_devices
):
11101 machine_block_devices : typing.Sequence<+T_co>[~MachineBlockDevices]<~MachineBlockDevices>
11102 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
11104 # map input types to rpc msg
11106 msg
= dict(type='DiskManager', request
='SetMachineBlockDevices', version
=2, params
=_params
)
11107 _params
['machine-block-devices'] = machine_block_devices
11108 reply
= await self
.rpc(msg
)
11112 class EntityWatcherFacade(Type
):
11113 name
= 'EntityWatcher'
11115 schema
= {'definitions': {'EntitiesWatchResult': {'additionalProperties': False,
11116 'properties': {'changes': {'items': {'type': 'string'},
11118 'error': {'$ref': '#/definitions/Error'},
11119 'watcher-id': {'type': 'string'}},
11120 'required': ['watcher-id'],
11122 'Error': {'additionalProperties': False,
11123 'properties': {'code': {'type': 'string'},
11124 'info': {'$ref': '#/definitions/ErrorInfo'},
11125 'message': {'type': 'string'}},
11126 'required': ['message', 'code'],
11128 'ErrorInfo': {'additionalProperties': False,
11129 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
11130 'macaroon-path': {'type': 'string'}},
11132 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
11133 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/EntitiesWatchResult'}},
11135 'Stop': {'type': 'object'}},
11139 @ReturnMapping(EntitiesWatchResult
)
11140 async def Next(self
):
11143 Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')]
11145 # map input types to rpc msg
11147 msg
= dict(type='EntityWatcher', request
='Next', version
=2, params
=_params
)
11149 reply
= await self
.rpc(msg
)
11154 @ReturnMapping(None)
11155 async def Stop(self
):
11160 # map input types to rpc msg
11162 msg
= dict(type='EntityWatcher', request
='Stop', version
=2, params
=_params
)
11164 reply
= await self
.rpc(msg
)
11168 class FilesystemAttachmentsWatcherFacade(Type
):
11169 name
= 'FilesystemAttachmentsWatcher'
11171 schema
= {'definitions': {'Error': {'additionalProperties': False,
11172 'properties': {'code': {'type': 'string'},
11173 'info': {'$ref': '#/definitions/ErrorInfo'},
11174 'message': {'type': 'string'}},
11175 'required': ['message', 'code'],
11177 'ErrorInfo': {'additionalProperties': False,
11178 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
11179 'macaroon-path': {'type': 'string'}},
11181 'Macaroon': {'additionalProperties': False, 'type': 'object'},
11182 'MachineStorageId': {'additionalProperties': False,
11183 'properties': {'attachment-tag': {'type': 'string'},
11184 'machine-tag': {'type': 'string'}},
11185 'required': ['machine-tag',
11188 'MachineStorageIdsWatchResult': {'additionalProperties': False,
11189 'properties': {'changes': {'items': {'$ref': '#/definitions/MachineStorageId'},
11191 'error': {'$ref': '#/definitions/Error'},
11192 'watcher-id': {'type': 'string'}},
11193 'required': ['watcher-id',
11195 'type': 'object'}},
11196 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResult'}},
11198 'Stop': {'type': 'object'}},
11202 @ReturnMapping(MachineStorageIdsWatchResult
)
11203 async def Next(self
):
11206 Returns -> typing.Union[typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>, _ForwardRef('Error')]
11208 # map input types to rpc msg
11210 msg
= dict(type='FilesystemAttachmentsWatcher', request
='Next', version
=2, params
=_params
)
11212 reply
= await self
.rpc(msg
)
11217 @ReturnMapping(None)
11218 async def Stop(self
):
11223 # map input types to rpc msg
11225 msg
= dict(type='FilesystemAttachmentsWatcher', request
='Stop', version
=2, params
=_params
)
11227 reply
= await self
.rpc(msg
)
11231 class FirewallerFacade(Type
):
11232 name
= 'Firewaller'
11234 schema
= {'definitions': {'BoolResult': {'additionalProperties': False,
11235 'properties': {'error': {'$ref': '#/definitions/Error'},
11236 'result': {'type': 'boolean'}},
11237 'required': ['result'],
11239 'BoolResults': {'additionalProperties': False,
11240 'properties': {'results': {'items': {'$ref': '#/definitions/BoolResult'},
11242 'required': ['results'],
11244 'CloudCredential': {'additionalProperties': False,
11245 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}},
11247 'auth-type': {'type': 'string'},
11248 'redacted': {'items': {'type': 'string'},
11250 'required': ['auth-type'],
11252 'CloudSpec': {'additionalProperties': False,
11253 'properties': {'credential': {'$ref': '#/definitions/CloudCredential'},
11254 'endpoint': {'type': 'string'},
11255 'identity-endpoint': {'type': 'string'},
11256 'name': {'type': 'string'},
11257 'region': {'type': 'string'},
11258 'storage-endpoint': {'type': 'string'},
11259 'type': {'type': 'string'}},
11260 'required': ['type', 'name'],
11262 'CloudSpecResult': {'additionalProperties': False,
11263 'properties': {'error': {'$ref': '#/definitions/Error'},
11264 'result': {'$ref': '#/definitions/CloudSpec'}},
11266 'CloudSpecResults': {'additionalProperties': False,
11267 'properties': {'results': {'items': {'$ref': '#/definitions/CloudSpecResult'},
11270 'Entities': {'additionalProperties': False,
11271 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
11273 'required': ['entities'],
11275 'Entity': {'additionalProperties': False,
11276 'properties': {'tag': {'type': 'string'}},
11277 'required': ['tag'],
11279 'Error': {'additionalProperties': False,
11280 'properties': {'code': {'type': 'string'},
11281 'info': {'$ref': '#/definitions/ErrorInfo'},
11282 'message': {'type': 'string'}},
11283 'required': ['message', 'code'],
11285 'ErrorInfo': {'additionalProperties': False,
11286 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
11287 'macaroon-path': {'type': 'string'}},
11289 'LifeResult': {'additionalProperties': False,
11290 'properties': {'error': {'$ref': '#/definitions/Error'},
11291 'life': {'type': 'string'}},
11292 'required': ['life'],
11294 'LifeResults': {'additionalProperties': False,
11295 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
11297 'required': ['results'],
11299 'Macaroon': {'additionalProperties': False, 'type': 'object'},
11300 'MachinePortRange': {'additionalProperties': False,
11301 'properties': {'port-range': {'$ref': '#/definitions/PortRange'},
11302 'relation-tag': {'type': 'string'},
11303 'unit-tag': {'type': 'string'}},
11304 'required': ['unit-tag',
11308 'MachinePorts': {'additionalProperties': False,
11309 'properties': {'machine-tag': {'type': 'string'},
11310 'subnet-tag': {'type': 'string'}},
11311 'required': ['machine-tag', 'subnet-tag'],
11313 'MachinePortsParams': {'additionalProperties': False,
11314 'properties': {'params': {'items': {'$ref': '#/definitions/MachinePorts'},
11316 'required': ['params'],
11318 'MachinePortsResult': {'additionalProperties': False,
11319 'properties': {'error': {'$ref': '#/definitions/Error'},
11320 'ports': {'items': {'$ref': '#/definitions/MachinePortRange'},
11322 'required': ['ports'],
11324 'MachinePortsResults': {'additionalProperties': False,
11325 'properties': {'results': {'items': {'$ref': '#/definitions/MachinePortsResult'},
11327 'required': ['results'],
11329 'ModelConfigResult': {'additionalProperties': False,
11330 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
11331 'type': 'object'}},
11332 'type': 'object'}},
11333 'required': ['config'],
11335 'ModelTag': {'additionalProperties': False, 'type': 'object'},
11336 'NotifyWatchResult': {'additionalProperties': False,
11337 'properties': {'NotifyWatcherId': {'type': 'string'},
11338 'error': {'$ref': '#/definitions/Error'}},
11339 'required': ['NotifyWatcherId'],
11341 'NotifyWatchResults': {'additionalProperties': False,
11342 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
11344 'required': ['results'],
11346 'PortRange': {'additionalProperties': False,
11347 'properties': {'from-port': {'type': 'integer'},
11348 'protocol': {'type': 'string'},
11349 'to-port': {'type': 'integer'}},
11350 'required': ['from-port', 'to-port', 'protocol'],
11352 'StringResult': {'additionalProperties': False,
11353 'properties': {'error': {'$ref': '#/definitions/Error'},
11354 'result': {'type': 'string'}},
11355 'required': ['result'],
11357 'StringResults': {'additionalProperties': False,
11358 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
11360 'required': ['results'],
11362 'StringsResult': {'additionalProperties': False,
11363 'properties': {'error': {'$ref': '#/definitions/Error'},
11364 'result': {'items': {'type': 'string'},
11367 'StringsResults': {'additionalProperties': False,
11368 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
11370 'required': ['results'],
11372 'StringsWatchResult': {'additionalProperties': False,
11373 'properties': {'changes': {'items': {'type': 'string'},
11375 'error': {'$ref': '#/definitions/Error'},
11376 'watcher-id': {'type': 'string'}},
11377 'required': ['watcher-id'],
11379 'StringsWatchResults': {'additionalProperties': False,
11380 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
11382 'required': ['results'],
11383 'type': 'object'}},
11384 'properties': {'CloudSpec': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11385 'Result': {'$ref': '#/definitions/CloudSpecResults'}},
11387 'GetAssignedMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11388 'Result': {'$ref': '#/definitions/StringResults'}},
11390 'GetCloudSpec': {'properties': {'Params': {'$ref': '#/definitions/ModelTag'},
11391 'Result': {'$ref': '#/definitions/CloudSpecResult'}},
11393 'GetExposed': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11394 'Result': {'$ref': '#/definitions/BoolResults'}},
11396 'GetMachineActiveSubnets': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11397 'Result': {'$ref': '#/definitions/StringsResults'}},
11399 'GetMachinePorts': {'properties': {'Params': {'$ref': '#/definitions/MachinePortsParams'},
11400 'Result': {'$ref': '#/definitions/MachinePortsResults'}},
11402 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11403 'Result': {'$ref': '#/definitions/StringResults'}},
11405 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11406 'Result': {'$ref': '#/definitions/LifeResults'}},
11408 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
11410 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11411 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
11413 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
11415 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
11417 'WatchOpenedPorts': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11418 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
11420 'WatchUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11421 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
11422 'type': 'object'}},
11426 @ReturnMapping(CloudSpecResults
)
11427 async def CloudSpec(self
, entities
):
11429 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
11430 Returns -> typing.Sequence<+T_co>[~CloudSpecResult]<~CloudSpecResult>
11432 # map input types to rpc msg
11434 msg
= dict(type='Firewaller', request
='CloudSpec', version
=3, params
=_params
)
11435 _params
['entities'] = entities
11436 reply
= await self
.rpc(msg
)
11441 @ReturnMapping(StringResults
)
11442 async def GetAssignedMachine(self
, entities
):
11444 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
11445 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
11447 # map input types to rpc msg
11449 msg
= dict(type='Firewaller', request
='GetAssignedMachine', version
=3, params
=_params
)
11450 _params
['entities'] = entities
11451 reply
= await self
.rpc(msg
)
11456 @ReturnMapping(CloudSpecResult
)
11457 async def GetCloudSpec(self
):
11460 Returns -> typing.Union[_ForwardRef('Error'), _ForwardRef('CloudSpec')]
11462 # map input types to rpc msg
11464 msg
= dict(type='Firewaller', request
='GetCloudSpec', version
=3, params
=_params
)
11466 reply
= await self
.rpc(msg
)
11471 @ReturnMapping(BoolResults
)
11472 async def GetExposed(self
, entities
):
11474 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
11475 Returns -> typing.Sequence<+T_co>[~BoolResult]<~BoolResult>
11477 # map input types to rpc msg
11479 msg
= dict(type='Firewaller', request
='GetExposed', version
=3, params
=_params
)
11480 _params
['entities'] = entities
11481 reply
= await self
.rpc(msg
)
11486 @ReturnMapping(StringsResults
)
11487 async def GetMachineActiveSubnets(self
, entities
):
11489 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
11490 Returns -> typing.Sequence<+T_co>[~StringsResult]<~StringsResult>
11492 # map input types to rpc msg
11494 msg
= dict(type='Firewaller', request
='GetMachineActiveSubnets', version
=3, params
=_params
)
11495 _params
['entities'] = entities
11496 reply
= await self
.rpc(msg
)
11501 @ReturnMapping(MachinePortsResults
)
11502 async def GetMachinePorts(self
, params
):
11504 params : typing.Sequence<+T_co>[~MachinePorts]<~MachinePorts>
11505 Returns -> typing.Sequence<+T_co>[~MachinePortsResult]<~MachinePortsResult>
11507 # map input types to rpc msg
11509 msg
= dict(type='Firewaller', request
='GetMachinePorts', version
=3, params
=_params
)
11510 _params
['params'] = params
11511 reply
= await self
.rpc(msg
)
11516 @ReturnMapping(StringResults
)
11517 async def InstanceId(self
, entities
):
11519 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
11520 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
11522 # map input types to rpc msg
11524 msg
= dict(type='Firewaller', request
='InstanceId', version
=3, params
=_params
)
11525 _params
['entities'] = entities
11526 reply
= await self
.rpc(msg
)
11531 @ReturnMapping(LifeResults
)
11532 async def Life(self
, entities
):
11534 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
11535 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
11537 # map input types to rpc msg
11539 msg
= dict(type='Firewaller', request
='Life', version
=3, params
=_params
)
11540 _params
['entities'] = entities
11541 reply
= await self
.rpc(msg
)
11546 @ReturnMapping(ModelConfigResult
)
11547 async def ModelConfig(self
):
11550 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
11552 # map input types to rpc msg
11554 msg
= dict(type='Firewaller', request
='ModelConfig', version
=3, params
=_params
)
11556 reply
= await self
.rpc(msg
)
11561 @ReturnMapping(NotifyWatchResults
)
11562 async def Watch(self
, entities
):
11564 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
11565 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
11567 # map input types to rpc msg
11569 msg
= dict(type='Firewaller', request
='Watch', version
=3, params
=_params
)
11570 _params
['entities'] = entities
11571 reply
= await self
.rpc(msg
)
11576 @ReturnMapping(NotifyWatchResult
)
11577 async def WatchForModelConfigChanges(self
):
11580 Returns -> typing.Union[str, _ForwardRef('Error')]
11582 # map input types to rpc msg
11584 msg
= dict(type='Firewaller', request
='WatchForModelConfigChanges', version
=3, params
=_params
)
11586 reply
= await self
.rpc(msg
)
11591 @ReturnMapping(StringsWatchResult
)
11592 async def WatchModelMachines(self
):
11595 Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')]
11597 # map input types to rpc msg
11599 msg
= dict(type='Firewaller', request
='WatchModelMachines', version
=3, params
=_params
)
11601 reply
= await self
.rpc(msg
)
11606 @ReturnMapping(StringsWatchResults
)
11607 async def WatchOpenedPorts(self
, entities
):
11609 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
11610 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
11612 # map input types to rpc msg
11614 msg
= dict(type='Firewaller', request
='WatchOpenedPorts', version
=3, params
=_params
)
11615 _params
['entities'] = entities
11616 reply
= await self
.rpc(msg
)
11621 @ReturnMapping(StringsWatchResults
)
11622 async def WatchUnits(self
, entities
):
11624 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
11625 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
11627 # map input types to rpc msg
11629 msg
= dict(type='Firewaller', request
='WatchUnits', version
=3, params
=_params
)
11630 _params
['entities'] = entities
11631 reply
= await self
.rpc(msg
)
11635 class HighAvailabilityFacade(Type
):
11636 name
= 'HighAvailability'
11638 schema
= {'definitions': {'Address': {'additionalProperties': False,
11639 'properties': {'Scope': {'type': 'string'},
11640 'SpaceName': {'type': 'string'},
11641 'SpaceProviderId': {'type': 'string'},
11642 'Type': {'type': 'string'},
11643 'Value': {'type': 'string'}},
11644 'required': ['Value',
11648 'SpaceProviderId'],
11650 'ControllersChangeResult': {'additionalProperties': False,
11651 'properties': {'error': {'$ref': '#/definitions/Error'},
11652 'result': {'$ref': '#/definitions/ControllersChanges'}},
11653 'required': ['result'],
11655 'ControllersChangeResults': {'additionalProperties': False,
11656 'properties': {'results': {'items': {'$ref': '#/definitions/ControllersChangeResult'},
11658 'required': ['results'],
11660 'ControllersChanges': {'additionalProperties': False,
11661 'properties': {'added': {'items': {'type': 'string'},
11663 'converted': {'items': {'type': 'string'},
11665 'demoted': {'items': {'type': 'string'},
11667 'maintained': {'items': {'type': 'string'},
11669 'promoted': {'items': {'type': 'string'},
11671 'removed': {'items': {'type': 'string'},
11674 'ControllersSpec': {'additionalProperties': False,
11675 'properties': {'constraints': {'$ref': '#/definitions/Value'},
11676 'num-controllers': {'type': 'integer'},
11677 'placement': {'items': {'type': 'string'},
11679 'series': {'type': 'string'}},
11680 'required': ['num-controllers'],
11682 'ControllersSpecs': {'additionalProperties': False,
11683 'properties': {'specs': {'items': {'$ref': '#/definitions/ControllersSpec'},
11685 'required': ['specs'],
11687 'Error': {'additionalProperties': False,
11688 'properties': {'code': {'type': 'string'},
11689 'info': {'$ref': '#/definitions/ErrorInfo'},
11690 'message': {'type': 'string'}},
11691 'required': ['message', 'code'],
11693 'ErrorInfo': {'additionalProperties': False,
11694 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
11695 'macaroon-path': {'type': 'string'}},
11697 'HAMember': {'additionalProperties': False,
11698 'properties': {'public-address': {'$ref': '#/definitions/Address'},
11699 'series': {'type': 'string'},
11700 'tag': {'type': 'string'}},
11701 'required': ['tag', 'public-address', 'series'],
11703 'Macaroon': {'additionalProperties': False, 'type': 'object'},
11704 'Member': {'additionalProperties': False,
11705 'properties': {'Address': {'type': 'string'},
11706 'Arbiter': {'type': 'boolean'},
11707 'BuildIndexes': {'type': 'boolean'},
11708 'Hidden': {'type': 'boolean'},
11709 'Id': {'type': 'integer'},
11710 'Priority': {'type': 'number'},
11711 'SlaveDelay': {'type': 'integer'},
11712 'Tags': {'patternProperties': {'.*': {'type': 'string'}},
11714 'Votes': {'type': 'integer'}},
11725 'MongoUpgradeResults': {'additionalProperties': False,
11726 'properties': {'ha-members': {'items': {'$ref': '#/definitions/HAMember'},
11728 'master': {'$ref': '#/definitions/HAMember'},
11729 'rs-members': {'items': {'$ref': '#/definitions/Member'},
11731 'required': ['rs-members',
11735 'MongoVersion': {'additionalProperties': False,
11736 'properties': {'engine': {'type': 'string'},
11737 'major': {'type': 'integer'},
11738 'minor': {'type': 'integer'},
11739 'patch': {'type': 'string'}},
11740 'required': ['major',
11745 'ResumeReplicationParams': {'additionalProperties': False,
11746 'properties': {'members': {'items': {'$ref': '#/definitions/Member'},
11748 'required': ['members'],
11750 'UpgradeMongoParams': {'additionalProperties': False,
11751 'properties': {'target': {'$ref': '#/definitions/MongoVersion'}},
11752 'required': ['target'],
11754 'Value': {'additionalProperties': False,
11755 'properties': {'arch': {'type': 'string'},
11756 'container': {'type': 'string'},
11757 'cores': {'type': 'integer'},
11758 'cpu-power': {'type': 'integer'},
11759 'instance-type': {'type': 'string'},
11760 'mem': {'type': 'integer'},
11761 'root-disk': {'type': 'integer'},
11762 'spaces': {'items': {'type': 'string'},
11764 'tags': {'items': {'type': 'string'},
11766 'virt-type': {'type': 'string'}},
11767 'type': 'object'}},
11768 'properties': {'EnableHA': {'properties': {'Params': {'$ref': '#/definitions/ControllersSpecs'},
11769 'Result': {'$ref': '#/definitions/ControllersChangeResults'}},
11771 'ResumeHAReplicationAfterUpgrade': {'properties': {'Params': {'$ref': '#/definitions/ResumeReplicationParams'}},
11773 'StopHAReplicationForUpgrade': {'properties': {'Params': {'$ref': '#/definitions/UpgradeMongoParams'},
11774 'Result': {'$ref': '#/definitions/MongoUpgradeResults'}},
11775 'type': 'object'}},
11779 @ReturnMapping(ControllersChangeResults
)
11780 async def EnableHA(self
, specs
):
11782 specs : typing.Sequence<+T_co>[~ControllersSpec]<~ControllersSpec>
11783 Returns -> typing.Sequence<+T_co>[~ControllersChangeResult]<~ControllersChangeResult>
11785 # map input types to rpc msg
11787 msg
= dict(type='HighAvailability', request
='EnableHA', version
=2, params
=_params
)
11788 _params
['specs'] = specs
11789 reply
= await self
.rpc(msg
)
11794 @ReturnMapping(None)
11795 async def ResumeHAReplicationAfterUpgrade(self
, members
):
11797 members : typing.Sequence<+T_co>[~Member]<~Member>
11800 # map input types to rpc msg
11802 msg
= dict(type='HighAvailability', request
='ResumeHAReplicationAfterUpgrade', version
=2, params
=_params
)
11803 _params
['members'] = members
11804 reply
= await self
.rpc(msg
)
11809 @ReturnMapping(MongoUpgradeResults
)
11810 async def StopHAReplicationForUpgrade(self
, target
):
11812 target : MongoVersion
11813 Returns -> typing.Union[_ForwardRef('HAMember'), typing.Sequence<+T_co>[~Member]<~Member>]
11815 # map input types to rpc msg
11817 msg
= dict(type='HighAvailability', request
='StopHAReplicationForUpgrade', version
=2, params
=_params
)
11818 _params
['target'] = target
11819 reply
= await self
.rpc(msg
)
11823 class HostKeyReporterFacade(Type
):
11824 name
= 'HostKeyReporter'
11826 schema
= {'definitions': {'Error': {'additionalProperties': False,
11827 'properties': {'code': {'type': 'string'},
11828 'info': {'$ref': '#/definitions/ErrorInfo'},
11829 'message': {'type': 'string'}},
11830 'required': ['message', 'code'],
11832 'ErrorInfo': {'additionalProperties': False,
11833 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
11834 'macaroon-path': {'type': 'string'}},
11836 'ErrorResult': {'additionalProperties': False,
11837 'properties': {'error': {'$ref': '#/definitions/Error'}},
11839 'ErrorResults': {'additionalProperties': False,
11840 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
11842 'required': ['results'],
11844 'Macaroon': {'additionalProperties': False, 'type': 'object'},
11845 'SSHHostKeySet': {'additionalProperties': False,
11846 'properties': {'entity-keys': {'items': {'$ref': '#/definitions/SSHHostKeys'},
11848 'required': ['entity-keys'],
11850 'SSHHostKeys': {'additionalProperties': False,
11851 'properties': {'public-keys': {'items': {'type': 'string'},
11853 'tag': {'type': 'string'}},
11854 'required': ['tag', 'public-keys'],
11855 'type': 'object'}},
11856 'properties': {'ReportKeys': {'properties': {'Params': {'$ref': '#/definitions/SSHHostKeySet'},
11857 'Result': {'$ref': '#/definitions/ErrorResults'}},
11858 'type': 'object'}},
11862 @ReturnMapping(ErrorResults
)
11863 async def ReportKeys(self
, entity_keys
):
11865 entity_keys : typing.Sequence<+T_co>[~SSHHostKeys]<~SSHHostKeys>
11866 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
11868 # map input types to rpc msg
11870 msg
= dict(type='HostKeyReporter', request
='ReportKeys', version
=1, params
=_params
)
11871 _params
['entity-keys'] = entity_keys
11872 reply
= await self
.rpc(msg
)
11876 class ImageManagerFacade(Type
):
11877 name
= 'ImageManager'
11879 schema
= {'definitions': {'Error': {'additionalProperties': False,
11880 'properties': {'code': {'type': 'string'},
11881 'info': {'$ref': '#/definitions/ErrorInfo'},
11882 'message': {'type': 'string'}},
11883 'required': ['message', 'code'],
11885 'ErrorInfo': {'additionalProperties': False,
11886 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
11887 'macaroon-path': {'type': 'string'}},
11889 'ErrorResult': {'additionalProperties': False,
11890 'properties': {'error': {'$ref': '#/definitions/Error'}},
11892 'ErrorResults': {'additionalProperties': False,
11893 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
11895 'required': ['results'],
11897 'ImageFilterParams': {'additionalProperties': False,
11898 'properties': {'images': {'items': {'$ref': '#/definitions/ImageSpec'},
11900 'required': ['images'],
11902 'ImageMetadata': {'additionalProperties': False,
11903 'properties': {'arch': {'type': 'string'},
11904 'created': {'format': 'date-time',
11906 'kind': {'type': 'string'},
11907 'series': {'type': 'string'},
11908 'url': {'type': 'string'}},
11909 'required': ['kind',
11915 'ImageSpec': {'additionalProperties': False,
11916 'properties': {'arch': {'type': 'string'},
11917 'kind': {'type': 'string'},
11918 'series': {'type': 'string'}},
11919 'required': ['kind', 'arch', 'series'],
11921 'ListImageResult': {'additionalProperties': False,
11922 'properties': {'result': {'items': {'$ref': '#/definitions/ImageMetadata'},
11924 'required': ['result'],
11926 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
11927 'properties': {'DeleteImages': {'properties': {'Params': {'$ref': '#/definitions/ImageFilterParams'},
11928 'Result': {'$ref': '#/definitions/ErrorResults'}},
11930 'ListImages': {'properties': {'Params': {'$ref': '#/definitions/ImageFilterParams'},
11931 'Result': {'$ref': '#/definitions/ListImageResult'}},
11932 'type': 'object'}},
11936 @ReturnMapping(ErrorResults
)
11937 async def DeleteImages(self
, images
):
11939 images : typing.Sequence<+T_co>[~ImageSpec]<~ImageSpec>
11940 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
11942 # map input types to rpc msg
11944 msg
= dict(type='ImageManager', request
='DeleteImages', version
=2, params
=_params
)
11945 _params
['images'] = images
11946 reply
= await self
.rpc(msg
)
11951 @ReturnMapping(ListImageResult
)
11952 async def ListImages(self
, images
):
11954 images : typing.Sequence<+T_co>[~ImageSpec]<~ImageSpec>
11955 Returns -> typing.Sequence<+T_co>[~ImageMetadata]<~ImageMetadata>
11957 # map input types to rpc msg
11959 msg
= dict(type='ImageManager', request
='ListImages', version
=2, params
=_params
)
11960 _params
['images'] = images
11961 reply
= await self
.rpc(msg
)
11965 class ImageMetadataFacade(Type
):
11966 name
= 'ImageMetadata'
11968 schema
= {'definitions': {'CloudImageMetadata': {'additionalProperties': False,
11969 'properties': {'arch': {'type': 'string'},
11970 'image-id': {'type': 'string'},
11971 'priority': {'type': 'integer'},
11972 'region': {'type': 'string'},
11973 'root-storage-size': {'type': 'integer'},
11974 'root-storage-type': {'type': 'string'},
11975 'series': {'type': 'string'},
11976 'source': {'type': 'string'},
11977 'stream': {'type': 'string'},
11978 'version': {'type': 'string'},
11979 'virt-type': {'type': 'string'}},
11980 'required': ['image-id',
11988 'CloudImageMetadataList': {'additionalProperties': False,
11989 'properties': {'metadata': {'items': {'$ref': '#/definitions/CloudImageMetadata'},
11992 'Error': {'additionalProperties': False,
11993 'properties': {'code': {'type': 'string'},
11994 'info': {'$ref': '#/definitions/ErrorInfo'},
11995 'message': {'type': 'string'}},
11996 'required': ['message', 'code'],
11998 'ErrorInfo': {'additionalProperties': False,
11999 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
12000 'macaroon-path': {'type': 'string'}},
12002 'ErrorResult': {'additionalProperties': False,
12003 'properties': {'error': {'$ref': '#/definitions/Error'}},
12005 'ErrorResults': {'additionalProperties': False,
12006 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
12008 'required': ['results'],
12010 'ImageMetadataFilter': {'additionalProperties': False,
12011 'properties': {'arches': {'items': {'type': 'string'},
12013 'region': {'type': 'string'},
12014 'root-storage-type': {'type': 'string'},
12015 'series': {'items': {'type': 'string'},
12017 'stream': {'type': 'string'},
12018 'virt-type': {'type': 'string'}},
12020 'ListCloudImageMetadataResult': {'additionalProperties': False,
12021 'properties': {'result': {'items': {'$ref': '#/definitions/CloudImageMetadata'},
12023 'required': ['result'],
12025 'Macaroon': {'additionalProperties': False, 'type': 'object'},
12026 'MetadataImageIds': {'additionalProperties': False,
12027 'properties': {'image-ids': {'items': {'type': 'string'},
12029 'required': ['image-ids'],
12031 'MetadataSaveParams': {'additionalProperties': False,
12032 'properties': {'metadata': {'items': {'$ref': '#/definitions/CloudImageMetadataList'},
12034 'type': 'object'}},
12035 'properties': {'Delete': {'properties': {'Params': {'$ref': '#/definitions/MetadataImageIds'},
12036 'Result': {'$ref': '#/definitions/ErrorResults'}},
12038 'List': {'properties': {'Params': {'$ref': '#/definitions/ImageMetadataFilter'},
12039 'Result': {'$ref': '#/definitions/ListCloudImageMetadataResult'}},
12041 'Save': {'properties': {'Params': {'$ref': '#/definitions/MetadataSaveParams'},
12042 'Result': {'$ref': '#/definitions/ErrorResults'}},
12044 'UpdateFromPublishedImages': {'type': 'object'}},
12048 @ReturnMapping(ErrorResults
)
12049 async def Delete(self
, image_ids
):
12051 image_ids : typing.Sequence<+T_co>[str]
12052 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
12054 # map input types to rpc msg
12056 msg
= dict(type='ImageMetadata', request
='Delete', version
=2, params
=_params
)
12057 _params
['image-ids'] = image_ids
12058 reply
= await self
.rpc(msg
)
12063 @ReturnMapping(ListCloudImageMetadataResult
)
12064 async def List(self
, arches
, region
, root_storage_type
, series
, stream
, virt_type
):
12066 arches : typing.Sequence<+T_co>[str]
12068 root_storage_type : str
12069 series : typing.Sequence<+T_co>[str]
12072 Returns -> typing.Sequence<+T_co>[~CloudImageMetadata]<~CloudImageMetadata>
12074 # map input types to rpc msg
12076 msg
= dict(type='ImageMetadata', request
='List', version
=2, params
=_params
)
12077 _params
['arches'] = arches
12078 _params
['region'] = region
12079 _params
['root-storage-type'] = root_storage_type
12080 _params
['series'] = series
12081 _params
['stream'] = stream
12082 _params
['virt-type'] = virt_type
12083 reply
= await self
.rpc(msg
)
12088 @ReturnMapping(ErrorResults
)
12089 async def Save(self
, metadata
):
12091 metadata : typing.Sequence<+T_co>[~CloudImageMetadataList]<~CloudImageMetadataList>
12092 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
12094 # map input types to rpc msg
12096 msg
= dict(type='ImageMetadata', request
='Save', version
=2, params
=_params
)
12097 _params
['metadata'] = metadata
12098 reply
= await self
.rpc(msg
)
12103 @ReturnMapping(None)
12104 async def UpdateFromPublishedImages(self
):
12109 # map input types to rpc msg
12111 msg
= dict(type='ImageMetadata', request
='UpdateFromPublishedImages', version
=2, params
=_params
)
12113 reply
= await self
.rpc(msg
)
12117 class InstancePollerFacade(Type
):
12118 name
= 'InstancePoller'
12120 schema
= {'definitions': {'Address': {'additionalProperties': False,
12121 'properties': {'scope': {'type': 'string'},
12122 'space-name': {'type': 'string'},
12123 'type': {'type': 'string'},
12124 'value': {'type': 'string'}},
12125 'required': ['value', 'type', 'scope'],
12127 'BoolResult': {'additionalProperties': False,
12128 'properties': {'error': {'$ref': '#/definitions/Error'},
12129 'result': {'type': 'boolean'}},
12130 'required': ['result'],
12132 'BoolResults': {'additionalProperties': False,
12133 'properties': {'results': {'items': {'$ref': '#/definitions/BoolResult'},
12135 'required': ['results'],
12137 'Entities': {'additionalProperties': False,
12138 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
12140 'required': ['entities'],
12142 'Entity': {'additionalProperties': False,
12143 'properties': {'tag': {'type': 'string'}},
12144 'required': ['tag'],
12146 'EntityStatusArgs': {'additionalProperties': False,
12147 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
12148 'type': 'object'}},
12150 'info': {'type': 'string'},
12151 'status': {'type': 'string'},
12152 'tag': {'type': 'string'}},
12153 'required': ['tag',
12158 'Error': {'additionalProperties': False,
12159 'properties': {'code': {'type': 'string'},
12160 'info': {'$ref': '#/definitions/ErrorInfo'},
12161 'message': {'type': 'string'}},
12162 'required': ['message', 'code'],
12164 'ErrorInfo': {'additionalProperties': False,
12165 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
12166 'macaroon-path': {'type': 'string'}},
12168 'ErrorResult': {'additionalProperties': False,
12169 'properties': {'error': {'$ref': '#/definitions/Error'}},
12171 'ErrorResults': {'additionalProperties': False,
12172 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
12174 'required': ['results'],
12176 'LifeResult': {'additionalProperties': False,
12177 'properties': {'error': {'$ref': '#/definitions/Error'},
12178 'life': {'type': 'string'}},
12179 'required': ['life'],
12181 'LifeResults': {'additionalProperties': False,
12182 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
12184 'required': ['results'],
12186 'Macaroon': {'additionalProperties': False, 'type': 'object'},
12187 'MachineAddresses': {'additionalProperties': False,
12188 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
12190 'tag': {'type': 'string'}},
12191 'required': ['tag', 'addresses'],
12193 'MachineAddressesResult': {'additionalProperties': False,
12194 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
12196 'error': {'$ref': '#/definitions/Error'}},
12197 'required': ['addresses'],
12199 'MachineAddressesResults': {'additionalProperties': False,
12200 'properties': {'results': {'items': {'$ref': '#/definitions/MachineAddressesResult'},
12202 'required': ['results'],
12204 'ModelConfigResult': {'additionalProperties': False,
12205 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
12206 'type': 'object'}},
12207 'type': 'object'}},
12208 'required': ['config'],
12210 'NotifyWatchResult': {'additionalProperties': False,
12211 'properties': {'NotifyWatcherId': {'type': 'string'},
12212 'error': {'$ref': '#/definitions/Error'}},
12213 'required': ['NotifyWatcherId'],
12215 'SetMachinesAddresses': {'additionalProperties': False,
12216 'properties': {'machine-addresses': {'items': {'$ref': '#/definitions/MachineAddresses'},
12218 'required': ['machine-addresses'],
12220 'SetStatus': {'additionalProperties': False,
12221 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
12223 'required': ['entities'],
12225 'StatusResult': {'additionalProperties': False,
12226 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
12227 'type': 'object'}},
12229 'error': {'$ref': '#/definitions/Error'},
12230 'id': {'type': 'string'},
12231 'info': {'type': 'string'},
12232 'life': {'type': 'string'},
12233 'since': {'format': 'date-time',
12235 'status': {'type': 'string'}},
12243 'StatusResults': {'additionalProperties': False,
12244 'properties': {'results': {'items': {'$ref': '#/definitions/StatusResult'},
12246 'required': ['results'],
12248 'StringResult': {'additionalProperties': False,
12249 'properties': {'error': {'$ref': '#/definitions/Error'},
12250 'result': {'type': 'string'}},
12251 'required': ['result'],
12253 'StringResults': {'additionalProperties': False,
12254 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
12256 'required': ['results'],
12258 'StringsWatchResult': {'additionalProperties': False,
12259 'properties': {'changes': {'items': {'type': 'string'},
12261 'error': {'$ref': '#/definitions/Error'},
12262 'watcher-id': {'type': 'string'}},
12263 'required': ['watcher-id'],
12264 'type': 'object'}},
12265 'properties': {'AreManuallyProvisioned': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12266 'Result': {'$ref': '#/definitions/BoolResults'}},
12268 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12269 'Result': {'$ref': '#/definitions/StringResults'}},
12271 'InstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12272 'Result': {'$ref': '#/definitions/StatusResults'}},
12274 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12275 'Result': {'$ref': '#/definitions/LifeResults'}},
12277 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
12279 'ProviderAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12280 'Result': {'$ref': '#/definitions/MachineAddressesResults'}},
12282 'SetInstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
12283 'Result': {'$ref': '#/definitions/ErrorResults'}},
12285 'SetProviderAddresses': {'properties': {'Params': {'$ref': '#/definitions/SetMachinesAddresses'},
12286 'Result': {'$ref': '#/definitions/ErrorResults'}},
12288 'Status': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12289 'Result': {'$ref': '#/definitions/StatusResults'}},
12291 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
12293 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
12294 'type': 'object'}},
12298 @ReturnMapping(BoolResults
)
12299 async def AreManuallyProvisioned(self
, entities
):
12301 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12302 Returns -> typing.Sequence<+T_co>[~BoolResult]<~BoolResult>
12304 # map input types to rpc msg
12306 msg
= dict(type='InstancePoller', request
='AreManuallyProvisioned', version
=3, params
=_params
)
12307 _params
['entities'] = entities
12308 reply
= await self
.rpc(msg
)
12313 @ReturnMapping(StringResults
)
12314 async def InstanceId(self
, entities
):
12316 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12317 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
12319 # map input types to rpc msg
12321 msg
= dict(type='InstancePoller', request
='InstanceId', version
=3, params
=_params
)
12322 _params
['entities'] = entities
12323 reply
= await self
.rpc(msg
)
12328 @ReturnMapping(StatusResults
)
12329 async def InstanceStatus(self
, entities
):
12331 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12332 Returns -> typing.Sequence<+T_co>[~StatusResult]<~StatusResult>
12334 # map input types to rpc msg
12336 msg
= dict(type='InstancePoller', request
='InstanceStatus', version
=3, params
=_params
)
12337 _params
['entities'] = entities
12338 reply
= await self
.rpc(msg
)
12343 @ReturnMapping(LifeResults
)
12344 async def Life(self
, entities
):
12346 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12347 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
12349 # map input types to rpc msg
12351 msg
= dict(type='InstancePoller', request
='Life', version
=3, params
=_params
)
12352 _params
['entities'] = entities
12353 reply
= await self
.rpc(msg
)
12358 @ReturnMapping(ModelConfigResult
)
12359 async def ModelConfig(self
):
12362 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
12364 # map input types to rpc msg
12366 msg
= dict(type='InstancePoller', request
='ModelConfig', version
=3, params
=_params
)
12368 reply
= await self
.rpc(msg
)
12373 @ReturnMapping(MachineAddressesResults
)
12374 async def ProviderAddresses(self
, entities
):
12376 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12377 Returns -> typing.Sequence<+T_co>[~MachineAddressesResult]<~MachineAddressesResult>
12379 # map input types to rpc msg
12381 msg
= dict(type='InstancePoller', request
='ProviderAddresses', version
=3, params
=_params
)
12382 _params
['entities'] = entities
12383 reply
= await self
.rpc(msg
)
12388 @ReturnMapping(ErrorResults
)
12389 async def SetInstanceStatus(self
, entities
):
12391 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
12392 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
12394 # map input types to rpc msg
12396 msg
= dict(type='InstancePoller', request
='SetInstanceStatus', version
=3, params
=_params
)
12397 _params
['entities'] = entities
12398 reply
= await self
.rpc(msg
)
12403 @ReturnMapping(ErrorResults
)
12404 async def SetProviderAddresses(self
, machine_addresses
):
12406 machine_addresses : typing.Sequence<+T_co>[~MachineAddresses]<~MachineAddresses>
12407 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
12409 # map input types to rpc msg
12411 msg
= dict(type='InstancePoller', request
='SetProviderAddresses', version
=3, params
=_params
)
12412 _params
['machine-addresses'] = machine_addresses
12413 reply
= await self
.rpc(msg
)
12418 @ReturnMapping(StatusResults
)
12419 async def Status(self
, entities
):
12421 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12422 Returns -> typing.Sequence<+T_co>[~StatusResult]<~StatusResult>
12424 # map input types to rpc msg
12426 msg
= dict(type='InstancePoller', request
='Status', version
=3, params
=_params
)
12427 _params
['entities'] = entities
12428 reply
= await self
.rpc(msg
)
12433 @ReturnMapping(NotifyWatchResult
)
12434 async def WatchForModelConfigChanges(self
):
12437 Returns -> typing.Union[str, _ForwardRef('Error')]
12439 # map input types to rpc msg
12441 msg
= dict(type='InstancePoller', request
='WatchForModelConfigChanges', version
=3, params
=_params
)
12443 reply
= await self
.rpc(msg
)
12448 @ReturnMapping(StringsWatchResult
)
12449 async def WatchModelMachines(self
):
12452 Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')]
12454 # map input types to rpc msg
12456 msg
= dict(type='InstancePoller', request
='WatchModelMachines', version
=3, params
=_params
)
12458 reply
= await self
.rpc(msg
)
12462 class KeyManagerFacade(Type
):
12463 name
= 'KeyManager'
12465 schema
= {'definitions': {'Entities': {'additionalProperties': False,
12466 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
12468 'required': ['entities'],
12470 'Entity': {'additionalProperties': False,
12471 'properties': {'tag': {'type': 'string'}},
12472 'required': ['tag'],
12474 'Error': {'additionalProperties': False,
12475 'properties': {'code': {'type': 'string'},
12476 'info': {'$ref': '#/definitions/ErrorInfo'},
12477 'message': {'type': 'string'}},
12478 'required': ['message', 'code'],
12480 'ErrorInfo': {'additionalProperties': False,
12481 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
12482 'macaroon-path': {'type': 'string'}},
12484 'ErrorResult': {'additionalProperties': False,
12485 'properties': {'error': {'$ref': '#/definitions/Error'}},
12487 'ErrorResults': {'additionalProperties': False,
12488 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
12490 'required': ['results'],
12492 'ListSSHKeys': {'additionalProperties': False,
12493 'properties': {'entities': {'$ref': '#/definitions/Entities'},
12494 'mode': {'type': 'boolean'}},
12495 'required': ['entities', 'mode'],
12497 'Macaroon': {'additionalProperties': False, 'type': 'object'},
12498 'ModifyUserSSHKeys': {'additionalProperties': False,
12499 'properties': {'ssh-keys': {'items': {'type': 'string'},
12501 'user': {'type': 'string'}},
12502 'required': ['user', 'ssh-keys'],
12504 'StringsResult': {'additionalProperties': False,
12505 'properties': {'error': {'$ref': '#/definitions/Error'},
12506 'result': {'items': {'type': 'string'},
12509 'StringsResults': {'additionalProperties': False,
12510 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
12512 'required': ['results'],
12513 'type': 'object'}},
12514 'properties': {'AddKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'},
12515 'Result': {'$ref': '#/definitions/ErrorResults'}},
12517 'DeleteKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'},
12518 'Result': {'$ref': '#/definitions/ErrorResults'}},
12520 'ImportKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'},
12521 'Result': {'$ref': '#/definitions/ErrorResults'}},
12523 'ListKeys': {'properties': {'Params': {'$ref': '#/definitions/ListSSHKeys'},
12524 'Result': {'$ref': '#/definitions/StringsResults'}},
12525 'type': 'object'}},
12529 @ReturnMapping(ErrorResults
)
12530 async def AddKeys(self
, ssh_keys
, user
):
12532 ssh_keys : typing.Sequence<+T_co>[str]
12534 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
12536 # map input types to rpc msg
12538 msg
= dict(type='KeyManager', request
='AddKeys', version
=1, params
=_params
)
12539 _params
['ssh-keys'] = ssh_keys
12540 _params
['user'] = user
12541 reply
= await self
.rpc(msg
)
12546 @ReturnMapping(ErrorResults
)
12547 async def DeleteKeys(self
, ssh_keys
, user
):
12549 ssh_keys : typing.Sequence<+T_co>[str]
12551 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
12553 # map input types to rpc msg
12555 msg
= dict(type='KeyManager', request
='DeleteKeys', version
=1, params
=_params
)
12556 _params
['ssh-keys'] = ssh_keys
12557 _params
['user'] = user
12558 reply
= await self
.rpc(msg
)
12563 @ReturnMapping(ErrorResults
)
12564 async def ImportKeys(self
, ssh_keys
, user
):
12566 ssh_keys : typing.Sequence<+T_co>[str]
12568 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
12570 # map input types to rpc msg
12572 msg
= dict(type='KeyManager', request
='ImportKeys', version
=1, params
=_params
)
12573 _params
['ssh-keys'] = ssh_keys
12574 _params
['user'] = user
12575 reply
= await self
.rpc(msg
)
12580 @ReturnMapping(StringsResults
)
12581 async def ListKeys(self
, entities
, mode
):
12583 entities : Entities
12585 Returns -> typing.Sequence<+T_co>[~StringsResult]<~StringsResult>
12587 # map input types to rpc msg
12589 msg
= dict(type='KeyManager', request
='ListKeys', version
=1, params
=_params
)
12590 _params
['entities'] = entities
12591 _params
['mode'] = mode
12592 reply
= await self
.rpc(msg
)
12596 class KeyUpdaterFacade(Type
):
12597 name
= 'KeyUpdater'
12599 schema
= {'definitions': {'Entities': {'additionalProperties': False,
12600 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
12602 'required': ['entities'],
12604 'Entity': {'additionalProperties': False,
12605 'properties': {'tag': {'type': 'string'}},
12606 'required': ['tag'],
12608 'Error': {'additionalProperties': False,
12609 'properties': {'code': {'type': 'string'},
12610 'info': {'$ref': '#/definitions/ErrorInfo'},
12611 'message': {'type': 'string'}},
12612 'required': ['message', 'code'],
12614 'ErrorInfo': {'additionalProperties': False,
12615 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
12616 'macaroon-path': {'type': 'string'}},
12618 'Macaroon': {'additionalProperties': False, 'type': 'object'},
12619 'NotifyWatchResult': {'additionalProperties': False,
12620 'properties': {'NotifyWatcherId': {'type': 'string'},
12621 'error': {'$ref': '#/definitions/Error'}},
12622 'required': ['NotifyWatcherId'],
12624 'NotifyWatchResults': {'additionalProperties': False,
12625 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
12627 'required': ['results'],
12629 'StringsResult': {'additionalProperties': False,
12630 'properties': {'error': {'$ref': '#/definitions/Error'},
12631 'result': {'items': {'type': 'string'},
12634 'StringsResults': {'additionalProperties': False,
12635 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
12637 'required': ['results'],
12638 'type': 'object'}},
12639 'properties': {'AuthorisedKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12640 'Result': {'$ref': '#/definitions/StringsResults'}},
12642 'WatchAuthorisedKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12643 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
12644 'type': 'object'}},
12648 @ReturnMapping(StringsResults
)
12649 async def AuthorisedKeys(self
, entities
):
12651 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12652 Returns -> typing.Sequence<+T_co>[~StringsResult]<~StringsResult>
12654 # map input types to rpc msg
12656 msg
= dict(type='KeyUpdater', request
='AuthorisedKeys', version
=1, params
=_params
)
12657 _params
['entities'] = entities
12658 reply
= await self
.rpc(msg
)
12663 @ReturnMapping(NotifyWatchResults
)
12664 async def WatchAuthorisedKeys(self
, entities
):
12666 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12667 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
12669 # map input types to rpc msg
12671 msg
= dict(type='KeyUpdater', request
='WatchAuthorisedKeys', version
=1, params
=_params
)
12672 _params
['entities'] = entities
12673 reply
= await self
.rpc(msg
)
12677 class LeadershipServiceFacade(Type
):
12678 name
= 'LeadershipService'
12680 schema
= {'definitions': {'ApplicationTag': {'additionalProperties': False,
12681 'properties': {'Name': {'type': 'string'}},
12682 'required': ['Name'],
12684 'ClaimLeadershipBulkParams': {'additionalProperties': False,
12685 'properties': {'params': {'items': {'$ref': '#/definitions/ClaimLeadershipParams'},
12687 'required': ['params'],
12689 'ClaimLeadershipBulkResults': {'additionalProperties': False,
12690 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
12692 'required': ['results'],
12694 'ClaimLeadershipParams': {'additionalProperties': False,
12695 'properties': {'application-tag': {'type': 'string'},
12696 'duration': {'type': 'number'},
12697 'unit-tag': {'type': 'string'}},
12698 'required': ['application-tag',
12702 'Error': {'additionalProperties': False,
12703 'properties': {'code': {'type': 'string'},
12704 'info': {'$ref': '#/definitions/ErrorInfo'},
12705 'message': {'type': 'string'}},
12706 'required': ['message', 'code'],
12708 'ErrorInfo': {'additionalProperties': False,
12709 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
12710 'macaroon-path': {'type': 'string'}},
12712 'ErrorResult': {'additionalProperties': False,
12713 'properties': {'error': {'$ref': '#/definitions/Error'}},
12715 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
12716 'properties': {'BlockUntilLeadershipReleased': {'properties': {'Params': {'$ref': '#/definitions/ApplicationTag'},
12717 'Result': {'$ref': '#/definitions/ErrorResult'}},
12719 'ClaimLeadership': {'properties': {'Params': {'$ref': '#/definitions/ClaimLeadershipBulkParams'},
12720 'Result': {'$ref': '#/definitions/ClaimLeadershipBulkResults'}},
12721 'type': 'object'}},
12725 @ReturnMapping(ErrorResult
)
12726 async def BlockUntilLeadershipReleased(self
, name
):
12731 # map input types to rpc msg
12733 msg
= dict(type='LeadershipService', request
='BlockUntilLeadershipReleased', version
=2, params
=_params
)
12734 _params
['Name'] = name
12735 reply
= await self
.rpc(msg
)
12740 @ReturnMapping(ClaimLeadershipBulkResults
)
12741 async def ClaimLeadership(self
, params
):
12743 params : typing.Sequence<+T_co>[~ClaimLeadershipParams]<~ClaimLeadershipParams>
12744 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
12746 # map input types to rpc msg
12748 msg
= dict(type='LeadershipService', request
='ClaimLeadership', version
=2, params
=_params
)
12749 _params
['params'] = params
12750 reply
= await self
.rpc(msg
)
12754 class LifeFlagFacade(Type
):
12757 schema
= {'definitions': {'Entities': {'additionalProperties': False,
12758 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
12760 'required': ['entities'],
12762 'Entity': {'additionalProperties': False,
12763 'properties': {'tag': {'type': 'string'}},
12764 'required': ['tag'],
12766 'Error': {'additionalProperties': False,
12767 'properties': {'code': {'type': 'string'},
12768 'info': {'$ref': '#/definitions/ErrorInfo'},
12769 'message': {'type': 'string'}},
12770 'required': ['message', 'code'],
12772 'ErrorInfo': {'additionalProperties': False,
12773 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
12774 'macaroon-path': {'type': 'string'}},
12776 'LifeResult': {'additionalProperties': False,
12777 'properties': {'error': {'$ref': '#/definitions/Error'},
12778 'life': {'type': 'string'}},
12779 'required': ['life'],
12781 'LifeResults': {'additionalProperties': False,
12782 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
12784 'required': ['results'],
12786 'Macaroon': {'additionalProperties': False, 'type': 'object'},
12787 'NotifyWatchResult': {'additionalProperties': False,
12788 'properties': {'NotifyWatcherId': {'type': 'string'},
12789 'error': {'$ref': '#/definitions/Error'}},
12790 'required': ['NotifyWatcherId'],
12792 'NotifyWatchResults': {'additionalProperties': False,
12793 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
12795 'required': ['results'],
12796 'type': 'object'}},
12797 'properties': {'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12798 'Result': {'$ref': '#/definitions/LifeResults'}},
12800 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12801 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
12802 'type': 'object'}},
12806 @ReturnMapping(LifeResults
)
12807 async def Life(self
, entities
):
12809 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12810 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
12812 # map input types to rpc msg
12814 msg
= dict(type='LifeFlag', request
='Life', version
=1, params
=_params
)
12815 _params
['entities'] = entities
12816 reply
= await self
.rpc(msg
)
12821 @ReturnMapping(NotifyWatchResults
)
12822 async def Watch(self
, entities
):
12824 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12825 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
12827 # map input types to rpc msg
12829 msg
= dict(type='LifeFlag', request
='Watch', version
=1, params
=_params
)
12830 _params
['entities'] = entities
12831 reply
= await self
.rpc(msg
)
12835 class LogForwardingFacade(Type
):
12836 name
= 'LogForwarding'
12838 schema
= {'definitions': {'Error': {'additionalProperties': False,
12839 'properties': {'code': {'type': 'string'},
12840 'info': {'$ref': '#/definitions/ErrorInfo'},
12841 'message': {'type': 'string'}},
12842 'required': ['message', 'code'],
12844 'ErrorInfo': {'additionalProperties': False,
12845 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
12846 'macaroon-path': {'type': 'string'}},
12848 'ErrorResult': {'additionalProperties': False,
12849 'properties': {'error': {'$ref': '#/definitions/Error'}},
12851 'ErrorResults': {'additionalProperties': False,
12852 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
12854 'required': ['results'],
12856 'LogForwardingGetLastSentParams': {'additionalProperties': False,
12857 'properties': {'ids': {'items': {'$ref': '#/definitions/LogForwardingID'},
12859 'required': ['ids'],
12861 'LogForwardingGetLastSentResult': {'additionalProperties': False,
12862 'properties': {'err': {'$ref': '#/definitions/Error'},
12863 'record-id': {'type': 'integer'},
12864 'record-timestamp': {'type': 'integer'}},
12865 'required': ['record-id',
12866 'record-timestamp',
12869 'LogForwardingGetLastSentResults': {'additionalProperties': False,
12870 'properties': {'results': {'items': {'$ref': '#/definitions/LogForwardingGetLastSentResult'},
12872 'required': ['results'],
12874 'LogForwardingID': {'additionalProperties': False,
12875 'properties': {'model': {'type': 'string'},
12876 'sink': {'type': 'string'}},
12877 'required': ['model', 'sink'],
12879 'LogForwardingSetLastSentParam': {'additionalProperties': False,
12880 'properties': {'LogForwardingID': {'$ref': '#/definitions/LogForwardingID'},
12881 'record-id': {'type': 'integer'},
12882 'record-timestamp': {'type': 'integer'}},
12883 'required': ['LogForwardingID',
12885 'record-timestamp'],
12887 'LogForwardingSetLastSentParams': {'additionalProperties': False,
12888 'properties': {'params': {'items': {'$ref': '#/definitions/LogForwardingSetLastSentParam'},
12890 'required': ['params'],
12892 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
12893 'properties': {'GetLastSent': {'properties': {'Params': {'$ref': '#/definitions/LogForwardingGetLastSentParams'},
12894 'Result': {'$ref': '#/definitions/LogForwardingGetLastSentResults'}},
12896 'SetLastSent': {'properties': {'Params': {'$ref': '#/definitions/LogForwardingSetLastSentParams'},
12897 'Result': {'$ref': '#/definitions/ErrorResults'}},
12898 'type': 'object'}},
12902 @ReturnMapping(LogForwardingGetLastSentResults
)
12903 async def GetLastSent(self
, ids
):
12905 ids : typing.Sequence<+T_co>[~LogForwardingID]<~LogForwardingID>
12906 Returns -> typing.Sequence<+T_co>[~LogForwardingGetLastSentResult]<~LogForwardingGetLastSentResult>
12908 # map input types to rpc msg
12910 msg
= dict(type='LogForwarding', request
='GetLastSent', version
=1, params
=_params
)
12911 _params
['ids'] = ids
12912 reply
= await self
.rpc(msg
)
12917 @ReturnMapping(ErrorResults
)
12918 async def SetLastSent(self
, params
):
12920 params : typing.Sequence<+T_co>[~LogForwardingSetLastSentParam]<~LogForwardingSetLastSentParam>
12921 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
12923 # map input types to rpc msg
12925 msg
= dict(type='LogForwarding', request
='SetLastSent', version
=1, params
=_params
)
12926 _params
['params'] = params
12927 reply
= await self
.rpc(msg
)
12931 class LoggerFacade(Type
):
12934 schema
= {'definitions': {'Entities': {'additionalProperties': False,
12935 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
12937 'required': ['entities'],
12939 'Entity': {'additionalProperties': False,
12940 'properties': {'tag': {'type': 'string'}},
12941 'required': ['tag'],
12943 'Error': {'additionalProperties': False,
12944 'properties': {'code': {'type': 'string'},
12945 'info': {'$ref': '#/definitions/ErrorInfo'},
12946 'message': {'type': 'string'}},
12947 'required': ['message', 'code'],
12949 'ErrorInfo': {'additionalProperties': False,
12950 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
12951 'macaroon-path': {'type': 'string'}},
12953 'Macaroon': {'additionalProperties': False, 'type': 'object'},
12954 'NotifyWatchResult': {'additionalProperties': False,
12955 'properties': {'NotifyWatcherId': {'type': 'string'},
12956 'error': {'$ref': '#/definitions/Error'}},
12957 'required': ['NotifyWatcherId'],
12959 'NotifyWatchResults': {'additionalProperties': False,
12960 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
12962 'required': ['results'],
12964 'StringResult': {'additionalProperties': False,
12965 'properties': {'error': {'$ref': '#/definitions/Error'},
12966 'result': {'type': 'string'}},
12967 'required': ['result'],
12969 'StringResults': {'additionalProperties': False,
12970 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
12972 'required': ['results'],
12973 'type': 'object'}},
12974 'properties': {'LoggingConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12975 'Result': {'$ref': '#/definitions/StringResults'}},
12977 'WatchLoggingConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12978 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
12979 'type': 'object'}},
12983 @ReturnMapping(StringResults
)
12984 async def LoggingConfig(self
, entities
):
12986 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12987 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
12989 # map input types to rpc msg
12991 msg
= dict(type='Logger', request
='LoggingConfig', version
=1, params
=_params
)
12992 _params
['entities'] = entities
12993 reply
= await self
.rpc(msg
)
12998 @ReturnMapping(NotifyWatchResults
)
12999 async def WatchLoggingConfig(self
, entities
):
13001 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13002 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
13004 # map input types to rpc msg
13006 msg
= dict(type='Logger', request
='WatchLoggingConfig', version
=1, params
=_params
)
13007 _params
['entities'] = entities
13008 reply
= await self
.rpc(msg
)
13012 class MachineActionsFacade(Type
):
13013 name
= 'MachineActions'
13015 schema
= {'definitions': {'Action': {'additionalProperties': False,
13016 'properties': {'name': {'type': 'string'},
13017 'parameters': {'patternProperties': {'.*': {'additionalProperties': True,
13018 'type': 'object'}},
13020 'receiver': {'type': 'string'},
13021 'tag': {'type': 'string'}},
13022 'required': ['tag', 'receiver', 'name'],
13024 'ActionExecutionResult': {'additionalProperties': False,
13025 'properties': {'action-tag': {'type': 'string'},
13026 'message': {'type': 'string'},
13027 'results': {'patternProperties': {'.*': {'additionalProperties': True,
13028 'type': 'object'}},
13030 'status': {'type': 'string'}},
13031 'required': ['action-tag', 'status'],
13033 'ActionExecutionResults': {'additionalProperties': False,
13034 'properties': {'results': {'items': {'$ref': '#/definitions/ActionExecutionResult'},
13037 'ActionResult': {'additionalProperties': False,
13038 'properties': {'action': {'$ref': '#/definitions/Action'},
13039 'completed': {'format': 'date-time',
13041 'enqueued': {'format': 'date-time',
13043 'error': {'$ref': '#/definitions/Error'},
13044 'message': {'type': 'string'},
13045 'output': {'patternProperties': {'.*': {'additionalProperties': True,
13046 'type': 'object'}},
13048 'started': {'format': 'date-time',
13050 'status': {'type': 'string'}},
13052 'ActionResults': {'additionalProperties': False,
13053 'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'},
13056 'ActionsByReceiver': {'additionalProperties': False,
13057 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'},
13059 'error': {'$ref': '#/definitions/Error'},
13060 'receiver': {'type': 'string'}},
13062 'ActionsByReceivers': {'additionalProperties': False,
13063 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByReceiver'},
13066 'Entities': {'additionalProperties': False,
13067 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
13069 'required': ['entities'],
13071 'Entity': {'additionalProperties': False,
13072 'properties': {'tag': {'type': 'string'}},
13073 'required': ['tag'],
13075 'Error': {'additionalProperties': False,
13076 'properties': {'code': {'type': 'string'},
13077 'info': {'$ref': '#/definitions/ErrorInfo'},
13078 'message': {'type': 'string'}},
13079 'required': ['message', 'code'],
13081 'ErrorInfo': {'additionalProperties': False,
13082 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
13083 'macaroon-path': {'type': 'string'}},
13085 'ErrorResult': {'additionalProperties': False,
13086 'properties': {'error': {'$ref': '#/definitions/Error'}},
13088 'ErrorResults': {'additionalProperties': False,
13089 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
13091 'required': ['results'],
13093 'Macaroon': {'additionalProperties': False, 'type': 'object'},
13094 'StringsWatchResult': {'additionalProperties': False,
13095 'properties': {'changes': {'items': {'type': 'string'},
13097 'error': {'$ref': '#/definitions/Error'},
13098 'watcher-id': {'type': 'string'}},
13099 'required': ['watcher-id'],
13101 'StringsWatchResults': {'additionalProperties': False,
13102 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
13104 'required': ['results'],
13105 'type': 'object'}},
13106 'properties': {'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13107 'Result': {'$ref': '#/definitions/ActionResults'}},
13109 'BeginActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13110 'Result': {'$ref': '#/definitions/ErrorResults'}},
13112 'FinishActions': {'properties': {'Params': {'$ref': '#/definitions/ActionExecutionResults'},
13113 'Result': {'$ref': '#/definitions/ErrorResults'}},
13115 'RunningActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13116 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
13118 'WatchActionNotifications': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13119 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
13120 'type': 'object'}},
13124 @ReturnMapping(ActionResults
)
13125 async def Actions(self
, entities
):
13127 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13128 Returns -> typing.Sequence<+T_co>[~ActionResult]<~ActionResult>
13130 # map input types to rpc msg
13132 msg
= dict(type='MachineActions', request
='Actions', version
=1, params
=_params
)
13133 _params
['entities'] = entities
13134 reply
= await self
.rpc(msg
)
13139 @ReturnMapping(ErrorResults
)
13140 async def BeginActions(self
, entities
):
13142 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13143 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
13145 # map input types to rpc msg
13147 msg
= dict(type='MachineActions', request
='BeginActions', version
=1, params
=_params
)
13148 _params
['entities'] = entities
13149 reply
= await self
.rpc(msg
)
13154 @ReturnMapping(ErrorResults
)
13155 async def FinishActions(self
, results
):
13157 results : typing.Sequence<+T_co>[~ActionExecutionResult]<~ActionExecutionResult>
13158 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
13160 # map input types to rpc msg
13162 msg
= dict(type='MachineActions', request
='FinishActions', version
=1, params
=_params
)
13163 _params
['results'] = results
13164 reply
= await self
.rpc(msg
)
13169 @ReturnMapping(ActionsByReceivers
)
13170 async def RunningActions(self
, entities
):
13172 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13173 Returns -> typing.Sequence<+T_co>[~ActionsByReceiver]<~ActionsByReceiver>
13175 # map input types to rpc msg
13177 msg
= dict(type='MachineActions', request
='RunningActions', version
=1, params
=_params
)
13178 _params
['entities'] = entities
13179 reply
= await self
.rpc(msg
)
13184 @ReturnMapping(StringsWatchResults
)
13185 async def WatchActionNotifications(self
, entities
):
13187 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13188 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
13190 # map input types to rpc msg
13192 msg
= dict(type='MachineActions', request
='WatchActionNotifications', version
=1, params
=_params
)
13193 _params
['entities'] = entities
13194 reply
= await self
.rpc(msg
)
13198 class MachineManagerFacade(Type
):
13199 name
= 'MachineManager'
13201 schema
= {'definitions': {'AddMachineParams': {'additionalProperties': False,
13202 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
13204 'constraints': {'$ref': '#/definitions/Value'},
13205 'container-type': {'type': 'string'},
13206 'disks': {'items': {'$ref': '#/definitions/Constraints'},
13208 'hardware-characteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
13209 'instance-id': {'type': 'string'},
13210 'jobs': {'items': {'type': 'string'},
13212 'nonce': {'type': 'string'},
13213 'parent-id': {'type': 'string'},
13214 'placement': {'$ref': '#/definitions/Placement'},
13215 'series': {'type': 'string'}},
13216 'required': ['series',
13223 'hardware-characteristics',
13226 'AddMachines': {'additionalProperties': False,
13227 'properties': {'params': {'items': {'$ref': '#/definitions/AddMachineParams'},
13229 'required': ['params'],
13231 'AddMachinesResult': {'additionalProperties': False,
13232 'properties': {'error': {'$ref': '#/definitions/Error'},
13233 'machine': {'type': 'string'}},
13234 'required': ['machine'],
13236 'AddMachinesResults': {'additionalProperties': False,
13237 'properties': {'machines': {'items': {'$ref': '#/definitions/AddMachinesResult'},
13239 'required': ['machines'],
13241 'Address': {'additionalProperties': False,
13242 'properties': {'scope': {'type': 'string'},
13243 'space-name': {'type': 'string'},
13244 'type': {'type': 'string'},
13245 'value': {'type': 'string'}},
13246 'required': ['value', 'type', 'scope'],
13248 'Constraints': {'additionalProperties': False,
13249 'properties': {'Count': {'type': 'integer'},
13250 'Pool': {'type': 'string'},
13251 'Size': {'type': 'integer'}},
13252 'required': ['Pool', 'Size', 'Count'],
13254 'Error': {'additionalProperties': False,
13255 'properties': {'code': {'type': 'string'},
13256 'info': {'$ref': '#/definitions/ErrorInfo'},
13257 'message': {'type': 'string'}},
13258 'required': ['message', 'code'],
13260 'ErrorInfo': {'additionalProperties': False,
13261 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
13262 'macaroon-path': {'type': 'string'}},
13264 'HardwareCharacteristics': {'additionalProperties': False,
13265 'properties': {'arch': {'type': 'string'},
13266 'availability-zone': {'type': 'string'},
13267 'cpu-cores': {'type': 'integer'},
13268 'cpu-power': {'type': 'integer'},
13269 'mem': {'type': 'integer'},
13270 'root-disk': {'type': 'integer'},
13271 'tags': {'items': {'type': 'string'},
13274 'Macaroon': {'additionalProperties': False, 'type': 'object'},
13275 'Placement': {'additionalProperties': False,
13276 'properties': {'directive': {'type': 'string'},
13277 'scope': {'type': 'string'}},
13278 'required': ['scope', 'directive'],
13280 'Value': {'additionalProperties': False,
13281 'properties': {'arch': {'type': 'string'},
13282 'container': {'type': 'string'},
13283 'cores': {'type': 'integer'},
13284 'cpu-power': {'type': 'integer'},
13285 'instance-type': {'type': 'string'},
13286 'mem': {'type': 'integer'},
13287 'root-disk': {'type': 'integer'},
13288 'spaces': {'items': {'type': 'string'},
13290 'tags': {'items': {'type': 'string'},
13292 'virt-type': {'type': 'string'}},
13293 'type': 'object'}},
13294 'properties': {'AddMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
13295 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
13296 'type': 'object'}},
13300 @ReturnMapping(AddMachinesResults
)
13301 async def AddMachines(self
, params
):
13303 params : typing.Sequence<+T_co>[~AddMachineParams]<~AddMachineParams>
13304 Returns -> typing.Sequence<+T_co>[~AddMachinesResult]<~AddMachinesResult>
13306 # map input types to rpc msg
13308 msg
= dict(type='MachineManager', request
='AddMachines', version
=2, params
=_params
)
13309 _params
['params'] = params
13310 reply
= await self
.rpc(msg
)
13314 class MachineUndertakerFacade(Type
):
13315 name
= 'MachineUndertaker'
13317 schema
= {'definitions': {'Entities': {'additionalProperties': False,
13318 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
13320 'required': ['entities'],
13322 'EntitiesResult': {'additionalProperties': False,
13323 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
13325 'error': {'$ref': '#/definitions/Error'}},
13326 'required': ['entities'],
13328 'EntitiesResults': {'additionalProperties': False,
13329 'properties': {'results': {'items': {'$ref': '#/definitions/EntitiesResult'},
13331 'required': ['results'],
13333 'Entity': {'additionalProperties': False,
13334 'properties': {'tag': {'type': 'string'}},
13335 'required': ['tag'],
13337 'Error': {'additionalProperties': False,
13338 'properties': {'code': {'type': 'string'},
13339 'info': {'$ref': '#/definitions/ErrorInfo'},
13340 'message': {'type': 'string'}},
13341 'required': ['message', 'code'],
13343 'ErrorInfo': {'additionalProperties': False,
13344 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
13345 'macaroon-path': {'type': 'string'}},
13347 'Macaroon': {'additionalProperties': False, 'type': 'object'},
13348 'NotifyWatchResult': {'additionalProperties': False,
13349 'properties': {'NotifyWatcherId': {'type': 'string'},
13350 'error': {'$ref': '#/definitions/Error'}},
13351 'required': ['NotifyWatcherId'],
13353 'NotifyWatchResults': {'additionalProperties': False,
13354 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
13356 'required': ['results'],
13358 'ProviderInterfaceInfo': {'additionalProperties': False,
13359 'properties': {'interface-name': {'type': 'string'},
13360 'mac-address': {'type': 'string'},
13361 'provider-id': {'type': 'string'}},
13362 'required': ['interface-name',
13366 'ProviderInterfaceInfoResult': {'additionalProperties': False,
13367 'properties': {'error': {'$ref': '#/definitions/Error'},
13368 'interfaces': {'items': {'$ref': '#/definitions/ProviderInterfaceInfo'},
13370 'machine-tag': {'type': 'string'}},
13371 'required': ['machine-tag',
13374 'ProviderInterfaceInfoResults': {'additionalProperties': False,
13375 'properties': {'results': {'items': {'$ref': '#/definitions/ProviderInterfaceInfoResult'},
13377 'required': ['results'],
13378 'type': 'object'}},
13379 'properties': {'AllMachineRemovals': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13380 'Result': {'$ref': '#/definitions/EntitiesResults'}},
13382 'CompleteMachineRemovals': {'properties': {'Params': {'$ref': '#/definitions/Entities'}},
13384 'GetMachineProviderInterfaceInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13385 'Result': {'$ref': '#/definitions/ProviderInterfaceInfoResults'}},
13387 'WatchMachineRemovals': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13388 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
13389 'type': 'object'}},
13393 @ReturnMapping(EntitiesResults
)
13394 async def AllMachineRemovals(self
, entities
):
13396 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13397 Returns -> typing.Sequence<+T_co>[~EntitiesResult]<~EntitiesResult>
13399 # map input types to rpc msg
13401 msg
= dict(type='MachineUndertaker', request
='AllMachineRemovals', version
=1, params
=_params
)
13402 _params
['entities'] = entities
13403 reply
= await self
.rpc(msg
)
13408 @ReturnMapping(None)
13409 async def CompleteMachineRemovals(self
, entities
):
13411 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13414 # map input types to rpc msg
13416 msg
= dict(type='MachineUndertaker', request
='CompleteMachineRemovals', version
=1, params
=_params
)
13417 _params
['entities'] = entities
13418 reply
= await self
.rpc(msg
)
13423 @ReturnMapping(ProviderInterfaceInfoResults
)
13424 async def GetMachineProviderInterfaceInfo(self
, entities
):
13426 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13427 Returns -> typing.Sequence<+T_co>[~ProviderInterfaceInfoResult]<~ProviderInterfaceInfoResult>
13429 # map input types to rpc msg
13431 msg
= dict(type='MachineUndertaker', request
='GetMachineProviderInterfaceInfo', version
=1, params
=_params
)
13432 _params
['entities'] = entities
13433 reply
= await self
.rpc(msg
)
13438 @ReturnMapping(NotifyWatchResults
)
13439 async def WatchMachineRemovals(self
, entities
):
13441 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13442 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
13444 # map input types to rpc msg
13446 msg
= dict(type='MachineUndertaker', request
='WatchMachineRemovals', version
=1, params
=_params
)
13447 _params
['entities'] = entities
13448 reply
= await self
.rpc(msg
)
13452 class MachinerFacade(Type
):
13455 schema
= {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
13456 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
13459 'required': ['servers'],
13461 'Address': {'additionalProperties': False,
13462 'properties': {'scope': {'type': 'string'},
13463 'space-name': {'type': 'string'},
13464 'type': {'type': 'string'},
13465 'value': {'type': 'string'}},
13466 'required': ['value', 'type', 'scope'],
13468 'BytesResult': {'additionalProperties': False,
13469 'properties': {'result': {'items': {'type': 'integer'},
13471 'required': ['result'],
13473 'Entities': {'additionalProperties': False,
13474 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
13476 'required': ['entities'],
13478 'Entity': {'additionalProperties': False,
13479 'properties': {'tag': {'type': 'string'}},
13480 'required': ['tag'],
13482 'EntityStatusArgs': {'additionalProperties': False,
13483 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
13484 'type': 'object'}},
13486 'info': {'type': 'string'},
13487 'status': {'type': 'string'},
13488 'tag': {'type': 'string'}},
13489 'required': ['tag',
13494 'Error': {'additionalProperties': False,
13495 'properties': {'code': {'type': 'string'},
13496 'info': {'$ref': '#/definitions/ErrorInfo'},
13497 'message': {'type': 'string'}},
13498 'required': ['message', 'code'],
13500 'ErrorInfo': {'additionalProperties': False,
13501 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
13502 'macaroon-path': {'type': 'string'}},
13504 'ErrorResult': {'additionalProperties': False,
13505 'properties': {'error': {'$ref': '#/definitions/Error'}},
13507 'ErrorResults': {'additionalProperties': False,
13508 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
13510 'required': ['results'],
13512 'HostPort': {'additionalProperties': False,
13513 'properties': {'Address': {'$ref': '#/definitions/Address'},
13514 'port': {'type': 'integer'}},
13515 'required': ['Address', 'port'],
13517 'JobsResult': {'additionalProperties': False,
13518 'properties': {'error': {'$ref': '#/definitions/Error'},
13519 'jobs': {'items': {'type': 'string'},
13521 'required': ['jobs'],
13523 'JobsResults': {'additionalProperties': False,
13524 'properties': {'results': {'items': {'$ref': '#/definitions/JobsResult'},
13526 'required': ['results'],
13528 'LifeResult': {'additionalProperties': False,
13529 'properties': {'error': {'$ref': '#/definitions/Error'},
13530 'life': {'type': 'string'}},
13531 'required': ['life'],
13533 'LifeResults': {'additionalProperties': False,
13534 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
13536 'required': ['results'],
13538 'Macaroon': {'additionalProperties': False, 'type': 'object'},
13539 'MachineAddresses': {'additionalProperties': False,
13540 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
13542 'tag': {'type': 'string'}},
13543 'required': ['tag', 'addresses'],
13545 'NetworkConfig': {'additionalProperties': False,
13546 'properties': {'address': {'type': 'string'},
13547 'cidr': {'type': 'string'},
13548 'config-type': {'type': 'string'},
13549 'device-index': {'type': 'integer'},
13550 'disabled': {'type': 'boolean'},
13551 'dns-search-domains': {'items': {'type': 'string'},
13553 'dns-servers': {'items': {'type': 'string'},
13555 'gateway-address': {'type': 'string'},
13556 'interface-name': {'type': 'string'},
13557 'interface-type': {'type': 'string'},
13558 'mac-address': {'type': 'string'},
13559 'mtu': {'type': 'integer'},
13560 'no-auto-start': {'type': 'boolean'},
13561 'parent-interface-name': {'type': 'string'},
13562 'provider-address-id': {'type': 'string'},
13563 'provider-id': {'type': 'string'},
13564 'provider-space-id': {'type': 'string'},
13565 'provider-subnet-id': {'type': 'string'},
13566 'provider-vlan-id': {'type': 'string'},
13567 'vlan-tag': {'type': 'integer'}},
13568 'required': ['device-index',
13573 'provider-subnet-id',
13574 'provider-space-id',
13575 'provider-address-id',
13576 'provider-vlan-id',
13579 'parent-interface-name',
13583 'NotifyWatchResult': {'additionalProperties': False,
13584 'properties': {'NotifyWatcherId': {'type': 'string'},
13585 'error': {'$ref': '#/definitions/Error'}},
13586 'required': ['NotifyWatcherId'],
13588 'NotifyWatchResults': {'additionalProperties': False,
13589 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
13591 'required': ['results'],
13593 'SetMachineNetworkConfig': {'additionalProperties': False,
13594 'properties': {'config': {'items': {'$ref': '#/definitions/NetworkConfig'},
13596 'tag': {'type': 'string'}},
13597 'required': ['tag', 'config'],
13599 'SetMachinesAddresses': {'additionalProperties': False,
13600 'properties': {'machine-addresses': {'items': {'$ref': '#/definitions/MachineAddresses'},
13602 'required': ['machine-addresses'],
13604 'SetStatus': {'additionalProperties': False,
13605 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
13607 'required': ['entities'],
13609 'StringResult': {'additionalProperties': False,
13610 'properties': {'error': {'$ref': '#/definitions/Error'},
13611 'result': {'type': 'string'}},
13612 'required': ['result'],
13614 'StringsResult': {'additionalProperties': False,
13615 'properties': {'error': {'$ref': '#/definitions/Error'},
13616 'result': {'items': {'type': 'string'},
13618 'type': 'object'}},
13619 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
13621 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
13623 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
13625 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13626 'Result': {'$ref': '#/definitions/ErrorResults'}},
13628 'Jobs': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13629 'Result': {'$ref': '#/definitions/JobsResults'}},
13631 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13632 'Result': {'$ref': '#/definitions/LifeResults'}},
13634 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
13636 'SetMachineAddresses': {'properties': {'Params': {'$ref': '#/definitions/SetMachinesAddresses'},
13637 'Result': {'$ref': '#/definitions/ErrorResults'}},
13639 'SetObservedNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/SetMachineNetworkConfig'}},
13641 'SetProviderNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13642 'Result': {'$ref': '#/definitions/ErrorResults'}},
13644 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
13645 'Result': {'$ref': '#/definitions/ErrorResults'}},
13647 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
13648 'Result': {'$ref': '#/definitions/ErrorResults'}},
13650 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13651 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
13653 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
13654 'type': 'object'}},
13658 @ReturnMapping(StringsResult
)
13659 async def APIAddresses(self
):
13662 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[str]]
13664 # map input types to rpc msg
13666 msg
= dict(type='Machiner', request
='APIAddresses', version
=1, params
=_params
)
13668 reply
= await self
.rpc(msg
)
13673 @ReturnMapping(APIHostPortsResult
)
13674 async def APIHostPorts(self
):
13677 Returns -> typing.Sequence<+T_co>[~HostPort]<~HostPort>
13679 # map input types to rpc msg
13681 msg
= dict(type='Machiner', request
='APIHostPorts', version
=1, params
=_params
)
13683 reply
= await self
.rpc(msg
)
13688 @ReturnMapping(BytesResult
)
13689 async def CACert(self
):
13692 Returns -> typing.Sequence<+T_co>[int]
13694 # map input types to rpc msg
13696 msg
= dict(type='Machiner', request
='CACert', version
=1, params
=_params
)
13698 reply
= await self
.rpc(msg
)
13703 @ReturnMapping(ErrorResults
)
13704 async def EnsureDead(self
, entities
):
13706 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13707 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
13709 # map input types to rpc msg
13711 msg
= dict(type='Machiner', request
='EnsureDead', version
=1, params
=_params
)
13712 _params
['entities'] = entities
13713 reply
= await self
.rpc(msg
)
13718 @ReturnMapping(JobsResults
)
13719 async def Jobs(self
, entities
):
13721 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13722 Returns -> typing.Sequence<+T_co>[~JobsResult]<~JobsResult>
13724 # map input types to rpc msg
13726 msg
= dict(type='Machiner', request
='Jobs', version
=1, params
=_params
)
13727 _params
['entities'] = entities
13728 reply
= await self
.rpc(msg
)
13733 @ReturnMapping(LifeResults
)
13734 async def Life(self
, entities
):
13736 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13737 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
13739 # map input types to rpc msg
13741 msg
= dict(type='Machiner', request
='Life', version
=1, params
=_params
)
13742 _params
['entities'] = entities
13743 reply
= await self
.rpc(msg
)
13748 @ReturnMapping(StringResult
)
13749 async def ModelUUID(self
):
13752 Returns -> typing.Union[_ForwardRef('Error'), str]
13754 # map input types to rpc msg
13756 msg
= dict(type='Machiner', request
='ModelUUID', version
=1, params
=_params
)
13758 reply
= await self
.rpc(msg
)
13763 @ReturnMapping(ErrorResults
)
13764 async def SetMachineAddresses(self
, machine_addresses
):
13766 machine_addresses : typing.Sequence<+T_co>[~MachineAddresses]<~MachineAddresses>
13767 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
13769 # map input types to rpc msg
13771 msg
= dict(type='Machiner', request
='SetMachineAddresses', version
=1, params
=_params
)
13772 _params
['machine-addresses'] = machine_addresses
13773 reply
= await self
.rpc(msg
)
13778 @ReturnMapping(None)
13779 async def SetObservedNetworkConfig(self
, config
, tag
):
13781 config : typing.Sequence<+T_co>[~NetworkConfig]<~NetworkConfig>
13785 # map input types to rpc msg
13787 msg
= dict(type='Machiner', request
='SetObservedNetworkConfig', version
=1, params
=_params
)
13788 _params
['config'] = config
13789 _params
['tag'] = tag
13790 reply
= await self
.rpc(msg
)
13795 @ReturnMapping(ErrorResults
)
13796 async def SetProviderNetworkConfig(self
, entities
):
13798 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13799 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
13801 # map input types to rpc msg
13803 msg
= dict(type='Machiner', request
='SetProviderNetworkConfig', version
=1, params
=_params
)
13804 _params
['entities'] = entities
13805 reply
= await self
.rpc(msg
)
13810 @ReturnMapping(ErrorResults
)
13811 async def SetStatus(self
, entities
):
13813 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
13814 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
13816 # map input types to rpc msg
13818 msg
= dict(type='Machiner', request
='SetStatus', version
=1, params
=_params
)
13819 _params
['entities'] = entities
13820 reply
= await self
.rpc(msg
)
13825 @ReturnMapping(ErrorResults
)
13826 async def UpdateStatus(self
, entities
):
13828 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
13829 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
13831 # map input types to rpc msg
13833 msg
= dict(type='Machiner', request
='UpdateStatus', version
=1, params
=_params
)
13834 _params
['entities'] = entities
13835 reply
= await self
.rpc(msg
)
13840 @ReturnMapping(NotifyWatchResults
)
13841 async def Watch(self
, entities
):
13843 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13844 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
13846 # map input types to rpc msg
13848 msg
= dict(type='Machiner', request
='Watch', version
=1, params
=_params
)
13849 _params
['entities'] = entities
13850 reply
= await self
.rpc(msg
)
13855 @ReturnMapping(NotifyWatchResult
)
13856 async def WatchAPIHostPorts(self
):
13859 Returns -> typing.Union[str, _ForwardRef('Error')]
13861 # map input types to rpc msg
13863 msg
= dict(type='Machiner', request
='WatchAPIHostPorts', version
=1, params
=_params
)
13865 reply
= await self
.rpc(msg
)
13869 class MeterStatusFacade(Type
):
13870 name
= 'MeterStatus'
13872 schema
= {'definitions': {'Entities': {'additionalProperties': False,
13873 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
13875 'required': ['entities'],
13877 'Entity': {'additionalProperties': False,
13878 'properties': {'tag': {'type': 'string'}},
13879 'required': ['tag'],
13881 'Error': {'additionalProperties': False,
13882 'properties': {'code': {'type': 'string'},
13883 'info': {'$ref': '#/definitions/ErrorInfo'},
13884 'message': {'type': 'string'}},
13885 'required': ['message', 'code'],
13887 'ErrorInfo': {'additionalProperties': False,
13888 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
13889 'macaroon-path': {'type': 'string'}},
13891 'Macaroon': {'additionalProperties': False, 'type': 'object'},
13892 'MeterStatusResult': {'additionalProperties': False,
13893 'properties': {'code': {'type': 'string'},
13894 'error': {'$ref': '#/definitions/Error'},
13895 'info': {'type': 'string'}},
13896 'required': ['code', 'info'],
13898 'MeterStatusResults': {'additionalProperties': False,
13899 'properties': {'results': {'items': {'$ref': '#/definitions/MeterStatusResult'},
13901 'required': ['results'],
13903 'NotifyWatchResult': {'additionalProperties': False,
13904 'properties': {'NotifyWatcherId': {'type': 'string'},
13905 'error': {'$ref': '#/definitions/Error'}},
13906 'required': ['NotifyWatcherId'],
13908 'NotifyWatchResults': {'additionalProperties': False,
13909 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
13911 'required': ['results'],
13912 'type': 'object'}},
13913 'properties': {'GetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13914 'Result': {'$ref': '#/definitions/MeterStatusResults'}},
13916 'WatchMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13917 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
13918 'type': 'object'}},
13922 @ReturnMapping(MeterStatusResults
)
13923 async def GetMeterStatus(self
, entities
):
13925 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13926 Returns -> typing.Sequence<+T_co>[~MeterStatusResult]<~MeterStatusResult>
13928 # map input types to rpc msg
13930 msg
= dict(type='MeterStatus', request
='GetMeterStatus', version
=1, params
=_params
)
13931 _params
['entities'] = entities
13932 reply
= await self
.rpc(msg
)
13937 @ReturnMapping(NotifyWatchResults
)
13938 async def WatchMeterStatus(self
, entities
):
13940 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13941 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
13943 # map input types to rpc msg
13945 msg
= dict(type='MeterStatus', request
='WatchMeterStatus', version
=1, params
=_params
)
13946 _params
['entities'] = entities
13947 reply
= await self
.rpc(msg
)
13951 class MetricsAdderFacade(Type
):
13952 name
= 'MetricsAdder'
13954 schema
= {'definitions': {'Error': {'additionalProperties': False,
13955 'properties': {'code': {'type': 'string'},
13956 'info': {'$ref': '#/definitions/ErrorInfo'},
13957 'message': {'type': 'string'}},
13958 'required': ['message', 'code'],
13960 'ErrorInfo': {'additionalProperties': False,
13961 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
13962 'macaroon-path': {'type': 'string'}},
13964 'ErrorResult': {'additionalProperties': False,
13965 'properties': {'error': {'$ref': '#/definitions/Error'}},
13967 'ErrorResults': {'additionalProperties': False,
13968 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
13970 'required': ['results'],
13972 'Macaroon': {'additionalProperties': False, 'type': 'object'},
13973 'Metric': {'additionalProperties': False,
13974 'properties': {'key': {'type': 'string'},
13975 'time': {'format': 'date-time',
13977 'value': {'type': 'string'}},
13978 'required': ['key', 'value', 'time'],
13980 'MetricBatch': {'additionalProperties': False,
13981 'properties': {'charm-url': {'type': 'string'},
13982 'created': {'format': 'date-time',
13984 'metrics': {'items': {'$ref': '#/definitions/Metric'},
13986 'uuid': {'type': 'string'}},
13987 'required': ['uuid',
13992 'MetricBatchParam': {'additionalProperties': False,
13993 'properties': {'batch': {'$ref': '#/definitions/MetricBatch'},
13994 'tag': {'type': 'string'}},
13995 'required': ['tag', 'batch'],
13997 'MetricBatchParams': {'additionalProperties': False,
13998 'properties': {'batches': {'items': {'$ref': '#/definitions/MetricBatchParam'},
14000 'required': ['batches'],
14001 'type': 'object'}},
14002 'properties': {'AddMetricBatches': {'properties': {'Params': {'$ref': '#/definitions/MetricBatchParams'},
14003 'Result': {'$ref': '#/definitions/ErrorResults'}},
14004 'type': 'object'}},
14008 @ReturnMapping(ErrorResults
)
14009 async def AddMetricBatches(self
, batches
):
14011 batches : typing.Sequence<+T_co>[~MetricBatchParam]<~MetricBatchParam>
14012 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
14014 # map input types to rpc msg
14016 msg
= dict(type='MetricsAdder', request
='AddMetricBatches', version
=2, params
=_params
)
14017 _params
['batches'] = batches
14018 reply
= await self
.rpc(msg
)
14022 class MetricsDebugFacade(Type
):
14023 name
= 'MetricsDebug'
14025 schema
= {'definitions': {'Entities': {'additionalProperties': False,
14026 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
14028 'required': ['entities'],
14030 'Entity': {'additionalProperties': False,
14031 'properties': {'tag': {'type': 'string'}},
14032 'required': ['tag'],
14034 'EntityMetrics': {'additionalProperties': False,
14035 'properties': {'error': {'$ref': '#/definitions/Error'},
14036 'metrics': {'items': {'$ref': '#/definitions/MetricResult'},
14039 'Error': {'additionalProperties': False,
14040 'properties': {'code': {'type': 'string'},
14041 'info': {'$ref': '#/definitions/ErrorInfo'},
14042 'message': {'type': 'string'}},
14043 'required': ['message', 'code'],
14045 'ErrorInfo': {'additionalProperties': False,
14046 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
14047 'macaroon-path': {'type': 'string'}},
14049 'ErrorResult': {'additionalProperties': False,
14050 'properties': {'error': {'$ref': '#/definitions/Error'}},
14052 'ErrorResults': {'additionalProperties': False,
14053 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
14055 'required': ['results'],
14057 'Macaroon': {'additionalProperties': False, 'type': 'object'},
14058 'MeterStatusParam': {'additionalProperties': False,
14059 'properties': {'code': {'type': 'string'},
14060 'info': {'type': 'string'},
14061 'tag': {'type': 'string'}},
14062 'required': ['tag', 'code', 'info'],
14064 'MeterStatusParams': {'additionalProperties': False,
14065 'properties': {'statues': {'items': {'$ref': '#/definitions/MeterStatusParam'},
14067 'required': ['statues'],
14069 'MetricResult': {'additionalProperties': False,
14070 'properties': {'key': {'type': 'string'},
14071 'time': {'format': 'date-time',
14073 'unit': {'type': 'string'},
14074 'value': {'type': 'string'}},
14075 'required': ['time', 'key', 'value', 'unit'],
14077 'MetricResults': {'additionalProperties': False,
14078 'properties': {'results': {'items': {'$ref': '#/definitions/EntityMetrics'},
14080 'required': ['results'],
14081 'type': 'object'}},
14082 'properties': {'GetMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14083 'Result': {'$ref': '#/definitions/MetricResults'}},
14085 'SetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/MeterStatusParams'},
14086 'Result': {'$ref': '#/definitions/ErrorResults'}},
14087 'type': 'object'}},
14091 @ReturnMapping(MetricResults
)
14092 async def GetMetrics(self
, entities
):
14094 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
14095 Returns -> typing.Sequence<+T_co>[~EntityMetrics]<~EntityMetrics>
14097 # map input types to rpc msg
14099 msg
= dict(type='MetricsDebug', request
='GetMetrics', version
=2, params
=_params
)
14100 _params
['entities'] = entities
14101 reply
= await self
.rpc(msg
)
14106 @ReturnMapping(ErrorResults
)
14107 async def SetMeterStatus(self
, statues
):
14109 statues : typing.Sequence<+T_co>[~MeterStatusParam]<~MeterStatusParam>
14110 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
14112 # map input types to rpc msg
14114 msg
= dict(type='MetricsDebug', request
='SetMeterStatus', version
=2, params
=_params
)
14115 _params
['statues'] = statues
14116 reply
= await self
.rpc(msg
)
14120 class MetricsManagerFacade(Type
):
14121 name
= 'MetricsManager'
14123 schema
= {'definitions': {'Entities': {'additionalProperties': False,
14124 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
14126 'required': ['entities'],
14128 'Entity': {'additionalProperties': False,
14129 'properties': {'tag': {'type': 'string'}},
14130 'required': ['tag'],
14132 'Error': {'additionalProperties': False,
14133 'properties': {'code': {'type': 'string'},
14134 'info': {'$ref': '#/definitions/ErrorInfo'},
14135 'message': {'type': 'string'}},
14136 'required': ['message', 'code'],
14138 'ErrorInfo': {'additionalProperties': False,
14139 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
14140 'macaroon-path': {'type': 'string'}},
14142 'ErrorResult': {'additionalProperties': False,
14143 'properties': {'error': {'$ref': '#/definitions/Error'}},
14145 'ErrorResults': {'additionalProperties': False,
14146 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
14148 'required': ['results'],
14150 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
14151 'properties': {'CleanupOldMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14152 'Result': {'$ref': '#/definitions/ErrorResults'}},
14154 'SendMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14155 'Result': {'$ref': '#/definitions/ErrorResults'}},
14156 'type': 'object'}},
14160 @ReturnMapping(ErrorResults
)
14161 async def CleanupOldMetrics(self
, entities
):
14163 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
14164 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
14166 # map input types to rpc msg
14168 msg
= dict(type='MetricsManager', request
='CleanupOldMetrics', version
=1, params
=_params
)
14169 _params
['entities'] = entities
14170 reply
= await self
.rpc(msg
)
14175 @ReturnMapping(ErrorResults
)
14176 async def SendMetrics(self
, entities
):
14178 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
14179 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
14181 # map input types to rpc msg
14183 msg
= dict(type='MetricsManager', request
='SendMetrics', version
=1, params
=_params
)
14184 _params
['entities'] = entities
14185 reply
= await self
.rpc(msg
)
14189 class MigrationFlagFacade(Type
):
14190 name
= 'MigrationFlag'
14192 schema
= {'definitions': {'Entities': {'additionalProperties': False,
14193 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
14195 'required': ['entities'],
14197 'Entity': {'additionalProperties': False,
14198 'properties': {'tag': {'type': 'string'}},
14199 'required': ['tag'],
14201 'Error': {'additionalProperties': False,
14202 'properties': {'code': {'type': 'string'},
14203 'info': {'$ref': '#/definitions/ErrorInfo'},
14204 'message': {'type': 'string'}},
14205 'required': ['message', 'code'],
14207 'ErrorInfo': {'additionalProperties': False,
14208 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
14209 'macaroon-path': {'type': 'string'}},
14211 'Macaroon': {'additionalProperties': False, 'type': 'object'},
14212 'NotifyWatchResult': {'additionalProperties': False,
14213 'properties': {'NotifyWatcherId': {'type': 'string'},
14214 'error': {'$ref': '#/definitions/Error'}},
14215 'required': ['NotifyWatcherId'],
14217 'NotifyWatchResults': {'additionalProperties': False,
14218 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
14220 'required': ['results'],
14222 'PhaseResult': {'additionalProperties': False,
14223 'properties': {'error': {'$ref': '#/definitions/Error'},
14224 'phase': {'type': 'string'}},
14226 'PhaseResults': {'additionalProperties': False,
14227 'properties': {'results': {'items': {'$ref': '#/definitions/PhaseResult'},
14229 'required': ['results'],
14230 'type': 'object'}},
14231 'properties': {'Phase': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14232 'Result': {'$ref': '#/definitions/PhaseResults'}},
14234 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14235 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
14236 'type': 'object'}},
14240 @ReturnMapping(PhaseResults
)
14241 async def Phase(self
, entities
):
14243 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
14244 Returns -> typing.Sequence<+T_co>[~PhaseResult]<~PhaseResult>
14246 # map input types to rpc msg
14248 msg
= dict(type='MigrationFlag', request
='Phase', version
=1, params
=_params
)
14249 _params
['entities'] = entities
14250 reply
= await self
.rpc(msg
)
14255 @ReturnMapping(NotifyWatchResults
)
14256 async def Watch(self
, entities
):
14258 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
14259 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
14261 # map input types to rpc msg
14263 msg
= dict(type='MigrationFlag', request
='Watch', version
=1, params
=_params
)
14264 _params
['entities'] = entities
14265 reply
= await self
.rpc(msg
)
14269 class MigrationMasterFacade(Type
):
14270 name
= 'MigrationMaster'
14272 schema
= {'definitions': {'Error': {'additionalProperties': False,
14273 'properties': {'code': {'type': 'string'},
14274 'info': {'$ref': '#/definitions/ErrorInfo'},
14275 'message': {'type': 'string'}},
14276 'required': ['message', 'code'],
14278 'ErrorInfo': {'additionalProperties': False,
14279 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
14280 'macaroon-path': {'type': 'string'}},
14282 'Macaroon': {'additionalProperties': False, 'type': 'object'},
14283 'MasterMigrationStatus': {'additionalProperties': False,
14284 'properties': {'migration-id': {'type': 'string'},
14285 'phase': {'type': 'string'},
14286 'phase-changed-time': {'format': 'date-time',
14288 'spec': {'$ref': '#/definitions/MigrationSpec'}},
14289 'required': ['spec',
14292 'phase-changed-time'],
14294 'MigrationModelInfo': {'additionalProperties': False,
14295 'properties': {'agent-version': {'$ref': '#/definitions/Number'},
14296 'name': {'type': 'string'},
14297 'owner-tag': {'type': 'string'},
14298 'uuid': {'type': 'string'}},
14299 'required': ['uuid',
14304 'MigrationSpec': {'additionalProperties': False,
14305 'properties': {'external-control': {'type': 'boolean'},
14306 'model-tag': {'type': 'string'},
14307 'skip-initial-prechecks': {'type': 'boolean'},
14308 'target-info': {'$ref': '#/definitions/MigrationTargetInfo'}},
14309 'required': ['model-tag',
14311 'external-control',
14312 'skip-initial-prechecks'],
14314 'MigrationTargetInfo': {'additionalProperties': False,
14315 'properties': {'addrs': {'items': {'type': 'string'},
14317 'auth-tag': {'type': 'string'},
14318 'ca-cert': {'type': 'string'},
14319 'controller-tag': {'type': 'string'},
14320 'macaroons': {'type': 'string'},
14321 'password': {'type': 'string'}},
14322 'required': ['controller-tag',
14327 'MinionReports': {'additionalProperties': False,
14328 'properties': {'failed': {'items': {'type': 'string'},
14330 'migration-id': {'type': 'string'},
14331 'phase': {'type': 'string'},
14332 'success-count': {'type': 'integer'},
14333 'unknown-count': {'type': 'integer'},
14334 'unknown-sample': {'items': {'type': 'string'},
14336 'required': ['migration-id',
14343 'NotifyWatchResult': {'additionalProperties': False,
14344 'properties': {'NotifyWatcherId': {'type': 'string'},
14345 'error': {'$ref': '#/definitions/Error'}},
14346 'required': ['NotifyWatcherId'],
14348 'Number': {'additionalProperties': False,
14349 'properties': {'Build': {'type': 'integer'},
14350 'Major': {'type': 'integer'},
14351 'Minor': {'type': 'integer'},
14352 'Patch': {'type': 'integer'},
14353 'Tag': {'type': 'string'}},
14354 'required': ['Major',
14360 'SerializedModel': {'additionalProperties': False,
14361 'properties': {'bytes': {'items': {'type': 'integer'},
14363 'charms': {'items': {'type': 'string'},
14365 'tools': {'items': {'$ref': '#/definitions/SerializedModelTools'},
14367 'required': ['bytes', 'charms', 'tools'],
14369 'SerializedModelTools': {'additionalProperties': False,
14370 'properties': {'uri': {'type': 'string'},
14371 'version': {'type': 'string'}},
14372 'required': ['version', 'uri'],
14374 'SetMigrationPhaseArgs': {'additionalProperties': False,
14375 'properties': {'phase': {'type': 'string'}},
14376 'required': ['phase'],
14378 'SetMigrationStatusMessageArgs': {'additionalProperties': False,
14379 'properties': {'message': {'type': 'string'}},
14380 'required': ['message'],
14381 'type': 'object'}},
14382 'properties': {'Export': {'properties': {'Result': {'$ref': '#/definitions/SerializedModel'}},
14384 'MigrationStatus': {'properties': {'Result': {'$ref': '#/definitions/MasterMigrationStatus'}},
14386 'MinionReports': {'properties': {'Result': {'$ref': '#/definitions/MinionReports'}},
14388 'ModelInfo': {'properties': {'Result': {'$ref': '#/definitions/MigrationModelInfo'}},
14390 'Prechecks': {'type': 'object'},
14391 'Reap': {'type': 'object'},
14392 'SetPhase': {'properties': {'Params': {'$ref': '#/definitions/SetMigrationPhaseArgs'}},
14394 'SetStatusMessage': {'properties': {'Params': {'$ref': '#/definitions/SetMigrationStatusMessageArgs'}},
14396 'Watch': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
14398 'WatchMinionReports': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
14399 'type': 'object'}},
14403 @ReturnMapping(SerializedModel
)
14404 async def Export(self
):
14407 Returns -> typing.Sequence<+T_co>[~SerializedModelTools]<~SerializedModelTools>
14409 # map input types to rpc msg
14411 msg
= dict(type='MigrationMaster', request
='Export', version
=1, params
=_params
)
14413 reply
= await self
.rpc(msg
)
14418 @ReturnMapping(MasterMigrationStatus
)
14419 async def MigrationStatus(self
):
14422 Returns -> typing.Union[str, _ForwardRef('MigrationSpec')]
14424 # map input types to rpc msg
14426 msg
= dict(type='MigrationMaster', request
='MigrationStatus', version
=1, params
=_params
)
14428 reply
= await self
.rpc(msg
)
14433 @ReturnMapping(MinionReports
)
14434 async def MinionReports(self
):
14437 Returns -> typing.Union[typing.Sequence<+T_co>[str], int]
14439 # map input types to rpc msg
14441 msg
= dict(type='MigrationMaster', request
='MinionReports', version
=1, params
=_params
)
14443 reply
= await self
.rpc(msg
)
14448 @ReturnMapping(MigrationModelInfo
)
14449 async def ModelInfo(self
):
14452 Returns -> typing.Union[_ForwardRef('Number'), str]
14454 # map input types to rpc msg
14456 msg
= dict(type='MigrationMaster', request
='ModelInfo', version
=1, params
=_params
)
14458 reply
= await self
.rpc(msg
)
14463 @ReturnMapping(None)
14464 async def Prechecks(self
):
14469 # map input types to rpc msg
14471 msg
= dict(type='MigrationMaster', request
='Prechecks', version
=1, params
=_params
)
14473 reply
= await self
.rpc(msg
)
14478 @ReturnMapping(None)
14479 async def Reap(self
):
14484 # map input types to rpc msg
14486 msg
= dict(type='MigrationMaster', request
='Reap', version
=1, params
=_params
)
14488 reply
= await self
.rpc(msg
)
14493 @ReturnMapping(None)
14494 async def SetPhase(self
, phase
):
14499 # map input types to rpc msg
14501 msg
= dict(type='MigrationMaster', request
='SetPhase', version
=1, params
=_params
)
14502 _params
['phase'] = phase
14503 reply
= await self
.rpc(msg
)
14508 @ReturnMapping(None)
14509 async def SetStatusMessage(self
, message
):
14514 # map input types to rpc msg
14516 msg
= dict(type='MigrationMaster', request
='SetStatusMessage', version
=1, params
=_params
)
14517 _params
['message'] = message
14518 reply
= await self
.rpc(msg
)
14523 @ReturnMapping(NotifyWatchResult
)
14524 async def Watch(self
):
14527 Returns -> typing.Union[str, _ForwardRef('Error')]
14529 # map input types to rpc msg
14531 msg
= dict(type='MigrationMaster', request
='Watch', version
=1, params
=_params
)
14533 reply
= await self
.rpc(msg
)
14538 @ReturnMapping(NotifyWatchResult
)
14539 async def WatchMinionReports(self
):
14542 Returns -> typing.Union[str, _ForwardRef('Error')]
14544 # map input types to rpc msg
14546 msg
= dict(type='MigrationMaster', request
='WatchMinionReports', version
=1, params
=_params
)
14548 reply
= await self
.rpc(msg
)
14552 class MigrationMinionFacade(Type
):
14553 name
= 'MigrationMinion'
14555 schema
= {'definitions': {'Error': {'additionalProperties': False,
14556 'properties': {'code': {'type': 'string'},
14557 'info': {'$ref': '#/definitions/ErrorInfo'},
14558 'message': {'type': 'string'}},
14559 'required': ['message', 'code'],
14561 'ErrorInfo': {'additionalProperties': False,
14562 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
14563 'macaroon-path': {'type': 'string'}},
14565 'Macaroon': {'additionalProperties': False, 'type': 'object'},
14566 'MinionReport': {'additionalProperties': False,
14567 'properties': {'migration-id': {'type': 'string'},
14568 'phase': {'type': 'string'},
14569 'success': {'type': 'boolean'}},
14570 'required': ['migration-id',
14574 'NotifyWatchResult': {'additionalProperties': False,
14575 'properties': {'NotifyWatcherId': {'type': 'string'},
14576 'error': {'$ref': '#/definitions/Error'}},
14577 'required': ['NotifyWatcherId'],
14578 'type': 'object'}},
14579 'properties': {'Report': {'properties': {'Params': {'$ref': '#/definitions/MinionReport'}},
14581 'Watch': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
14582 'type': 'object'}},
14586 @ReturnMapping(None)
14587 async def Report(self
, migration_id
, phase
, success
):
14594 # map input types to rpc msg
14596 msg
= dict(type='MigrationMinion', request
='Report', version
=1, params
=_params
)
14597 _params
['migration-id'] = migration_id
14598 _params
['phase'] = phase
14599 _params
['success'] = success
14600 reply
= await self
.rpc(msg
)
14605 @ReturnMapping(NotifyWatchResult
)
14606 async def Watch(self
):
14609 Returns -> typing.Union[str, _ForwardRef('Error')]
14611 # map input types to rpc msg
14613 msg
= dict(type='MigrationMinion', request
='Watch', version
=1, params
=_params
)
14615 reply
= await self
.rpc(msg
)
14619 class MigrationStatusWatcherFacade(Type
):
14620 name
= 'MigrationStatusWatcher'
14622 schema
= {'definitions': {'MigrationStatus': {'additionalProperties': False,
14623 'properties': {'attempt': {'type': 'integer'},
14624 'external-control': {'type': 'boolean'},
14625 'migration-id': {'type': 'string'},
14626 'phase': {'type': 'string'},
14627 'source-api-addrs': {'items': {'type': 'string'},
14629 'source-ca-cert': {'type': 'string'},
14630 'target-api-addrs': {'items': {'type': 'string'},
14632 'target-ca-cert': {'type': 'string'}},
14633 'required': ['migration-id',
14636 'external-control',
14637 'source-api-addrs',
14639 'target-api-addrs',
14641 'type': 'object'}},
14642 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MigrationStatus'}},
14644 'Stop': {'type': 'object'}},
14648 @ReturnMapping(MigrationStatus
)
14649 async def Next(self
):
14652 Returns -> typing.Union[int, typing.Sequence<+T_co>[str]]
14654 # map input types to rpc msg
14656 msg
= dict(type='MigrationStatusWatcher', request
='Next', version
=1, params
=_params
)
14658 reply
= await self
.rpc(msg
)
14663 @ReturnMapping(None)
14664 async def Stop(self
):
14669 # map input types to rpc msg
14671 msg
= dict(type='MigrationStatusWatcher', request
='Stop', version
=1, params
=_params
)
14673 reply
= await self
.rpc(msg
)
14677 class MigrationTargetFacade(Type
):
14678 name
= 'MigrationTarget'
14680 schema
= {'definitions': {'MigrationModelInfo': {'additionalProperties': False,
14681 'properties': {'agent-version': {'$ref': '#/definitions/Number'},
14682 'name': {'type': 'string'},
14683 'owner-tag': {'type': 'string'},
14684 'uuid': {'type': 'string'}},
14685 'required': ['uuid',
14690 'ModelArgs': {'additionalProperties': False,
14691 'properties': {'model-tag': {'type': 'string'}},
14692 'required': ['model-tag'],
14694 'Number': {'additionalProperties': False,
14695 'properties': {'Build': {'type': 'integer'},
14696 'Major': {'type': 'integer'},
14697 'Minor': {'type': 'integer'},
14698 'Patch': {'type': 'integer'},
14699 'Tag': {'type': 'string'}},
14700 'required': ['Major',
14706 'SerializedModel': {'additionalProperties': False,
14707 'properties': {'bytes': {'items': {'type': 'integer'},
14709 'charms': {'items': {'type': 'string'},
14711 'tools': {'items': {'$ref': '#/definitions/SerializedModelTools'},
14713 'required': ['bytes', 'charms', 'tools'],
14715 'SerializedModelTools': {'additionalProperties': False,
14716 'properties': {'uri': {'type': 'string'},
14717 'version': {'type': 'string'}},
14718 'required': ['version', 'uri'],
14719 'type': 'object'}},
14720 'properties': {'Abort': {'properties': {'Params': {'$ref': '#/definitions/ModelArgs'}},
14722 'Activate': {'properties': {'Params': {'$ref': '#/definitions/ModelArgs'}},
14724 'Import': {'properties': {'Params': {'$ref': '#/definitions/SerializedModel'}},
14726 'Prechecks': {'properties': {'Params': {'$ref': '#/definitions/MigrationModelInfo'}},
14727 'type': 'object'}},
14731 @ReturnMapping(None)
14732 async def Abort(self
, model_tag
):
14737 # map input types to rpc msg
14739 msg
= dict(type='MigrationTarget', request
='Abort', version
=1, params
=_params
)
14740 _params
['model-tag'] = model_tag
14741 reply
= await self
.rpc(msg
)
14746 @ReturnMapping(None)
14747 async def Activate(self
, model_tag
):
14752 # map input types to rpc msg
14754 msg
= dict(type='MigrationTarget', request
='Activate', version
=1, params
=_params
)
14755 _params
['model-tag'] = model_tag
14756 reply
= await self
.rpc(msg
)
14761 @ReturnMapping(None)
14762 async def Import(self
, bytes_
, charms
, tools
):
14764 bytes_ : typing.Sequence<+T_co>[int]
14765 charms : typing.Sequence<+T_co>[str]
14766 tools : typing.Sequence<+T_co>[~SerializedModelTools]<~SerializedModelTools>
14769 # map input types to rpc msg
14771 msg
= dict(type='MigrationTarget', request
='Import', version
=1, params
=_params
)
14772 _params
['bytes'] = bytes_
14773 _params
['charms'] = charms
14774 _params
['tools'] = tools
14775 reply
= await self
.rpc(msg
)
14780 @ReturnMapping(None)
14781 async def Prechecks(self
, agent_version
, name
, owner_tag
, uuid
):
14783 agent_version : Number
14789 # map input types to rpc msg
14791 msg
= dict(type='MigrationTarget', request
='Prechecks', version
=1, params
=_params
)
14792 _params
['agent-version'] = agent_version
14793 _params
['name'] = name
14794 _params
['owner-tag'] = owner_tag
14795 _params
['uuid'] = uuid
14796 reply
= await self
.rpc(msg
)
14800 class ModelConfigFacade(Type
):
14801 name
= 'ModelConfig'
14803 schema
= {'definitions': {'ConfigValue': {'additionalProperties': False,
14804 'properties': {'source': {'type': 'string'},
14805 'value': {'additionalProperties': True,
14806 'type': 'object'}},
14807 'required': ['value', 'source'],
14809 'ModelConfigResults': {'additionalProperties': False,
14810 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ConfigValue'}},
14811 'type': 'object'}},
14812 'required': ['config'],
14814 'ModelSet': {'additionalProperties': False,
14815 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
14816 'type': 'object'}},
14817 'type': 'object'}},
14818 'required': ['config'],
14820 'ModelUnset': {'additionalProperties': False,
14821 'properties': {'keys': {'items': {'type': 'string'},
14823 'required': ['keys'],
14824 'type': 'object'}},
14825 'properties': {'ModelGet': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}},
14827 'ModelSet': {'properties': {'Params': {'$ref': '#/definitions/ModelSet'}},
14829 'ModelUnset': {'properties': {'Params': {'$ref': '#/definitions/ModelUnset'}},
14830 'type': 'object'}},
14834 @ReturnMapping(ModelConfigResults
)
14835 async def ModelGet(self
):
14838 Returns -> typing.Mapping<~KT, +VT_co>[str, ~ConfigValue]<~ConfigValue>
14840 # map input types to rpc msg
14842 msg
= dict(type='ModelConfig', request
='ModelGet', version
=1, params
=_params
)
14844 reply
= await self
.rpc(msg
)
14849 @ReturnMapping(None)
14850 async def ModelSet(self
, config
):
14852 config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
14855 # map input types to rpc msg
14857 msg
= dict(type='ModelConfig', request
='ModelSet', version
=1, params
=_params
)
14858 _params
['config'] = config
14859 reply
= await self
.rpc(msg
)
14864 @ReturnMapping(None)
14865 async def ModelUnset(self
, keys
):
14867 keys : typing.Sequence<+T_co>[str]
14870 # map input types to rpc msg
14872 msg
= dict(type='ModelConfig', request
='ModelUnset', version
=1, params
=_params
)
14873 _params
['keys'] = keys
14874 reply
= await self
.rpc(msg
)
14878 class ModelManagerFacade(Type
):
14879 name
= 'ModelManager'
14881 schema
= {'definitions': {'Entities': {'additionalProperties': False,
14882 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
14884 'required': ['entities'],
14886 'Entity': {'additionalProperties': False,
14887 'properties': {'tag': {'type': 'string'}},
14888 'required': ['tag'],
14890 'EntityStatus': {'additionalProperties': False,
14891 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
14892 'type': 'object'}},
14894 'info': {'type': 'string'},
14895 'since': {'format': 'date-time',
14897 'status': {'type': 'string'}},
14898 'required': ['status', 'info', 'since'],
14900 'Error': {'additionalProperties': False,
14901 'properties': {'code': {'type': 'string'},
14902 'info': {'$ref': '#/definitions/ErrorInfo'},
14903 'message': {'type': 'string'}},
14904 'required': ['message', 'code'],
14906 'ErrorInfo': {'additionalProperties': False,
14907 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
14908 'macaroon-path': {'type': 'string'}},
14910 'ErrorResult': {'additionalProperties': False,
14911 'properties': {'error': {'$ref': '#/definitions/Error'}},
14913 'ErrorResults': {'additionalProperties': False,
14914 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
14916 'required': ['results'],
14918 'Macaroon': {'additionalProperties': False, 'type': 'object'},
14919 'MachineHardware': {'additionalProperties': False,
14920 'properties': {'arch': {'type': 'string'},
14921 'availability-zone': {'type': 'string'},
14922 'cores': {'type': 'integer'},
14923 'cpu-power': {'type': 'integer'},
14924 'mem': {'type': 'integer'},
14925 'root-disk': {'type': 'integer'},
14926 'tags': {'items': {'type': 'string'},
14929 'MapResult': {'additionalProperties': False,
14930 'properties': {'error': {'$ref': '#/definitions/Error'},
14931 'result': {'patternProperties': {'.*': {'additionalProperties': True,
14932 'type': 'object'}},
14933 'type': 'object'}},
14934 'required': ['result'],
14936 'MapResults': {'additionalProperties': False,
14937 'properties': {'results': {'items': {'$ref': '#/definitions/MapResult'},
14939 'required': ['results'],
14941 'Model': {'additionalProperties': False,
14942 'properties': {'name': {'type': 'string'},
14943 'owner-tag': {'type': 'string'},
14944 'uuid': {'type': 'string'}},
14945 'required': ['name', 'uuid', 'owner-tag'],
14947 'ModelCreateArgs': {'additionalProperties': False,
14948 'properties': {'cloud-tag': {'type': 'string'},
14949 'config': {'patternProperties': {'.*': {'additionalProperties': True,
14950 'type': 'object'}},
14952 'credential': {'type': 'string'},
14953 'name': {'type': 'string'},
14954 'owner-tag': {'type': 'string'},
14955 'region': {'type': 'string'}},
14956 'required': ['name', 'owner-tag'],
14958 'ModelDefaultValues': {'additionalProperties': False,
14959 'properties': {'cloud-region': {'type': 'string'},
14960 'cloud-tag': {'type': 'string'},
14961 'config': {'patternProperties': {'.*': {'additionalProperties': True,
14962 'type': 'object'}},
14963 'type': 'object'}},
14964 'required': ['config'],
14966 'ModelDefaults': {'additionalProperties': False,
14967 'properties': {'controller': {'additionalProperties': True,
14969 'default': {'additionalProperties': True,
14971 'regions': {'items': {'$ref': '#/definitions/RegionDefaults'},
14974 'ModelDefaultsResult': {'additionalProperties': False,
14975 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ModelDefaults'}},
14976 'type': 'object'}},
14977 'required': ['config'],
14979 'ModelInfo': {'additionalProperties': False,
14980 'properties': {'cloud-credential-tag': {'type': 'string'},
14981 'cloud-region': {'type': 'string'},
14982 'cloud-tag': {'type': 'string'},
14983 'controller-uuid': {'type': 'string'},
14984 'default-series': {'type': 'string'},
14985 'life': {'type': 'string'},
14986 'machines': {'items': {'$ref': '#/definitions/ModelMachineInfo'},
14988 'name': {'type': 'string'},
14989 'owner-tag': {'type': 'string'},
14990 'provider-type': {'type': 'string'},
14991 'status': {'$ref': '#/definitions/EntityStatus'},
14992 'users': {'items': {'$ref': '#/definitions/ModelUserInfo'},
14994 'uuid': {'type': 'string'}},
14995 'required': ['name',
15007 'ModelInfoResult': {'additionalProperties': False,
15008 'properties': {'error': {'$ref': '#/definitions/Error'},
15009 'result': {'$ref': '#/definitions/ModelInfo'}},
15011 'ModelInfoResults': {'additionalProperties': False,
15012 'properties': {'results': {'items': {'$ref': '#/definitions/ModelInfoResult'},
15014 'required': ['results'],
15016 'ModelMachineInfo': {'additionalProperties': False,
15017 'properties': {'hardware': {'$ref': '#/definitions/MachineHardware'},
15018 'has-vote': {'type': 'boolean'},
15019 'id': {'type': 'string'},
15020 'instance-id': {'type': 'string'},
15021 'status': {'type': 'string'},
15022 'wants-vote': {'type': 'boolean'}},
15023 'required': ['id'],
15025 'ModelStatus': {'additionalProperties': False,
15026 'properties': {'application-count': {'type': 'integer'},
15027 'hosted-machine-count': {'type': 'integer'},
15028 'life': {'type': 'string'},
15029 'machines': {'items': {'$ref': '#/definitions/ModelMachineInfo'},
15031 'model-tag': {'type': 'string'},
15032 'owner-tag': {'type': 'string'}},
15033 'required': ['model-tag',
15035 'hosted-machine-count',
15036 'application-count',
15039 'ModelStatusResults': {'additionalProperties': False,
15040 'properties': {'models': {'items': {'$ref': '#/definitions/ModelStatus'},
15042 'required': ['models'],
15044 'ModelUnsetKeys': {'additionalProperties': False,
15045 'properties': {'cloud-region': {'type': 'string'},
15046 'cloud-tag': {'type': 'string'},
15047 'keys': {'items': {'type': 'string'},
15049 'required': ['keys'],
15051 'ModelUserInfo': {'additionalProperties': False,
15052 'properties': {'access': {'type': 'string'},
15053 'display-name': {'type': 'string'},
15054 'last-connection': {'format': 'date-time',
15056 'user': {'type': 'string'}},
15057 'required': ['user',
15062 'ModifyModelAccess': {'additionalProperties': False,
15063 'properties': {'access': {'type': 'string'},
15064 'action': {'type': 'string'},
15065 'model-tag': {'type': 'string'},
15066 'user-tag': {'type': 'string'}},
15067 'required': ['user-tag',
15072 'ModifyModelAccessRequest': {'additionalProperties': False,
15073 'properties': {'changes': {'items': {'$ref': '#/definitions/ModifyModelAccess'},
15075 'required': ['changes'],
15077 'RegionDefaults': {'additionalProperties': False,
15078 'properties': {'region-name': {'type': 'string'},
15079 'value': {'additionalProperties': True,
15080 'type': 'object'}},
15081 'required': ['region-name', 'value'],
15083 'SetModelDefaults': {'additionalProperties': False,
15084 'properties': {'config': {'items': {'$ref': '#/definitions/ModelDefaultValues'},
15086 'required': ['config'],
15088 'UnsetModelDefaults': {'additionalProperties': False,
15089 'properties': {'keys': {'items': {'$ref': '#/definitions/ModelUnsetKeys'},
15091 'required': ['keys'],
15093 'UserModel': {'additionalProperties': False,
15094 'properties': {'last-connection': {'format': 'date-time',
15096 'model': {'$ref': '#/definitions/Model'}},
15097 'required': ['model', 'last-connection'],
15099 'UserModelList': {'additionalProperties': False,
15100 'properties': {'user-models': {'items': {'$ref': '#/definitions/UserModel'},
15102 'required': ['user-models'],
15103 'type': 'object'}},
15104 'properties': {'CreateModel': {'properties': {'Params': {'$ref': '#/definitions/ModelCreateArgs'},
15105 'Result': {'$ref': '#/definitions/ModelInfo'}},
15107 'DestroyModels': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15108 'Result': {'$ref': '#/definitions/ErrorResults'}},
15110 'DumpModels': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15111 'Result': {'$ref': '#/definitions/MapResults'}},
15113 'DumpModelsDB': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15114 'Result': {'$ref': '#/definitions/MapResults'}},
15116 'ListModels': {'properties': {'Params': {'$ref': '#/definitions/Entity'},
15117 'Result': {'$ref': '#/definitions/UserModelList'}},
15119 'ModelDefaults': {'properties': {'Result': {'$ref': '#/definitions/ModelDefaultsResult'}},
15121 'ModelInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15122 'Result': {'$ref': '#/definitions/ModelInfoResults'}},
15124 'ModelStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15125 'Result': {'$ref': '#/definitions/ModelStatusResults'}},
15127 'ModifyModelAccess': {'properties': {'Params': {'$ref': '#/definitions/ModifyModelAccessRequest'},
15128 'Result': {'$ref': '#/definitions/ErrorResults'}},
15130 'SetModelDefaults': {'properties': {'Params': {'$ref': '#/definitions/SetModelDefaults'},
15131 'Result': {'$ref': '#/definitions/ErrorResults'}},
15133 'UnsetModelDefaults': {'properties': {'Params': {'$ref': '#/definitions/UnsetModelDefaults'},
15134 'Result': {'$ref': '#/definitions/ErrorResults'}},
15135 'type': 'object'}},
15139 @ReturnMapping(ModelInfo
)
15140 async def CreateModel(self
, cloud_tag
, config
, credential
, name
, owner_tag
, region
):
15143 config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
15148 Returns -> typing.Union[_ForwardRef('EntityStatus'), typing.Sequence<+T_co>[~ModelUserInfo]<~ModelUserInfo>]
15150 # map input types to rpc msg
15152 msg
= dict(type='ModelManager', request
='CreateModel', version
=2, params
=_params
)
15153 _params
['cloud-tag'] = cloud_tag
15154 _params
['config'] = config
15155 _params
['credential'] = credential
15156 _params
['name'] = name
15157 _params
['owner-tag'] = owner_tag
15158 _params
['region'] = region
15159 reply
= await self
.rpc(msg
)
15164 @ReturnMapping(ErrorResults
)
15165 async def DestroyModels(self
, entities
):
15167 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
15168 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
15170 # map input types to rpc msg
15172 msg
= dict(type='ModelManager', request
='DestroyModels', version
=2, params
=_params
)
15173 _params
['entities'] = entities
15174 reply
= await self
.rpc(msg
)
15179 @ReturnMapping(MapResults
)
15180 async def DumpModels(self
, entities
):
15182 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
15183 Returns -> typing.Sequence<+T_co>[~MapResult]<~MapResult>
15185 # map input types to rpc msg
15187 msg
= dict(type='ModelManager', request
='DumpModels', version
=2, params
=_params
)
15188 _params
['entities'] = entities
15189 reply
= await self
.rpc(msg
)
15194 @ReturnMapping(MapResults
)
15195 async def DumpModelsDB(self
, entities
):
15197 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
15198 Returns -> typing.Sequence<+T_co>[~MapResult]<~MapResult>
15200 # map input types to rpc msg
15202 msg
= dict(type='ModelManager', request
='DumpModelsDB', version
=2, params
=_params
)
15203 _params
['entities'] = entities
15204 reply
= await self
.rpc(msg
)
15209 @ReturnMapping(UserModelList
)
15210 async def ListModels(self
, tag
):
15213 Returns -> typing.Sequence<+T_co>[~UserModel]<~UserModel>
15215 # map input types to rpc msg
15217 msg
= dict(type='ModelManager', request
='ListModels', version
=2, params
=_params
)
15218 _params
['tag'] = tag
15219 reply
= await self
.rpc(msg
)
15224 @ReturnMapping(ModelDefaultsResult
)
15225 async def ModelDefaults(self
):
15228 Returns -> typing.Mapping<~KT, +VT_co>[str, ~ModelDefaults]<~ModelDefaults>
15230 # map input types to rpc msg
15232 msg
= dict(type='ModelManager', request
='ModelDefaults', version
=2, params
=_params
)
15234 reply
= await self
.rpc(msg
)
15239 @ReturnMapping(ModelInfoResults
)
15240 async def ModelInfo(self
, entities
):
15242 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
15243 Returns -> typing.Sequence<+T_co>[~ModelInfoResult]<~ModelInfoResult>
15245 # map input types to rpc msg
15247 msg
= dict(type='ModelManager', request
='ModelInfo', version
=2, params
=_params
)
15248 _params
['entities'] = entities
15249 reply
= await self
.rpc(msg
)
15254 @ReturnMapping(ModelStatusResults
)
15255 async def ModelStatus(self
, entities
):
15257 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
15258 Returns -> typing.Sequence<+T_co>[~ModelStatus]<~ModelStatus>
15260 # map input types to rpc msg
15262 msg
= dict(type='ModelManager', request
='ModelStatus', version
=2, params
=_params
)
15263 _params
['entities'] = entities
15264 reply
= await self
.rpc(msg
)
15269 @ReturnMapping(ErrorResults
)
15270 async def ModifyModelAccess(self
, changes
):
15272 changes : typing.Sequence<+T_co>[~ModifyModelAccess]<~ModifyModelAccess>
15273 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
15275 # map input types to rpc msg
15277 msg
= dict(type='ModelManager', request
='ModifyModelAccess', version
=2, params
=_params
)
15278 _params
['changes'] = changes
15279 reply
= await self
.rpc(msg
)
15284 @ReturnMapping(ErrorResults
)
15285 async def SetModelDefaults(self
, config
):
15287 config : typing.Sequence<+T_co>[~ModelDefaultValues]<~ModelDefaultValues>
15288 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
15290 # map input types to rpc msg
15292 msg
= dict(type='ModelManager', request
='SetModelDefaults', version
=2, params
=_params
)
15293 _params
['config'] = config
15294 reply
= await self
.rpc(msg
)
15299 @ReturnMapping(ErrorResults
)
15300 async def UnsetModelDefaults(self
, keys
):
15302 keys : typing.Sequence<+T_co>[~ModelUnsetKeys]<~ModelUnsetKeys>
15303 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
15305 # map input types to rpc msg
15307 msg
= dict(type='ModelManager', request
='UnsetModelDefaults', version
=2, params
=_params
)
15308 _params
['keys'] = keys
15309 reply
= await self
.rpc(msg
)
15313 class NotifyWatcherFacade(Type
):
15314 name
= 'NotifyWatcher'
15316 schema
= {'properties': {'Next': {'type': 'object'}, 'Stop': {'type': 'object'}},
15320 @ReturnMapping(None)
15321 async def Next(self
):
15326 # map input types to rpc msg
15328 msg
= dict(type='NotifyWatcher', request
='Next', version
=1, params
=_params
)
15330 reply
= await self
.rpc(msg
)
15335 @ReturnMapping(None)
15336 async def Stop(self
):
15341 # map input types to rpc msg
15343 msg
= dict(type='NotifyWatcher', request
='Stop', version
=1, params
=_params
)
15345 reply
= await self
.rpc(msg
)
15349 class PingerFacade(Type
):
15352 schema
= {'properties': {'Ping': {'type': 'object'}, 'Stop': {'type': 'object'}},
15356 @ReturnMapping(None)
15357 async def Ping(self
):
15362 # map input types to rpc msg
15364 msg
= dict(type='Pinger', request
='Ping', version
=1, params
=_params
)
15366 reply
= await self
.rpc(msg
)
15371 @ReturnMapping(None)
15372 async def Stop(self
):
15377 # map input types to rpc msg
15379 msg
= dict(type='Pinger', request
='Stop', version
=1, params
=_params
)
15381 reply
= await self
.rpc(msg
)
15385 class ProvisionerFacade(Type
):
15386 name
= 'Provisioner'
15388 schema
= {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
15389 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
15392 'required': ['servers'],
15394 'Address': {'additionalProperties': False,
15395 'properties': {'scope': {'type': 'string'},
15396 'space-name': {'type': 'string'},
15397 'type': {'type': 'string'},
15398 'value': {'type': 'string'}},
15399 'required': ['value', 'type', 'scope'],
15401 'Binary': {'additionalProperties': False,
15402 'properties': {'Arch': {'type': 'string'},
15403 'Number': {'$ref': '#/definitions/Number'},
15404 'Series': {'type': 'string'}},
15405 'required': ['Number', 'Series', 'Arch'],
15407 'BytesResult': {'additionalProperties': False,
15408 'properties': {'result': {'items': {'type': 'integer'},
15410 'required': ['result'],
15412 'CloudImageMetadata': {'additionalProperties': False,
15413 'properties': {'arch': {'type': 'string'},
15414 'image-id': {'type': 'string'},
15415 'priority': {'type': 'integer'},
15416 'region': {'type': 'string'},
15417 'root-storage-size': {'type': 'integer'},
15418 'root-storage-type': {'type': 'string'},
15419 'series': {'type': 'string'},
15420 'source': {'type': 'string'},
15421 'stream': {'type': 'string'},
15422 'version': {'type': 'string'},
15423 'virt-type': {'type': 'string'}},
15424 'required': ['image-id',
15432 'ConstraintsResult': {'additionalProperties': False,
15433 'properties': {'constraints': {'$ref': '#/definitions/Value'},
15434 'error': {'$ref': '#/definitions/Error'}},
15435 'required': ['constraints'],
15437 'ConstraintsResults': {'additionalProperties': False,
15438 'properties': {'results': {'items': {'$ref': '#/definitions/ConstraintsResult'},
15440 'required': ['results'],
15442 'ContainerConfig': {'additionalProperties': False,
15443 'properties': {'UpdateBehavior': {'$ref': '#/definitions/UpdateBehavior'},
15444 'apt-mirror': {'type': 'string'},
15445 'apt-proxy': {'$ref': '#/definitions/Settings'},
15446 'authorized-keys': {'type': 'string'},
15447 'provider-type': {'type': 'string'},
15448 'proxy': {'$ref': '#/definitions/Settings'},
15449 'ssl-hostname-verification': {'type': 'boolean'}},
15450 'required': ['provider-type',
15452 'ssl-hostname-verification',
15458 'ContainerManagerConfig': {'additionalProperties': False,
15459 'properties': {'config': {'patternProperties': {'.*': {'type': 'string'}},
15460 'type': 'object'}},
15461 'required': ['config'],
15463 'ContainerManagerConfigParams': {'additionalProperties': False,
15464 'properties': {'type': {'type': 'string'}},
15465 'required': ['type'],
15467 'ControllerConfigResult': {'additionalProperties': False,
15468 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
15469 'type': 'object'}},
15470 'type': 'object'}},
15471 'required': ['config'],
15473 'DistributionGroupResult': {'additionalProperties': False,
15474 'properties': {'error': {'$ref': '#/definitions/Error'},
15475 'result': {'items': {'type': 'string'},
15477 'required': ['result'],
15479 'DistributionGroupResults': {'additionalProperties': False,
15480 'properties': {'results': {'items': {'$ref': '#/definitions/DistributionGroupResult'},
15482 'required': ['results'],
15484 'Entities': {'additionalProperties': False,
15485 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
15487 'required': ['entities'],
15489 'Entity': {'additionalProperties': False,
15490 'properties': {'tag': {'type': 'string'}},
15491 'required': ['tag'],
15493 'EntityPassword': {'additionalProperties': False,
15494 'properties': {'password': {'type': 'string'},
15495 'tag': {'type': 'string'}},
15496 'required': ['tag', 'password'],
15498 'EntityPasswords': {'additionalProperties': False,
15499 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'},
15501 'required': ['changes'],
15503 'EntityStatusArgs': {'additionalProperties': False,
15504 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
15505 'type': 'object'}},
15507 'info': {'type': 'string'},
15508 'status': {'type': 'string'},
15509 'tag': {'type': 'string'}},
15510 'required': ['tag',
15515 'Error': {'additionalProperties': False,
15516 'properties': {'code': {'type': 'string'},
15517 'info': {'$ref': '#/definitions/ErrorInfo'},
15518 'message': {'type': 'string'}},
15519 'required': ['message', 'code'],
15521 'ErrorInfo': {'additionalProperties': False,
15522 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
15523 'macaroon-path': {'type': 'string'}},
15525 'ErrorResult': {'additionalProperties': False,
15526 'properties': {'error': {'$ref': '#/definitions/Error'}},
15528 'ErrorResults': {'additionalProperties': False,
15529 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
15531 'required': ['results'],
15533 'FindToolsParams': {'additionalProperties': False,
15534 'properties': {'arch': {'type': 'string'},
15535 'major': {'type': 'integer'},
15536 'minor': {'type': 'integer'},
15537 'number': {'$ref': '#/definitions/Number'},
15538 'series': {'type': 'string'}},
15539 'required': ['number',
15545 'FindToolsResult': {'additionalProperties': False,
15546 'properties': {'error': {'$ref': '#/definitions/Error'},
15547 'list': {'items': {'$ref': '#/definitions/Tools'},
15549 'required': ['list'],
15551 'HardwareCharacteristics': {'additionalProperties': False,
15552 'properties': {'arch': {'type': 'string'},
15553 'availability-zone': {'type': 'string'},
15554 'cpu-cores': {'type': 'integer'},
15555 'cpu-power': {'type': 'integer'},
15556 'mem': {'type': 'integer'},
15557 'root-disk': {'type': 'integer'},
15558 'tags': {'items': {'type': 'string'},
15561 'HostPort': {'additionalProperties': False,
15562 'properties': {'Address': {'$ref': '#/definitions/Address'},
15563 'port': {'type': 'integer'}},
15564 'required': ['Address', 'port'],
15566 'InstanceInfo': {'additionalProperties': False,
15567 'properties': {'characteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
15568 'instance-id': {'type': 'string'},
15569 'network-config': {'items': {'$ref': '#/definitions/NetworkConfig'},
15571 'nonce': {'type': 'string'},
15572 'tag': {'type': 'string'},
15573 'volume-attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/VolumeAttachmentInfo'}},
15575 'volumes': {'items': {'$ref': '#/definitions/Volume'},
15577 'required': ['tag',
15582 'volume-attachments',
15585 'InstancesInfo': {'additionalProperties': False,
15586 'properties': {'machines': {'items': {'$ref': '#/definitions/InstanceInfo'},
15588 'required': ['machines'],
15590 'LifeResult': {'additionalProperties': False,
15591 'properties': {'error': {'$ref': '#/definitions/Error'},
15592 'life': {'type': 'string'}},
15593 'required': ['life'],
15595 'LifeResults': {'additionalProperties': False,
15596 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
15598 'required': ['results'],
15600 'Macaroon': {'additionalProperties': False, 'type': 'object'},
15601 'MachineContainers': {'additionalProperties': False,
15602 'properties': {'container-types': {'items': {'type': 'string'},
15604 'machine-tag': {'type': 'string'}},
15605 'required': ['machine-tag',
15606 'container-types'],
15608 'MachineContainersParams': {'additionalProperties': False,
15609 'properties': {'params': {'items': {'$ref': '#/definitions/MachineContainers'},
15611 'required': ['params'],
15613 'MachineNetworkConfigResult': {'additionalProperties': False,
15614 'properties': {'error': {'$ref': '#/definitions/Error'},
15615 'info': {'items': {'$ref': '#/definitions/NetworkConfig'},
15617 'required': ['info'],
15619 'MachineNetworkConfigResults': {'additionalProperties': False,
15620 'properties': {'results': {'items': {'$ref': '#/definitions/MachineNetworkConfigResult'},
15622 'required': ['results'],
15624 'ModelConfigResult': {'additionalProperties': False,
15625 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
15626 'type': 'object'}},
15627 'type': 'object'}},
15628 'required': ['config'],
15630 'NetworkConfig': {'additionalProperties': False,
15631 'properties': {'address': {'type': 'string'},
15632 'cidr': {'type': 'string'},
15633 'config-type': {'type': 'string'},
15634 'device-index': {'type': 'integer'},
15635 'disabled': {'type': 'boolean'},
15636 'dns-search-domains': {'items': {'type': 'string'},
15638 'dns-servers': {'items': {'type': 'string'},
15640 'gateway-address': {'type': 'string'},
15641 'interface-name': {'type': 'string'},
15642 'interface-type': {'type': 'string'},
15643 'mac-address': {'type': 'string'},
15644 'mtu': {'type': 'integer'},
15645 'no-auto-start': {'type': 'boolean'},
15646 'parent-interface-name': {'type': 'string'},
15647 'provider-address-id': {'type': 'string'},
15648 'provider-id': {'type': 'string'},
15649 'provider-space-id': {'type': 'string'},
15650 'provider-subnet-id': {'type': 'string'},
15651 'provider-vlan-id': {'type': 'string'},
15652 'vlan-tag': {'type': 'integer'}},
15653 'required': ['device-index',
15658 'provider-subnet-id',
15659 'provider-space-id',
15660 'provider-address-id',
15661 'provider-vlan-id',
15664 'parent-interface-name',
15668 'NotifyWatchResult': {'additionalProperties': False,
15669 'properties': {'NotifyWatcherId': {'type': 'string'},
15670 'error': {'$ref': '#/definitions/Error'}},
15671 'required': ['NotifyWatcherId'],
15673 'Number': {'additionalProperties': False,
15674 'properties': {'Build': {'type': 'integer'},
15675 'Major': {'type': 'integer'},
15676 'Minor': {'type': 'integer'},
15677 'Patch': {'type': 'integer'},
15678 'Tag': {'type': 'string'}},
15679 'required': ['Major',
15685 'ProvisioningInfo': {'additionalProperties': False,
15686 'properties': {'constraints': {'$ref': '#/definitions/Value'},
15687 'controller-config': {'patternProperties': {'.*': {'additionalProperties': True,
15688 'type': 'object'}},
15690 'endpoint-bindings': {'patternProperties': {'.*': {'type': 'string'}},
15692 'image-metadata': {'items': {'$ref': '#/definitions/CloudImageMetadata'},
15694 'jobs': {'items': {'type': 'string'},
15696 'placement': {'type': 'string'},
15697 'series': {'type': 'string'},
15698 'subnets-to-zones': {'patternProperties': {'.*': {'items': {'type': 'string'},
15701 'tags': {'patternProperties': {'.*': {'type': 'string'}},
15703 'volumes': {'items': {'$ref': '#/definitions/VolumeParams'},
15705 'required': ['constraints',
15710 'ProvisioningInfoResult': {'additionalProperties': False,
15711 'properties': {'error': {'$ref': '#/definitions/Error'},
15712 'result': {'$ref': '#/definitions/ProvisioningInfo'}},
15713 'required': ['result'],
15715 'ProvisioningInfoResults': {'additionalProperties': False,
15716 'properties': {'results': {'items': {'$ref': '#/definitions/ProvisioningInfoResult'},
15718 'required': ['results'],
15720 'SetStatus': {'additionalProperties': False,
15721 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
15723 'required': ['entities'],
15725 'Settings': {'additionalProperties': False,
15726 'properties': {'Ftp': {'type': 'string'},
15727 'Http': {'type': 'string'},
15728 'Https': {'type': 'string'},
15729 'NoProxy': {'type': 'string'}},
15730 'required': ['Http', 'Https', 'Ftp', 'NoProxy'],
15732 'StatusResult': {'additionalProperties': False,
15733 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
15734 'type': 'object'}},
15736 'error': {'$ref': '#/definitions/Error'},
15737 'id': {'type': 'string'},
15738 'info': {'type': 'string'},
15739 'life': {'type': 'string'},
15740 'since': {'format': 'date-time',
15742 'status': {'type': 'string'}},
15750 'StatusResults': {'additionalProperties': False,
15751 'properties': {'results': {'items': {'$ref': '#/definitions/StatusResult'},
15753 'required': ['results'],
15755 'StringResult': {'additionalProperties': False,
15756 'properties': {'error': {'$ref': '#/definitions/Error'},
15757 'result': {'type': 'string'}},
15758 'required': ['result'],
15760 'StringResults': {'additionalProperties': False,
15761 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
15763 'required': ['results'],
15765 'StringsResult': {'additionalProperties': False,
15766 'properties': {'error': {'$ref': '#/definitions/Error'},
15767 'result': {'items': {'type': 'string'},
15770 'StringsWatchResult': {'additionalProperties': False,
15771 'properties': {'changes': {'items': {'type': 'string'},
15773 'error': {'$ref': '#/definitions/Error'},
15774 'watcher-id': {'type': 'string'}},
15775 'required': ['watcher-id'],
15777 'StringsWatchResults': {'additionalProperties': False,
15778 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
15780 'required': ['results'],
15782 'Tools': {'additionalProperties': False,
15783 'properties': {'sha256': {'type': 'string'},
15784 'size': {'type': 'integer'},
15785 'url': {'type': 'string'},
15786 'version': {'$ref': '#/definitions/Binary'}},
15787 'required': ['version', 'url', 'size'],
15789 'ToolsResult': {'additionalProperties': False,
15790 'properties': {'disable-ssl-hostname-verification': {'type': 'boolean'},
15791 'error': {'$ref': '#/definitions/Error'},
15792 'tools': {'items': {'$ref': '#/definitions/Tools'},
15794 'required': ['tools',
15795 'disable-ssl-hostname-verification'],
15797 'ToolsResults': {'additionalProperties': False,
15798 'properties': {'results': {'items': {'$ref': '#/definitions/ToolsResult'},
15800 'required': ['results'],
15802 'UpdateBehavior': {'additionalProperties': False,
15803 'properties': {'enable-os-refresh-update': {'type': 'boolean'},
15804 'enable-os-upgrade': {'type': 'boolean'}},
15805 'required': ['enable-os-refresh-update',
15806 'enable-os-upgrade'],
15808 'Value': {'additionalProperties': False,
15809 'properties': {'arch': {'type': 'string'},
15810 'container': {'type': 'string'},
15811 'cores': {'type': 'integer'},
15812 'cpu-power': {'type': 'integer'},
15813 'instance-type': {'type': 'string'},
15814 'mem': {'type': 'integer'},
15815 'root-disk': {'type': 'integer'},
15816 'spaces': {'items': {'type': 'string'},
15818 'tags': {'items': {'type': 'string'},
15820 'virt-type': {'type': 'string'}},
15822 'Volume': {'additionalProperties': False,
15823 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'},
15824 'volume-tag': {'type': 'string'}},
15825 'required': ['volume-tag', 'info'],
15827 'VolumeAttachmentInfo': {'additionalProperties': False,
15828 'properties': {'bus-address': {'type': 'string'},
15829 'device-link': {'type': 'string'},
15830 'device-name': {'type': 'string'},
15831 'read-only': {'type': 'boolean'}},
15833 'VolumeAttachmentParams': {'additionalProperties': False,
15834 'properties': {'instance-id': {'type': 'string'},
15835 'machine-tag': {'type': 'string'},
15836 'provider': {'type': 'string'},
15837 'read-only': {'type': 'boolean'},
15838 'volume-id': {'type': 'string'},
15839 'volume-tag': {'type': 'string'}},
15840 'required': ['volume-tag',
15844 'VolumeInfo': {'additionalProperties': False,
15845 'properties': {'hardware-id': {'type': 'string'},
15846 'persistent': {'type': 'boolean'},
15847 'size': {'type': 'integer'},
15848 'volume-id': {'type': 'string'}},
15849 'required': ['volume-id', 'size', 'persistent'],
15851 'VolumeParams': {'additionalProperties': False,
15852 'properties': {'attachment': {'$ref': '#/definitions/VolumeAttachmentParams'},
15853 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
15854 'type': 'object'}},
15856 'provider': {'type': 'string'},
15857 'size': {'type': 'integer'},
15858 'tags': {'patternProperties': {'.*': {'type': 'string'}},
15860 'volume-tag': {'type': 'string'}},
15861 'required': ['volume-tag',
15865 'WatchContainer': {'additionalProperties': False,
15866 'properties': {'container-type': {'type': 'string'},
15867 'machine-tag': {'type': 'string'}},
15868 'required': ['machine-tag',
15871 'WatchContainers': {'additionalProperties': False,
15872 'properties': {'params': {'items': {'$ref': '#/definitions/WatchContainer'},
15874 'required': ['params'],
15875 'type': 'object'}},
15876 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
15878 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
15880 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
15882 'Constraints': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15883 'Result': {'$ref': '#/definitions/ConstraintsResults'}},
15885 'ContainerConfig': {'properties': {'Result': {'$ref': '#/definitions/ContainerConfig'}},
15887 'ContainerManagerConfig': {'properties': {'Params': {'$ref': '#/definitions/ContainerManagerConfigParams'},
15888 'Result': {'$ref': '#/definitions/ContainerManagerConfig'}},
15890 'ControllerConfig': {'properties': {'Result': {'$ref': '#/definitions/ControllerConfigResult'}},
15892 'DistributionGroup': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15893 'Result': {'$ref': '#/definitions/DistributionGroupResults'}},
15895 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15896 'Result': {'$ref': '#/definitions/ErrorResults'}},
15898 'FindTools': {'properties': {'Params': {'$ref': '#/definitions/FindToolsParams'},
15899 'Result': {'$ref': '#/definitions/FindToolsResult'}},
15901 'GetContainerInterfaceInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15902 'Result': {'$ref': '#/definitions/MachineNetworkConfigResults'}},
15904 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15905 'Result': {'$ref': '#/definitions/StringResults'}},
15907 'InstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15908 'Result': {'$ref': '#/definitions/StatusResults'}},
15910 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15911 'Result': {'$ref': '#/definitions/LifeResults'}},
15913 'MachinesWithTransientErrors': {'properties': {'Result': {'$ref': '#/definitions/StatusResults'}},
15915 'MarkMachinesForRemoval': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15916 'Result': {'$ref': '#/definitions/ErrorResults'}},
15918 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
15920 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
15922 'PrepareContainerInterfaceInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15923 'Result': {'$ref': '#/definitions/MachineNetworkConfigResults'}},
15925 'ProvisioningInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15926 'Result': {'$ref': '#/definitions/ProvisioningInfoResults'}},
15928 'ReleaseContainerAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15929 'Result': {'$ref': '#/definitions/ErrorResults'}},
15931 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15932 'Result': {'$ref': '#/definitions/ErrorResults'}},
15934 'Series': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15935 'Result': {'$ref': '#/definitions/StringResults'}},
15937 'SetInstanceInfo': {'properties': {'Params': {'$ref': '#/definitions/InstancesInfo'},
15938 'Result': {'$ref': '#/definitions/ErrorResults'}},
15940 'SetInstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
15941 'Result': {'$ref': '#/definitions/ErrorResults'}},
15943 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
15944 'Result': {'$ref': '#/definitions/ErrorResults'}},
15946 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
15947 'Result': {'$ref': '#/definitions/ErrorResults'}},
15949 'SetSupportedContainers': {'properties': {'Params': {'$ref': '#/definitions/MachineContainersParams'},
15950 'Result': {'$ref': '#/definitions/ErrorResults'}},
15952 'StateAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
15954 'Status': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15955 'Result': {'$ref': '#/definitions/StatusResults'}},
15957 'Tools': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15958 'Result': {'$ref': '#/definitions/ToolsResults'}},
15960 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
15961 'Result': {'$ref': '#/definitions/ErrorResults'}},
15963 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
15965 'WatchAllContainers': {'properties': {'Params': {'$ref': '#/definitions/WatchContainers'},
15966 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
15968 'WatchContainers': {'properties': {'Params': {'$ref': '#/definitions/WatchContainers'},
15969 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
15971 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
15973 'WatchMachineErrorRetry': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
15975 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
15976 'type': 'object'}},
15980 @ReturnMapping(StringsResult
)
15981 async def APIAddresses(self
):
15984 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[str]]
15986 # map input types to rpc msg
15988 msg
= dict(type='Provisioner', request
='APIAddresses', version
=3, params
=_params
)
15990 reply
= await self
.rpc(msg
)
15995 @ReturnMapping(APIHostPortsResult
)
15996 async def APIHostPorts(self
):
15999 Returns -> typing.Sequence<+T_co>[~HostPort]<~HostPort>
16001 # map input types to rpc msg
16003 msg
= dict(type='Provisioner', request
='APIHostPorts', version
=3, params
=_params
)
16005 reply
= await self
.rpc(msg
)
16010 @ReturnMapping(BytesResult
)
16011 async def CACert(self
):
16014 Returns -> typing.Sequence<+T_co>[int]
16016 # map input types to rpc msg
16018 msg
= dict(type='Provisioner', request
='CACert', version
=3, params
=_params
)
16020 reply
= await self
.rpc(msg
)
16025 @ReturnMapping(ConstraintsResults
)
16026 async def Constraints(self
, entities
):
16028 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16029 Returns -> typing.Sequence<+T_co>[~ConstraintsResult]<~ConstraintsResult>
16031 # map input types to rpc msg
16033 msg
= dict(type='Provisioner', request
='Constraints', version
=3, params
=_params
)
16034 _params
['entities'] = entities
16035 reply
= await self
.rpc(msg
)
16040 @ReturnMapping(ContainerConfig
)
16041 async def ContainerConfig(self
):
16044 Returns -> typing.Union[_ForwardRef('UpdateBehavior'), str, _ForwardRef('Settings'), _ForwardRef('Settings'), bool]
16046 # map input types to rpc msg
16048 msg
= dict(type='Provisioner', request
='ContainerConfig', version
=3, params
=_params
)
16050 reply
= await self
.rpc(msg
)
16055 @ReturnMapping(ContainerManagerConfig
)
16056 async def ContainerManagerConfig(self
, type_
):
16059 Returns -> typing.Mapping<~KT, +VT_co>[str, str]
16061 # map input types to rpc msg
16063 msg
= dict(type='Provisioner', request
='ContainerManagerConfig', version
=3, params
=_params
)
16064 _params
['type'] = type_
16065 reply
= await self
.rpc(msg
)
16070 @ReturnMapping(ControllerConfigResult
)
16071 async def ControllerConfig(self
):
16074 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
16076 # map input types to rpc msg
16078 msg
= dict(type='Provisioner', request
='ControllerConfig', version
=3, params
=_params
)
16080 reply
= await self
.rpc(msg
)
16085 @ReturnMapping(DistributionGroupResults
)
16086 async def DistributionGroup(self
, entities
):
16088 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16089 Returns -> typing.Sequence<+T_co>[~DistributionGroupResult]<~DistributionGroupResult>
16091 # map input types to rpc msg
16093 msg
= dict(type='Provisioner', request
='DistributionGroup', version
=3, params
=_params
)
16094 _params
['entities'] = entities
16095 reply
= await self
.rpc(msg
)
16100 @ReturnMapping(ErrorResults
)
16101 async def EnsureDead(self
, entities
):
16103 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16104 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
16106 # map input types to rpc msg
16108 msg
= dict(type='Provisioner', request
='EnsureDead', version
=3, params
=_params
)
16109 _params
['entities'] = entities
16110 reply
= await self
.rpc(msg
)
16115 @ReturnMapping(FindToolsResult
)
16116 async def FindTools(self
, arch
, major
, minor
, number
, series
):
16123 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[~Tools]<~Tools>]
16125 # map input types to rpc msg
16127 msg
= dict(type='Provisioner', request
='FindTools', version
=3, params
=_params
)
16128 _params
['arch'] = arch
16129 _params
['major'] = major
16130 _params
['minor'] = minor
16131 _params
['number'] = number
16132 _params
['series'] = series
16133 reply
= await self
.rpc(msg
)
16138 @ReturnMapping(MachineNetworkConfigResults
)
16139 async def GetContainerInterfaceInfo(self
, entities
):
16141 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16142 Returns -> typing.Sequence<+T_co>[~MachineNetworkConfigResult]<~MachineNetworkConfigResult>
16144 # map input types to rpc msg
16146 msg
= dict(type='Provisioner', request
='GetContainerInterfaceInfo', version
=3, params
=_params
)
16147 _params
['entities'] = entities
16148 reply
= await self
.rpc(msg
)
16153 @ReturnMapping(StringResults
)
16154 async def InstanceId(self
, entities
):
16156 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16157 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
16159 # map input types to rpc msg
16161 msg
= dict(type='Provisioner', request
='InstanceId', version
=3, params
=_params
)
16162 _params
['entities'] = entities
16163 reply
= await self
.rpc(msg
)
16168 @ReturnMapping(StatusResults
)
16169 async def InstanceStatus(self
, entities
):
16171 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16172 Returns -> typing.Sequence<+T_co>[~StatusResult]<~StatusResult>
16174 # map input types to rpc msg
16176 msg
= dict(type='Provisioner', request
='InstanceStatus', version
=3, params
=_params
)
16177 _params
['entities'] = entities
16178 reply
= await self
.rpc(msg
)
16183 @ReturnMapping(LifeResults
)
16184 async def Life(self
, entities
):
16186 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16187 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
16189 # map input types to rpc msg
16191 msg
= dict(type='Provisioner', request
='Life', version
=3, params
=_params
)
16192 _params
['entities'] = entities
16193 reply
= await self
.rpc(msg
)
16198 @ReturnMapping(StatusResults
)
16199 async def MachinesWithTransientErrors(self
):
16202 Returns -> typing.Sequence<+T_co>[~StatusResult]<~StatusResult>
16204 # map input types to rpc msg
16206 msg
= dict(type='Provisioner', request
='MachinesWithTransientErrors', version
=3, params
=_params
)
16208 reply
= await self
.rpc(msg
)
16213 @ReturnMapping(ErrorResults
)
16214 async def MarkMachinesForRemoval(self
, entities
):
16216 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16217 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
16219 # map input types to rpc msg
16221 msg
= dict(type='Provisioner', request
='MarkMachinesForRemoval', version
=3, params
=_params
)
16222 _params
['entities'] = entities
16223 reply
= await self
.rpc(msg
)
16228 @ReturnMapping(ModelConfigResult
)
16229 async def ModelConfig(self
):
16232 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
16234 # map input types to rpc msg
16236 msg
= dict(type='Provisioner', request
='ModelConfig', version
=3, params
=_params
)
16238 reply
= await self
.rpc(msg
)
16243 @ReturnMapping(StringResult
)
16244 async def ModelUUID(self
):
16247 Returns -> typing.Union[_ForwardRef('Error'), str]
16249 # map input types to rpc msg
16251 msg
= dict(type='Provisioner', request
='ModelUUID', version
=3, params
=_params
)
16253 reply
= await self
.rpc(msg
)
16258 @ReturnMapping(MachineNetworkConfigResults
)
16259 async def PrepareContainerInterfaceInfo(self
, entities
):
16261 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16262 Returns -> typing.Sequence<+T_co>[~MachineNetworkConfigResult]<~MachineNetworkConfigResult>
16264 # map input types to rpc msg
16266 msg
= dict(type='Provisioner', request
='PrepareContainerInterfaceInfo', version
=3, params
=_params
)
16267 _params
['entities'] = entities
16268 reply
= await self
.rpc(msg
)
16273 @ReturnMapping(ProvisioningInfoResults
)
16274 async def ProvisioningInfo(self
, entities
):
16276 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16277 Returns -> typing.Sequence<+T_co>[~ProvisioningInfoResult]<~ProvisioningInfoResult>
16279 # map input types to rpc msg
16281 msg
= dict(type='Provisioner', request
='ProvisioningInfo', version
=3, params
=_params
)
16282 _params
['entities'] = entities
16283 reply
= await self
.rpc(msg
)
16288 @ReturnMapping(ErrorResults
)
16289 async def ReleaseContainerAddresses(self
, entities
):
16291 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16292 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
16294 # map input types to rpc msg
16296 msg
= dict(type='Provisioner', request
='ReleaseContainerAddresses', version
=3, params
=_params
)
16297 _params
['entities'] = entities
16298 reply
= await self
.rpc(msg
)
16303 @ReturnMapping(ErrorResults
)
16304 async def Remove(self
, entities
):
16306 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16307 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
16309 # map input types to rpc msg
16311 msg
= dict(type='Provisioner', request
='Remove', version
=3, params
=_params
)
16312 _params
['entities'] = entities
16313 reply
= await self
.rpc(msg
)
16318 @ReturnMapping(StringResults
)
16319 async def Series(self
, entities
):
16321 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16322 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
16324 # map input types to rpc msg
16326 msg
= dict(type='Provisioner', request
='Series', version
=3, params
=_params
)
16327 _params
['entities'] = entities
16328 reply
= await self
.rpc(msg
)
16333 @ReturnMapping(ErrorResults
)
16334 async def SetInstanceInfo(self
, machines
):
16336 machines : typing.Sequence<+T_co>[~InstanceInfo]<~InstanceInfo>
16337 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
16339 # map input types to rpc msg
16341 msg
= dict(type='Provisioner', request
='SetInstanceInfo', version
=3, params
=_params
)
16342 _params
['machines'] = machines
16343 reply
= await self
.rpc(msg
)
16348 @ReturnMapping(ErrorResults
)
16349 async def SetInstanceStatus(self
, entities
):
16351 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
16352 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
16354 # map input types to rpc msg
16356 msg
= dict(type='Provisioner', request
='SetInstanceStatus', version
=3, params
=_params
)
16357 _params
['entities'] = entities
16358 reply
= await self
.rpc(msg
)
16363 @ReturnMapping(ErrorResults
)
16364 async def SetPasswords(self
, changes
):
16366 changes : typing.Sequence<+T_co>[~EntityPassword]<~EntityPassword>
16367 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
16369 # map input types to rpc msg
16371 msg
= dict(type='Provisioner', request
='SetPasswords', version
=3, params
=_params
)
16372 _params
['changes'] = changes
16373 reply
= await self
.rpc(msg
)
16378 @ReturnMapping(ErrorResults
)
16379 async def SetStatus(self
, entities
):
16381 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
16382 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
16384 # map input types to rpc msg
16386 msg
= dict(type='Provisioner', request
='SetStatus', version
=3, params
=_params
)
16387 _params
['entities'] = entities
16388 reply
= await self
.rpc(msg
)
16393 @ReturnMapping(ErrorResults
)
16394 async def SetSupportedContainers(self
, params
):
16396 params : typing.Sequence<+T_co>[~MachineContainers]<~MachineContainers>
16397 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
16399 # map input types to rpc msg
16401 msg
= dict(type='Provisioner', request
='SetSupportedContainers', version
=3, params
=_params
)
16402 _params
['params'] = params
16403 reply
= await self
.rpc(msg
)
16408 @ReturnMapping(StringsResult
)
16409 async def StateAddresses(self
):
16412 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[str]]
16414 # map input types to rpc msg
16416 msg
= dict(type='Provisioner', request
='StateAddresses', version
=3, params
=_params
)
16418 reply
= await self
.rpc(msg
)
16423 @ReturnMapping(StatusResults
)
16424 async def Status(self
, entities
):
16426 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16427 Returns -> typing.Sequence<+T_co>[~StatusResult]<~StatusResult>
16429 # map input types to rpc msg
16431 msg
= dict(type='Provisioner', request
='Status', version
=3, params
=_params
)
16432 _params
['entities'] = entities
16433 reply
= await self
.rpc(msg
)
16438 @ReturnMapping(ToolsResults
)
16439 async def Tools(self
, entities
):
16441 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16442 Returns -> typing.Sequence<+T_co>[~ToolsResult]<~ToolsResult>
16444 # map input types to rpc msg
16446 msg
= dict(type='Provisioner', request
='Tools', version
=3, params
=_params
)
16447 _params
['entities'] = entities
16448 reply
= await self
.rpc(msg
)
16453 @ReturnMapping(ErrorResults
)
16454 async def UpdateStatus(self
, entities
):
16456 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
16457 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
16459 # map input types to rpc msg
16461 msg
= dict(type='Provisioner', request
='UpdateStatus', version
=3, params
=_params
)
16462 _params
['entities'] = entities
16463 reply
= await self
.rpc(msg
)
16468 @ReturnMapping(NotifyWatchResult
)
16469 async def WatchAPIHostPorts(self
):
16472 Returns -> typing.Union[str, _ForwardRef('Error')]
16474 # map input types to rpc msg
16476 msg
= dict(type='Provisioner', request
='WatchAPIHostPorts', version
=3, params
=_params
)
16478 reply
= await self
.rpc(msg
)
16483 @ReturnMapping(StringsWatchResults
)
16484 async def WatchAllContainers(self
, params
):
16486 params : typing.Sequence<+T_co>[~WatchContainer]<~WatchContainer>
16487 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
16489 # map input types to rpc msg
16491 msg
= dict(type='Provisioner', request
='WatchAllContainers', version
=3, params
=_params
)
16492 _params
['params'] = params
16493 reply
= await self
.rpc(msg
)
16498 @ReturnMapping(StringsWatchResults
)
16499 async def WatchContainers(self
, params
):
16501 params : typing.Sequence<+T_co>[~WatchContainer]<~WatchContainer>
16502 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
16504 # map input types to rpc msg
16506 msg
= dict(type='Provisioner', request
='WatchContainers', version
=3, params
=_params
)
16507 _params
['params'] = params
16508 reply
= await self
.rpc(msg
)
16513 @ReturnMapping(NotifyWatchResult
)
16514 async def WatchForModelConfigChanges(self
):
16517 Returns -> typing.Union[str, _ForwardRef('Error')]
16519 # map input types to rpc msg
16521 msg
= dict(type='Provisioner', request
='WatchForModelConfigChanges', version
=3, params
=_params
)
16523 reply
= await self
.rpc(msg
)
16528 @ReturnMapping(NotifyWatchResult
)
16529 async def WatchMachineErrorRetry(self
):
16532 Returns -> typing.Union[str, _ForwardRef('Error')]
16534 # map input types to rpc msg
16536 msg
= dict(type='Provisioner', request
='WatchMachineErrorRetry', version
=3, params
=_params
)
16538 reply
= await self
.rpc(msg
)
16543 @ReturnMapping(StringsWatchResult
)
16544 async def WatchModelMachines(self
):
16547 Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')]
16549 # map input types to rpc msg
16551 msg
= dict(type='Provisioner', request
='WatchModelMachines', version
=3, params
=_params
)
16553 reply
= await self
.rpc(msg
)
16557 class ProxyUpdaterFacade(Type
):
16558 name
= 'ProxyUpdater'
16560 schema
= {'definitions': {'Entities': {'additionalProperties': False,
16561 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
16563 'required': ['entities'],
16565 'Entity': {'additionalProperties': False,
16566 'properties': {'tag': {'type': 'string'}},
16567 'required': ['tag'],
16569 'Error': {'additionalProperties': False,
16570 'properties': {'code': {'type': 'string'},
16571 'info': {'$ref': '#/definitions/ErrorInfo'},
16572 'message': {'type': 'string'}},
16573 'required': ['message', 'code'],
16575 'ErrorInfo': {'additionalProperties': False,
16576 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
16577 'macaroon-path': {'type': 'string'}},
16579 'Macaroon': {'additionalProperties': False, 'type': 'object'},
16580 'NotifyWatchResult': {'additionalProperties': False,
16581 'properties': {'NotifyWatcherId': {'type': 'string'},
16582 'error': {'$ref': '#/definitions/Error'}},
16583 'required': ['NotifyWatcherId'],
16585 'NotifyWatchResults': {'additionalProperties': False,
16586 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
16588 'required': ['results'],
16590 'ProxyConfig': {'additionalProperties': False,
16591 'properties': {'ftp': {'type': 'string'},
16592 'http': {'type': 'string'},
16593 'https': {'type': 'string'},
16594 'no-proxy': {'type': 'string'}},
16595 'required': ['http',
16600 'ProxyConfigResult': {'additionalProperties': False,
16601 'properties': {'apt-proxy-settings': {'$ref': '#/definitions/ProxyConfig'},
16602 'error': {'$ref': '#/definitions/Error'},
16603 'proxy-settings': {'$ref': '#/definitions/ProxyConfig'}},
16604 'required': ['proxy-settings',
16605 'apt-proxy-settings'],
16607 'ProxyConfigResults': {'additionalProperties': False,
16608 'properties': {'results': {'items': {'$ref': '#/definitions/ProxyConfigResult'},
16610 'required': ['results'],
16611 'type': 'object'}},
16612 'properties': {'ProxyConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16613 'Result': {'$ref': '#/definitions/ProxyConfigResults'}},
16615 'WatchForProxyConfigAndAPIHostPortChanges': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16616 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
16617 'type': 'object'}},
16621 @ReturnMapping(ProxyConfigResults
)
16622 async def ProxyConfig(self
, entities
):
16624 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16625 Returns -> typing.Sequence<+T_co>[~ProxyConfigResult]<~ProxyConfigResult>
16627 # map input types to rpc msg
16629 msg
= dict(type='ProxyUpdater', request
='ProxyConfig', version
=1, params
=_params
)
16630 _params
['entities'] = entities
16631 reply
= await self
.rpc(msg
)
16636 @ReturnMapping(NotifyWatchResults
)
16637 async def WatchForProxyConfigAndAPIHostPortChanges(self
, entities
):
16639 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16640 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
16642 # map input types to rpc msg
16644 msg
= dict(type='ProxyUpdater', request
='WatchForProxyConfigAndAPIHostPortChanges', version
=1, params
=_params
)
16645 _params
['entities'] = entities
16646 reply
= await self
.rpc(msg
)
16650 class RebootFacade(Type
):
16653 schema
= {'definitions': {'Entities': {'additionalProperties': False,
16654 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
16656 'required': ['entities'],
16658 'Entity': {'additionalProperties': False,
16659 'properties': {'tag': {'type': 'string'}},
16660 'required': ['tag'],
16662 'Error': {'additionalProperties': False,
16663 'properties': {'code': {'type': 'string'},
16664 'info': {'$ref': '#/definitions/ErrorInfo'},
16665 'message': {'type': 'string'}},
16666 'required': ['message', 'code'],
16668 'ErrorInfo': {'additionalProperties': False,
16669 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
16670 'macaroon-path': {'type': 'string'}},
16672 'ErrorResult': {'additionalProperties': False,
16673 'properties': {'error': {'$ref': '#/definitions/Error'}},
16675 'ErrorResults': {'additionalProperties': False,
16676 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
16678 'required': ['results'],
16680 'Macaroon': {'additionalProperties': False, 'type': 'object'},
16681 'NotifyWatchResult': {'additionalProperties': False,
16682 'properties': {'NotifyWatcherId': {'type': 'string'},
16683 'error': {'$ref': '#/definitions/Error'}},
16684 'required': ['NotifyWatcherId'],
16686 'RebootActionResult': {'additionalProperties': False,
16687 'properties': {'error': {'$ref': '#/definitions/Error'},
16688 'result': {'type': 'string'}},
16690 'RebootActionResults': {'additionalProperties': False,
16691 'properties': {'results': {'items': {'$ref': '#/definitions/RebootActionResult'},
16693 'type': 'object'}},
16694 'properties': {'ClearReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16695 'Result': {'$ref': '#/definitions/ErrorResults'}},
16697 'GetRebootAction': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16698 'Result': {'$ref': '#/definitions/RebootActionResults'}},
16700 'RequestReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16701 'Result': {'$ref': '#/definitions/ErrorResults'}},
16703 'WatchForRebootEvent': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
16704 'type': 'object'}},
16708 @ReturnMapping(ErrorResults
)
16709 async def ClearReboot(self
, entities
):
16711 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16712 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
16714 # map input types to rpc msg
16716 msg
= dict(type='Reboot', request
='ClearReboot', version
=2, params
=_params
)
16717 _params
['entities'] = entities
16718 reply
= await self
.rpc(msg
)
16723 @ReturnMapping(RebootActionResults
)
16724 async def GetRebootAction(self
, entities
):
16726 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16727 Returns -> typing.Sequence<+T_co>[~RebootActionResult]<~RebootActionResult>
16729 # map input types to rpc msg
16731 msg
= dict(type='Reboot', request
='GetRebootAction', version
=2, params
=_params
)
16732 _params
['entities'] = entities
16733 reply
= await self
.rpc(msg
)
16738 @ReturnMapping(ErrorResults
)
16739 async def RequestReboot(self
, entities
):
16741 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16742 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
16744 # map input types to rpc msg
16746 msg
= dict(type='Reboot', request
='RequestReboot', version
=2, params
=_params
)
16747 _params
['entities'] = entities
16748 reply
= await self
.rpc(msg
)
16753 @ReturnMapping(NotifyWatchResult
)
16754 async def WatchForRebootEvent(self
):
16757 Returns -> typing.Union[str, _ForwardRef('Error')]
16759 # map input types to rpc msg
16761 msg
= dict(type='Reboot', request
='WatchForRebootEvent', version
=2, params
=_params
)
16763 reply
= await self
.rpc(msg
)
16767 class RelationUnitsWatcherFacade(Type
):
16768 name
= 'RelationUnitsWatcher'
16770 schema
= {'definitions': {'Error': {'additionalProperties': False,
16771 'properties': {'code': {'type': 'string'},
16772 'info': {'$ref': '#/definitions/ErrorInfo'},
16773 'message': {'type': 'string'}},
16774 'required': ['message', 'code'],
16776 'ErrorInfo': {'additionalProperties': False,
16777 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
16778 'macaroon-path': {'type': 'string'}},
16780 'Macaroon': {'additionalProperties': False, 'type': 'object'},
16781 'RelationUnitsChange': {'additionalProperties': False,
16782 'properties': {'changed': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitSettings'}},
16784 'departed': {'items': {'type': 'string'},
16786 'required': ['changed'],
16788 'RelationUnitsWatchResult': {'additionalProperties': False,
16789 'properties': {'changes': {'$ref': '#/definitions/RelationUnitsChange'},
16790 'error': {'$ref': '#/definitions/Error'},
16791 'watcher-id': {'type': 'string'}},
16792 'required': ['watcher-id',
16795 'UnitSettings': {'additionalProperties': False,
16796 'properties': {'version': {'type': 'integer'}},
16797 'required': ['version'],
16798 'type': 'object'}},
16799 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/RelationUnitsWatchResult'}},
16801 'Stop': {'type': 'object'}},
16805 @ReturnMapping(RelationUnitsWatchResult
)
16806 async def Next(self
):
16809 Returns -> typing.Union[_ForwardRef('RelationUnitsChange'), _ForwardRef('Error'), str]
16811 # map input types to rpc msg
16813 msg
= dict(type='RelationUnitsWatcher', request
='Next', version
=1, params
=_params
)
16815 reply
= await self
.rpc(msg
)
16820 @ReturnMapping(None)
16821 async def Stop(self
):
16826 # map input types to rpc msg
16828 msg
= dict(type='RelationUnitsWatcher', request
='Stop', version
=1, params
=_params
)
16830 reply
= await self
.rpc(msg
)
16834 class ResumerFacade(Type
):
16837 schema
= {'properties': {'ResumeTransactions': {'type': 'object'}}, 'type': 'object'}
16840 @ReturnMapping(None)
16841 async def ResumeTransactions(self
):
16846 # map input types to rpc msg
16848 msg
= dict(type='Resumer', request
='ResumeTransactions', version
=2, params
=_params
)
16850 reply
= await self
.rpc(msg
)
16854 class RetryStrategyFacade(Type
):
16855 name
= 'RetryStrategy'
16857 schema
= {'definitions': {'Entities': {'additionalProperties': False,
16858 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
16860 'required': ['entities'],
16862 'Entity': {'additionalProperties': False,
16863 'properties': {'tag': {'type': 'string'}},
16864 'required': ['tag'],
16866 'Error': {'additionalProperties': False,
16867 'properties': {'code': {'type': 'string'},
16868 'info': {'$ref': '#/definitions/ErrorInfo'},
16869 'message': {'type': 'string'}},
16870 'required': ['message', 'code'],
16872 'ErrorInfo': {'additionalProperties': False,
16873 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
16874 'macaroon-path': {'type': 'string'}},
16876 'Macaroon': {'additionalProperties': False, 'type': 'object'},
16877 'NotifyWatchResult': {'additionalProperties': False,
16878 'properties': {'NotifyWatcherId': {'type': 'string'},
16879 'error': {'$ref': '#/definitions/Error'}},
16880 'required': ['NotifyWatcherId'],
16882 'NotifyWatchResults': {'additionalProperties': False,
16883 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
16885 'required': ['results'],
16887 'RetryStrategy': {'additionalProperties': False,
16888 'properties': {'jitter-retry-time': {'type': 'boolean'},
16889 'max-retry-time': {'type': 'integer'},
16890 'min-retry-time': {'type': 'integer'},
16891 'retry-time-factor': {'type': 'integer'},
16892 'should-retry': {'type': 'boolean'}},
16893 'required': ['should-retry',
16896 'jitter-retry-time',
16897 'retry-time-factor'],
16899 'RetryStrategyResult': {'additionalProperties': False,
16900 'properties': {'error': {'$ref': '#/definitions/Error'},
16901 'result': {'$ref': '#/definitions/RetryStrategy'}},
16903 'RetryStrategyResults': {'additionalProperties': False,
16904 'properties': {'results': {'items': {'$ref': '#/definitions/RetryStrategyResult'},
16906 'required': ['results'],
16907 'type': 'object'}},
16908 'properties': {'RetryStrategy': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16909 'Result': {'$ref': '#/definitions/RetryStrategyResults'}},
16911 'WatchRetryStrategy': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16912 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
16913 'type': 'object'}},
16917 @ReturnMapping(RetryStrategyResults
)
16918 async def RetryStrategy(self
, entities
):
16920 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16921 Returns -> typing.Sequence<+T_co>[~RetryStrategyResult]<~RetryStrategyResult>
16923 # map input types to rpc msg
16925 msg
= dict(type='RetryStrategy', request
='RetryStrategy', version
=1, params
=_params
)
16926 _params
['entities'] = entities
16927 reply
= await self
.rpc(msg
)
16932 @ReturnMapping(NotifyWatchResults
)
16933 async def WatchRetryStrategy(self
, entities
):
16935 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16936 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
16938 # map input types to rpc msg
16940 msg
= dict(type='RetryStrategy', request
='WatchRetryStrategy', version
=1, params
=_params
)
16941 _params
['entities'] = entities
16942 reply
= await self
.rpc(msg
)
16946 class SSHClientFacade(Type
):
16949 schema
= {'definitions': {'Entities': {'additionalProperties': False,
16950 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
16952 'required': ['entities'],
16954 'Entity': {'additionalProperties': False,
16955 'properties': {'tag': {'type': 'string'}},
16956 'required': ['tag'],
16958 'Error': {'additionalProperties': False,
16959 'properties': {'code': {'type': 'string'},
16960 'info': {'$ref': '#/definitions/ErrorInfo'},
16961 'message': {'type': 'string'}},
16962 'required': ['message', 'code'],
16964 'ErrorInfo': {'additionalProperties': False,
16965 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
16966 'macaroon-path': {'type': 'string'}},
16968 'Macaroon': {'additionalProperties': False, 'type': 'object'},
16969 'SSHAddressResult': {'additionalProperties': False,
16970 'properties': {'address': {'type': 'string'},
16971 'error': {'$ref': '#/definitions/Error'}},
16973 'SSHAddressResults': {'additionalProperties': False,
16974 'properties': {'results': {'items': {'$ref': '#/definitions/SSHAddressResult'},
16976 'required': ['results'],
16978 'SSHAddressesResult': {'additionalProperties': False,
16979 'properties': {'addresses': {'items': {'type': 'string'},
16981 'error': {'$ref': '#/definitions/Error'}},
16982 'required': ['addresses'],
16984 'SSHAddressesResults': {'additionalProperties': False,
16985 'properties': {'results': {'items': {'$ref': '#/definitions/SSHAddressesResult'},
16987 'required': ['results'],
16989 'SSHProxyResult': {'additionalProperties': False,
16990 'properties': {'use-proxy': {'type': 'boolean'}},
16991 'required': ['use-proxy'],
16993 'SSHPublicKeysResult': {'additionalProperties': False,
16994 'properties': {'error': {'$ref': '#/definitions/Error'},
16995 'public-keys': {'items': {'type': 'string'},
16998 'SSHPublicKeysResults': {'additionalProperties': False,
16999 'properties': {'results': {'items': {'$ref': '#/definitions/SSHPublicKeysResult'},
17001 'required': ['results'],
17002 'type': 'object'}},
17003 'properties': {'AllAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17004 'Result': {'$ref': '#/definitions/SSHAddressesResults'}},
17006 'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17007 'Result': {'$ref': '#/definitions/SSHAddressResults'}},
17009 'Proxy': {'properties': {'Result': {'$ref': '#/definitions/SSHProxyResult'}},
17011 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17012 'Result': {'$ref': '#/definitions/SSHAddressResults'}},
17014 'PublicKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17015 'Result': {'$ref': '#/definitions/SSHPublicKeysResults'}},
17016 'type': 'object'}},
17020 @ReturnMapping(SSHAddressesResults
)
17021 async def AllAddresses(self
, entities
):
17023 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17024 Returns -> typing.Sequence<+T_co>[~SSHAddressesResult]<~SSHAddressesResult>
17026 # map input types to rpc msg
17028 msg
= dict(type='SSHClient', request
='AllAddresses', version
=2, params
=_params
)
17029 _params
['entities'] = entities
17030 reply
= await self
.rpc(msg
)
17035 @ReturnMapping(SSHAddressResults
)
17036 async def PrivateAddress(self
, entities
):
17038 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17039 Returns -> typing.Sequence<+T_co>[~SSHAddressResult]<~SSHAddressResult>
17041 # map input types to rpc msg
17043 msg
= dict(type='SSHClient', request
='PrivateAddress', version
=2, params
=_params
)
17044 _params
['entities'] = entities
17045 reply
= await self
.rpc(msg
)
17050 @ReturnMapping(SSHProxyResult
)
17051 async def Proxy(self
):
17056 # map input types to rpc msg
17058 msg
= dict(type='SSHClient', request
='Proxy', version
=2, params
=_params
)
17060 reply
= await self
.rpc(msg
)
17065 @ReturnMapping(SSHAddressResults
)
17066 async def PublicAddress(self
, entities
):
17068 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17069 Returns -> typing.Sequence<+T_co>[~SSHAddressResult]<~SSHAddressResult>
17071 # map input types to rpc msg
17073 msg
= dict(type='SSHClient', request
='PublicAddress', version
=2, params
=_params
)
17074 _params
['entities'] = entities
17075 reply
= await self
.rpc(msg
)
17080 @ReturnMapping(SSHPublicKeysResults
)
17081 async def PublicKeys(self
, entities
):
17083 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17084 Returns -> typing.Sequence<+T_co>[~SSHPublicKeysResult]<~SSHPublicKeysResult>
17086 # map input types to rpc msg
17088 msg
= dict(type='SSHClient', request
='PublicKeys', version
=2, params
=_params
)
17089 _params
['entities'] = entities
17090 reply
= await self
.rpc(msg
)
17094 class SingularFacade(Type
):
17097 schema
= {'definitions': {'Entities': {'additionalProperties': False,
17098 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
17100 'required': ['entities'],
17102 'Entity': {'additionalProperties': False,
17103 'properties': {'tag': {'type': 'string'}},
17104 'required': ['tag'],
17106 'Error': {'additionalProperties': False,
17107 'properties': {'code': {'type': 'string'},
17108 'info': {'$ref': '#/definitions/ErrorInfo'},
17109 'message': {'type': 'string'}},
17110 'required': ['message', 'code'],
17112 'ErrorInfo': {'additionalProperties': False,
17113 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
17114 'macaroon-path': {'type': 'string'}},
17116 'ErrorResult': {'additionalProperties': False,
17117 'properties': {'error': {'$ref': '#/definitions/Error'}},
17119 'ErrorResults': {'additionalProperties': False,
17120 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
17122 'required': ['results'],
17124 'Macaroon': {'additionalProperties': False, 'type': 'object'},
17125 'SingularClaim': {'additionalProperties': False,
17126 'properties': {'controller-tag': {'type': 'string'},
17127 'duration': {'type': 'integer'},
17128 'model-tag': {'type': 'string'}},
17129 'required': ['model-tag',
17133 'SingularClaims': {'additionalProperties': False,
17134 'properties': {'claims': {'items': {'$ref': '#/definitions/SingularClaim'},
17136 'required': ['claims'],
17137 'type': 'object'}},
17138 'properties': {'Claim': {'properties': {'Params': {'$ref': '#/definitions/SingularClaims'},
17139 'Result': {'$ref': '#/definitions/ErrorResults'}},
17141 'Wait': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17142 'Result': {'$ref': '#/definitions/ErrorResults'}},
17143 'type': 'object'}},
17147 @ReturnMapping(ErrorResults
)
17148 async def Claim(self
, claims
):
17150 claims : typing.Sequence<+T_co>[~SingularClaim]<~SingularClaim>
17151 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
17153 # map input types to rpc msg
17155 msg
= dict(type='Singular', request
='Claim', version
=1, params
=_params
)
17156 _params
['claims'] = claims
17157 reply
= await self
.rpc(msg
)
17162 @ReturnMapping(ErrorResults
)
17163 async def Wait(self
, entities
):
17165 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17166 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
17168 # map input types to rpc msg
17170 msg
= dict(type='Singular', request
='Wait', version
=1, params
=_params
)
17171 _params
['entities'] = entities
17172 reply
= await self
.rpc(msg
)
17176 class SpacesFacade(Type
):
17179 schema
= {'definitions': {'CreateSpaceParams': {'additionalProperties': False,
17180 'properties': {'provider-id': {'type': 'string'},
17181 'public': {'type': 'boolean'},
17182 'space-tag': {'type': 'string'},
17183 'subnet-tags': {'items': {'type': 'string'},
17185 'required': ['subnet-tags',
17189 'CreateSpacesParams': {'additionalProperties': False,
17190 'properties': {'spaces': {'items': {'$ref': '#/definitions/CreateSpaceParams'},
17192 'required': ['spaces'],
17194 'Error': {'additionalProperties': False,
17195 'properties': {'code': {'type': 'string'},
17196 'info': {'$ref': '#/definitions/ErrorInfo'},
17197 'message': {'type': 'string'}},
17198 'required': ['message', 'code'],
17200 'ErrorInfo': {'additionalProperties': False,
17201 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
17202 'macaroon-path': {'type': 'string'}},
17204 'ErrorResult': {'additionalProperties': False,
17205 'properties': {'error': {'$ref': '#/definitions/Error'}},
17207 'ErrorResults': {'additionalProperties': False,
17208 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
17210 'required': ['results'],
17212 'ListSpacesResults': {'additionalProperties': False,
17213 'properties': {'results': {'items': {'$ref': '#/definitions/Space'},
17215 'required': ['results'],
17217 'Macaroon': {'additionalProperties': False, 'type': 'object'},
17218 'Space': {'additionalProperties': False,
17219 'properties': {'error': {'$ref': '#/definitions/Error'},
17220 'name': {'type': 'string'},
17221 'subnets': {'items': {'$ref': '#/definitions/Subnet'},
17223 'required': ['name', 'subnets'],
17225 'Subnet': {'additionalProperties': False,
17226 'properties': {'cidr': {'type': 'string'},
17227 'life': {'type': 'string'},
17228 'provider-id': {'type': 'string'},
17229 'space-tag': {'type': 'string'},
17230 'status': {'type': 'string'},
17231 'vlan-tag': {'type': 'integer'},
17232 'zones': {'items': {'type': 'string'},
17234 'required': ['cidr',
17239 'type': 'object'}},
17240 'properties': {'CreateSpaces': {'properties': {'Params': {'$ref': '#/definitions/CreateSpacesParams'},
17241 'Result': {'$ref': '#/definitions/ErrorResults'}},
17243 'ListSpaces': {'properties': {'Result': {'$ref': '#/definitions/ListSpacesResults'}},
17244 'type': 'object'}},
17248 @ReturnMapping(ErrorResults
)
17249 async def CreateSpaces(self
, spaces
):
17251 spaces : typing.Sequence<+T_co>[~CreateSpaceParams]<~CreateSpaceParams>
17252 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
17254 # map input types to rpc msg
17256 msg
= dict(type='Spaces', request
='CreateSpaces', version
=2, params
=_params
)
17257 _params
['spaces'] = spaces
17258 reply
= await self
.rpc(msg
)
17263 @ReturnMapping(ListSpacesResults
)
17264 async def ListSpaces(self
):
17267 Returns -> typing.Sequence<+T_co>[~Space]<~Space>
17269 # map input types to rpc msg
17271 msg
= dict(type='Spaces', request
='ListSpaces', version
=2, params
=_params
)
17273 reply
= await self
.rpc(msg
)
17277 class StatusHistoryFacade(Type
):
17278 name
= 'StatusHistory'
17280 schema
= {'definitions': {'StatusHistoryPruneArgs': {'additionalProperties': False,
17281 'properties': {'max-history-mb': {'type': 'integer'},
17282 'max-history-time': {'type': 'integer'}},
17283 'required': ['max-history-time',
17285 'type': 'object'}},
17286 'properties': {'Prune': {'properties': {'Params': {'$ref': '#/definitions/StatusHistoryPruneArgs'}},
17287 'type': 'object'}},
17291 @ReturnMapping(None)
17292 async def Prune(self
, max_history_mb
, max_history_time
):
17294 max_history_mb : int
17295 max_history_time : int
17298 # map input types to rpc msg
17300 msg
= dict(type='StatusHistory', request
='Prune', version
=2, params
=_params
)
17301 _params
['max-history-mb'] = max_history_mb
17302 _params
['max-history-time'] = max_history_time
17303 reply
= await self
.rpc(msg
)
17307 class StorageFacade(Type
):
17310 schema
= {'definitions': {'Entities': {'additionalProperties': False,
17311 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
17313 'required': ['entities'],
17315 'Entity': {'additionalProperties': False,
17316 'properties': {'tag': {'type': 'string'}},
17317 'required': ['tag'],
17319 'EntityStatus': {'additionalProperties': False,
17320 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
17321 'type': 'object'}},
17323 'info': {'type': 'string'},
17324 'since': {'format': 'date-time',
17326 'status': {'type': 'string'}},
17327 'required': ['status', 'info', 'since'],
17329 'Error': {'additionalProperties': False,
17330 'properties': {'code': {'type': 'string'},
17331 'info': {'$ref': '#/definitions/ErrorInfo'},
17332 'message': {'type': 'string'}},
17333 'required': ['message', 'code'],
17335 'ErrorInfo': {'additionalProperties': False,
17336 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
17337 'macaroon-path': {'type': 'string'}},
17339 'ErrorResult': {'additionalProperties': False,
17340 'properties': {'error': {'$ref': '#/definitions/Error'}},
17342 'ErrorResults': {'additionalProperties': False,
17343 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
17345 'required': ['results'],
17347 'FilesystemAttachmentInfo': {'additionalProperties': False,
17348 'properties': {'mount-point': {'type': 'string'},
17349 'read-only': {'type': 'boolean'}},
17351 'FilesystemDetails': {'additionalProperties': False,
17352 'properties': {'filesystem-tag': {'type': 'string'},
17353 'info': {'$ref': '#/definitions/FilesystemInfo'},
17354 'machine-attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/FilesystemAttachmentInfo'}},
17356 'status': {'$ref': '#/definitions/EntityStatus'},
17357 'storage': {'$ref': '#/definitions/StorageDetails'},
17358 'volume-tag': {'type': 'string'}},
17359 'required': ['filesystem-tag',
17363 'FilesystemDetailsListResult': {'additionalProperties': False,
17364 'properties': {'error': {'$ref': '#/definitions/Error'},
17365 'result': {'items': {'$ref': '#/definitions/FilesystemDetails'},
17368 'FilesystemDetailsListResults': {'additionalProperties': False,
17369 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemDetailsListResult'},
17372 'FilesystemFilter': {'additionalProperties': False,
17373 'properties': {'machines': {'items': {'type': 'string'},
17376 'FilesystemFilters': {'additionalProperties': False,
17377 'properties': {'filters': {'items': {'$ref': '#/definitions/FilesystemFilter'},
17380 'FilesystemInfo': {'additionalProperties': False,
17381 'properties': {'filesystem-id': {'type': 'string'},
17382 'size': {'type': 'integer'}},
17383 'required': ['filesystem-id', 'size'],
17385 'Macaroon': {'additionalProperties': False, 'type': 'object'},
17386 'StorageAddParams': {'additionalProperties': False,
17387 'properties': {'name': {'type': 'string'},
17388 'storage': {'$ref': '#/definitions/StorageConstraints'},
17389 'unit': {'type': 'string'}},
17390 'required': ['unit', 'name', 'storage'],
17392 'StorageAttachmentDetails': {'additionalProperties': False,
17393 'properties': {'location': {'type': 'string'},
17394 'machine-tag': {'type': 'string'},
17395 'storage-tag': {'type': 'string'},
17396 'unit-tag': {'type': 'string'}},
17397 'required': ['storage-tag',
17401 'StorageConstraints': {'additionalProperties': False,
17402 'properties': {'count': {'type': 'integer'},
17403 'pool': {'type': 'string'},
17404 'size': {'type': 'integer'}},
17406 'StorageDetails': {'additionalProperties': False,
17407 'properties': {'attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/StorageAttachmentDetails'}},
17409 'kind': {'type': 'integer'},
17410 'owner-tag': {'type': 'string'},
17411 'persistent': {'type': 'boolean'},
17412 'status': {'$ref': '#/definitions/EntityStatus'},
17413 'storage-tag': {'type': 'string'}},
17414 'required': ['storage-tag',
17420 'StorageDetailsListResult': {'additionalProperties': False,
17421 'properties': {'error': {'$ref': '#/definitions/Error'},
17422 'result': {'items': {'$ref': '#/definitions/StorageDetails'},
17425 'StorageDetailsListResults': {'additionalProperties': False,
17426 'properties': {'results': {'items': {'$ref': '#/definitions/StorageDetailsListResult'},
17429 'StorageDetailsResult': {'additionalProperties': False,
17430 'properties': {'error': {'$ref': '#/definitions/Error'},
17431 'result': {'$ref': '#/definitions/StorageDetails'}},
17433 'StorageDetailsResults': {'additionalProperties': False,
17434 'properties': {'results': {'items': {'$ref': '#/definitions/StorageDetailsResult'},
17437 'StorageFilter': {'additionalProperties': False,
17439 'StorageFilters': {'additionalProperties': False,
17440 'properties': {'filters': {'items': {'$ref': '#/definitions/StorageFilter'},
17443 'StoragePool': {'additionalProperties': False,
17444 'properties': {'attrs': {'patternProperties': {'.*': {'additionalProperties': True,
17445 'type': 'object'}},
17447 'name': {'type': 'string'},
17448 'provider': {'type': 'string'}},
17449 'required': ['name', 'provider', 'attrs'],
17451 'StoragePoolFilter': {'additionalProperties': False,
17452 'properties': {'names': {'items': {'type': 'string'},
17454 'providers': {'items': {'type': 'string'},
17457 'StoragePoolFilters': {'additionalProperties': False,
17458 'properties': {'filters': {'items': {'$ref': '#/definitions/StoragePoolFilter'},
17461 'StoragePoolsResult': {'additionalProperties': False,
17462 'properties': {'error': {'$ref': '#/definitions/Error'},
17463 'storage-pools': {'items': {'$ref': '#/definitions/StoragePool'},
17466 'StoragePoolsResults': {'additionalProperties': False,
17467 'properties': {'results': {'items': {'$ref': '#/definitions/StoragePoolsResult'},
17470 'StoragesAddParams': {'additionalProperties': False,
17471 'properties': {'storages': {'items': {'$ref': '#/definitions/StorageAddParams'},
17473 'required': ['storages'],
17475 'VolumeAttachmentInfo': {'additionalProperties': False,
17476 'properties': {'bus-address': {'type': 'string'},
17477 'device-link': {'type': 'string'},
17478 'device-name': {'type': 'string'},
17479 'read-only': {'type': 'boolean'}},
17481 'VolumeDetails': {'additionalProperties': False,
17482 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'},
17483 'machine-attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/VolumeAttachmentInfo'}},
17485 'status': {'$ref': '#/definitions/EntityStatus'},
17486 'storage': {'$ref': '#/definitions/StorageDetails'},
17487 'volume-tag': {'type': 'string'}},
17488 'required': ['volume-tag', 'info', 'status'],
17490 'VolumeDetailsListResult': {'additionalProperties': False,
17491 'properties': {'error': {'$ref': '#/definitions/Error'},
17492 'result': {'items': {'$ref': '#/definitions/VolumeDetails'},
17495 'VolumeDetailsListResults': {'additionalProperties': False,
17496 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeDetailsListResult'},
17499 'VolumeFilter': {'additionalProperties': False,
17500 'properties': {'machines': {'items': {'type': 'string'},
17503 'VolumeFilters': {'additionalProperties': False,
17504 'properties': {'filters': {'items': {'$ref': '#/definitions/VolumeFilter'},
17507 'VolumeInfo': {'additionalProperties': False,
17508 'properties': {'hardware-id': {'type': 'string'},
17509 'persistent': {'type': 'boolean'},
17510 'size': {'type': 'integer'},
17511 'volume-id': {'type': 'string'}},
17512 'required': ['volume-id', 'size', 'persistent'],
17513 'type': 'object'}},
17514 'properties': {'AddToUnit': {'properties': {'Params': {'$ref': '#/definitions/StoragesAddParams'},
17515 'Result': {'$ref': '#/definitions/ErrorResults'}},
17517 'CreatePool': {'properties': {'Params': {'$ref': '#/definitions/StoragePool'}},
17519 'ListFilesystems': {'properties': {'Params': {'$ref': '#/definitions/FilesystemFilters'},
17520 'Result': {'$ref': '#/definitions/FilesystemDetailsListResults'}},
17522 'ListPools': {'properties': {'Params': {'$ref': '#/definitions/StoragePoolFilters'},
17523 'Result': {'$ref': '#/definitions/StoragePoolsResults'}},
17525 'ListStorageDetails': {'properties': {'Params': {'$ref': '#/definitions/StorageFilters'},
17526 'Result': {'$ref': '#/definitions/StorageDetailsListResults'}},
17528 'ListVolumes': {'properties': {'Params': {'$ref': '#/definitions/VolumeFilters'},
17529 'Result': {'$ref': '#/definitions/VolumeDetailsListResults'}},
17531 'StorageDetails': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17532 'Result': {'$ref': '#/definitions/StorageDetailsResults'}},
17533 'type': 'object'}},
17537 @ReturnMapping(ErrorResults
)
17538 async def AddToUnit(self
, storages
):
17540 storages : typing.Sequence<+T_co>[~StorageAddParams]<~StorageAddParams>
17541 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
17543 # map input types to rpc msg
17545 msg
= dict(type='Storage', request
='AddToUnit', version
=3, params
=_params
)
17546 _params
['storages'] = storages
17547 reply
= await self
.rpc(msg
)
17552 @ReturnMapping(None)
17553 async def CreatePool(self
, attrs
, name
, provider
):
17555 attrs : typing.Mapping<~KT, +VT_co>[str, typing.Any]
17560 # map input types to rpc msg
17562 msg
= dict(type='Storage', request
='CreatePool', version
=3, params
=_params
)
17563 _params
['attrs'] = attrs
17564 _params
['name'] = name
17565 _params
['provider'] = provider
17566 reply
= await self
.rpc(msg
)
17571 @ReturnMapping(FilesystemDetailsListResults
)
17572 async def ListFilesystems(self
, filters
):
17574 filters : typing.Sequence<+T_co>[~FilesystemFilter]<~FilesystemFilter>
17575 Returns -> typing.Sequence<+T_co>[~FilesystemDetailsListResult]<~FilesystemDetailsListResult>
17577 # map input types to rpc msg
17579 msg
= dict(type='Storage', request
='ListFilesystems', version
=3, params
=_params
)
17580 _params
['filters'] = filters
17581 reply
= await self
.rpc(msg
)
17586 @ReturnMapping(StoragePoolsResults
)
17587 async def ListPools(self
, filters
):
17589 filters : typing.Sequence<+T_co>[~StoragePoolFilter]<~StoragePoolFilter>
17590 Returns -> typing.Sequence<+T_co>[~StoragePoolsResult]<~StoragePoolsResult>
17592 # map input types to rpc msg
17594 msg
= dict(type='Storage', request
='ListPools', version
=3, params
=_params
)
17595 _params
['filters'] = filters
17596 reply
= await self
.rpc(msg
)
17601 @ReturnMapping(StorageDetailsListResults
)
17602 async def ListStorageDetails(self
, filters
):
17604 filters : typing.Sequence<+T_co>[~StorageFilter]<~StorageFilter>
17605 Returns -> typing.Sequence<+T_co>[~StorageDetailsListResult]<~StorageDetailsListResult>
17607 # map input types to rpc msg
17609 msg
= dict(type='Storage', request
='ListStorageDetails', version
=3, params
=_params
)
17610 _params
['filters'] = filters
17611 reply
= await self
.rpc(msg
)
17616 @ReturnMapping(VolumeDetailsListResults
)
17617 async def ListVolumes(self
, filters
):
17619 filters : typing.Sequence<+T_co>[~VolumeFilter]<~VolumeFilter>
17620 Returns -> typing.Sequence<+T_co>[~VolumeDetailsListResult]<~VolumeDetailsListResult>
17622 # map input types to rpc msg
17624 msg
= dict(type='Storage', request
='ListVolumes', version
=3, params
=_params
)
17625 _params
['filters'] = filters
17626 reply
= await self
.rpc(msg
)
17631 @ReturnMapping(StorageDetailsResults
)
17632 async def StorageDetails(self
, entities
):
17634 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17635 Returns -> typing.Sequence<+T_co>[~StorageDetailsResult]<~StorageDetailsResult>
17637 # map input types to rpc msg
17639 msg
= dict(type='Storage', request
='StorageDetails', version
=3, params
=_params
)
17640 _params
['entities'] = entities
17641 reply
= await self
.rpc(msg
)
17645 class StorageProvisionerFacade(Type
):
17646 name
= 'StorageProvisioner'
17648 schema
= {'definitions': {'BlockDevice': {'additionalProperties': False,
17649 'properties': {'BusAddress': {'type': 'string'},
17650 'DeviceLinks': {'items': {'type': 'string'},
17652 'DeviceName': {'type': 'string'},
17653 'FilesystemType': {'type': 'string'},
17654 'HardwareId': {'type': 'string'},
17655 'InUse': {'type': 'boolean'},
17656 'Label': {'type': 'string'},
17657 'MountPoint': {'type': 'string'},
17658 'Size': {'type': 'integer'},
17659 'UUID': {'type': 'string'}},
17660 'required': ['DeviceName',
17671 'BlockDeviceResult': {'additionalProperties': False,
17672 'properties': {'error': {'$ref': '#/definitions/Error'},
17673 'result': {'$ref': '#/definitions/BlockDevice'}},
17674 'required': ['result'],
17676 'BlockDeviceResults': {'additionalProperties': False,
17677 'properties': {'results': {'items': {'$ref': '#/definitions/BlockDeviceResult'},
17680 'Entities': {'additionalProperties': False,
17681 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
17683 'required': ['entities'],
17685 'Entity': {'additionalProperties': False,
17686 'properties': {'tag': {'type': 'string'}},
17687 'required': ['tag'],
17689 'EntityStatusArgs': {'additionalProperties': False,
17690 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
17691 'type': 'object'}},
17693 'info': {'type': 'string'},
17694 'status': {'type': 'string'},
17695 'tag': {'type': 'string'}},
17696 'required': ['tag',
17701 'Error': {'additionalProperties': False,
17702 'properties': {'code': {'type': 'string'},
17703 'info': {'$ref': '#/definitions/ErrorInfo'},
17704 'message': {'type': 'string'}},
17705 'required': ['message', 'code'],
17707 'ErrorInfo': {'additionalProperties': False,
17708 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
17709 'macaroon-path': {'type': 'string'}},
17711 'ErrorResult': {'additionalProperties': False,
17712 'properties': {'error': {'$ref': '#/definitions/Error'}},
17714 'ErrorResults': {'additionalProperties': False,
17715 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
17717 'required': ['results'],
17719 'Filesystem': {'additionalProperties': False,
17720 'properties': {'filesystem-tag': {'type': 'string'},
17721 'info': {'$ref': '#/definitions/FilesystemInfo'},
17722 'volume-tag': {'type': 'string'}},
17723 'required': ['filesystem-tag', 'info'],
17725 'FilesystemAttachment': {'additionalProperties': False,
17726 'properties': {'filesystem-tag': {'type': 'string'},
17727 'info': {'$ref': '#/definitions/FilesystemAttachmentInfo'},
17728 'machine-tag': {'type': 'string'}},
17729 'required': ['filesystem-tag',
17733 'FilesystemAttachmentInfo': {'additionalProperties': False,
17734 'properties': {'mount-point': {'type': 'string'},
17735 'read-only': {'type': 'boolean'}},
17737 'FilesystemAttachmentParams': {'additionalProperties': False,
17738 'properties': {'filesystem-id': {'type': 'string'},
17739 'filesystem-tag': {'type': 'string'},
17740 'instance-id': {'type': 'string'},
17741 'machine-tag': {'type': 'string'},
17742 'mount-point': {'type': 'string'},
17743 'provider': {'type': 'string'},
17744 'read-only': {'type': 'boolean'}},
17745 'required': ['filesystem-tag',
17749 'FilesystemAttachmentParamsResult': {'additionalProperties': False,
17750 'properties': {'error': {'$ref': '#/definitions/Error'},
17751 'result': {'$ref': '#/definitions/FilesystemAttachmentParams'}},
17752 'required': ['result'],
17754 'FilesystemAttachmentParamsResults': {'additionalProperties': False,
17755 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemAttachmentParamsResult'},
17758 'FilesystemAttachmentResult': {'additionalProperties': False,
17759 'properties': {'error': {'$ref': '#/definitions/Error'},
17760 'result': {'$ref': '#/definitions/FilesystemAttachment'}},
17761 'required': ['result'],
17763 'FilesystemAttachmentResults': {'additionalProperties': False,
17764 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemAttachmentResult'},
17767 'FilesystemAttachments': {'additionalProperties': False,
17768 'properties': {'filesystem-attachments': {'items': {'$ref': '#/definitions/FilesystemAttachment'},
17770 'required': ['filesystem-attachments'],
17772 'FilesystemInfo': {'additionalProperties': False,
17773 'properties': {'filesystem-id': {'type': 'string'},
17774 'size': {'type': 'integer'}},
17775 'required': ['filesystem-id', 'size'],
17777 'FilesystemParams': {'additionalProperties': False,
17778 'properties': {'attachment': {'$ref': '#/definitions/FilesystemAttachmentParams'},
17779 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
17780 'type': 'object'}},
17782 'filesystem-tag': {'type': 'string'},
17783 'provider': {'type': 'string'},
17784 'size': {'type': 'integer'},
17785 'tags': {'patternProperties': {'.*': {'type': 'string'}},
17787 'volume-tag': {'type': 'string'}},
17788 'required': ['filesystem-tag',
17792 'FilesystemParamsResult': {'additionalProperties': False,
17793 'properties': {'error': {'$ref': '#/definitions/Error'},
17794 'result': {'$ref': '#/definitions/FilesystemParams'}},
17795 'required': ['result'],
17797 'FilesystemParamsResults': {'additionalProperties': False,
17798 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemParamsResult'},
17801 'FilesystemResult': {'additionalProperties': False,
17802 'properties': {'error': {'$ref': '#/definitions/Error'},
17803 'result': {'$ref': '#/definitions/Filesystem'}},
17804 'required': ['result'],
17806 'FilesystemResults': {'additionalProperties': False,
17807 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemResult'},
17810 'Filesystems': {'additionalProperties': False,
17811 'properties': {'filesystems': {'items': {'$ref': '#/definitions/Filesystem'},
17813 'required': ['filesystems'],
17815 'LifeResult': {'additionalProperties': False,
17816 'properties': {'error': {'$ref': '#/definitions/Error'},
17817 'life': {'type': 'string'}},
17818 'required': ['life'],
17820 'LifeResults': {'additionalProperties': False,
17821 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
17823 'required': ['results'],
17825 'Macaroon': {'additionalProperties': False, 'type': 'object'},
17826 'MachineStorageId': {'additionalProperties': False,
17827 'properties': {'attachment-tag': {'type': 'string'},
17828 'machine-tag': {'type': 'string'}},
17829 'required': ['machine-tag',
17832 'MachineStorageIds': {'additionalProperties': False,
17833 'properties': {'ids': {'items': {'$ref': '#/definitions/MachineStorageId'},
17835 'required': ['ids'],
17837 'MachineStorageIdsWatchResult': {'additionalProperties': False,
17838 'properties': {'changes': {'items': {'$ref': '#/definitions/MachineStorageId'},
17840 'error': {'$ref': '#/definitions/Error'},
17841 'watcher-id': {'type': 'string'}},
17842 'required': ['watcher-id',
17845 'MachineStorageIdsWatchResults': {'additionalProperties': False,
17846 'properties': {'results': {'items': {'$ref': '#/definitions/MachineStorageIdsWatchResult'},
17848 'required': ['results'],
17850 'NotifyWatchResult': {'additionalProperties': False,
17851 'properties': {'NotifyWatcherId': {'type': 'string'},
17852 'error': {'$ref': '#/definitions/Error'}},
17853 'required': ['NotifyWatcherId'],
17855 'NotifyWatchResults': {'additionalProperties': False,
17856 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
17858 'required': ['results'],
17860 'SetStatus': {'additionalProperties': False,
17861 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
17863 'required': ['entities'],
17865 'StringResult': {'additionalProperties': False,
17866 'properties': {'error': {'$ref': '#/definitions/Error'},
17867 'result': {'type': 'string'}},
17868 'required': ['result'],
17870 'StringResults': {'additionalProperties': False,
17871 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
17873 'required': ['results'],
17875 'StringsWatchResult': {'additionalProperties': False,
17876 'properties': {'changes': {'items': {'type': 'string'},
17878 'error': {'$ref': '#/definitions/Error'},
17879 'watcher-id': {'type': 'string'}},
17880 'required': ['watcher-id'],
17882 'StringsWatchResults': {'additionalProperties': False,
17883 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
17885 'required': ['results'],
17887 'Volume': {'additionalProperties': False,
17888 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'},
17889 'volume-tag': {'type': 'string'}},
17890 'required': ['volume-tag', 'info'],
17892 'VolumeAttachment': {'additionalProperties': False,
17893 'properties': {'info': {'$ref': '#/definitions/VolumeAttachmentInfo'},
17894 'machine-tag': {'type': 'string'},
17895 'volume-tag': {'type': 'string'}},
17896 'required': ['volume-tag',
17900 'VolumeAttachmentInfo': {'additionalProperties': False,
17901 'properties': {'bus-address': {'type': 'string'},
17902 'device-link': {'type': 'string'},
17903 'device-name': {'type': 'string'},
17904 'read-only': {'type': 'boolean'}},
17906 'VolumeAttachmentParams': {'additionalProperties': False,
17907 'properties': {'instance-id': {'type': 'string'},
17908 'machine-tag': {'type': 'string'},
17909 'provider': {'type': 'string'},
17910 'read-only': {'type': 'boolean'},
17911 'volume-id': {'type': 'string'},
17912 'volume-tag': {'type': 'string'}},
17913 'required': ['volume-tag',
17917 'VolumeAttachmentParamsResult': {'additionalProperties': False,
17918 'properties': {'error': {'$ref': '#/definitions/Error'},
17919 'result': {'$ref': '#/definitions/VolumeAttachmentParams'}},
17920 'required': ['result'],
17922 'VolumeAttachmentParamsResults': {'additionalProperties': False,
17923 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeAttachmentParamsResult'},
17926 'VolumeAttachmentResult': {'additionalProperties': False,
17927 'properties': {'error': {'$ref': '#/definitions/Error'},
17928 'result': {'$ref': '#/definitions/VolumeAttachment'}},
17929 'required': ['result'],
17931 'VolumeAttachmentResults': {'additionalProperties': False,
17932 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeAttachmentResult'},
17935 'VolumeAttachments': {'additionalProperties': False,
17936 'properties': {'volume-attachments': {'items': {'$ref': '#/definitions/VolumeAttachment'},
17938 'required': ['volume-attachments'],
17940 'VolumeInfo': {'additionalProperties': False,
17941 'properties': {'hardware-id': {'type': 'string'},
17942 'persistent': {'type': 'boolean'},
17943 'size': {'type': 'integer'},
17944 'volume-id': {'type': 'string'}},
17945 'required': ['volume-id', 'size', 'persistent'],
17947 'VolumeParams': {'additionalProperties': False,
17948 'properties': {'attachment': {'$ref': '#/definitions/VolumeAttachmentParams'},
17949 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
17950 'type': 'object'}},
17952 'provider': {'type': 'string'},
17953 'size': {'type': 'integer'},
17954 'tags': {'patternProperties': {'.*': {'type': 'string'}},
17956 'volume-tag': {'type': 'string'}},
17957 'required': ['volume-tag',
17961 'VolumeParamsResult': {'additionalProperties': False,
17962 'properties': {'error': {'$ref': '#/definitions/Error'},
17963 'result': {'$ref': '#/definitions/VolumeParams'}},
17964 'required': ['result'],
17966 'VolumeParamsResults': {'additionalProperties': False,
17967 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeParamsResult'},
17970 'VolumeResult': {'additionalProperties': False,
17971 'properties': {'error': {'$ref': '#/definitions/Error'},
17972 'result': {'$ref': '#/definitions/Volume'}},
17973 'required': ['result'],
17975 'VolumeResults': {'additionalProperties': False,
17976 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeResult'},
17979 'Volumes': {'additionalProperties': False,
17980 'properties': {'volumes': {'items': {'$ref': '#/definitions/Volume'},
17982 'required': ['volumes'],
17983 'type': 'object'}},
17984 'properties': {'AttachmentLife': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
17985 'Result': {'$ref': '#/definitions/LifeResults'}},
17987 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17988 'Result': {'$ref': '#/definitions/ErrorResults'}},
17990 'FilesystemAttachmentParams': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
17991 'Result': {'$ref': '#/definitions/FilesystemAttachmentParamsResults'}},
17993 'FilesystemAttachments': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
17994 'Result': {'$ref': '#/definitions/FilesystemAttachmentResults'}},
17996 'FilesystemParams': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17997 'Result': {'$ref': '#/definitions/FilesystemParamsResults'}},
17999 'Filesystems': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18000 'Result': {'$ref': '#/definitions/FilesystemResults'}},
18002 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18003 'Result': {'$ref': '#/definitions/StringResults'}},
18005 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18006 'Result': {'$ref': '#/definitions/LifeResults'}},
18008 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18009 'Result': {'$ref': '#/definitions/ErrorResults'}},
18011 'RemoveAttachment': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
18012 'Result': {'$ref': '#/definitions/ErrorResults'}},
18014 'SetFilesystemAttachmentInfo': {'properties': {'Params': {'$ref': '#/definitions/FilesystemAttachments'},
18015 'Result': {'$ref': '#/definitions/ErrorResults'}},
18017 'SetFilesystemInfo': {'properties': {'Params': {'$ref': '#/definitions/Filesystems'},
18018 'Result': {'$ref': '#/definitions/ErrorResults'}},
18020 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
18021 'Result': {'$ref': '#/definitions/ErrorResults'}},
18023 'SetVolumeAttachmentInfo': {'properties': {'Params': {'$ref': '#/definitions/VolumeAttachments'},
18024 'Result': {'$ref': '#/definitions/ErrorResults'}},
18026 'SetVolumeInfo': {'properties': {'Params': {'$ref': '#/definitions/Volumes'},
18027 'Result': {'$ref': '#/definitions/ErrorResults'}},
18029 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
18030 'Result': {'$ref': '#/definitions/ErrorResults'}},
18032 'VolumeAttachmentParams': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
18033 'Result': {'$ref': '#/definitions/VolumeAttachmentParamsResults'}},
18035 'VolumeAttachments': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
18036 'Result': {'$ref': '#/definitions/VolumeAttachmentResults'}},
18038 'VolumeBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
18039 'Result': {'$ref': '#/definitions/BlockDeviceResults'}},
18041 'VolumeParams': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18042 'Result': {'$ref': '#/definitions/VolumeParamsResults'}},
18044 'Volumes': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18045 'Result': {'$ref': '#/definitions/VolumeResults'}},
18047 'WatchBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18048 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
18050 'WatchFilesystemAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18051 'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResults'}},
18053 'WatchFilesystems': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18054 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
18056 'WatchMachines': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18057 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
18059 'WatchVolumeAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18060 'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResults'}},
18062 'WatchVolumes': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18063 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
18064 'type': 'object'}},
18068 @ReturnMapping(LifeResults
)
18069 async def AttachmentLife(self
, ids
):
18071 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
18072 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
18074 # map input types to rpc msg
18076 msg
= dict(type='StorageProvisioner', request
='AttachmentLife', version
=3, params
=_params
)
18077 _params
['ids'] = ids
18078 reply
= await self
.rpc(msg
)
18083 @ReturnMapping(ErrorResults
)
18084 async def EnsureDead(self
, entities
):
18086 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
18087 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
18089 # map input types to rpc msg
18091 msg
= dict(type='StorageProvisioner', request
='EnsureDead', version
=3, params
=_params
)
18092 _params
['entities'] = entities
18093 reply
= await self
.rpc(msg
)
18098 @ReturnMapping(FilesystemAttachmentParamsResults
)
18099 async def FilesystemAttachmentParams(self
, ids
):
18101 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
18102 Returns -> typing.Sequence<+T_co>[~FilesystemAttachmentParamsResult]<~FilesystemAttachmentParamsResult>
18104 # map input types to rpc msg
18106 msg
= dict(type='StorageProvisioner', request
='FilesystemAttachmentParams', version
=3, params
=_params
)
18107 _params
['ids'] = ids
18108 reply
= await self
.rpc(msg
)
18113 @ReturnMapping(FilesystemAttachmentResults
)
18114 async def FilesystemAttachments(self
, ids
):
18116 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
18117 Returns -> typing.Sequence<+T_co>[~FilesystemAttachmentResult]<~FilesystemAttachmentResult>
18119 # map input types to rpc msg
18121 msg
= dict(type='StorageProvisioner', request
='FilesystemAttachments', version
=3, params
=_params
)
18122 _params
['ids'] = ids
18123 reply
= await self
.rpc(msg
)
18128 @ReturnMapping(FilesystemParamsResults
)
18129 async def FilesystemParams(self
, entities
):
18131 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
18132 Returns -> typing.Sequence<+T_co>[~FilesystemParamsResult]<~FilesystemParamsResult>
18134 # map input types to rpc msg
18136 msg
= dict(type='StorageProvisioner', request
='FilesystemParams', version
=3, params
=_params
)
18137 _params
['entities'] = entities
18138 reply
= await self
.rpc(msg
)
18143 @ReturnMapping(FilesystemResults
)
18144 async def Filesystems(self
, entities
):
18146 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
18147 Returns -> typing.Sequence<+T_co>[~FilesystemResult]<~FilesystemResult>
18149 # map input types to rpc msg
18151 msg
= dict(type='StorageProvisioner', request
='Filesystems', version
=3, params
=_params
)
18152 _params
['entities'] = entities
18153 reply
= await self
.rpc(msg
)
18158 @ReturnMapping(StringResults
)
18159 async def InstanceId(self
, entities
):
18161 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
18162 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
18164 # map input types to rpc msg
18166 msg
= dict(type='StorageProvisioner', request
='InstanceId', version
=3, params
=_params
)
18167 _params
['entities'] = entities
18168 reply
= await self
.rpc(msg
)
18173 @ReturnMapping(LifeResults
)
18174 async def Life(self
, entities
):
18176 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
18177 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
18179 # map input types to rpc msg
18181 msg
= dict(type='StorageProvisioner', request
='Life', version
=3, params
=_params
)
18182 _params
['entities'] = entities
18183 reply
= await self
.rpc(msg
)
18188 @ReturnMapping(ErrorResults
)
18189 async def Remove(self
, entities
):
18191 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
18192 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
18194 # map input types to rpc msg
18196 msg
= dict(type='StorageProvisioner', request
='Remove', version
=3, params
=_params
)
18197 _params
['entities'] = entities
18198 reply
= await self
.rpc(msg
)
18203 @ReturnMapping(ErrorResults
)
18204 async def RemoveAttachment(self
, ids
):
18206 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
18207 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
18209 # map input types to rpc msg
18211 msg
= dict(type='StorageProvisioner', request
='RemoveAttachment', version
=3, params
=_params
)
18212 _params
['ids'] = ids
18213 reply
= await self
.rpc(msg
)
18218 @ReturnMapping(ErrorResults
)
18219 async def SetFilesystemAttachmentInfo(self
, filesystem_attachments
):
18221 filesystem_attachments : typing.Sequence<+T_co>[~FilesystemAttachment]<~FilesystemAttachment>
18222 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
18224 # map input types to rpc msg
18226 msg
= dict(type='StorageProvisioner', request
='SetFilesystemAttachmentInfo', version
=3, params
=_params
)
18227 _params
['filesystem-attachments'] = filesystem_attachments
18228 reply
= await self
.rpc(msg
)
18233 @ReturnMapping(ErrorResults
)
18234 async def SetFilesystemInfo(self
, filesystems
):
18236 filesystems : typing.Sequence<+T_co>[~Filesystem]<~Filesystem>
18237 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
18239 # map input types to rpc msg
18241 msg
= dict(type='StorageProvisioner', request
='SetFilesystemInfo', version
=3, params
=_params
)
18242 _params
['filesystems'] = filesystems
18243 reply
= await self
.rpc(msg
)
18248 @ReturnMapping(ErrorResults
)
18249 async def SetStatus(self
, entities
):
18251 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
18252 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
18254 # map input types to rpc msg
18256 msg
= dict(type='StorageProvisioner', request
='SetStatus', version
=3, params
=_params
)
18257 _params
['entities'] = entities
18258 reply
= await self
.rpc(msg
)
18263 @ReturnMapping(ErrorResults
)
18264 async def SetVolumeAttachmentInfo(self
, volume_attachments
):
18266 volume_attachments : typing.Sequence<+T_co>[~VolumeAttachment]<~VolumeAttachment>
18267 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
18269 # map input types to rpc msg
18271 msg
= dict(type='StorageProvisioner', request
='SetVolumeAttachmentInfo', version
=3, params
=_params
)
18272 _params
['volume-attachments'] = volume_attachments
18273 reply
= await self
.rpc(msg
)
18278 @ReturnMapping(ErrorResults
)
18279 async def SetVolumeInfo(self
, volumes
):
18281 volumes : typing.Sequence<+T_co>[~Volume]<~Volume>
18282 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
18284 # map input types to rpc msg
18286 msg
= dict(type='StorageProvisioner', request
='SetVolumeInfo', version
=3, params
=_params
)
18287 _params
['volumes'] = volumes
18288 reply
= await self
.rpc(msg
)
18293 @ReturnMapping(ErrorResults
)
18294 async def UpdateStatus(self
, entities
):
18296 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
18297 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
18299 # map input types to rpc msg
18301 msg
= dict(type='StorageProvisioner', request
='UpdateStatus', version
=3, params
=_params
)
18302 _params
['entities'] = entities
18303 reply
= await self
.rpc(msg
)
18308 @ReturnMapping(VolumeAttachmentParamsResults
)
18309 async def VolumeAttachmentParams(self
, ids
):
18311 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
18312 Returns -> typing.Sequence<+T_co>[~VolumeAttachmentParamsResult]<~VolumeAttachmentParamsResult>
18314 # map input types to rpc msg
18316 msg
= dict(type='StorageProvisioner', request
='VolumeAttachmentParams', version
=3, params
=_params
)
18317 _params
['ids'] = ids
18318 reply
= await self
.rpc(msg
)
18323 @ReturnMapping(VolumeAttachmentResults
)
18324 async def VolumeAttachments(self
, ids
):
18326 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
18327 Returns -> typing.Sequence<+T_co>[~VolumeAttachmentResult]<~VolumeAttachmentResult>
18329 # map input types to rpc msg
18331 msg
= dict(type='StorageProvisioner', request
='VolumeAttachments', version
=3, params
=_params
)
18332 _params
['ids'] = ids
18333 reply
= await self
.rpc(msg
)
18338 @ReturnMapping(BlockDeviceResults
)
18339 async def VolumeBlockDevices(self
, ids
):
18341 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
18342 Returns -> typing.Sequence<+T_co>[~BlockDeviceResult]<~BlockDeviceResult>
18344 # map input types to rpc msg
18346 msg
= dict(type='StorageProvisioner', request
='VolumeBlockDevices', version
=3, params
=_params
)
18347 _params
['ids'] = ids
18348 reply
= await self
.rpc(msg
)
18353 @ReturnMapping(VolumeParamsResults
)
18354 async def VolumeParams(self
, entities
):
18356 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
18357 Returns -> typing.Sequence<+T_co>[~VolumeParamsResult]<~VolumeParamsResult>
18359 # map input types to rpc msg
18361 msg
= dict(type='StorageProvisioner', request
='VolumeParams', version
=3, params
=_params
)
18362 _params
['entities'] = entities
18363 reply
= await self
.rpc(msg
)
18368 @ReturnMapping(VolumeResults
)
18369 async def Volumes(self
, entities
):
18371 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
18372 Returns -> typing.Sequence<+T_co>[~VolumeResult]<~VolumeResult>
18374 # map input types to rpc msg
18376 msg
= dict(type='StorageProvisioner', request
='Volumes', version
=3, params
=_params
)
18377 _params
['entities'] = entities
18378 reply
= await self
.rpc(msg
)
18383 @ReturnMapping(NotifyWatchResults
)
18384 async def WatchBlockDevices(self
, entities
):
18386 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
18387 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
18389 # map input types to rpc msg
18391 msg
= dict(type='StorageProvisioner', request
='WatchBlockDevices', version
=3, params
=_params
)
18392 _params
['entities'] = entities
18393 reply
= await self
.rpc(msg
)
18398 @ReturnMapping(MachineStorageIdsWatchResults
)
18399 async def WatchFilesystemAttachments(self
, entities
):
18401 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
18402 Returns -> typing.Sequence<+T_co>[~MachineStorageIdsWatchResult]<~MachineStorageIdsWatchResult>
18404 # map input types to rpc msg
18406 msg
= dict(type='StorageProvisioner', request
='WatchFilesystemAttachments', version
=3, params
=_params
)
18407 _params
['entities'] = entities
18408 reply
= await self
.rpc(msg
)
18413 @ReturnMapping(StringsWatchResults
)
18414 async def WatchFilesystems(self
, entities
):
18416 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
18417 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
18419 # map input types to rpc msg
18421 msg
= dict(type='StorageProvisioner', request
='WatchFilesystems', version
=3, params
=_params
)
18422 _params
['entities'] = entities
18423 reply
= await self
.rpc(msg
)
18428 @ReturnMapping(NotifyWatchResults
)
18429 async def WatchMachines(self
, entities
):
18431 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
18432 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
18434 # map input types to rpc msg
18436 msg
= dict(type='StorageProvisioner', request
='WatchMachines', version
=3, params
=_params
)
18437 _params
['entities'] = entities
18438 reply
= await self
.rpc(msg
)
18443 @ReturnMapping(MachineStorageIdsWatchResults
)
18444 async def WatchVolumeAttachments(self
, entities
):
18446 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
18447 Returns -> typing.Sequence<+T_co>[~MachineStorageIdsWatchResult]<~MachineStorageIdsWatchResult>
18449 # map input types to rpc msg
18451 msg
= dict(type='StorageProvisioner', request
='WatchVolumeAttachments', version
=3, params
=_params
)
18452 _params
['entities'] = entities
18453 reply
= await self
.rpc(msg
)
18458 @ReturnMapping(StringsWatchResults
)
18459 async def WatchVolumes(self
, entities
):
18461 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
18462 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
18464 # map input types to rpc msg
18466 msg
= dict(type='StorageProvisioner', request
='WatchVolumes', version
=3, params
=_params
)
18467 _params
['entities'] = entities
18468 reply
= await self
.rpc(msg
)
18472 class StringsWatcherFacade(Type
):
18473 name
= 'StringsWatcher'
18475 schema
= {'definitions': {'Error': {'additionalProperties': False,
18476 'properties': {'code': {'type': 'string'},
18477 'info': {'$ref': '#/definitions/ErrorInfo'},
18478 'message': {'type': 'string'}},
18479 'required': ['message', 'code'],
18481 'ErrorInfo': {'additionalProperties': False,
18482 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
18483 'macaroon-path': {'type': 'string'}},
18485 'Macaroon': {'additionalProperties': False, 'type': 'object'},
18486 'StringsWatchResult': {'additionalProperties': False,
18487 'properties': {'changes': {'items': {'type': 'string'},
18489 'error': {'$ref': '#/definitions/Error'},
18490 'watcher-id': {'type': 'string'}},
18491 'required': ['watcher-id'],
18492 'type': 'object'}},
18493 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
18495 'Stop': {'type': 'object'}},
18499 @ReturnMapping(StringsWatchResult
)
18500 async def Next(self
):
18503 Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')]
18505 # map input types to rpc msg
18507 msg
= dict(type='StringsWatcher', request
='Next', version
=1, params
=_params
)
18509 reply
= await self
.rpc(msg
)
18514 @ReturnMapping(None)
18515 async def Stop(self
):
18520 # map input types to rpc msg
18522 msg
= dict(type='StringsWatcher', request
='Stop', version
=1, params
=_params
)
18524 reply
= await self
.rpc(msg
)
18528 class SubnetsFacade(Type
):
18531 schema
= {'definitions': {'AddSubnetParams': {'additionalProperties': False,
18532 'properties': {'space-tag': {'type': 'string'},
18533 'subnet-provider-id': {'type': 'string'},
18534 'subnet-tag': {'type': 'string'},
18535 'zones': {'items': {'type': 'string'},
18537 'required': ['space-tag'],
18539 'AddSubnetsParams': {'additionalProperties': False,
18540 'properties': {'subnets': {'items': {'$ref': '#/definitions/AddSubnetParams'},
18542 'required': ['subnets'],
18544 'Error': {'additionalProperties': False,
18545 'properties': {'code': {'type': 'string'},
18546 'info': {'$ref': '#/definitions/ErrorInfo'},
18547 'message': {'type': 'string'}},
18548 'required': ['message', 'code'],
18550 'ErrorInfo': {'additionalProperties': False,
18551 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
18552 'macaroon-path': {'type': 'string'}},
18554 'ErrorResult': {'additionalProperties': False,
18555 'properties': {'error': {'$ref': '#/definitions/Error'}},
18557 'ErrorResults': {'additionalProperties': False,
18558 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
18560 'required': ['results'],
18562 'ListSubnetsResults': {'additionalProperties': False,
18563 'properties': {'results': {'items': {'$ref': '#/definitions/Subnet'},
18565 'required': ['results'],
18567 'Macaroon': {'additionalProperties': False, 'type': 'object'},
18568 'SpaceResult': {'additionalProperties': False,
18569 'properties': {'error': {'$ref': '#/definitions/Error'},
18570 'tag': {'type': 'string'}},
18571 'required': ['tag'],
18573 'SpaceResults': {'additionalProperties': False,
18574 'properties': {'results': {'items': {'$ref': '#/definitions/SpaceResult'},
18576 'required': ['results'],
18578 'Subnet': {'additionalProperties': False,
18579 'properties': {'cidr': {'type': 'string'},
18580 'life': {'type': 'string'},
18581 'provider-id': {'type': 'string'},
18582 'space-tag': {'type': 'string'},
18583 'status': {'type': 'string'},
18584 'vlan-tag': {'type': 'integer'},
18585 'zones': {'items': {'type': 'string'},
18587 'required': ['cidr',
18593 'SubnetsFilters': {'additionalProperties': False,
18594 'properties': {'space-tag': {'type': 'string'},
18595 'zone': {'type': 'string'}},
18597 'ZoneResult': {'additionalProperties': False,
18598 'properties': {'available': {'type': 'boolean'},
18599 'error': {'$ref': '#/definitions/Error'},
18600 'name': {'type': 'string'}},
18601 'required': ['name', 'available'],
18603 'ZoneResults': {'additionalProperties': False,
18604 'properties': {'results': {'items': {'$ref': '#/definitions/ZoneResult'},
18606 'required': ['results'],
18607 'type': 'object'}},
18608 'properties': {'AddSubnets': {'properties': {'Params': {'$ref': '#/definitions/AddSubnetsParams'},
18609 'Result': {'$ref': '#/definitions/ErrorResults'}},
18611 'AllSpaces': {'properties': {'Result': {'$ref': '#/definitions/SpaceResults'}},
18613 'AllZones': {'properties': {'Result': {'$ref': '#/definitions/ZoneResults'}},
18615 'ListSubnets': {'properties': {'Params': {'$ref': '#/definitions/SubnetsFilters'},
18616 'Result': {'$ref': '#/definitions/ListSubnetsResults'}},
18617 'type': 'object'}},
18621 @ReturnMapping(ErrorResults
)
18622 async def AddSubnets(self
, subnets
):
18624 subnets : typing.Sequence<+T_co>[~AddSubnetParams]<~AddSubnetParams>
18625 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
18627 # map input types to rpc msg
18629 msg
= dict(type='Subnets', request
='AddSubnets', version
=2, params
=_params
)
18630 _params
['subnets'] = subnets
18631 reply
= await self
.rpc(msg
)
18636 @ReturnMapping(SpaceResults
)
18637 async def AllSpaces(self
):
18640 Returns -> typing.Sequence<+T_co>[~SpaceResult]<~SpaceResult>
18642 # map input types to rpc msg
18644 msg
= dict(type='Subnets', request
='AllSpaces', version
=2, params
=_params
)
18646 reply
= await self
.rpc(msg
)
18651 @ReturnMapping(ZoneResults
)
18652 async def AllZones(self
):
18655 Returns -> typing.Sequence<+T_co>[~ZoneResult]<~ZoneResult>
18657 # map input types to rpc msg
18659 msg
= dict(type='Subnets', request
='AllZones', version
=2, params
=_params
)
18661 reply
= await self
.rpc(msg
)
18666 @ReturnMapping(ListSubnetsResults
)
18667 async def ListSubnets(self
, space_tag
, zone
):
18671 Returns -> typing.Sequence<+T_co>[~Subnet]<~Subnet>
18673 # map input types to rpc msg
18675 msg
= dict(type='Subnets', request
='ListSubnets', version
=2, params
=_params
)
18676 _params
['space-tag'] = space_tag
18677 _params
['zone'] = zone
18678 reply
= await self
.rpc(msg
)
18682 class UndertakerFacade(Type
):
18683 name
= 'Undertaker'
18685 schema
= {'definitions': {'EntityStatusArgs': {'additionalProperties': False,
18686 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
18687 'type': 'object'}},
18689 'info': {'type': 'string'},
18690 'status': {'type': 'string'},
18691 'tag': {'type': 'string'}},
18692 'required': ['tag',
18697 'Error': {'additionalProperties': False,
18698 'properties': {'code': {'type': 'string'},
18699 'info': {'$ref': '#/definitions/ErrorInfo'},
18700 'message': {'type': 'string'}},
18701 'required': ['message', 'code'],
18703 'ErrorInfo': {'additionalProperties': False,
18704 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
18705 'macaroon-path': {'type': 'string'}},
18707 'ErrorResult': {'additionalProperties': False,
18708 'properties': {'error': {'$ref': '#/definitions/Error'}},
18710 'ErrorResults': {'additionalProperties': False,
18711 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
18713 'required': ['results'],
18715 'Macaroon': {'additionalProperties': False, 'type': 'object'},
18716 'ModelConfigResult': {'additionalProperties': False,
18717 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
18718 'type': 'object'}},
18719 'type': 'object'}},
18720 'required': ['config'],
18722 'NotifyWatchResult': {'additionalProperties': False,
18723 'properties': {'NotifyWatcherId': {'type': 'string'},
18724 'error': {'$ref': '#/definitions/Error'}},
18725 'required': ['NotifyWatcherId'],
18727 'NotifyWatchResults': {'additionalProperties': False,
18728 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
18730 'required': ['results'],
18732 'SetStatus': {'additionalProperties': False,
18733 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
18735 'required': ['entities'],
18737 'UndertakerModelInfo': {'additionalProperties': False,
18738 'properties': {'global-name': {'type': 'string'},
18739 'is-system': {'type': 'boolean'},
18740 'life': {'type': 'string'},
18741 'name': {'type': 'string'},
18742 'uuid': {'type': 'string'}},
18743 'required': ['uuid',
18749 'UndertakerModelInfoResult': {'additionalProperties': False,
18750 'properties': {'error': {'$ref': '#/definitions/Error'},
18751 'result': {'$ref': '#/definitions/UndertakerModelInfo'}},
18752 'required': ['result'],
18753 'type': 'object'}},
18754 'properties': {'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
18756 'ModelInfo': {'properties': {'Result': {'$ref': '#/definitions/UndertakerModelInfoResult'}},
18758 'ProcessDyingModel': {'type': 'object'},
18759 'RemoveModel': {'type': 'object'},
18760 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
18761 'Result': {'$ref': '#/definitions/ErrorResults'}},
18763 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
18764 'Result': {'$ref': '#/definitions/ErrorResults'}},
18766 'WatchModelResources': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
18767 'type': 'object'}},
18771 @ReturnMapping(ModelConfigResult
)
18772 async def ModelConfig(self
):
18775 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
18777 # map input types to rpc msg
18779 msg
= dict(type='Undertaker', request
='ModelConfig', version
=1, params
=_params
)
18781 reply
= await self
.rpc(msg
)
18786 @ReturnMapping(UndertakerModelInfoResult
)
18787 async def ModelInfo(self
):
18790 Returns -> typing.Union[_ForwardRef('Error'), _ForwardRef('UndertakerModelInfo')]
18792 # map input types to rpc msg
18794 msg
= dict(type='Undertaker', request
='ModelInfo', version
=1, params
=_params
)
18796 reply
= await self
.rpc(msg
)
18801 @ReturnMapping(None)
18802 async def ProcessDyingModel(self
):
18807 # map input types to rpc msg
18809 msg
= dict(type='Undertaker', request
='ProcessDyingModel', version
=1, params
=_params
)
18811 reply
= await self
.rpc(msg
)
18816 @ReturnMapping(None)
18817 async def RemoveModel(self
):
18822 # map input types to rpc msg
18824 msg
= dict(type='Undertaker', request
='RemoveModel', version
=1, params
=_params
)
18826 reply
= await self
.rpc(msg
)
18831 @ReturnMapping(ErrorResults
)
18832 async def SetStatus(self
, entities
):
18834 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
18835 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
18837 # map input types to rpc msg
18839 msg
= dict(type='Undertaker', request
='SetStatus', version
=1, params
=_params
)
18840 _params
['entities'] = entities
18841 reply
= await self
.rpc(msg
)
18846 @ReturnMapping(ErrorResults
)
18847 async def UpdateStatus(self
, entities
):
18849 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
18850 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
18852 # map input types to rpc msg
18854 msg
= dict(type='Undertaker', request
='UpdateStatus', version
=1, params
=_params
)
18855 _params
['entities'] = entities
18856 reply
= await self
.rpc(msg
)
18861 @ReturnMapping(NotifyWatchResults
)
18862 async def WatchModelResources(self
):
18865 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
18867 # map input types to rpc msg
18869 msg
= dict(type='Undertaker', request
='WatchModelResources', version
=1, params
=_params
)
18871 reply
= await self
.rpc(msg
)
18875 class UnitAssignerFacade(Type
):
18876 name
= 'UnitAssigner'
18878 schema
= {'definitions': {'Entities': {'additionalProperties': False,
18879 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
18881 'required': ['entities'],
18883 'Entity': {'additionalProperties': False,
18884 'properties': {'tag': {'type': 'string'}},
18885 'required': ['tag'],
18887 'EntityStatusArgs': {'additionalProperties': False,
18888 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
18889 'type': 'object'}},
18891 'info': {'type': 'string'},
18892 'status': {'type': 'string'},
18893 'tag': {'type': 'string'}},
18894 'required': ['tag',
18899 'Error': {'additionalProperties': False,
18900 'properties': {'code': {'type': 'string'},
18901 'info': {'$ref': '#/definitions/ErrorInfo'},
18902 'message': {'type': 'string'}},
18903 'required': ['message', 'code'],
18905 'ErrorInfo': {'additionalProperties': False,
18906 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
18907 'macaroon-path': {'type': 'string'}},
18909 'ErrorResult': {'additionalProperties': False,
18910 'properties': {'error': {'$ref': '#/definitions/Error'}},
18912 'ErrorResults': {'additionalProperties': False,
18913 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
18915 'required': ['results'],
18917 'Macaroon': {'additionalProperties': False, 'type': 'object'},
18918 'SetStatus': {'additionalProperties': False,
18919 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
18921 'required': ['entities'],
18923 'StringsWatchResult': {'additionalProperties': False,
18924 'properties': {'changes': {'items': {'type': 'string'},
18926 'error': {'$ref': '#/definitions/Error'},
18927 'watcher-id': {'type': 'string'}},
18928 'required': ['watcher-id'],
18929 'type': 'object'}},
18930 'properties': {'AssignUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18931 'Result': {'$ref': '#/definitions/ErrorResults'}},
18933 'SetAgentStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
18934 'Result': {'$ref': '#/definitions/ErrorResults'}},
18936 'WatchUnitAssignments': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
18937 'type': 'object'}},
18941 @ReturnMapping(ErrorResults
)
18942 async def AssignUnits(self
, entities
):
18944 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
18945 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
18947 # map input types to rpc msg
18949 msg
= dict(type='UnitAssigner', request
='AssignUnits', version
=1, params
=_params
)
18950 _params
['entities'] = entities
18951 reply
= await self
.rpc(msg
)
18956 @ReturnMapping(ErrorResults
)
18957 async def SetAgentStatus(self
, entities
):
18959 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
18960 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
18962 # map input types to rpc msg
18964 msg
= dict(type='UnitAssigner', request
='SetAgentStatus', version
=1, params
=_params
)
18965 _params
['entities'] = entities
18966 reply
= await self
.rpc(msg
)
18971 @ReturnMapping(StringsWatchResult
)
18972 async def WatchUnitAssignments(self
):
18975 Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')]
18977 # map input types to rpc msg
18979 msg
= dict(type='UnitAssigner', request
='WatchUnitAssignments', version
=1, params
=_params
)
18981 reply
= await self
.rpc(msg
)
18985 class UniterFacade(Type
):
18988 schema
= {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
18989 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
18992 'required': ['servers'],
18994 'Action': {'additionalProperties': False,
18995 'properties': {'name': {'type': 'string'},
18996 'parameters': {'patternProperties': {'.*': {'additionalProperties': True,
18997 'type': 'object'}},
18999 'receiver': {'type': 'string'},
19000 'tag': {'type': 'string'}},
19001 'required': ['tag', 'receiver', 'name'],
19003 'ActionExecutionResult': {'additionalProperties': False,
19004 'properties': {'action-tag': {'type': 'string'},
19005 'message': {'type': 'string'},
19006 'results': {'patternProperties': {'.*': {'additionalProperties': True,
19007 'type': 'object'}},
19009 'status': {'type': 'string'}},
19010 'required': ['action-tag', 'status'],
19012 'ActionExecutionResults': {'additionalProperties': False,
19013 'properties': {'results': {'items': {'$ref': '#/definitions/ActionExecutionResult'},
19016 'ActionResult': {'additionalProperties': False,
19017 'properties': {'action': {'$ref': '#/definitions/Action'},
19018 'completed': {'format': 'date-time',
19020 'enqueued': {'format': 'date-time',
19022 'error': {'$ref': '#/definitions/Error'},
19023 'message': {'type': 'string'},
19024 'output': {'patternProperties': {'.*': {'additionalProperties': True,
19025 'type': 'object'}},
19027 'started': {'format': 'date-time',
19029 'status': {'type': 'string'}},
19031 'ActionResults': {'additionalProperties': False,
19032 'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'},
19035 'Address': {'additionalProperties': False,
19036 'properties': {'scope': {'type': 'string'},
19037 'space-name': {'type': 'string'},
19038 'type': {'type': 'string'},
19039 'value': {'type': 'string'}},
19040 'required': ['value', 'type', 'scope'],
19042 'ApplicationStatusResult': {'additionalProperties': False,
19043 'properties': {'application': {'$ref': '#/definitions/StatusResult'},
19044 'error': {'$ref': '#/definitions/Error'},
19045 'units': {'patternProperties': {'.*': {'$ref': '#/definitions/StatusResult'}},
19046 'type': 'object'}},
19047 'required': ['application',
19050 'ApplicationStatusResults': {'additionalProperties': False,
19051 'properties': {'results': {'items': {'$ref': '#/definitions/ApplicationStatusResult'},
19053 'required': ['results'],
19055 'BoolResult': {'additionalProperties': False,
19056 'properties': {'error': {'$ref': '#/definitions/Error'},
19057 'result': {'type': 'boolean'}},
19058 'required': ['result'],
19060 'BoolResults': {'additionalProperties': False,
19061 'properties': {'results': {'items': {'$ref': '#/definitions/BoolResult'},
19063 'required': ['results'],
19065 'BytesResult': {'additionalProperties': False,
19066 'properties': {'result': {'items': {'type': 'integer'},
19068 'required': ['result'],
19070 'CharmRelation': {'additionalProperties': False,
19071 'properties': {'interface': {'type': 'string'},
19072 'limit': {'type': 'integer'},
19073 'name': {'type': 'string'},
19074 'optional': {'type': 'boolean'},
19075 'role': {'type': 'string'},
19076 'scope': {'type': 'string'}},
19077 'required': ['name',
19084 'CharmURL': {'additionalProperties': False,
19085 'properties': {'url': {'type': 'string'}},
19086 'required': ['url'],
19088 'CharmURLs': {'additionalProperties': False,
19089 'properties': {'urls': {'items': {'$ref': '#/definitions/CharmURL'},
19091 'required': ['urls'],
19093 'ConfigSettingsResult': {'additionalProperties': False,
19094 'properties': {'error': {'$ref': '#/definitions/Error'},
19095 'settings': {'patternProperties': {'.*': {'additionalProperties': True,
19096 'type': 'object'}},
19097 'type': 'object'}},
19098 'required': ['settings'],
19100 'ConfigSettingsResults': {'additionalProperties': False,
19101 'properties': {'results': {'items': {'$ref': '#/definitions/ConfigSettingsResult'},
19103 'required': ['results'],
19105 'Endpoint': {'additionalProperties': False,
19106 'properties': {'application-name': {'type': 'string'},
19107 'relation': {'$ref': '#/definitions/CharmRelation'}},
19108 'required': ['application-name', 'relation'],
19110 'Entities': {'additionalProperties': False,
19111 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
19113 'required': ['entities'],
19115 'EntitiesCharmURL': {'additionalProperties': False,
19116 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityCharmURL'},
19118 'required': ['entities'],
19120 'EntitiesPortRanges': {'additionalProperties': False,
19121 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityPortRange'},
19123 'required': ['entities'],
19125 'Entity': {'additionalProperties': False,
19126 'properties': {'tag': {'type': 'string'}},
19127 'required': ['tag'],
19129 'EntityCharmURL': {'additionalProperties': False,
19130 'properties': {'charm-url': {'type': 'string'},
19131 'tag': {'type': 'string'}},
19132 'required': ['tag', 'charm-url'],
19134 'EntityPortRange': {'additionalProperties': False,
19135 'properties': {'from-port': {'type': 'integer'},
19136 'protocol': {'type': 'string'},
19137 'tag': {'type': 'string'},
19138 'to-port': {'type': 'integer'}},
19139 'required': ['tag',
19144 'EntityStatusArgs': {'additionalProperties': False,
19145 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
19146 'type': 'object'}},
19148 'info': {'type': 'string'},
19149 'status': {'type': 'string'},
19150 'tag': {'type': 'string'}},
19151 'required': ['tag',
19156 'EntityWorkloadVersion': {'additionalProperties': False,
19157 'properties': {'tag': {'type': 'string'},
19158 'workload-version': {'type': 'string'}},
19159 'required': ['tag',
19160 'workload-version'],
19162 'EntityWorkloadVersions': {'additionalProperties': False,
19163 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityWorkloadVersion'},
19165 'required': ['entities'],
19167 'Error': {'additionalProperties': False,
19168 'properties': {'code': {'type': 'string'},
19169 'info': {'$ref': '#/definitions/ErrorInfo'},
19170 'message': {'type': 'string'}},
19171 'required': ['message', 'code'],
19173 'ErrorInfo': {'additionalProperties': False,
19174 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
19175 'macaroon-path': {'type': 'string'}},
19177 'ErrorResult': {'additionalProperties': False,
19178 'properties': {'error': {'$ref': '#/definitions/Error'}},
19180 'ErrorResults': {'additionalProperties': False,
19181 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
19183 'required': ['results'],
19185 'GetLeadershipSettingsBulkResults': {'additionalProperties': False,
19186 'properties': {'results': {'items': {'$ref': '#/definitions/GetLeadershipSettingsResult'},
19188 'required': ['results'],
19190 'GetLeadershipSettingsResult': {'additionalProperties': False,
19191 'properties': {'error': {'$ref': '#/definitions/Error'},
19192 'settings': {'patternProperties': {'.*': {'type': 'string'}},
19193 'type': 'object'}},
19194 'required': ['settings'],
19196 'HostPort': {'additionalProperties': False,
19197 'properties': {'Address': {'$ref': '#/definitions/Address'},
19198 'port': {'type': 'integer'}},
19199 'required': ['Address', 'port'],
19201 'IntResult': {'additionalProperties': False,
19202 'properties': {'error': {'$ref': '#/definitions/Error'},
19203 'result': {'type': 'integer'}},
19204 'required': ['result'],
19206 'IntResults': {'additionalProperties': False,
19207 'properties': {'results': {'items': {'$ref': '#/definitions/IntResult'},
19209 'required': ['results'],
19211 'LifeResult': {'additionalProperties': False,
19212 'properties': {'error': {'$ref': '#/definitions/Error'},
19213 'life': {'type': 'string'}},
19214 'required': ['life'],
19216 'LifeResults': {'additionalProperties': False,
19217 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
19219 'required': ['results'],
19221 'Macaroon': {'additionalProperties': False, 'type': 'object'},
19222 'MachinePortRange': {'additionalProperties': False,
19223 'properties': {'port-range': {'$ref': '#/definitions/PortRange'},
19224 'relation-tag': {'type': 'string'},
19225 'unit-tag': {'type': 'string'}},
19226 'required': ['unit-tag',
19230 'MachinePortsResult': {'additionalProperties': False,
19231 'properties': {'error': {'$ref': '#/definitions/Error'},
19232 'ports': {'items': {'$ref': '#/definitions/MachinePortRange'},
19234 'required': ['ports'],
19236 'MachinePortsResults': {'additionalProperties': False,
19237 'properties': {'results': {'items': {'$ref': '#/definitions/MachinePortsResult'},
19239 'required': ['results'],
19241 'MergeLeadershipSettingsBulkParams': {'additionalProperties': False,
19242 'properties': {'params': {'items': {'$ref': '#/definitions/MergeLeadershipSettingsParam'},
19244 'required': ['params'],
19246 'MergeLeadershipSettingsParam': {'additionalProperties': False,
19247 'properties': {'application-tag': {'type': 'string'},
19248 'settings': {'patternProperties': {'.*': {'type': 'string'}},
19249 'type': 'object'}},
19250 'required': ['application-tag',
19253 'MeterStatusResult': {'additionalProperties': False,
19254 'properties': {'code': {'type': 'string'},
19255 'error': {'$ref': '#/definitions/Error'},
19256 'info': {'type': 'string'}},
19257 'required': ['code', 'info'],
19259 'MeterStatusResults': {'additionalProperties': False,
19260 'properties': {'results': {'items': {'$ref': '#/definitions/MeterStatusResult'},
19262 'required': ['results'],
19264 'Metric': {'additionalProperties': False,
19265 'properties': {'key': {'type': 'string'},
19266 'time': {'format': 'date-time',
19268 'value': {'type': 'string'}},
19269 'required': ['key', 'value', 'time'],
19271 'MetricBatch': {'additionalProperties': False,
19272 'properties': {'charm-url': {'type': 'string'},
19273 'created': {'format': 'date-time',
19275 'metrics': {'items': {'$ref': '#/definitions/Metric'},
19277 'uuid': {'type': 'string'}},
19278 'required': ['uuid',
19283 'MetricBatchParam': {'additionalProperties': False,
19284 'properties': {'batch': {'$ref': '#/definitions/MetricBatch'},
19285 'tag': {'type': 'string'}},
19286 'required': ['tag', 'batch'],
19288 'MetricBatchParams': {'additionalProperties': False,
19289 'properties': {'batches': {'items': {'$ref': '#/definitions/MetricBatchParam'},
19291 'required': ['batches'],
19293 'ModelConfigResult': {'additionalProperties': False,
19294 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
19295 'type': 'object'}},
19296 'type': 'object'}},
19297 'required': ['config'],
19299 'ModelResult': {'additionalProperties': False,
19300 'properties': {'error': {'$ref': '#/definitions/Error'},
19301 'name': {'type': 'string'},
19302 'uuid': {'type': 'string'}},
19303 'required': ['name', 'uuid'],
19305 'NetworkConfig': {'additionalProperties': False,
19306 'properties': {'address': {'type': 'string'},
19307 'cidr': {'type': 'string'},
19308 'config-type': {'type': 'string'},
19309 'device-index': {'type': 'integer'},
19310 'disabled': {'type': 'boolean'},
19311 'dns-search-domains': {'items': {'type': 'string'},
19313 'dns-servers': {'items': {'type': 'string'},
19315 'gateway-address': {'type': 'string'},
19316 'interface-name': {'type': 'string'},
19317 'interface-type': {'type': 'string'},
19318 'mac-address': {'type': 'string'},
19319 'mtu': {'type': 'integer'},
19320 'no-auto-start': {'type': 'boolean'},
19321 'parent-interface-name': {'type': 'string'},
19322 'provider-address-id': {'type': 'string'},
19323 'provider-id': {'type': 'string'},
19324 'provider-space-id': {'type': 'string'},
19325 'provider-subnet-id': {'type': 'string'},
19326 'provider-vlan-id': {'type': 'string'},
19327 'vlan-tag': {'type': 'integer'}},
19328 'required': ['device-index',
19333 'provider-subnet-id',
19334 'provider-space-id',
19335 'provider-address-id',
19336 'provider-vlan-id',
19339 'parent-interface-name',
19343 'NotifyWatchResult': {'additionalProperties': False,
19344 'properties': {'NotifyWatcherId': {'type': 'string'},
19345 'error': {'$ref': '#/definitions/Error'}},
19346 'required': ['NotifyWatcherId'],
19348 'NotifyWatchResults': {'additionalProperties': False,
19349 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
19351 'required': ['results'],
19353 'PortRange': {'additionalProperties': False,
19354 'properties': {'from-port': {'type': 'integer'},
19355 'protocol': {'type': 'string'},
19356 'to-port': {'type': 'integer'}},
19357 'required': ['from-port', 'to-port', 'protocol'],
19359 'RelationIds': {'additionalProperties': False,
19360 'properties': {'relation-ids': {'items': {'type': 'integer'},
19362 'required': ['relation-ids'],
19364 'RelationResult': {'additionalProperties': False,
19365 'properties': {'endpoint': {'$ref': '#/definitions/Endpoint'},
19366 'error': {'$ref': '#/definitions/Error'},
19367 'id': {'type': 'integer'},
19368 'key': {'type': 'string'},
19369 'life': {'type': 'string'}},
19370 'required': ['life',
19375 'RelationResults': {'additionalProperties': False,
19376 'properties': {'results': {'items': {'$ref': '#/definitions/RelationResult'},
19378 'required': ['results'],
19380 'RelationUnit': {'additionalProperties': False,
19381 'properties': {'relation': {'type': 'string'},
19382 'unit': {'type': 'string'}},
19383 'required': ['relation', 'unit'],
19385 'RelationUnitPair': {'additionalProperties': False,
19386 'properties': {'local-unit': {'type': 'string'},
19387 'relation': {'type': 'string'},
19388 'remote-unit': {'type': 'string'}},
19389 'required': ['relation',
19393 'RelationUnitPairs': {'additionalProperties': False,
19394 'properties': {'relation-unit-pairs': {'items': {'$ref': '#/definitions/RelationUnitPair'},
19396 'required': ['relation-unit-pairs'],
19398 'RelationUnitSettings': {'additionalProperties': False,
19399 'properties': {'relation': {'type': 'string'},
19400 'settings': {'patternProperties': {'.*': {'type': 'string'}},
19402 'unit': {'type': 'string'}},
19403 'required': ['relation',
19407 'RelationUnits': {'additionalProperties': False,
19408 'properties': {'relation-units': {'items': {'$ref': '#/definitions/RelationUnit'},
19410 'required': ['relation-units'],
19412 'RelationUnitsChange': {'additionalProperties': False,
19413 'properties': {'changed': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitSettings'}},
19415 'departed': {'items': {'type': 'string'},
19417 'required': ['changed'],
19419 'RelationUnitsSettings': {'additionalProperties': False,
19420 'properties': {'relation-units': {'items': {'$ref': '#/definitions/RelationUnitSettings'},
19422 'required': ['relation-units'],
19424 'RelationUnitsWatchResult': {'additionalProperties': False,
19425 'properties': {'changes': {'$ref': '#/definitions/RelationUnitsChange'},
19426 'error': {'$ref': '#/definitions/Error'},
19427 'watcher-id': {'type': 'string'}},
19428 'required': ['watcher-id',
19431 'RelationUnitsWatchResults': {'additionalProperties': False,
19432 'properties': {'results': {'items': {'$ref': '#/definitions/RelationUnitsWatchResult'},
19434 'required': ['results'],
19436 'ResolvedModeResult': {'additionalProperties': False,
19437 'properties': {'error': {'$ref': '#/definitions/Error'},
19438 'mode': {'type': 'string'}},
19439 'required': ['mode'],
19441 'ResolvedModeResults': {'additionalProperties': False,
19442 'properties': {'results': {'items': {'$ref': '#/definitions/ResolvedModeResult'},
19444 'required': ['results'],
19446 'SetStatus': {'additionalProperties': False,
19447 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
19449 'required': ['entities'],
19451 'SettingsResult': {'additionalProperties': False,
19452 'properties': {'error': {'$ref': '#/definitions/Error'},
19453 'settings': {'patternProperties': {'.*': {'type': 'string'}},
19454 'type': 'object'}},
19455 'required': ['settings'],
19457 'SettingsResults': {'additionalProperties': False,
19458 'properties': {'results': {'items': {'$ref': '#/definitions/SettingsResult'},
19460 'required': ['results'],
19462 'StatusResult': {'additionalProperties': False,
19463 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
19464 'type': 'object'}},
19466 'error': {'$ref': '#/definitions/Error'},
19467 'id': {'type': 'string'},
19468 'info': {'type': 'string'},
19469 'life': {'type': 'string'},
19470 'since': {'format': 'date-time',
19472 'status': {'type': 'string'}},
19480 'StatusResults': {'additionalProperties': False,
19481 'properties': {'results': {'items': {'$ref': '#/definitions/StatusResult'},
19483 'required': ['results'],
19485 'StorageAddParams': {'additionalProperties': False,
19486 'properties': {'name': {'type': 'string'},
19487 'storage': {'$ref': '#/definitions/StorageConstraints'},
19488 'unit': {'type': 'string'}},
19489 'required': ['unit', 'name', 'storage'],
19491 'StorageAttachment': {'additionalProperties': False,
19492 'properties': {'kind': {'type': 'integer'},
19493 'life': {'type': 'string'},
19494 'location': {'type': 'string'},
19495 'owner-tag': {'type': 'string'},
19496 'storage-tag': {'type': 'string'},
19497 'unit-tag': {'type': 'string'}},
19498 'required': ['storage-tag',
19505 'StorageAttachmentId': {'additionalProperties': False,
19506 'properties': {'storage-tag': {'type': 'string'},
19507 'unit-tag': {'type': 'string'}},
19508 'required': ['storage-tag',
19511 'StorageAttachmentIds': {'additionalProperties': False,
19512 'properties': {'ids': {'items': {'$ref': '#/definitions/StorageAttachmentId'},
19514 'required': ['ids'],
19516 'StorageAttachmentIdsResult': {'additionalProperties': False,
19517 'properties': {'error': {'$ref': '#/definitions/Error'},
19518 'result': {'$ref': '#/definitions/StorageAttachmentIds'}},
19519 'required': ['result'],
19521 'StorageAttachmentIdsResults': {'additionalProperties': False,
19522 'properties': {'results': {'items': {'$ref': '#/definitions/StorageAttachmentIdsResult'},
19525 'StorageAttachmentResult': {'additionalProperties': False,
19526 'properties': {'error': {'$ref': '#/definitions/Error'},
19527 'result': {'$ref': '#/definitions/StorageAttachment'}},
19528 'required': ['result'],
19530 'StorageAttachmentResults': {'additionalProperties': False,
19531 'properties': {'results': {'items': {'$ref': '#/definitions/StorageAttachmentResult'},
19534 'StorageConstraints': {'additionalProperties': False,
19535 'properties': {'count': {'type': 'integer'},
19536 'pool': {'type': 'string'},
19537 'size': {'type': 'integer'}},
19539 'StoragesAddParams': {'additionalProperties': False,
19540 'properties': {'storages': {'items': {'$ref': '#/definitions/StorageAddParams'},
19542 'required': ['storages'],
19544 'StringBoolResult': {'additionalProperties': False,
19545 'properties': {'error': {'$ref': '#/definitions/Error'},
19546 'ok': {'type': 'boolean'},
19547 'result': {'type': 'string'}},
19548 'required': ['result', 'ok'],
19550 'StringBoolResults': {'additionalProperties': False,
19551 'properties': {'results': {'items': {'$ref': '#/definitions/StringBoolResult'},
19553 'required': ['results'],
19555 'StringResult': {'additionalProperties': False,
19556 'properties': {'error': {'$ref': '#/definitions/Error'},
19557 'result': {'type': 'string'}},
19558 'required': ['result'],
19560 'StringResults': {'additionalProperties': False,
19561 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
19563 'required': ['results'],
19565 'StringsResult': {'additionalProperties': False,
19566 'properties': {'error': {'$ref': '#/definitions/Error'},
19567 'result': {'items': {'type': 'string'},
19570 'StringsResults': {'additionalProperties': False,
19571 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
19573 'required': ['results'],
19575 'StringsWatchResult': {'additionalProperties': False,
19576 'properties': {'changes': {'items': {'type': 'string'},
19578 'error': {'$ref': '#/definitions/Error'},
19579 'watcher-id': {'type': 'string'}},
19580 'required': ['watcher-id'],
19582 'StringsWatchResults': {'additionalProperties': False,
19583 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
19585 'required': ['results'],
19587 'UnitNetworkConfig': {'additionalProperties': False,
19588 'properties': {'binding-name': {'type': 'string'},
19589 'unit-tag': {'type': 'string'}},
19590 'required': ['unit-tag', 'binding-name'],
19592 'UnitNetworkConfigResult': {'additionalProperties': False,
19593 'properties': {'error': {'$ref': '#/definitions/Error'},
19594 'info': {'items': {'$ref': '#/definitions/NetworkConfig'},
19596 'required': ['info'],
19598 'UnitNetworkConfigResults': {'additionalProperties': False,
19599 'properties': {'results': {'items': {'$ref': '#/definitions/UnitNetworkConfigResult'},
19601 'required': ['results'],
19603 'UnitSettings': {'additionalProperties': False,
19604 'properties': {'version': {'type': 'integer'}},
19605 'required': ['version'],
19607 'UnitsNetworkConfig': {'additionalProperties': False,
19608 'properties': {'args': {'items': {'$ref': '#/definitions/UnitNetworkConfig'},
19610 'required': ['args'],
19611 'type': 'object'}},
19612 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
19614 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
19616 'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19617 'Result': {'$ref': '#/definitions/ActionResults'}},
19619 'AddMetricBatches': {'properties': {'Params': {'$ref': '#/definitions/MetricBatchParams'},
19620 'Result': {'$ref': '#/definitions/ErrorResults'}},
19622 'AddUnitStorage': {'properties': {'Params': {'$ref': '#/definitions/StoragesAddParams'},
19623 'Result': {'$ref': '#/definitions/ErrorResults'}},
19625 'AllMachinePorts': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19626 'Result': {'$ref': '#/definitions/MachinePortsResults'}},
19628 'ApplicationStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19629 'Result': {'$ref': '#/definitions/ApplicationStatusResults'}},
19631 'AssignedMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19632 'Result': {'$ref': '#/definitions/StringResults'}},
19634 'AvailabilityZone': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19635 'Result': {'$ref': '#/definitions/StringResults'}},
19637 'BeginActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19638 'Result': {'$ref': '#/definitions/ErrorResults'}},
19640 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
19642 'CharmArchiveSha256': {'properties': {'Params': {'$ref': '#/definitions/CharmURLs'},
19643 'Result': {'$ref': '#/definitions/StringResults'}},
19645 'CharmModifiedVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19646 'Result': {'$ref': '#/definitions/IntResults'}},
19648 'CharmURL': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19649 'Result': {'$ref': '#/definitions/StringBoolResults'}},
19651 'ClearResolved': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19652 'Result': {'$ref': '#/definitions/ErrorResults'}},
19654 'ClosePorts': {'properties': {'Params': {'$ref': '#/definitions/EntitiesPortRanges'},
19655 'Result': {'$ref': '#/definitions/ErrorResults'}},
19657 'ConfigSettings': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19658 'Result': {'$ref': '#/definitions/ConfigSettingsResults'}},
19660 'CurrentModel': {'properties': {'Result': {'$ref': '#/definitions/ModelResult'}},
19662 'Destroy': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19663 'Result': {'$ref': '#/definitions/ErrorResults'}},
19665 'DestroyAllSubordinates': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19666 'Result': {'$ref': '#/definitions/ErrorResults'}},
19668 'DestroyUnitStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19669 'Result': {'$ref': '#/definitions/ErrorResults'}},
19671 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19672 'Result': {'$ref': '#/definitions/ErrorResults'}},
19674 'EnterScope': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
19675 'Result': {'$ref': '#/definitions/ErrorResults'}},
19677 'FinishActions': {'properties': {'Params': {'$ref': '#/definitions/ActionExecutionResults'},
19678 'Result': {'$ref': '#/definitions/ErrorResults'}},
19680 'GetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19681 'Result': {'$ref': '#/definitions/MeterStatusResults'}},
19683 'GetPrincipal': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19684 'Result': {'$ref': '#/definitions/StringBoolResults'}},
19686 'HasSubordinates': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19687 'Result': {'$ref': '#/definitions/BoolResults'}},
19689 'JoinedRelations': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19690 'Result': {'$ref': '#/definitions/StringsResults'}},
19692 'LeaveScope': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
19693 'Result': {'$ref': '#/definitions/ErrorResults'}},
19695 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19696 'Result': {'$ref': '#/definitions/LifeResults'}},
19698 'Merge': {'properties': {'Params': {'$ref': '#/definitions/MergeLeadershipSettingsBulkParams'},
19699 'Result': {'$ref': '#/definitions/ErrorResults'}},
19701 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
19703 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
19705 'NetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/UnitsNetworkConfig'},
19706 'Result': {'$ref': '#/definitions/UnitNetworkConfigResults'}},
19708 'OpenPorts': {'properties': {'Params': {'$ref': '#/definitions/EntitiesPortRanges'},
19709 'Result': {'$ref': '#/definitions/ErrorResults'}},
19711 'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19712 'Result': {'$ref': '#/definitions/StringResults'}},
19714 'ProviderType': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
19716 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19717 'Result': {'$ref': '#/definitions/StringResults'}},
19719 'Read': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19720 'Result': {'$ref': '#/definitions/GetLeadershipSettingsBulkResults'}},
19722 'ReadRemoteSettings': {'properties': {'Params': {'$ref': '#/definitions/RelationUnitPairs'},
19723 'Result': {'$ref': '#/definitions/SettingsResults'}},
19725 'ReadSettings': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
19726 'Result': {'$ref': '#/definitions/SettingsResults'}},
19728 'Relation': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
19729 'Result': {'$ref': '#/definitions/RelationResults'}},
19731 'RelationById': {'properties': {'Params': {'$ref': '#/definitions/RelationIds'},
19732 'Result': {'$ref': '#/definitions/RelationResults'}},
19734 'RemoveStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
19735 'Result': {'$ref': '#/definitions/ErrorResults'}},
19737 'RequestReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19738 'Result': {'$ref': '#/definitions/ErrorResults'}},
19740 'Resolved': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19741 'Result': {'$ref': '#/definitions/ResolvedModeResults'}},
19743 'SetAgentStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
19744 'Result': {'$ref': '#/definitions/ErrorResults'}},
19746 'SetApplicationStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
19747 'Result': {'$ref': '#/definitions/ErrorResults'}},
19749 'SetCharmURL': {'properties': {'Params': {'$ref': '#/definitions/EntitiesCharmURL'},
19750 'Result': {'$ref': '#/definitions/ErrorResults'}},
19752 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
19753 'Result': {'$ref': '#/definitions/ErrorResults'}},
19755 'SetUnitStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
19756 'Result': {'$ref': '#/definitions/ErrorResults'}},
19758 'SetWorkloadVersion': {'properties': {'Params': {'$ref': '#/definitions/EntityWorkloadVersions'},
19759 'Result': {'$ref': '#/definitions/ErrorResults'}},
19761 'StorageAttachmentLife': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
19762 'Result': {'$ref': '#/definitions/LifeResults'}},
19764 'StorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
19765 'Result': {'$ref': '#/definitions/StorageAttachmentResults'}},
19767 'UnitStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19768 'Result': {'$ref': '#/definitions/StatusResults'}},
19770 'UnitStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19771 'Result': {'$ref': '#/definitions/StorageAttachmentIdsResults'}},
19773 'UpdateSettings': {'properties': {'Params': {'$ref': '#/definitions/RelationUnitsSettings'},
19774 'Result': {'$ref': '#/definitions/ErrorResults'}},
19776 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19777 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
19779 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
19781 'WatchActionNotifications': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19782 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
19784 'WatchApplicationRelations': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19785 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
19787 'WatchConfigSettings': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19788 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
19790 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
19792 'WatchLeadershipSettings': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19793 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
19795 'WatchMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19796 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
19798 'WatchRelationUnits': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
19799 'Result': {'$ref': '#/definitions/RelationUnitsWatchResults'}},
19801 'WatchStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
19802 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
19804 'WatchUnitAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19805 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
19807 'WatchUnitStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19808 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
19810 'WorkloadVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19811 'Result': {'$ref': '#/definitions/StringResults'}},
19812 'type': 'object'}},
19816 @ReturnMapping(StringsResult
)
19817 async def APIAddresses(self
):
19820 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[str]]
19822 # map input types to rpc msg
19824 msg
= dict(type='Uniter', request
='APIAddresses', version
=4, params
=_params
)
19826 reply
= await self
.rpc(msg
)
19831 @ReturnMapping(APIHostPortsResult
)
19832 async def APIHostPorts(self
):
19835 Returns -> typing.Sequence<+T_co>[~HostPort]<~HostPort>
19837 # map input types to rpc msg
19839 msg
= dict(type='Uniter', request
='APIHostPorts', version
=4, params
=_params
)
19841 reply
= await self
.rpc(msg
)
19846 @ReturnMapping(ActionResults
)
19847 async def Actions(self
, entities
):
19849 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19850 Returns -> typing.Sequence<+T_co>[~ActionResult]<~ActionResult>
19852 # map input types to rpc msg
19854 msg
= dict(type='Uniter', request
='Actions', version
=4, params
=_params
)
19855 _params
['entities'] = entities
19856 reply
= await self
.rpc(msg
)
19861 @ReturnMapping(ErrorResults
)
19862 async def AddMetricBatches(self
, batches
):
19864 batches : typing.Sequence<+T_co>[~MetricBatchParam]<~MetricBatchParam>
19865 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
19867 # map input types to rpc msg
19869 msg
= dict(type='Uniter', request
='AddMetricBatches', version
=4, params
=_params
)
19870 _params
['batches'] = batches
19871 reply
= await self
.rpc(msg
)
19876 @ReturnMapping(ErrorResults
)
19877 async def AddUnitStorage(self
, storages
):
19879 storages : typing.Sequence<+T_co>[~StorageAddParams]<~StorageAddParams>
19880 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
19882 # map input types to rpc msg
19884 msg
= dict(type='Uniter', request
='AddUnitStorage', version
=4, params
=_params
)
19885 _params
['storages'] = storages
19886 reply
= await self
.rpc(msg
)
19891 @ReturnMapping(MachinePortsResults
)
19892 async def AllMachinePorts(self
, entities
):
19894 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19895 Returns -> typing.Sequence<+T_co>[~MachinePortsResult]<~MachinePortsResult>
19897 # map input types to rpc msg
19899 msg
= dict(type='Uniter', request
='AllMachinePorts', version
=4, params
=_params
)
19900 _params
['entities'] = entities
19901 reply
= await self
.rpc(msg
)
19906 @ReturnMapping(ApplicationStatusResults
)
19907 async def ApplicationStatus(self
, entities
):
19909 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19910 Returns -> typing.Sequence<+T_co>[~ApplicationStatusResult]<~ApplicationStatusResult>
19912 # map input types to rpc msg
19914 msg
= dict(type='Uniter', request
='ApplicationStatus', version
=4, params
=_params
)
19915 _params
['entities'] = entities
19916 reply
= await self
.rpc(msg
)
19921 @ReturnMapping(StringResults
)
19922 async def AssignedMachine(self
, entities
):
19924 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19925 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
19927 # map input types to rpc msg
19929 msg
= dict(type='Uniter', request
='AssignedMachine', version
=4, params
=_params
)
19930 _params
['entities'] = entities
19931 reply
= await self
.rpc(msg
)
19936 @ReturnMapping(StringResults
)
19937 async def AvailabilityZone(self
, entities
):
19939 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19940 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
19942 # map input types to rpc msg
19944 msg
= dict(type='Uniter', request
='AvailabilityZone', version
=4, params
=_params
)
19945 _params
['entities'] = entities
19946 reply
= await self
.rpc(msg
)
19951 @ReturnMapping(ErrorResults
)
19952 async def BeginActions(self
, entities
):
19954 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19955 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
19957 # map input types to rpc msg
19959 msg
= dict(type='Uniter', request
='BeginActions', version
=4, params
=_params
)
19960 _params
['entities'] = entities
19961 reply
= await self
.rpc(msg
)
19966 @ReturnMapping(BytesResult
)
19967 async def CACert(self
):
19970 Returns -> typing.Sequence<+T_co>[int]
19972 # map input types to rpc msg
19974 msg
= dict(type='Uniter', request
='CACert', version
=4, params
=_params
)
19976 reply
= await self
.rpc(msg
)
19981 @ReturnMapping(StringResults
)
19982 async def CharmArchiveSha256(self
, urls
):
19984 urls : typing.Sequence<+T_co>[~CharmURL]<~CharmURL>
19985 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
19987 # map input types to rpc msg
19989 msg
= dict(type='Uniter', request
='CharmArchiveSha256', version
=4, params
=_params
)
19990 _params
['urls'] = urls
19991 reply
= await self
.rpc(msg
)
19996 @ReturnMapping(IntResults
)
19997 async def CharmModifiedVersion(self
, entities
):
19999 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20000 Returns -> typing.Sequence<+T_co>[~IntResult]<~IntResult>
20002 # map input types to rpc msg
20004 msg
= dict(type='Uniter', request
='CharmModifiedVersion', version
=4, params
=_params
)
20005 _params
['entities'] = entities
20006 reply
= await self
.rpc(msg
)
20011 @ReturnMapping(StringBoolResults
)
20012 async def CharmURL(self
, entities
):
20014 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20015 Returns -> typing.Sequence<+T_co>[~StringBoolResult]<~StringBoolResult>
20017 # map input types to rpc msg
20019 msg
= dict(type='Uniter', request
='CharmURL', version
=4, params
=_params
)
20020 _params
['entities'] = entities
20021 reply
= await self
.rpc(msg
)
20026 @ReturnMapping(ErrorResults
)
20027 async def ClearResolved(self
, entities
):
20029 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20030 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20032 # map input types to rpc msg
20034 msg
= dict(type='Uniter', request
='ClearResolved', version
=4, params
=_params
)
20035 _params
['entities'] = entities
20036 reply
= await self
.rpc(msg
)
20041 @ReturnMapping(ErrorResults
)
20042 async def ClosePorts(self
, entities
):
20044 entities : typing.Sequence<+T_co>[~EntityPortRange]<~EntityPortRange>
20045 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20047 # map input types to rpc msg
20049 msg
= dict(type='Uniter', request
='ClosePorts', version
=4, params
=_params
)
20050 _params
['entities'] = entities
20051 reply
= await self
.rpc(msg
)
20056 @ReturnMapping(ConfigSettingsResults
)
20057 async def ConfigSettings(self
, entities
):
20059 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20060 Returns -> typing.Sequence<+T_co>[~ConfigSettingsResult]<~ConfigSettingsResult>
20062 # map input types to rpc msg
20064 msg
= dict(type='Uniter', request
='ConfigSettings', version
=4, params
=_params
)
20065 _params
['entities'] = entities
20066 reply
= await self
.rpc(msg
)
20071 @ReturnMapping(ModelResult
)
20072 async def CurrentModel(self
):
20075 Returns -> typing.Union[_ForwardRef('Error'), str]
20077 # map input types to rpc msg
20079 msg
= dict(type='Uniter', request
='CurrentModel', version
=4, params
=_params
)
20081 reply
= await self
.rpc(msg
)
20086 @ReturnMapping(ErrorResults
)
20087 async def Destroy(self
, entities
):
20089 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20090 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20092 # map input types to rpc msg
20094 msg
= dict(type='Uniter', request
='Destroy', version
=4, params
=_params
)
20095 _params
['entities'] = entities
20096 reply
= await self
.rpc(msg
)
20101 @ReturnMapping(ErrorResults
)
20102 async def DestroyAllSubordinates(self
, entities
):
20104 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20105 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20107 # map input types to rpc msg
20109 msg
= dict(type='Uniter', request
='DestroyAllSubordinates', version
=4, params
=_params
)
20110 _params
['entities'] = entities
20111 reply
= await self
.rpc(msg
)
20116 @ReturnMapping(ErrorResults
)
20117 async def DestroyUnitStorageAttachments(self
, entities
):
20119 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20120 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20122 # map input types to rpc msg
20124 msg
= dict(type='Uniter', request
='DestroyUnitStorageAttachments', version
=4, params
=_params
)
20125 _params
['entities'] = entities
20126 reply
= await self
.rpc(msg
)
20131 @ReturnMapping(ErrorResults
)
20132 async def EnsureDead(self
, entities
):
20134 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20135 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20137 # map input types to rpc msg
20139 msg
= dict(type='Uniter', request
='EnsureDead', version
=4, params
=_params
)
20140 _params
['entities'] = entities
20141 reply
= await self
.rpc(msg
)
20146 @ReturnMapping(ErrorResults
)
20147 async def EnterScope(self
, relation_units
):
20149 relation_units : typing.Sequence<+T_co>[~RelationUnit]<~RelationUnit>
20150 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20152 # map input types to rpc msg
20154 msg
= dict(type='Uniter', request
='EnterScope', version
=4, params
=_params
)
20155 _params
['relation-units'] = relation_units
20156 reply
= await self
.rpc(msg
)
20161 @ReturnMapping(ErrorResults
)
20162 async def FinishActions(self
, results
):
20164 results : typing.Sequence<+T_co>[~ActionExecutionResult]<~ActionExecutionResult>
20165 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20167 # map input types to rpc msg
20169 msg
= dict(type='Uniter', request
='FinishActions', version
=4, params
=_params
)
20170 _params
['results'] = results
20171 reply
= await self
.rpc(msg
)
20176 @ReturnMapping(MeterStatusResults
)
20177 async def GetMeterStatus(self
, entities
):
20179 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20180 Returns -> typing.Sequence<+T_co>[~MeterStatusResult]<~MeterStatusResult>
20182 # map input types to rpc msg
20184 msg
= dict(type='Uniter', request
='GetMeterStatus', version
=4, params
=_params
)
20185 _params
['entities'] = entities
20186 reply
= await self
.rpc(msg
)
20191 @ReturnMapping(StringBoolResults
)
20192 async def GetPrincipal(self
, entities
):
20194 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20195 Returns -> typing.Sequence<+T_co>[~StringBoolResult]<~StringBoolResult>
20197 # map input types to rpc msg
20199 msg
= dict(type='Uniter', request
='GetPrincipal', version
=4, params
=_params
)
20200 _params
['entities'] = entities
20201 reply
= await self
.rpc(msg
)
20206 @ReturnMapping(BoolResults
)
20207 async def HasSubordinates(self
, entities
):
20209 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20210 Returns -> typing.Sequence<+T_co>[~BoolResult]<~BoolResult>
20212 # map input types to rpc msg
20214 msg
= dict(type='Uniter', request
='HasSubordinates', version
=4, params
=_params
)
20215 _params
['entities'] = entities
20216 reply
= await self
.rpc(msg
)
20221 @ReturnMapping(StringsResults
)
20222 async def JoinedRelations(self
, entities
):
20224 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20225 Returns -> typing.Sequence<+T_co>[~StringsResult]<~StringsResult>
20227 # map input types to rpc msg
20229 msg
= dict(type='Uniter', request
='JoinedRelations', version
=4, params
=_params
)
20230 _params
['entities'] = entities
20231 reply
= await self
.rpc(msg
)
20236 @ReturnMapping(ErrorResults
)
20237 async def LeaveScope(self
, relation_units
):
20239 relation_units : typing.Sequence<+T_co>[~RelationUnit]<~RelationUnit>
20240 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20242 # map input types to rpc msg
20244 msg
= dict(type='Uniter', request
='LeaveScope', version
=4, params
=_params
)
20245 _params
['relation-units'] = relation_units
20246 reply
= await self
.rpc(msg
)
20251 @ReturnMapping(LifeResults
)
20252 async def Life(self
, entities
):
20254 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20255 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
20257 # map input types to rpc msg
20259 msg
= dict(type='Uniter', request
='Life', version
=4, params
=_params
)
20260 _params
['entities'] = entities
20261 reply
= await self
.rpc(msg
)
20266 @ReturnMapping(ErrorResults
)
20267 async def Merge(self
, params
):
20269 params : typing.Sequence<+T_co>[~MergeLeadershipSettingsParam]<~MergeLeadershipSettingsParam>
20270 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20272 # map input types to rpc msg
20274 msg
= dict(type='Uniter', request
='Merge', version
=4, params
=_params
)
20275 _params
['params'] = params
20276 reply
= await self
.rpc(msg
)
20281 @ReturnMapping(ModelConfigResult
)
20282 async def ModelConfig(self
):
20285 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
20287 # map input types to rpc msg
20289 msg
= dict(type='Uniter', request
='ModelConfig', version
=4, params
=_params
)
20291 reply
= await self
.rpc(msg
)
20296 @ReturnMapping(StringResult
)
20297 async def ModelUUID(self
):
20300 Returns -> typing.Union[_ForwardRef('Error'), str]
20302 # map input types to rpc msg
20304 msg
= dict(type='Uniter', request
='ModelUUID', version
=4, params
=_params
)
20306 reply
= await self
.rpc(msg
)
20311 @ReturnMapping(UnitNetworkConfigResults
)
20312 async def NetworkConfig(self
, args
):
20314 args : typing.Sequence<+T_co>[~UnitNetworkConfig]<~UnitNetworkConfig>
20315 Returns -> typing.Sequence<+T_co>[~UnitNetworkConfigResult]<~UnitNetworkConfigResult>
20317 # map input types to rpc msg
20319 msg
= dict(type='Uniter', request
='NetworkConfig', version
=4, params
=_params
)
20320 _params
['args'] = args
20321 reply
= await self
.rpc(msg
)
20326 @ReturnMapping(ErrorResults
)
20327 async def OpenPorts(self
, entities
):
20329 entities : typing.Sequence<+T_co>[~EntityPortRange]<~EntityPortRange>
20330 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20332 # map input types to rpc msg
20334 msg
= dict(type='Uniter', request
='OpenPorts', version
=4, params
=_params
)
20335 _params
['entities'] = entities
20336 reply
= await self
.rpc(msg
)
20341 @ReturnMapping(StringResults
)
20342 async def PrivateAddress(self
, entities
):
20344 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20345 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
20347 # map input types to rpc msg
20349 msg
= dict(type='Uniter', request
='PrivateAddress', version
=4, params
=_params
)
20350 _params
['entities'] = entities
20351 reply
= await self
.rpc(msg
)
20356 @ReturnMapping(StringResult
)
20357 async def ProviderType(self
):
20360 Returns -> typing.Union[_ForwardRef('Error'), str]
20362 # map input types to rpc msg
20364 msg
= dict(type='Uniter', request
='ProviderType', version
=4, params
=_params
)
20366 reply
= await self
.rpc(msg
)
20371 @ReturnMapping(StringResults
)
20372 async def PublicAddress(self
, entities
):
20374 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20375 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
20377 # map input types to rpc msg
20379 msg
= dict(type='Uniter', request
='PublicAddress', version
=4, params
=_params
)
20380 _params
['entities'] = entities
20381 reply
= await self
.rpc(msg
)
20386 @ReturnMapping(GetLeadershipSettingsBulkResults
)
20387 async def Read(self
, entities
):
20389 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20390 Returns -> typing.Sequence<+T_co>[~GetLeadershipSettingsResult]<~GetLeadershipSettingsResult>
20392 # map input types to rpc msg
20394 msg
= dict(type='Uniter', request
='Read', version
=4, params
=_params
)
20395 _params
['entities'] = entities
20396 reply
= await self
.rpc(msg
)
20401 @ReturnMapping(SettingsResults
)
20402 async def ReadRemoteSettings(self
, relation_unit_pairs
):
20404 relation_unit_pairs : typing.Sequence<+T_co>[~RelationUnitPair]<~RelationUnitPair>
20405 Returns -> typing.Sequence<+T_co>[~SettingsResult]<~SettingsResult>
20407 # map input types to rpc msg
20409 msg
= dict(type='Uniter', request
='ReadRemoteSettings', version
=4, params
=_params
)
20410 _params
['relation-unit-pairs'] = relation_unit_pairs
20411 reply
= await self
.rpc(msg
)
20416 @ReturnMapping(SettingsResults
)
20417 async def ReadSettings(self
, relation_units
):
20419 relation_units : typing.Sequence<+T_co>[~RelationUnit]<~RelationUnit>
20420 Returns -> typing.Sequence<+T_co>[~SettingsResult]<~SettingsResult>
20422 # map input types to rpc msg
20424 msg
= dict(type='Uniter', request
='ReadSettings', version
=4, params
=_params
)
20425 _params
['relation-units'] = relation_units
20426 reply
= await self
.rpc(msg
)
20431 @ReturnMapping(RelationResults
)
20432 async def Relation(self
, relation_units
):
20434 relation_units : typing.Sequence<+T_co>[~RelationUnit]<~RelationUnit>
20435 Returns -> typing.Sequence<+T_co>[~RelationResult]<~RelationResult>
20437 # map input types to rpc msg
20439 msg
= dict(type='Uniter', request
='Relation', version
=4, params
=_params
)
20440 _params
['relation-units'] = relation_units
20441 reply
= await self
.rpc(msg
)
20446 @ReturnMapping(RelationResults
)
20447 async def RelationById(self
, relation_ids
):
20449 relation_ids : typing.Sequence<+T_co>[int]
20450 Returns -> typing.Sequence<+T_co>[~RelationResult]<~RelationResult>
20452 # map input types to rpc msg
20454 msg
= dict(type='Uniter', request
='RelationById', version
=4, params
=_params
)
20455 _params
['relation-ids'] = relation_ids
20456 reply
= await self
.rpc(msg
)
20461 @ReturnMapping(ErrorResults
)
20462 async def RemoveStorageAttachments(self
, ids
):
20464 ids : typing.Sequence<+T_co>[~StorageAttachmentId]<~StorageAttachmentId>
20465 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20467 # map input types to rpc msg
20469 msg
= dict(type='Uniter', request
='RemoveStorageAttachments', version
=4, params
=_params
)
20470 _params
['ids'] = ids
20471 reply
= await self
.rpc(msg
)
20476 @ReturnMapping(ErrorResults
)
20477 async def RequestReboot(self
, entities
):
20479 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20480 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20482 # map input types to rpc msg
20484 msg
= dict(type='Uniter', request
='RequestReboot', version
=4, params
=_params
)
20485 _params
['entities'] = entities
20486 reply
= await self
.rpc(msg
)
20491 @ReturnMapping(ResolvedModeResults
)
20492 async def Resolved(self
, entities
):
20494 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20495 Returns -> typing.Sequence<+T_co>[~ResolvedModeResult]<~ResolvedModeResult>
20497 # map input types to rpc msg
20499 msg
= dict(type='Uniter', request
='Resolved', version
=4, params
=_params
)
20500 _params
['entities'] = entities
20501 reply
= await self
.rpc(msg
)
20506 @ReturnMapping(ErrorResults
)
20507 async def SetAgentStatus(self
, entities
):
20509 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
20510 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20512 # map input types to rpc msg
20514 msg
= dict(type='Uniter', request
='SetAgentStatus', version
=4, params
=_params
)
20515 _params
['entities'] = entities
20516 reply
= await self
.rpc(msg
)
20521 @ReturnMapping(ErrorResults
)
20522 async def SetApplicationStatus(self
, entities
):
20524 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
20525 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20527 # map input types to rpc msg
20529 msg
= dict(type='Uniter', request
='SetApplicationStatus', version
=4, params
=_params
)
20530 _params
['entities'] = entities
20531 reply
= await self
.rpc(msg
)
20536 @ReturnMapping(ErrorResults
)
20537 async def SetCharmURL(self
, entities
):
20539 entities : typing.Sequence<+T_co>[~EntityCharmURL]<~EntityCharmURL>
20540 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20542 # map input types to rpc msg
20544 msg
= dict(type='Uniter', request
='SetCharmURL', version
=4, params
=_params
)
20545 _params
['entities'] = entities
20546 reply
= await self
.rpc(msg
)
20551 @ReturnMapping(ErrorResults
)
20552 async def SetStatus(self
, entities
):
20554 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
20555 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20557 # map input types to rpc msg
20559 msg
= dict(type='Uniter', request
='SetStatus', version
=4, params
=_params
)
20560 _params
['entities'] = entities
20561 reply
= await self
.rpc(msg
)
20566 @ReturnMapping(ErrorResults
)
20567 async def SetUnitStatus(self
, entities
):
20569 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
20570 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20572 # map input types to rpc msg
20574 msg
= dict(type='Uniter', request
='SetUnitStatus', version
=4, params
=_params
)
20575 _params
['entities'] = entities
20576 reply
= await self
.rpc(msg
)
20581 @ReturnMapping(ErrorResults
)
20582 async def SetWorkloadVersion(self
, entities
):
20584 entities : typing.Sequence<+T_co>[~EntityWorkloadVersion]<~EntityWorkloadVersion>
20585 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20587 # map input types to rpc msg
20589 msg
= dict(type='Uniter', request
='SetWorkloadVersion', version
=4, params
=_params
)
20590 _params
['entities'] = entities
20591 reply
= await self
.rpc(msg
)
20596 @ReturnMapping(LifeResults
)
20597 async def StorageAttachmentLife(self
, ids
):
20599 ids : typing.Sequence<+T_co>[~StorageAttachmentId]<~StorageAttachmentId>
20600 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
20602 # map input types to rpc msg
20604 msg
= dict(type='Uniter', request
='StorageAttachmentLife', version
=4, params
=_params
)
20605 _params
['ids'] = ids
20606 reply
= await self
.rpc(msg
)
20611 @ReturnMapping(StorageAttachmentResults
)
20612 async def StorageAttachments(self
, ids
):
20614 ids : typing.Sequence<+T_co>[~StorageAttachmentId]<~StorageAttachmentId>
20615 Returns -> typing.Sequence<+T_co>[~StorageAttachmentResult]<~StorageAttachmentResult>
20617 # map input types to rpc msg
20619 msg
= dict(type='Uniter', request
='StorageAttachments', version
=4, params
=_params
)
20620 _params
['ids'] = ids
20621 reply
= await self
.rpc(msg
)
20626 @ReturnMapping(StatusResults
)
20627 async def UnitStatus(self
, entities
):
20629 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20630 Returns -> typing.Sequence<+T_co>[~StatusResult]<~StatusResult>
20632 # map input types to rpc msg
20634 msg
= dict(type='Uniter', request
='UnitStatus', version
=4, params
=_params
)
20635 _params
['entities'] = entities
20636 reply
= await self
.rpc(msg
)
20641 @ReturnMapping(StorageAttachmentIdsResults
)
20642 async def UnitStorageAttachments(self
, entities
):
20644 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20645 Returns -> typing.Sequence<+T_co>[~StorageAttachmentIdsResult]<~StorageAttachmentIdsResult>
20647 # map input types to rpc msg
20649 msg
= dict(type='Uniter', request
='UnitStorageAttachments', version
=4, params
=_params
)
20650 _params
['entities'] = entities
20651 reply
= await self
.rpc(msg
)
20656 @ReturnMapping(ErrorResults
)
20657 async def UpdateSettings(self
, relation_units
):
20659 relation_units : typing.Sequence<+T_co>[~RelationUnitSettings]<~RelationUnitSettings>
20660 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20662 # map input types to rpc msg
20664 msg
= dict(type='Uniter', request
='UpdateSettings', version
=4, params
=_params
)
20665 _params
['relation-units'] = relation_units
20666 reply
= await self
.rpc(msg
)
20671 @ReturnMapping(NotifyWatchResults
)
20672 async def Watch(self
, entities
):
20674 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20675 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
20677 # map input types to rpc msg
20679 msg
= dict(type='Uniter', request
='Watch', version
=4, params
=_params
)
20680 _params
['entities'] = entities
20681 reply
= await self
.rpc(msg
)
20686 @ReturnMapping(NotifyWatchResult
)
20687 async def WatchAPIHostPorts(self
):
20690 Returns -> typing.Union[str, _ForwardRef('Error')]
20692 # map input types to rpc msg
20694 msg
= dict(type='Uniter', request
='WatchAPIHostPorts', version
=4, params
=_params
)
20696 reply
= await self
.rpc(msg
)
20701 @ReturnMapping(StringsWatchResults
)
20702 async def WatchActionNotifications(self
, entities
):
20704 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20705 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
20707 # map input types to rpc msg
20709 msg
= dict(type='Uniter', request
='WatchActionNotifications', version
=4, params
=_params
)
20710 _params
['entities'] = entities
20711 reply
= await self
.rpc(msg
)
20716 @ReturnMapping(StringsWatchResults
)
20717 async def WatchApplicationRelations(self
, entities
):
20719 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20720 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
20722 # map input types to rpc msg
20724 msg
= dict(type='Uniter', request
='WatchApplicationRelations', version
=4, params
=_params
)
20725 _params
['entities'] = entities
20726 reply
= await self
.rpc(msg
)
20731 @ReturnMapping(NotifyWatchResults
)
20732 async def WatchConfigSettings(self
, entities
):
20734 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20735 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
20737 # map input types to rpc msg
20739 msg
= dict(type='Uniter', request
='WatchConfigSettings', version
=4, params
=_params
)
20740 _params
['entities'] = entities
20741 reply
= await self
.rpc(msg
)
20746 @ReturnMapping(NotifyWatchResult
)
20747 async def WatchForModelConfigChanges(self
):
20750 Returns -> typing.Union[str, _ForwardRef('Error')]
20752 # map input types to rpc msg
20754 msg
= dict(type='Uniter', request
='WatchForModelConfigChanges', version
=4, params
=_params
)
20756 reply
= await self
.rpc(msg
)
20761 @ReturnMapping(NotifyWatchResults
)
20762 async def WatchLeadershipSettings(self
, entities
):
20764 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20765 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
20767 # map input types to rpc msg
20769 msg
= dict(type='Uniter', request
='WatchLeadershipSettings', version
=4, params
=_params
)
20770 _params
['entities'] = entities
20771 reply
= await self
.rpc(msg
)
20776 @ReturnMapping(NotifyWatchResults
)
20777 async def WatchMeterStatus(self
, entities
):
20779 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20780 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
20782 # map input types to rpc msg
20784 msg
= dict(type='Uniter', request
='WatchMeterStatus', version
=4, params
=_params
)
20785 _params
['entities'] = entities
20786 reply
= await self
.rpc(msg
)
20791 @ReturnMapping(RelationUnitsWatchResults
)
20792 async def WatchRelationUnits(self
, relation_units
):
20794 relation_units : typing.Sequence<+T_co>[~RelationUnit]<~RelationUnit>
20795 Returns -> typing.Sequence<+T_co>[~RelationUnitsWatchResult]<~RelationUnitsWatchResult>
20797 # map input types to rpc msg
20799 msg
= dict(type='Uniter', request
='WatchRelationUnits', version
=4, params
=_params
)
20800 _params
['relation-units'] = relation_units
20801 reply
= await self
.rpc(msg
)
20806 @ReturnMapping(NotifyWatchResults
)
20807 async def WatchStorageAttachments(self
, ids
):
20809 ids : typing.Sequence<+T_co>[~StorageAttachmentId]<~StorageAttachmentId>
20810 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
20812 # map input types to rpc msg
20814 msg
= dict(type='Uniter', request
='WatchStorageAttachments', version
=4, params
=_params
)
20815 _params
['ids'] = ids
20816 reply
= await self
.rpc(msg
)
20821 @ReturnMapping(NotifyWatchResults
)
20822 async def WatchUnitAddresses(self
, entities
):
20824 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20825 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
20827 # map input types to rpc msg
20829 msg
= dict(type='Uniter', request
='WatchUnitAddresses', version
=4, params
=_params
)
20830 _params
['entities'] = entities
20831 reply
= await self
.rpc(msg
)
20836 @ReturnMapping(StringsWatchResults
)
20837 async def WatchUnitStorageAttachments(self
, entities
):
20839 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20840 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
20842 # map input types to rpc msg
20844 msg
= dict(type='Uniter', request
='WatchUnitStorageAttachments', version
=4, params
=_params
)
20845 _params
['entities'] = entities
20846 reply
= await self
.rpc(msg
)
20851 @ReturnMapping(StringResults
)
20852 async def WorkloadVersion(self
, entities
):
20854 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20855 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
20857 # map input types to rpc msg
20859 msg
= dict(type='Uniter', request
='WorkloadVersion', version
=4, params
=_params
)
20860 _params
['entities'] = entities
20861 reply
= await self
.rpc(msg
)
20865 class UpgraderFacade(Type
):
20868 schema
= {'definitions': {'Binary': {'additionalProperties': False,
20869 'properties': {'Arch': {'type': 'string'},
20870 'Number': {'$ref': '#/definitions/Number'},
20871 'Series': {'type': 'string'}},
20872 'required': ['Number', 'Series', 'Arch'],
20874 'Entities': {'additionalProperties': False,
20875 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
20877 'required': ['entities'],
20879 'EntitiesVersion': {'additionalProperties': False,
20880 'properties': {'agent-tools': {'items': {'$ref': '#/definitions/EntityVersion'},
20882 'required': ['agent-tools'],
20884 'Entity': {'additionalProperties': False,
20885 'properties': {'tag': {'type': 'string'}},
20886 'required': ['tag'],
20888 'EntityVersion': {'additionalProperties': False,
20889 'properties': {'tag': {'type': 'string'},
20890 'tools': {'$ref': '#/definitions/Version'}},
20891 'required': ['tag', 'tools'],
20893 'Error': {'additionalProperties': False,
20894 'properties': {'code': {'type': 'string'},
20895 'info': {'$ref': '#/definitions/ErrorInfo'},
20896 'message': {'type': 'string'}},
20897 'required': ['message', 'code'],
20899 'ErrorInfo': {'additionalProperties': False,
20900 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
20901 'macaroon-path': {'type': 'string'}},
20903 'ErrorResult': {'additionalProperties': False,
20904 'properties': {'error': {'$ref': '#/definitions/Error'}},
20906 'ErrorResults': {'additionalProperties': False,
20907 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
20909 'required': ['results'],
20911 'Macaroon': {'additionalProperties': False, 'type': 'object'},
20912 'NotifyWatchResult': {'additionalProperties': False,
20913 'properties': {'NotifyWatcherId': {'type': 'string'},
20914 'error': {'$ref': '#/definitions/Error'}},
20915 'required': ['NotifyWatcherId'],
20917 'NotifyWatchResults': {'additionalProperties': False,
20918 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
20920 'required': ['results'],
20922 'Number': {'additionalProperties': False,
20923 'properties': {'Build': {'type': 'integer'},
20924 'Major': {'type': 'integer'},
20925 'Minor': {'type': 'integer'},
20926 'Patch': {'type': 'integer'},
20927 'Tag': {'type': 'string'}},
20928 'required': ['Major',
20934 'Tools': {'additionalProperties': False,
20935 'properties': {'sha256': {'type': 'string'},
20936 'size': {'type': 'integer'},
20937 'url': {'type': 'string'},
20938 'version': {'$ref': '#/definitions/Binary'}},
20939 'required': ['version', 'url', 'size'],
20941 'ToolsResult': {'additionalProperties': False,
20942 'properties': {'disable-ssl-hostname-verification': {'type': 'boolean'},
20943 'error': {'$ref': '#/definitions/Error'},
20944 'tools': {'items': {'$ref': '#/definitions/Tools'},
20946 'required': ['tools',
20947 'disable-ssl-hostname-verification'],
20949 'ToolsResults': {'additionalProperties': False,
20950 'properties': {'results': {'items': {'$ref': '#/definitions/ToolsResult'},
20952 'required': ['results'],
20954 'Version': {'additionalProperties': False,
20955 'properties': {'version': {'$ref': '#/definitions/Binary'}},
20956 'required': ['version'],
20958 'VersionResult': {'additionalProperties': False,
20959 'properties': {'error': {'$ref': '#/definitions/Error'},
20960 'version': {'$ref': '#/definitions/Number'}},
20962 'VersionResults': {'additionalProperties': False,
20963 'properties': {'results': {'items': {'$ref': '#/definitions/VersionResult'},
20965 'required': ['results'],
20966 'type': 'object'}},
20967 'properties': {'DesiredVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
20968 'Result': {'$ref': '#/definitions/VersionResults'}},
20970 'SetTools': {'properties': {'Params': {'$ref': '#/definitions/EntitiesVersion'},
20971 'Result': {'$ref': '#/definitions/ErrorResults'}},
20973 'Tools': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
20974 'Result': {'$ref': '#/definitions/ToolsResults'}},
20976 'WatchAPIVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
20977 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
20978 'type': 'object'}},
20982 @ReturnMapping(VersionResults
)
20983 async def DesiredVersion(self
, entities
):
20985 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20986 Returns -> typing.Sequence<+T_co>[~VersionResult]<~VersionResult>
20988 # map input types to rpc msg
20990 msg
= dict(type='Upgrader', request
='DesiredVersion', version
=1, params
=_params
)
20991 _params
['entities'] = entities
20992 reply
= await self
.rpc(msg
)
20997 @ReturnMapping(ErrorResults
)
20998 async def SetTools(self
, agent_tools
):
21000 agent_tools : typing.Sequence<+T_co>[~EntityVersion]<~EntityVersion>
21001 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
21003 # map input types to rpc msg
21005 msg
= dict(type='Upgrader', request
='SetTools', version
=1, params
=_params
)
21006 _params
['agent-tools'] = agent_tools
21007 reply
= await self
.rpc(msg
)
21012 @ReturnMapping(ToolsResults
)
21013 async def Tools(self
, entities
):
21015 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
21016 Returns -> typing.Sequence<+T_co>[~ToolsResult]<~ToolsResult>
21018 # map input types to rpc msg
21020 msg
= dict(type='Upgrader', request
='Tools', version
=1, params
=_params
)
21021 _params
['entities'] = entities
21022 reply
= await self
.rpc(msg
)
21027 @ReturnMapping(NotifyWatchResults
)
21028 async def WatchAPIVersion(self
, entities
):
21030 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
21031 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
21033 # map input types to rpc msg
21035 msg
= dict(type='Upgrader', request
='WatchAPIVersion', version
=1, params
=_params
)
21036 _params
['entities'] = entities
21037 reply
= await self
.rpc(msg
)
21041 class UserManagerFacade(Type
):
21042 name
= 'UserManager'
21044 schema
= {'definitions': {'AddUser': {'additionalProperties': False,
21045 'properties': {'display-name': {'type': 'string'},
21046 'password': {'type': 'string'},
21047 'username': {'type': 'string'}},
21048 'required': ['username', 'display-name'],
21050 'AddUserResult': {'additionalProperties': False,
21051 'properties': {'error': {'$ref': '#/definitions/Error'},
21052 'secret-key': {'items': {'type': 'integer'},
21054 'tag': {'type': 'string'}},
21056 'AddUserResults': {'additionalProperties': False,
21057 'properties': {'results': {'items': {'$ref': '#/definitions/AddUserResult'},
21059 'required': ['results'],
21061 'AddUsers': {'additionalProperties': False,
21062 'properties': {'users': {'items': {'$ref': '#/definitions/AddUser'},
21064 'required': ['users'],
21066 'Entities': {'additionalProperties': False,
21067 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
21069 'required': ['entities'],
21071 'Entity': {'additionalProperties': False,
21072 'properties': {'tag': {'type': 'string'}},
21073 'required': ['tag'],
21075 'EntityPassword': {'additionalProperties': False,
21076 'properties': {'password': {'type': 'string'},
21077 'tag': {'type': 'string'}},
21078 'required': ['tag', 'password'],
21080 'EntityPasswords': {'additionalProperties': False,
21081 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'},
21083 'required': ['changes'],
21085 'Error': {'additionalProperties': False,
21086 'properties': {'code': {'type': 'string'},
21087 'info': {'$ref': '#/definitions/ErrorInfo'},
21088 'message': {'type': 'string'}},
21089 'required': ['message', 'code'],
21091 'ErrorInfo': {'additionalProperties': False,
21092 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
21093 'macaroon-path': {'type': 'string'}},
21095 'ErrorResult': {'additionalProperties': False,
21096 'properties': {'error': {'$ref': '#/definitions/Error'}},
21098 'ErrorResults': {'additionalProperties': False,
21099 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
21101 'required': ['results'],
21103 'Macaroon': {'additionalProperties': False, 'type': 'object'},
21104 'UserInfo': {'additionalProperties': False,
21105 'properties': {'access': {'type': 'string'},
21106 'created-by': {'type': 'string'},
21107 'date-created': {'format': 'date-time',
21109 'disabled': {'type': 'boolean'},
21110 'display-name': {'type': 'string'},
21111 'last-connection': {'format': 'date-time',
21113 'username': {'type': 'string'}},
21114 'required': ['username',
21121 'UserInfoRequest': {'additionalProperties': False,
21122 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
21124 'include-disabled': {'type': 'boolean'}},
21125 'required': ['entities',
21126 'include-disabled'],
21128 'UserInfoResult': {'additionalProperties': False,
21129 'properties': {'error': {'$ref': '#/definitions/Error'},
21130 'result': {'$ref': '#/definitions/UserInfo'}},
21132 'UserInfoResults': {'additionalProperties': False,
21133 'properties': {'results': {'items': {'$ref': '#/definitions/UserInfoResult'},
21135 'required': ['results'],
21136 'type': 'object'}},
21137 'properties': {'AddUser': {'properties': {'Params': {'$ref': '#/definitions/AddUsers'},
21138 'Result': {'$ref': '#/definitions/AddUserResults'}},
21140 'DisableUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
21141 'Result': {'$ref': '#/definitions/ErrorResults'}},
21143 'EnableUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
21144 'Result': {'$ref': '#/definitions/ErrorResults'}},
21146 'RemoveUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
21147 'Result': {'$ref': '#/definitions/ErrorResults'}},
21149 'SetPassword': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
21150 'Result': {'$ref': '#/definitions/ErrorResults'}},
21152 'UserInfo': {'properties': {'Params': {'$ref': '#/definitions/UserInfoRequest'},
21153 'Result': {'$ref': '#/definitions/UserInfoResults'}},
21154 'type': 'object'}},
21158 @ReturnMapping(AddUserResults
)
21159 async def AddUser(self
, users
):
21161 users : typing.Sequence<+T_co>[~AddUser]<~AddUser>
21162 Returns -> typing.Sequence<+T_co>[~AddUserResult]<~AddUserResult>
21164 # map input types to rpc msg
21166 msg
= dict(type='UserManager', request
='AddUser', version
=1, params
=_params
)
21167 _params
['users'] = users
21168 reply
= await self
.rpc(msg
)
21173 @ReturnMapping(ErrorResults
)
21174 async def DisableUser(self
, entities
):
21176 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
21177 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
21179 # map input types to rpc msg
21181 msg
= dict(type='UserManager', request
='DisableUser', version
=1, params
=_params
)
21182 _params
['entities'] = entities
21183 reply
= await self
.rpc(msg
)
21188 @ReturnMapping(ErrorResults
)
21189 async def EnableUser(self
, entities
):
21191 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
21192 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
21194 # map input types to rpc msg
21196 msg
= dict(type='UserManager', request
='EnableUser', version
=1, params
=_params
)
21197 _params
['entities'] = entities
21198 reply
= await self
.rpc(msg
)
21203 @ReturnMapping(ErrorResults
)
21204 async def RemoveUser(self
, entities
):
21206 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
21207 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
21209 # map input types to rpc msg
21211 msg
= dict(type='UserManager', request
='RemoveUser', version
=1, params
=_params
)
21212 _params
['entities'] = entities
21213 reply
= await self
.rpc(msg
)
21218 @ReturnMapping(ErrorResults
)
21219 async def SetPassword(self
, changes
):
21221 changes : typing.Sequence<+T_co>[~EntityPassword]<~EntityPassword>
21222 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
21224 # map input types to rpc msg
21226 msg
= dict(type='UserManager', request
='SetPassword', version
=1, params
=_params
)
21227 _params
['changes'] = changes
21228 reply
= await self
.rpc(msg
)
21233 @ReturnMapping(UserInfoResults
)
21234 async def UserInfo(self
, entities
, include_disabled
):
21236 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
21237 include_disabled : bool
21238 Returns -> typing.Sequence<+T_co>[~UserInfoResult]<~UserInfoResult>
21240 # map input types to rpc msg
21242 msg
= dict(type='UserManager', request
='UserInfo', version
=1, params
=_params
)
21243 _params
['entities'] = entities
21244 _params
['include-disabled'] = include_disabled
21245 reply
= await self
.rpc(msg
)
21249 class VolumeAttachmentsWatcherFacade(Type
):
21250 name
= 'VolumeAttachmentsWatcher'
21252 schema
= {'definitions': {'Error': {'additionalProperties': False,
21253 'properties': {'code': {'type': 'string'},
21254 'info': {'$ref': '#/definitions/ErrorInfo'},
21255 'message': {'type': 'string'}},
21256 'required': ['message', 'code'],
21258 'ErrorInfo': {'additionalProperties': False,
21259 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
21260 'macaroon-path': {'type': 'string'}},
21262 'Macaroon': {'additionalProperties': False, 'type': 'object'},
21263 'MachineStorageId': {'additionalProperties': False,
21264 'properties': {'attachment-tag': {'type': 'string'},
21265 'machine-tag': {'type': 'string'}},
21266 'required': ['machine-tag',
21269 'MachineStorageIdsWatchResult': {'additionalProperties': False,
21270 'properties': {'changes': {'items': {'$ref': '#/definitions/MachineStorageId'},
21272 'error': {'$ref': '#/definitions/Error'},
21273 'watcher-id': {'type': 'string'}},
21274 'required': ['watcher-id',
21276 'type': 'object'}},
21277 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResult'}},
21279 'Stop': {'type': 'object'}},
21283 @ReturnMapping(MachineStorageIdsWatchResult
)
21284 async def Next(self
):
21287 Returns -> typing.Union[typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>, _ForwardRef('Error')]
21289 # map input types to rpc msg
21291 msg
= dict(type='VolumeAttachmentsWatcher', request
='Next', version
=2, params
=_params
)
21293 reply
= await self
.rpc(msg
)
21298 @ReturnMapping(None)
21299 async def Stop(self
):
21304 # map input types to rpc msg
21306 msg
= dict(type='VolumeAttachmentsWatcher', request
='Stop', version
=2, params
=_params
)
21308 reply
= await self
.rpc(msg
)