1 # DO NOT CHANGE THIS FILE! This file is auto-generated by facade.py.
2 # Changes will be overwritten/lost when the file is regenerated.
4 from juju
.client
.facade
import Type
, ReturnMapping
8 _toSchema
= {'name': 'name', 'receiver': 'receiver', 'tag': 'tag', 'parameters': 'parameters'}
9 _toPy
= {'name': 'name', 'receiver': 'receiver', 'tag': 'tag', 'parameters': 'parameters'}
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
= {'started': 'started', 'error': 'error', 'message': 'message', 'status': 'status', 'enqueued': 'enqueued', 'action': 'action', 'completed': 'completed', 'output': 'output'}
25 _toPy
= {'started': 'started', 'error': 'error', 'message': 'message', 'status': 'status', 'enqueued': 'enqueued', 'action': 'action', 'completed': 'completed', 'output': 'output'}
26 def __init__(self
, action
=None, completed
=None, enqueued
=None, error
=None, message
=None, output
=None, started
=None, status
=None):
33 output : typing.Mapping<~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
= {'name': 'name', 'actions': 'actions', 'error': 'error'}
81 _toPy
= {'name': 'name', 'actions': 'actions', 'error': 'error'}
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
= {'receiver': 'receiver', 'actions': 'actions', 'error': 'error'}
105 _toPy
= {'receiver': 'receiver', 'actions': 'actions', 'error': 'error'}
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
= {'error': 'error', 'actions': 'actions', 'application_tag': 'application-tag'}
129 _toPy
= {'application-tag': 'application_tag', 'actions': 'actions', '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
= {'info': 'info', 'code': 'code', 'message': 'message'}
173 _toPy
= {'info': 'info', 'code': 'code', '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-path': 'macaroon_path', 'macaroon': 'macaroon'}
188 def __init__(self
, macaroon
=None, macaroon_path
=None):
193 self
.macaroon
= Macaroon
.from_json(macaroon
) if macaroon
else None
194 self
.macaroon_path
= macaroon_path
197 class FindActionsByNames(Type
):
198 _toSchema
= {'names': 'names'}
199 _toPy
= {'names': 'names'}
200 def __init__(self
, names
=None):
202 names : typing.Sequence<+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
= {'commands': 'commands', 'machines': 'machines', 'units': 'units', 'applications': 'applications', 'timeout': 'timeout'}
239 _toPy
= {'commands': 'commands', 'machines': 'machines', 'units': 'units', 'applications': 'applications', 'timeout': 'timeout'}
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
= {'life': 'life', 'error': 'error', 'jobs': 'jobs', 'container_type': 'container-type'}
257 _toPy
= {'life': 'life', 'container-type': 'container_type', 'jobs': 'jobs', 'error': 'error'}
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
= {'auth_type': 'auth-type', 'attrs': 'attrs', 'redacted': 'redacted'}
283 _toPy
= {'auth-type': 'auth_type', 'attrs': 'attrs', '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
= {'type_': 'type', 'identity_endpoint': 'identity-endpoint', 'storage_endpoint': 'storage-endpoint', 'region': 'region', 'name': 'name', 'endpoint': 'endpoint', 'credential': 'credential'}
297 _toPy
= {'region': 'region', 'name': 'name', 'type': 'type_', 'identity-endpoint': 'identity_endpoint', 'endpoint': 'endpoint', 'credential': 'credential', 'storage-endpoint': 'storage_endpoint'}
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
= {'result': 'result', 'error': 'error'}
319 _toPy
= {'result': 'result', 'error': 'error'}
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
= {'tag': 'tag', 'password': 'password'}
351 _toPy
= {'tag': 'tag', 'password': 'password'}
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
= {'info': 'info', 'code': 'code', 'message': 'message'}
373 _toPy
= {'info': 'info', 'code': 'code', 'message': 'message'}
374 def __init__(self
, code
=None, info
=None, message
=None):
381 self
.info
= ErrorInfo
.from_json(info
) if info
else None
382 self
.message
= message
385 class ErrorResults(Type
):
386 _toSchema
= {'results': 'results'}
387 _toPy
= {'results': 'results'}
388 def __init__(self
, results
=None):
390 results : typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
392 self
.results
= [ErrorResult
.from_json(o
) for o
in results
or []]
395 class IsMasterResult(Type
):
396 _toSchema
= {'master': 'master'}
397 _toPy
= {'master': 'master'}
398 def __init__(self
, master
=None):
405 class ModelConfigResult(Type
):
406 _toSchema
= {'config': 'config'}
407 _toPy
= {'config': 'config'}
408 def __init__(self
, config
=None):
410 config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
415 class NotifyWatchResult(Type
):
416 _toSchema
= {'notifywatcherid': 'NotifyWatcherId', 'error': 'error'}
417 _toPy
= {'NotifyWatcherId': 'notifywatcherid', 'error': 'error'}
418 def __init__(self
, notifywatcherid
=None, error
=None):
420 notifywatcherid : str
423 self
.notifywatcherid
= notifywatcherid
424 self
.error
= Error
.from_json(error
) if error
else None
427 class StateServingInfo(Type
):
428 _toSchema
= {'state_port': 'state-port', 'system_identity': 'system-identity', 'api_port': 'api-port', 'cert': 'cert', 'shared_secret': 'shared-secret', 'private_key': 'private-key', 'ca_private_key': 'ca-private-key'}
429 _toPy
= {'shared-secret': 'shared_secret', 'state-port': 'state_port', 'cert': 'cert', 'ca-private-key': 'ca_private_key', 'api-port': 'api_port', 'system-identity': 'system_identity', 'private-key': 'private_key'}
430 def __init__(self
, api_port
=None, ca_private_key
=None, cert
=None, private_key
=None, shared_secret
=None, state_port
=None, system_identity
=None):
438 system_identity : str
440 self
.api_port
= api_port
441 self
.ca_private_key
= ca_private_key
443 self
.private_key
= private_key
444 self
.shared_secret
= shared_secret
445 self
.state_port
= state_port
446 self
.system_identity
= system_identity
449 class AllWatcherNextResults(Type
):
450 _toSchema
= {'deltas': 'deltas'}
451 _toPy
= {'deltas': 'deltas'}
452 def __init__(self
, deltas
=None):
454 deltas : typing.Sequence<+T_co>[~Delta]<~Delta>
456 self
.deltas
= [Delta
.from_json(o
) for o
in deltas
or []]
460 _toSchema
= {'entity': 'entity', 'removed': 'removed'}
461 _toPy
= {'entity': 'entity', 'removed': 'removed'}
462 def __init__(self
, entity
=None, removed
=None):
464 entity : typing.Mapping<~KT, +VT_co>[str, typing.Any]
468 self
.removed
= removed
471 class AnnotationsGetResult(Type
):
472 _toSchema
= {'entity': 'entity', 'annotations': 'annotations', 'error': 'error'}
473 _toPy
= {'entity': 'entity', 'annotations': 'annotations', 'error': 'error'}
474 def __init__(self
, annotations
=None, entity
=None, error
=None):
476 annotations : typing.Mapping<~KT, +VT_co>[str, str]
480 self
.annotations
= annotations
482 self
.error
= ErrorResult
.from_json(error
) if error
else None
485 class AnnotationsGetResults(Type
):
486 _toSchema
= {'results': 'results'}
487 _toPy
= {'results': 'results'}
488 def __init__(self
, results
=None):
490 results : typing.Sequence<+T_co>[~AnnotationsGetResult]<~AnnotationsGetResult>
492 self
.results
= [AnnotationsGetResult
.from_json(o
) for o
in results
or []]
495 class AnnotationsSet(Type
):
496 _toSchema
= {'annotations': 'annotations'}
497 _toPy
= {'annotations': 'annotations'}
498 def __init__(self
, annotations
=None):
500 annotations : typing.Sequence<+T_co>[~EntityAnnotations]<~EntityAnnotations>
502 self
.annotations
= [EntityAnnotations
.from_json(o
) for o
in annotations
or []]
505 class EntityAnnotations(Type
):
506 _toSchema
= {'entity': 'entity', 'annotations': 'annotations'}
507 _toPy
= {'entity': 'entity', 'annotations': 'annotations'}
508 def __init__(self
, annotations
=None, entity
=None):
510 annotations : typing.Mapping<~KT, +VT_co>[str, str]
513 self
.annotations
= annotations
517 class AddApplicationUnits(Type
):
518 _toSchema
= {'application': 'application', 'placement': 'placement', 'num_units': 'num-units'}
519 _toPy
= {'application': 'application', 'placement': 'placement', 'num-units': 'num_units'}
520 def __init__(self
, application
=None, num_units
=None, placement
=None):
524 placement : typing.Sequence<+T_co>[~Placement]<~Placement>
526 self
.application
= application
527 self
.num_units
= num_units
528 self
.placement
= [Placement
.from_json(o
) for o
in placement
or []]
531 class AddApplicationUnitsResults(Type
):
532 _toSchema
= {'units': 'units'}
533 _toPy
= {'units': 'units'}
534 def __init__(self
, units
=None):
536 units : typing.Sequence<+T_co>[str]
541 class AddRelation(Type
):
542 _toSchema
= {'endpoints': 'endpoints'}
543 _toPy
= {'endpoints': 'endpoints'}
544 def __init__(self
, endpoints
=None):
546 endpoints : typing.Sequence<+T_co>[str]
548 self
.endpoints
= endpoints
551 class AddRelationResults(Type
):
552 _toSchema
= {'endpoints': 'endpoints'}
553 _toPy
= {'endpoints': 'endpoints'}
554 def __init__(self
, endpoints
=None):
556 endpoints : typing.Mapping<~KT, +VT_co>[str, ~CharmRelation]<~CharmRelation>
558 self
.endpoints
= endpoints
561 class ApplicationCharmRelations(Type
):
562 _toSchema
= {'application': 'application'}
563 _toPy
= {'application': 'application'}
564 def __init__(self
, application
=None):
568 self
.application
= application
571 class ApplicationCharmRelationsResults(Type
):
572 _toSchema
= {'charm_relations': 'charm-relations'}
573 _toPy
= {'charm-relations': 'charm_relations'}
574 def __init__(self
, charm_relations
=None):
576 charm_relations : typing.Sequence<+T_co>[str]
578 self
.charm_relations
= charm_relations
581 class ApplicationDeploy(Type
):
582 _toSchema
= {'application': 'application', 'charm_url': 'charm-url', 'channel': 'channel', 'resources': 'resources', 'placement': 'placement', 'config_yaml': 'config-yaml', 'config': 'config', 'constraints': 'constraints', 'num_units': 'num-units', 'storage': 'storage', 'endpoint_bindings': 'endpoint-bindings', 'series': 'series'}
583 _toPy
= {'application': 'application', 'num-units': 'num_units', 'channel': 'channel', 'resources': 'resources', 'placement': 'placement', 'endpoint-bindings': 'endpoint_bindings', 'config': 'config', 'constraints': 'constraints', 'series': 'series', 'storage': 'storage', 'charm-url': 'charm_url', 'config-yaml': 'config_yaml'}
584 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):
589 config : typing.Mapping<~KT, +VT_co>[str, str]
592 endpoint_bindings : typing.Mapping<~KT, +VT_co>[str, str]
594 placement : typing.Sequence<+T_co>[~Placement]<~Placement>
595 resources : typing.Mapping<~KT, +VT_co>[str, str]
597 storage : typing.Mapping<~KT, +VT_co>[str, ~Constraints]<~Constraints>
599 self
.application
= application
600 self
.channel
= channel
601 self
.charm_url
= charm_url
603 self
.config_yaml
= config_yaml
604 self
.constraints
= Value
.from_json(constraints
) if constraints
else None
605 self
.endpoint_bindings
= endpoint_bindings
606 self
.num_units
= num_units
607 self
.placement
= [Placement
.from_json(o
) for o
in placement
or []]
608 self
.resources
= resources
610 self
.storage
= storage
613 class ApplicationDestroy(Type
):
614 _toSchema
= {'application': 'application'}
615 _toPy
= {'application': 'application'}
616 def __init__(self
, application
=None):
620 self
.application
= application
623 class ApplicationExpose(Type
):
624 _toSchema
= {'application': 'application'}
625 _toPy
= {'application': 'application'}
626 def __init__(self
, application
=None):
630 self
.application
= application
633 class ApplicationGet(Type
):
634 _toSchema
= {'application': 'application'}
635 _toPy
= {'application': 'application'}
636 def __init__(self
, application
=None):
640 self
.application
= application
643 class ApplicationGetResults(Type
):
644 _toSchema
= {'application': 'application', 'config': 'config', 'charm': 'charm', 'constraints': 'constraints', 'series': 'series'}
645 _toPy
= {'application': 'application', 'config': 'config', 'charm': 'charm', 'constraints': 'constraints', 'series': 'series'}
646 def __init__(self
, application
=None, charm
=None, config
=None, constraints
=None, series
=None):
650 config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
654 self
.application
= application
657 self
.constraints
= Value
.from_json(constraints
) if constraints
else None
661 class ApplicationMetricCredential(Type
):
662 _toSchema
= {'application': 'application', 'metrics_credentials': 'metrics-credentials'}
663 _toPy
= {'application': 'application', 'metrics-credentials': 'metrics_credentials'}
664 def __init__(self
, application
=None, metrics_credentials
=None):
667 metrics_credentials : typing.Sequence<+T_co>[int]
669 self
.application
= application
670 self
.metrics_credentials
= metrics_credentials
673 class ApplicationMetricCredentials(Type
):
674 _toSchema
= {'creds': 'creds'}
675 _toPy
= {'creds': 'creds'}
676 def __init__(self
, creds
=None):
678 creds : typing.Sequence<+T_co>[~ApplicationMetricCredential]<~ApplicationMetricCredential>
680 self
.creds
= [ApplicationMetricCredential
.from_json(o
) for o
in creds
or []]
683 class ApplicationSet(Type
):
684 _toSchema
= {'application': 'application', 'options': 'options'}
685 _toPy
= {'application': 'application', 'options': 'options'}
686 def __init__(self
, application
=None, options
=None):
689 options : typing.Mapping<~KT, +VT_co>[str, str]
691 self
.application
= application
692 self
.options
= options
695 class ApplicationSetCharm(Type
):
696 _toSchema
= {'application': 'application', 'charm_url': 'charm-url', 'channel': 'channel', 'force_units': 'force-units', 'force_series': 'force-series', 'resource_ids': 'resource-ids'}
697 _toPy
= {'application': 'application', 'force-units': 'force_units', 'channel': 'channel', 'charm-url': 'charm_url', 'force-series': 'force_series', 'resource-ids': 'resource_ids'}
698 def __init__(self
, application
=None, channel
=None, charm_url
=None, force_series
=None, force_units
=None, resource_ids
=None):
705 resource_ids : typing.Mapping<~KT, +VT_co>[str, str]
707 self
.application
= application
708 self
.channel
= channel
709 self
.charm_url
= charm_url
710 self
.force_series
= force_series
711 self
.force_units
= force_units
712 self
.resource_ids
= resource_ids
715 class ApplicationUnexpose(Type
):
716 _toSchema
= {'application': 'application'}
717 _toPy
= {'application': 'application'}
718 def __init__(self
, application
=None):
722 self
.application
= application
725 class ApplicationUnset(Type
):
726 _toSchema
= {'application': 'application', 'options': 'options'}
727 _toPy
= {'application': 'application', 'options': 'options'}
728 def __init__(self
, application
=None, options
=None):
731 options : typing.Sequence<+T_co>[str]
733 self
.application
= application
734 self
.options
= options
737 class ApplicationUpdate(Type
):
738 _toSchema
= {'application': 'application', 'charm_url': 'charm-url', 'constraints': 'constraints', 'settings_yaml': 'settings-yaml', 'min_units': 'min-units', 'settings': 'settings', 'force_series': 'force-series', 'force_charm_url': 'force-charm-url'}
739 _toPy
= {'application': 'application', 'constraints': 'constraints', 'settings-yaml': 'settings_yaml', 'min-units': 'min_units', 'charm-url': 'charm_url', 'force-series': 'force_series', 'settings': 'settings', 'force-charm-url': 'force_charm_url'}
740 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):
745 force_charm_url : bool
748 settings : typing.Mapping<~KT, +VT_co>[str, str]
751 self
.application
= application
752 self
.charm_url
= charm_url
753 self
.constraints
= Value
.from_json(constraints
) if constraints
else None
754 self
.force_charm_url
= force_charm_url
755 self
.force_series
= force_series
756 self
.min_units
= min_units
757 self
.settings
= settings
758 self
.settings_yaml
= settings_yaml
761 class ApplicationsDeploy(Type
):
762 _toSchema
= {'applications': 'applications'}
763 _toPy
= {'applications': 'applications'}
764 def __init__(self
, applications
=None):
766 applications : typing.Sequence<+T_co>[~ApplicationDeploy]<~ApplicationDeploy>
768 self
.applications
= [ApplicationDeploy
.from_json(o
) for o
in applications
or []]
771 class CharmRelation(Type
):
772 _toSchema
= {'limit': 'limit', 'role': 'role', 'scope': 'scope', 'optional': 'optional', 'name': 'name', 'interface': 'interface'}
773 _toPy
= {'limit': 'limit', 'role': 'role', 'scope': 'scope', 'optional': 'optional', 'name': 'name', 'interface': 'interface'}
774 def __init__(self
, interface
=None, limit
=None, name
=None, optional
=None, role
=None, scope
=None):
783 self
.interface
= interface
786 self
.optional
= optional
791 class Constraints(Type
):
792 _toSchema
= {'size': 'Size', 'pool': 'Pool', 'count': 'Count'}
793 _toPy
= {'Size': 'size', 'Count': 'count', 'Pool': 'pool'}
794 def __init__(self
, count
=None, pool
=None, size
=None):
805 class DestroyApplicationUnits(Type
):
806 _toSchema
= {'unit_names': 'unit-names'}
807 _toPy
= {'unit-names': 'unit_names'}
808 def __init__(self
, unit_names
=None):
810 unit_names : typing.Sequence<+T_co>[str]
812 self
.unit_names
= unit_names
815 class DestroyRelation(Type
):
816 _toSchema
= {'endpoints': 'endpoints'}
817 _toPy
= {'endpoints': 'endpoints'}
818 def __init__(self
, endpoints
=None):
820 endpoints : typing.Sequence<+T_co>[str]
822 self
.endpoints
= endpoints
825 class GetApplicationConstraints(Type
):
826 _toSchema
= {'application': 'application'}
827 _toPy
= {'application': 'application'}
828 def __init__(self
, application
=None):
832 self
.application
= application
835 class GetConstraintsResults(Type
):
836 _toSchema
= {'cpu_power': 'cpu-power', 'instance_type': 'instance-type', 'tags': 'tags', 'virt_type': 'virt-type', 'arch': 'arch', 'container': 'container', 'root_disk': 'root-disk', 'mem': 'mem', 'cpu_cores': 'cpu-cores', 'spaces': 'spaces'}
837 _toPy
= {'virt-type': 'virt_type', 'cpu-power': 'cpu_power', 'container': 'container', 'cpu-cores': 'cpu_cores', 'arch': 'arch', 'tags': 'tags', 'mem': 'mem', 'spaces': 'spaces', 'instance-type': 'instance_type', 'root-disk': 'root_disk'}
838 def __init__(self
, arch
=None, container
=None, cpu_cores
=None, cpu_power
=None, instance_type
=None, mem
=None, root_disk
=None, spaces
=None, tags
=None, virt_type
=None):
847 spaces : typing.Sequence<+T_co>[str]
848 tags : typing.Sequence<+T_co>[str]
852 self
.container
= container
853 self
.cpu_cores
= cpu_cores
854 self
.cpu_power
= cpu_power
855 self
.instance_type
= instance_type
857 self
.root_disk
= root_disk
860 self
.virt_type
= virt_type
863 class Placement(Type
):
864 _toSchema
= {'directive': 'directive', 'scope': 'scope'}
865 _toPy
= {'directive': 'directive', 'scope': 'scope'}
866 def __init__(self
, directive
=None, scope
=None):
871 self
.directive
= directive
875 class SetConstraints(Type
):
876 _toSchema
= {'application': 'application', 'constraints': 'constraints'}
877 _toPy
= {'application': 'application', 'constraints': 'constraints'}
878 def __init__(self
, application
=None, constraints
=None):
883 self
.application
= application
884 self
.constraints
= Value
.from_json(constraints
) if constraints
else None
887 class StringResult(Type
):
888 _toSchema
= {'result': 'result', 'error': 'error'}
889 _toPy
= {'result': 'result', 'error': 'error'}
890 def __init__(self
, error
=None, result
=None):
895 self
.error
= Error
.from_json(error
) if error
else None
900 _toSchema
= {'cpu_power': 'cpu-power', 'instance_type': 'instance-type', 'tags': 'tags', 'virt_type': 'virt-type', 'arch': 'arch', 'container': 'container', 'root_disk': 'root-disk', 'mem': 'mem', 'cpu_cores': 'cpu-cores', 'spaces': 'spaces'}
901 _toPy
= {'virt-type': 'virt_type', 'cpu-power': 'cpu_power', 'container': 'container', 'cpu-cores': 'cpu_cores', 'arch': 'arch', 'tags': 'tags', 'mem': 'mem', 'spaces': 'spaces', 'instance-type': 'instance_type', 'root-disk': 'root_disk'}
902 def __init__(self
, arch
=None, container
=None, cpu_cores
=None, cpu_power
=None, instance_type
=None, mem
=None, root_disk
=None, spaces
=None, tags
=None, virt_type
=None):
911 spaces : typing.Sequence<+T_co>[str]
912 tags : typing.Sequence<+T_co>[str]
916 self
.container
= container
917 self
.cpu_cores
= cpu_cores
918 self
.cpu_power
= cpu_power
919 self
.instance_type
= instance_type
921 self
.root_disk
= root_disk
924 self
.virt_type
= virt_type
927 class StringsWatchResult(Type
):
928 _toSchema
= {'changes': 'changes', 'watcher_id': 'watcher-id', 'error': 'error'}
929 _toPy
= {'watcher-id': 'watcher_id', 'changes': 'changes', 'error': 'error'}
930 def __init__(self
, changes
=None, error
=None, watcher_id
=None):
932 changes : typing.Sequence<+T_co>[str]
936 self
.changes
= changes
937 self
.error
= Error
.from_json(error
) if error
else None
938 self
.watcher_id
= watcher_id
941 class BackupsCreateArgs(Type
):
942 _toSchema
= {'notes': 'notes'}
943 _toPy
= {'notes': 'notes'}
944 def __init__(self
, notes
=None):
951 class BackupsInfoArgs(Type
):
952 _toSchema
= {'id_': 'id'}
953 _toPy
= {'id': 'id_'}
954 def __init__(self
, id_
=None):
961 class BackupsListArgs(Type
):
971 class BackupsListResult(Type
):
972 _toSchema
= {'list_': 'list'}
973 _toPy
= {'list': 'list_'}
974 def __init__(self
, list_
=None):
976 list_ : typing.Sequence<+T_co>[~BackupsMetadataResult]<~BackupsMetadataResult>
978 self
.list_
= [BackupsMetadataResult
.from_json(o
) for o
in list_
or []]
981 class BackupsMetadataResult(Type
):
982 _toSchema
= {'ca_private_key': 'ca-private-key', 'size': 'size', 'started': 'started', 'id_': 'id', 'checksum': 'checksum', 'finished': 'finished', 'hostname': 'hostname', 'stored': 'stored', 'series': 'series', 'machine': 'machine', 'notes': 'notes', 'ca_cert': 'ca-cert', 'checksum_format': 'checksum-format', 'model': 'model', 'version': 'version'}
983 _toPy
= {'started': 'started', 'size': 'size', 'ca-cert': 'ca_cert', 'ca-private-key': 'ca_private_key', 'checksum': 'checksum', 'machine': 'machine', 'finished': 'finished', 'hostname': 'hostname', 'stored': 'stored', 'series': 'series', 'notes': 'notes', 'id': 'id_', 'checksum-format': 'checksum_format', 'model': 'model', 'version': 'version'}
984 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):
989 checksum_format : str
1002 self
.ca_cert
= ca_cert
1003 self
.ca_private_key
= ca_private_key
1004 self
.checksum
= checksum
1005 self
.checksum_format
= checksum_format
1006 self
.finished
= finished
1007 self
.hostname
= hostname
1009 self
.machine
= machine
1012 self
.series
= series
1014 self
.started
= started
1015 self
.stored
= stored
1016 self
.version
= Number
.from_json(version
) if version
else None
1019 class BackupsRemoveArgs(Type
):
1020 _toSchema
= {'id_': 'id'}
1021 _toPy
= {'id': 'id_'}
1022 def __init__(self
, id_
=None):
1030 _toSchema
= {'build': 'Build', 'patch': 'Patch', 'tag': 'Tag', 'minor': 'Minor', 'major': 'Major'}
1031 _toPy
= {'Tag': 'tag', 'Major': 'major', 'Patch': 'patch', 'Minor': 'minor', 'Build': 'build'}
1032 def __init__(self
, build
=None, major
=None, minor
=None, patch
=None, tag
=None):
1047 class RestoreArgs(Type
):
1048 _toSchema
= {'backup_id': 'backup-id'}
1049 _toPy
= {'backup-id': 'backup_id'}
1050 def __init__(self
, backup_id
=None):
1054 self
.backup_id
= backup_id
1058 _toSchema
= {'tag': 'tag', 'type_': 'type', 'id_': 'id', 'message': 'message'}
1059 _toPy
= {'type': 'type_', 'id': 'id_', 'tag': 'tag', 'message': 'message'}
1060 def __init__(self
, id_
=None, message
=None, tag
=None, type_
=None):
1068 self
.message
= message
1073 class BlockResult(Type
):
1074 _toSchema
= {'result': 'result', 'error': 'error'}
1075 _toPy
= {'result': 'result', 'error': 'error'}
1076 def __init__(self
, error
=None, result
=None):
1081 self
.error
= Error
.from_json(error
) if error
else None
1082 self
.result
= Block
.from_json(result
) if result
else None
1085 class BlockResults(Type
):
1086 _toSchema
= {'results': 'results'}
1087 _toPy
= {'results': 'results'}
1088 def __init__(self
, results
=None):
1090 results : typing.Sequence<+T_co>[~BlockResult]<~BlockResult>
1092 self
.results
= [BlockResult
.from_json(o
) for o
in results
or []]
1095 class BlockSwitchParams(Type
):
1096 _toSchema
= {'type_': 'type', 'message': 'message'}
1097 _toPy
= {'type': 'type_', 'message': 'message'}
1098 def __init__(self
, message
=None, type_
=None):
1103 self
.message
= message
1107 class CharmActionSpec(Type
):
1108 _toSchema
= {'description': 'description', 'params': 'params'}
1109 _toPy
= {'description': 'description', 'params': 'params'}
1110 def __init__(self
, description
=None, params
=None):
1113 params : typing.Mapping<~KT, +VT_co>[str, typing.Any]
1115 self
.description
= description
1116 self
.params
= params
1119 class CharmActions(Type
):
1120 _toSchema
= {'specs': 'specs'}
1121 _toPy
= {'specs': 'specs'}
1122 def __init__(self
, specs
=None):
1124 specs : typing.Mapping<~KT, +VT_co>[str, ~CharmActionSpec]<~CharmActionSpec>
1129 class CharmInfo(Type
):
1130 _toSchema
= {'config': 'config', 'actions': 'actions', 'revision': 'revision', 'metrics': 'metrics', 'url': 'url', 'meta': 'meta'}
1131 _toPy
= {'config': 'config', 'actions': 'actions', 'revision': 'revision', 'metrics': 'metrics', 'url': 'url', 'meta': 'meta'}
1132 def __init__(self
, actions
=None, config
=None, meta
=None, metrics
=None, revision
=None, url
=None):
1134 actions : CharmActions
1135 config : typing.Mapping<~KT, +VT_co>[str, ~CharmOption]<~CharmOption>
1137 metrics : CharmMetrics
1141 self
.actions
= CharmActions
.from_json(actions
) if actions
else None
1142 self
.config
= config
1143 self
.meta
= CharmMeta
.from_json(meta
) if meta
else None
1144 self
.metrics
= CharmMetrics
.from_json(metrics
) if metrics
else None
1145 self
.revision
= revision
1149 class CharmMeta(Type
):
1150 _toSchema
= {'description': 'description', 'extra_bindings': 'extra-bindings', 'tags': 'tags', 'min_juju_version': 'min-juju-version', 'payload_classes': 'payload-classes', 'resources': 'resources', 'storage': 'storage', 'subordinate': 'subordinate', 'categories': 'categories', 'terms': 'terms', 'series': 'series', 'peers': 'peers', 'name': 'name', 'requires': 'requires', 'summary': 'summary', 'provides': 'provides'}
1151 _toPy
= {'description': 'description', 'min-juju-version': 'min_juju_version', 'peers': 'peers', 'provides': 'provides', 'resources': 'resources', 'extra-bindings': 'extra_bindings', 'terms': 'terms', 'subordinate': 'subordinate', 'categories': 'categories', 'series': 'series', 'storage': 'storage', 'name': 'name', 'requires': 'requires', 'summary': 'summary', 'payload-classes': 'payload_classes', 'tags': 'tags'}
1152 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):
1154 categories : typing.Sequence<+T_co>[str]
1156 extra_bindings : typing.Mapping<~KT, +VT_co>[str, str]
1157 min_juju_version : str
1159 payload_classes : typing.Mapping<~KT, +VT_co>[str, ~CharmPayloadClass]<~CharmPayloadClass>
1160 peers : typing.Mapping<~KT, +VT_co>[str, ~CharmRelation]<~CharmRelation>
1161 provides : typing.Mapping<~KT, +VT_co>[str, ~CharmRelation]<~CharmRelation>
1162 requires : typing.Mapping<~KT, +VT_co>[str, ~CharmRelation]<~CharmRelation>
1163 resources : typing.Mapping<~KT, +VT_co>[str, ~CharmResourceMeta]<~CharmResourceMeta>
1164 series : typing.Sequence<+T_co>[str]
1165 storage : typing.Mapping<~KT, +VT_co>[str, ~CharmStorage]<~CharmStorage>
1168 tags : typing.Sequence<+T_co>[str]
1169 terms : typing.Sequence<+T_co>[str]
1171 self
.categories
= categories
1172 self
.description
= description
1173 self
.extra_bindings
= extra_bindings
1174 self
.min_juju_version
= min_juju_version
1176 self
.payload_classes
= payload_classes
1178 self
.provides
= provides
1179 self
.requires
= requires
1180 self
.resources
= resources
1181 self
.series
= series
1182 self
.storage
= storage
1183 self
.subordinate
= subordinate
1184 self
.summary
= summary
1189 class CharmMetric(Type
):
1190 _toSchema
= {'description': 'description', 'type_': 'type'}
1191 _toPy
= {'type': 'type_', 'description': 'description'}
1192 def __init__(self
, description
=None, type_
=None):
1197 self
.description
= description
1201 class CharmMetrics(Type
):
1202 _toSchema
= {'metrics': 'metrics'}
1203 _toPy
= {'metrics': 'metrics'}
1204 def __init__(self
, metrics
=None):
1206 metrics : typing.Mapping<~KT, +VT_co>[str, ~CharmMetric]<~CharmMetric>
1208 self
.metrics
= metrics
1211 class CharmOption(Type
):
1212 _toSchema
= {'description': 'description', 'default': 'default', 'type_': 'type'}
1213 _toPy
= {'type': 'type_', 'description': 'description', 'default': 'default'}
1214 def __init__(self
, default
=None, description
=None, type_
=None):
1216 default : typing.Mapping<~KT, +VT_co>[str, typing.Any]
1220 self
.default
= default
1221 self
.description
= description
1225 class CharmPayloadClass(Type
):
1226 _toSchema
= {'name': 'name', 'type_': 'type'}
1227 _toPy
= {'type': 'type_', 'name': 'name'}
1228 def __init__(self
, name
=None, type_
=None):
1237 class CharmResourceMeta(Type
):
1238 _toSchema
= {'description': 'description', 'type_': 'type', 'path': 'path', 'name': 'name'}
1239 _toPy
= {'type': 'type_', 'description': 'description', 'path': 'path', 'name': 'name'}
1240 def __init__(self
, description
=None, name
=None, path
=None, type_
=None):
1247 self
.description
= description
1253 class CharmStorage(Type
):
1254 _toSchema
= {'shared': 'shared', 'count_min': 'count-min', 'properties': 'properties', 'type_': 'type', 'description': 'description', 'name': 'name', 'location': 'location', 'minimum_size': 'minimum-size', 'read_only': 'read-only', 'count_max': 'count-max'}
1255 _toPy
= {'description': 'description', 'count-min': 'count_min', 'minimum-size': 'minimum_size', 'shared': 'shared', 'name': 'name', 'location': 'location', 'type': 'type_', 'count-max': 'count_max', 'read-only': 'read_only', 'properties': 'properties'}
1256 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):
1264 properties : typing.Sequence<+T_co>[str]
1269 self
.count_max
= count_max
1270 self
.count_min
= count_min
1271 self
.description
= description
1272 self
.location
= location
1273 self
.minimum_size
= minimum_size
1275 self
.properties
= properties
1276 self
.read_only
= read_only
1277 self
.shared
= shared
1281 class CharmURL(Type
):
1282 _toSchema
= {'url': 'url'}
1283 _toPy
= {'url': 'url'}
1284 def __init__(self
, url
=None):
1291 class CharmsList(Type
):
1292 _toSchema
= {'names': 'names'}
1293 _toPy
= {'names': 'names'}
1294 def __init__(self
, names
=None):
1296 names : typing.Sequence<+T_co>[str]
1301 class CharmsListResult(Type
):
1302 _toSchema
= {'charm_urls': 'charm-urls'}
1303 _toPy
= {'charm-urls': 'charm_urls'}
1304 def __init__(self
, charm_urls
=None):
1306 charm_urls : typing.Sequence<+T_co>[str]
1308 self
.charm_urls
= charm_urls
1311 class IsMeteredResult(Type
):
1312 _toSchema
= {'metered': 'metered'}
1313 _toPy
= {'metered': 'metered'}
1314 def __init__(self
, metered
=None):
1318 self
.metered
= metered
1321 class APIHostPortsResult(Type
):
1322 _toSchema
= {'servers': 'servers'}
1323 _toPy
= {'servers': 'servers'}
1324 def __init__(self
, servers
=None):
1326 servers : typing.Sequence<+T_co>[~HostPort]<~HostPort>
1328 self
.servers
= [HostPort
.from_json(o
) for o
in servers
or []]
1331 class AddCharm(Type
):
1332 _toSchema
= {'channel': 'channel', 'url': 'url'}
1333 _toPy
= {'channel': 'channel', 'url': 'url'}
1334 def __init__(self
, channel
=None, url
=None):
1339 self
.channel
= channel
1343 class AddCharmWithAuthorization(Type
):
1344 _toSchema
= {'macaroon': 'macaroon', 'channel': 'channel', 'url': 'url'}
1345 _toPy
= {'macaroon': 'macaroon', 'channel': 'channel', 'url': 'url'}
1346 def __init__(self
, channel
=None, macaroon
=None, url
=None):
1352 self
.channel
= channel
1353 self
.macaroon
= Macaroon
.from_json(macaroon
) if macaroon
else None
1357 class AddMachineParams(Type
):
1358 _toSchema
= {'addresses': 'addresses', 'disks': 'disks', 'hardware_characteristics': 'hardware-characteristics', 'nonce': 'nonce', 'constraints': 'constraints', 'series': 'series', 'placement': 'placement', 'parent_id': 'parent-id', 'jobs': 'jobs', 'instance_id': 'instance-id', 'container_type': 'container-type'}
1359 _toPy
= {'addresses': 'addresses', 'disks': 'disks', 'instance-id': 'instance_id', 'container-type': 'container_type', 'nonce': 'nonce', 'constraints': 'constraints', 'series': 'series', 'placement': 'placement', 'parent-id': 'parent_id', 'hardware-characteristics': 'hardware_characteristics', 'jobs': 'jobs'}
1360 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):
1362 addresses : typing.Sequence<+T_co>[~Address]<~Address>
1364 container_type : str
1365 disks : typing.Sequence<+T_co>[~Constraints]<~Constraints>
1366 hardware_characteristics : HardwareCharacteristics
1368 jobs : typing.Sequence<+T_co>[str]
1371 placement : Placement
1374 self
.addresses
= [Address
.from_json(o
) for o
in addresses
or []]
1375 self
.constraints
= Value
.from_json(constraints
) if constraints
else None
1376 self
.container_type
= container_type
1377 self
.disks
= [Constraints
.from_json(o
) for o
in disks
or []]
1378 self
.hardware_characteristics
= HardwareCharacteristics
.from_json(hardware_characteristics
) if hardware_characteristics
else None
1379 self
.instance_id
= instance_id
1382 self
.parent_id
= parent_id
1383 self
.placement
= Placement
.from_json(placement
) if placement
else None
1384 self
.series
= series
1387 class AddMachines(Type
):
1388 _toSchema
= {'params': 'params'}
1389 _toPy
= {'params': 'params'}
1390 def __init__(self
, params
=None):
1392 params : typing.Sequence<+T_co>[~AddMachineParams]<~AddMachineParams>
1394 self
.params
= [AddMachineParams
.from_json(o
) for o
in params
or []]
1397 class AddMachinesResult(Type
):
1398 _toSchema
= {'machine': 'machine', 'error': 'error'}
1399 _toPy
= {'machine': 'machine', 'error': 'error'}
1400 def __init__(self
, error
=None, machine
=None):
1405 self
.error
= Error
.from_json(error
) if error
else None
1406 self
.machine
= machine
1409 class AddMachinesResults(Type
):
1410 _toSchema
= {'machines': 'machines'}
1411 _toPy
= {'machines': 'machines'}
1412 def __init__(self
, machines
=None):
1414 machines : typing.Sequence<+T_co>[~AddMachinesResult]<~AddMachinesResult>
1416 self
.machines
= [AddMachinesResult
.from_json(o
) for o
in machines
or []]
1419 class Address(Type
):
1420 _toSchema
= {'space_name': 'space-name', 'type_': 'type', 'scope': 'scope', 'value': 'value'}
1421 _toPy
= {'type': 'type_', 'value': 'value', 'scope': 'scope', 'space-name': 'space_name'}
1422 def __init__(self
, scope
=None, space_name
=None, type_
=None, value
=None):
1430 self
.space_name
= space_name
1435 class AgentVersionResult(Type
):
1436 _toSchema
= {'build': 'Build', 'patch': 'Patch', 'tag': 'Tag', 'minor': 'Minor', 'major': 'Major'}
1437 _toPy
= {'Tag': 'tag', 'Major': 'major', 'Patch': 'patch', 'Minor': 'minor', 'Build': 'build'}
1438 def __init__(self
, build
=None, major
=None, minor
=None, patch
=None, tag
=None):
1453 class AllWatcherId(Type
):
1454 _toSchema
= {'watcher_id': 'watcher-id'}
1455 _toPy
= {'watcher-id': 'watcher_id'}
1456 def __init__(self
, watcher_id
=None):
1460 self
.watcher_id
= watcher_id
1463 class ApplicationStatus(Type
):
1464 _toSchema
= {'can_upgrade_to': 'can-upgrade-to', 'subordinate_to': 'subordinate-to', 'workload_version': 'workload-version', 'life': 'life', 'charm': 'charm', 'status': 'status', 'units': 'units', 'meter_statuses': 'meter-statuses', 'series': 'series', 'err': 'err', 'relations': 'relations', 'exposed': 'exposed'}
1465 _toPy
= {'can-upgrade-to': 'can_upgrade_to', 'workload-version': 'workload_version', 'life': 'life', 'charm': 'charm', 'status': 'status', 'units': 'units', 'series': 'series', 'err': 'err', 'relations': 'relations', 'meter-statuses': 'meter_statuses', 'exposed': 'exposed', 'subordinate-to': 'subordinate_to'}
1466 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):
1468 can_upgrade_to : str
1470 err : typing.Mapping<~KT, +VT_co>[str, typing.Any]
1473 meter_statuses : typing.Mapping<~KT, +VT_co>[str, ~MeterStatus]<~MeterStatus>
1474 relations : typing.Sequence<+T_co>[str]
1476 status : DetailedStatus
1477 subordinate_to : typing.Sequence<+T_co>[str]
1478 units : typing.Mapping<~KT, +VT_co>[str, ~UnitStatus]<~UnitStatus>
1479 workload_version : str
1481 self
.can_upgrade_to
= can_upgrade_to
1484 self
.exposed
= exposed
1486 self
.meter_statuses
= meter_statuses
1487 self
.relations
= relations
1488 self
.series
= series
1489 self
.status
= DetailedStatus
.from_json(status
) if status
else None
1490 self
.subordinate_to
= subordinate_to
1492 self
.workload_version
= workload_version
1496 _toSchema
= {'number': 'Number', 'series': 'Series', 'arch': 'Arch'}
1497 _toPy
= {'Series': 'series', 'Arch': 'arch', 'Number': 'number'}
1498 def __init__(self
, arch
=None, number
=None, series
=None):
1505 self
.number
= Number
.from_json(number
) if number
else None
1506 self
.series
= series
1509 class BundleChangesChange(Type
):
1510 _toSchema
= {'args': 'args', 'requires': 'requires', 'id_': 'id', 'method': 'method'}
1511 _toPy
= {'args': 'args', 'id': 'id_', 'requires': 'requires', 'method': 'method'}
1512 def __init__(self
, args
=None, id_
=None, method
=None, requires
=None):
1514 args : typing.Sequence<+T_co>[typing.Any]
1517 requires : typing.Sequence<+T_co>[str]
1521 self
.method
= method
1522 self
.requires
= requires
1525 class ConfigValue(Type
):
1526 _toSchema
= {'source': 'source', 'value': 'value'}
1527 _toPy
= {'source': 'source', 'value': 'value'}
1528 def __init__(self
, source
=None, value
=None):
1531 value : typing.Mapping<~KT, +VT_co>[str, typing.Any]
1533 self
.source
= source
1537 class DestroyMachines(Type
):
1538 _toSchema
= {'machine_names': 'machine-names', 'force': 'force'}
1539 _toPy
= {'force': 'force', 'machine-names': 'machine_names'}
1540 def __init__(self
, force
=None, machine_names
=None):
1543 machine_names : typing.Sequence<+T_co>[str]
1546 self
.machine_names
= machine_names
1549 class DetailedStatus(Type
):
1550 _toSchema
= {'info': 'info', 'data': 'data', 'kind': 'kind', 'since': 'since', 'err': 'err', 'life': 'life', 'status': 'status', 'version': 'version'}
1551 _toPy
= {'info': 'info', 'data': 'data', 'kind': 'kind', 'since': 'since', 'err': 'err', 'life': 'life', 'status': 'status', 'version': 'version'}
1552 def __init__(self
, data
=None, err
=None, info
=None, kind
=None, life
=None, since
=None, status
=None, version
=None):
1554 data : typing.Mapping<~KT, +VT_co>[str, typing.Any]
1555 err : typing.Mapping<~KT, +VT_co>[str, typing.Any]
1569 self
.status
= status
1570 self
.version
= version
1573 class EndpointStatus(Type
):
1574 _toSchema
= {'application': 'application', 'name': 'name', 'role': 'role', 'subordinate': 'subordinate'}
1575 _toPy
= {'application': 'application', 'name': 'name', 'role': 'role', 'subordinate': 'subordinate'}
1576 def __init__(self
, application
=None, name
=None, role
=None, subordinate
=None):
1583 self
.application
= application
1586 self
.subordinate
= subordinate
1589 class EntityStatus(Type
):
1590 _toSchema
= {'info': 'info', 'data': 'data', 'status': 'status', 'since': 'since'}
1591 _toPy
= {'info': 'info', 'data': 'data', 'status': 'status', 'since': 'since'}
1592 def __init__(self
, data
=None, info
=None, since
=None, status
=None):
1594 data : typing.Mapping<~KT, +VT_co>[str, typing.Any]
1602 self
.status
= status
1605 class FindToolsParams(Type
):
1606 _toSchema
= {'series': 'series', 'number': 'number', 'minor': 'minor', 'major': 'major', 'arch': 'arch'}
1607 _toPy
= {'series': 'series', 'number': 'number', 'minor': 'minor', 'major': 'major', 'arch': 'arch'}
1608 def __init__(self
, arch
=None, major
=None, minor
=None, number
=None, series
=None):
1619 self
.number
= Number
.from_json(number
) if number
else None
1620 self
.series
= series
1623 class FindToolsResult(Type
):
1624 _toSchema
= {'list_': 'list', 'error': 'error'}
1625 _toPy
= {'list': 'list_', 'error': 'error'}
1626 def __init__(self
, error
=None, list_
=None):
1629 list_ : typing.Sequence<+T_co>[~Tools]<~Tools>
1631 self
.error
= Error
.from_json(error
) if error
else None
1632 self
.list_
= [Tools
.from_json(o
) for o
in list_
or []]
1635 class FullStatus(Type
):
1636 _toSchema
= {'relations': 'relations', 'machines': 'machines', 'applications': 'applications', 'model': 'model'}
1637 _toPy
= {'relations': 'relations', 'machines': 'machines', 'applications': 'applications', 'model': 'model'}
1638 def __init__(self
, applications
=None, machines
=None, model
=None, relations
=None):
1640 applications : typing.Mapping<~KT, +VT_co>[str, ~ApplicationStatus]<~ApplicationStatus>
1641 machines : typing.Mapping<~KT, +VT_co>[str, ~MachineStatus]<~MachineStatus>
1642 model : ModelStatusInfo
1643 relations : typing.Sequence<+T_co>[~RelationStatus]<~RelationStatus>
1645 self
.applications
= applications
1646 self
.machines
= machines
1647 self
.model
= ModelStatusInfo
.from_json(model
) if model
else None
1648 self
.relations
= [RelationStatus
.from_json(o
) for o
in relations
or []]
1651 class GetBundleChangesParams(Type
):
1652 _toSchema
= {'yaml': 'yaml'}
1653 _toPy
= {'yaml': 'yaml'}
1654 def __init__(self
, yaml
=None):
1661 class GetBundleChangesResults(Type
):
1662 _toSchema
= {'errors': 'errors', 'changes': 'changes'}
1663 _toPy
= {'errors': 'errors', 'changes': 'changes'}
1664 def __init__(self
, changes
=None, errors
=None):
1666 changes : typing.Sequence<+T_co>[~BundleChangesChange]<~BundleChangesChange>
1667 errors : typing.Sequence<+T_co>[str]
1669 self
.changes
= [BundleChangesChange
.from_json(o
) for o
in changes
or []]
1670 self
.errors
= errors
1673 class HardwareCharacteristics(Type
):
1674 _toSchema
= {'cpu_power': 'cpu-power', 'tags': 'tags', 'availability_zone': 'availability-zone', 'mem': 'mem', 'root_disk': 'root-disk', 'arch': 'arch', 'cpu_cores': 'cpu-cores'}
1675 _toPy
= {'cpu-power': 'cpu_power', 'tags': 'tags', 'arch': 'arch', 'mem': 'mem', 'availability-zone': 'availability_zone', 'cpu-cores': 'cpu_cores', 'root-disk': 'root_disk'}
1676 def __init__(self
, arch
=None, availability_zone
=None, cpu_cores
=None, cpu_power
=None, mem
=None, root_disk
=None, tags
=None):
1679 availability_zone : str
1684 tags : typing.Sequence<+T_co>[str]
1687 self
.availability_zone
= availability_zone
1688 self
.cpu_cores
= cpu_cores
1689 self
.cpu_power
= cpu_power
1691 self
.root_disk
= root_disk
1695 class History(Type
):
1696 _toSchema
= {'statuses': 'statuses', 'error': 'error'}
1697 _toPy
= {'statuses': 'statuses', 'error': 'error'}
1698 def __init__(self
, error
=None, statuses
=None):
1701 statuses : typing.Sequence<+T_co>[~DetailedStatus]<~DetailedStatus>
1703 self
.error
= Error
.from_json(error
) if error
else None
1704 self
.statuses
= [DetailedStatus
.from_json(o
) for o
in statuses
or []]
1707 class HostPort(Type
):
1708 _toSchema
= {'port': 'port', 'address': 'Address'}
1709 _toPy
= {'Address': 'address', 'port': 'port'}
1710 def __init__(self
, address
=None, port
=None):
1715 self
.address
= Address
.from_json(address
) if address
else None
1719 class MachineStatus(Type
):
1720 _toSchema
= {'dns_name': 'dns-name', 'jobs': 'jobs', 'id_': 'id', 'instance_id': 'instance-id', 'series': 'series', 'wants_vote': 'wants-vote', 'instance_status': 'instance-status', 'hardware': 'hardware', 'containers': 'containers', 'has_vote': 'has-vote', 'agent_status': 'agent-status'}
1721 _toPy
= {'has-vote': 'has_vote', 'instance-id': 'instance_id', 'instance-status': 'instance_status', 'series': 'series', 'dns-name': 'dns_name', 'wants-vote': 'wants_vote', 'id': 'id_', 'agent-status': 'agent_status', 'containers': 'containers', 'jobs': 'jobs', 'hardware': 'hardware'}
1722 def __init__(self
, agent_status
=None, containers
=None, dns_name
=None, hardware
=None, has_vote
=None, id_
=None, instance_id
=None, instance_status
=None, jobs
=None, series
=None, wants_vote
=None):
1724 agent_status : DetailedStatus
1725 containers : typing.Mapping<~KT, +VT_co>[str, ~MachineStatus]<~MachineStatus>
1731 instance_status : DetailedStatus
1732 jobs : typing.Sequence<+T_co>[str]
1736 self
.agent_status
= DetailedStatus
.from_json(agent_status
) if agent_status
else None
1737 self
.containers
= containers
1738 self
.dns_name
= dns_name
1739 self
.hardware
= hardware
1740 self
.has_vote
= has_vote
1742 self
.instance_id
= instance_id
1743 self
.instance_status
= DetailedStatus
.from_json(instance_status
) if instance_status
else None
1745 self
.series
= series
1746 self
.wants_vote
= wants_vote
1749 class MeterStatus(Type
):
1750 _toSchema
= {'color': 'color', 'message': 'message'}
1751 _toPy
= {'color': 'color', 'message': 'message'}
1752 def __init__(self
, color
=None, message
=None):
1758 self
.message
= message
1761 class ModelConfigResults(Type
):
1762 _toSchema
= {'config': 'config'}
1763 _toPy
= {'config': 'config'}
1764 def __init__(self
, config
=None):
1766 config : typing.Mapping<~KT, +VT_co>[str, ~ConfigValue]<~ConfigValue>
1768 self
.config
= config
1771 class ModelDefaultValues(Type
):
1772 _toSchema
= {'config': 'config', 'cloud_tag': 'cloud-tag', 'cloud_region': 'cloud-region'}
1773 _toPy
= {'config': 'config', 'cloud-tag': 'cloud_tag', 'cloud-region': 'cloud_region'}
1774 def __init__(self
, cloud_region
=None, cloud_tag
=None, config
=None):
1778 config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
1780 self
.cloud_region
= cloud_region
1781 self
.cloud_tag
= cloud_tag
1782 self
.config
= config
1785 class ModelDefaults(Type
):
1786 _toSchema
= {'controller': 'controller', 'default': 'default', 'regions': 'regions'}
1787 _toPy
= {'controller': 'controller', 'default': 'default', 'regions': 'regions'}
1788 def __init__(self
, controller
=None, default
=None, regions
=None):
1790 controller : typing.Mapping<~KT, +VT_co>[str, typing.Any]
1791 default : typing.Mapping<~KT, +VT_co>[str, typing.Any]
1792 regions : typing.Sequence<+T_co>[~RegionDefaults]<~RegionDefaults>
1794 self
.controller
= controller
1795 self
.default
= default
1796 self
.regions
= [RegionDefaults
.from_json(o
) for o
in regions
or []]
1799 class ModelDefaultsResult(Type
):
1800 _toSchema
= {'config': 'config'}
1801 _toPy
= {'config': 'config'}
1802 def __init__(self
, config
=None):
1804 config : typing.Mapping<~KT, +VT_co>[str, ~ModelDefaults]<~ModelDefaults>
1806 self
.config
= config
1809 class ModelInfo(Type
):
1810 _toSchema
= {'default_series': 'default-series', 'life': 'life', 'cloud_region': 'cloud-region', 'users': 'users', 'uuid': 'uuid', 'owner_tag': 'owner-tag', 'cloud': 'cloud', 'cloud_credential_tag': 'cloud-credential-tag', 'status': 'status', 'name': 'name', 'controller_uuid': 'controller-uuid', 'provider_type': 'provider-type'}
1811 _toPy
= {'controller-uuid': 'controller_uuid', 'life': 'life', 'owner-tag': 'owner_tag', 'provider-type': 'provider_type', 'users': 'users', 'uuid': 'uuid', 'default-series': 'default_series', 'cloud': 'cloud', 'cloud-credential-tag': 'cloud_credential_tag', 'status': 'status', 'name': 'name', 'cloud-region': 'cloud_region'}
1812 def __init__(self
, cloud
=None, cloud_credential_tag
=None, cloud_region
=None, controller_uuid
=None, default_series
=None, life
=None, name
=None, owner_tag
=None, provider_type
=None, status
=None, users
=None, uuid
=None):
1815 cloud_credential_tag : str
1817 controller_uuid : str
1818 default_series : str
1823 status : EntityStatus
1824 users : typing.Sequence<+T_co>[~ModelUserInfo]<~ModelUserInfo>
1828 self
.cloud_credential_tag
= cloud_credential_tag
1829 self
.cloud_region
= cloud_region
1830 self
.controller_uuid
= controller_uuid
1831 self
.default_series
= default_series
1834 self
.owner_tag
= owner_tag
1835 self
.provider_type
= provider_type
1836 self
.status
= EntityStatus
.from_json(status
) if status
else None
1837 self
.users
= [ModelUserInfo
.from_json(o
) for o
in users
or []]
1841 class ModelSet(Type
):
1842 _toSchema
= {'config': 'config'}
1843 _toPy
= {'config': 'config'}
1844 def __init__(self
, config
=None):
1846 config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
1848 self
.config
= config
1851 class ModelStatusInfo(Type
):
1852 _toSchema
= {'cloud': 'cloud', 'name': 'name', 'migration': 'migration', 'region': 'region', 'available_version': 'available-version', 'version': 'version'}
1853 _toPy
= {'available-version': 'available_version', 'cloud': 'cloud', 'name': 'name', 'migration': 'migration', 'region': 'region', 'version': 'version'}
1854 def __init__(self
, available_version
=None, cloud
=None, migration
=None, name
=None, region
=None, version
=None):
1856 available_version : str
1863 self
.available_version
= available_version
1865 self
.migration
= migration
1867 self
.region
= region
1868 self
.version
= version
1871 class ModelUnset(Type
):
1872 _toSchema
= {'keys': 'keys'}
1873 _toPy
= {'keys': 'keys'}
1874 def __init__(self
, keys
=None):
1876 keys : typing.Sequence<+T_co>[str]
1881 class ModelUnsetKeys(Type
):
1882 _toSchema
= {'cloud_tag': 'cloud-tag', 'keys': 'keys', 'cloud_region': 'cloud-region'}
1883 _toPy
= {'cloud-tag': 'cloud_tag', 'cloud-region': 'cloud_region', 'keys': 'keys'}
1884 def __init__(self
, cloud_region
=None, cloud_tag
=None, keys
=None):
1888 keys : typing.Sequence<+T_co>[str]
1890 self
.cloud_region
= cloud_region
1891 self
.cloud_tag
= cloud_tag
1895 class ModelUserInfo(Type
):
1896 _toSchema
= {'display_name': 'display-name', 'access': 'access', 'user': 'user', 'last_connection': 'last-connection'}
1897 _toPy
= {'last-connection': 'last_connection', 'access': 'access', 'user': 'user', 'display-name': 'display_name'}
1898 def __init__(self
, access
=None, display_name
=None, last_connection
=None, user
=None):
1902 last_connection : str
1905 self
.access
= access
1906 self
.display_name
= display_name
1907 self
.last_connection
= last_connection
1911 class ModelUserInfoResult(Type
):
1912 _toSchema
= {'result': 'result', 'error': 'error'}
1913 _toPy
= {'result': 'result', 'error': 'error'}
1914 def __init__(self
, error
=None, result
=None):
1917 result : ModelUserInfo
1919 self
.error
= Error
.from_json(error
) if error
else None
1920 self
.result
= ModelUserInfo
.from_json(result
) if result
else None
1923 class ModelUserInfoResults(Type
):
1924 _toSchema
= {'results': 'results'}
1925 _toPy
= {'results': 'results'}
1926 def __init__(self
, results
=None):
1928 results : typing.Sequence<+T_co>[~ModelUserInfoResult]<~ModelUserInfoResult>
1930 self
.results
= [ModelUserInfoResult
.from_json(o
) for o
in results
or []]
1933 class PrivateAddress(Type
):
1934 _toSchema
= {'target': 'target'}
1935 _toPy
= {'target': 'target'}
1936 def __init__(self
, target
=None):
1940 self
.target
= target
1943 class PrivateAddressResults(Type
):
1944 _toSchema
= {'private_address': 'private-address'}
1945 _toPy
= {'private-address': 'private_address'}
1946 def __init__(self
, private_address
=None):
1948 private_address : str
1950 self
.private_address
= private_address
1953 class ProvisioningScriptParams(Type
):
1954 _toSchema
= {'data_dir': 'data-dir', 'nonce': 'nonce', 'disable_package_commands': 'disable-package-commands', 'machine_id': 'machine-id'}
1955 _toPy
= {'machine-id': 'machine_id', 'data-dir': 'data_dir', 'nonce': 'nonce', 'disable-package-commands': 'disable_package_commands'}
1956 def __init__(self
, data_dir
=None, disable_package_commands
=None, machine_id
=None, nonce
=None):
1959 disable_package_commands : bool
1963 self
.data_dir
= data_dir
1964 self
.disable_package_commands
= disable_package_commands
1965 self
.machine_id
= machine_id
1969 class ProvisioningScriptResult(Type
):
1970 _toSchema
= {'script': 'script'}
1971 _toPy
= {'script': 'script'}
1972 def __init__(self
, script
=None):
1976 self
.script
= script
1979 class PublicAddress(Type
):
1980 _toSchema
= {'target': 'target'}
1981 _toPy
= {'target': 'target'}
1982 def __init__(self
, target
=None):
1986 self
.target
= target
1989 class PublicAddressResults(Type
):
1990 _toSchema
= {'public_address': 'public-address'}
1991 _toPy
= {'public-address': 'public_address'}
1992 def __init__(self
, public_address
=None):
1994 public_address : str
1996 self
.public_address
= public_address
1999 class RegionDefaults(Type
):
2000 _toSchema
= {'value': 'value', 'region_name': 'region-name'}
2001 _toPy
= {'region-name': 'region_name', 'value': 'value'}
2002 def __init__(self
, region_name
=None, value
=None):
2005 value : typing.Mapping<~KT, +VT_co>[str, typing.Any]
2007 self
.region_name
= region_name
2011 class RelationStatus(Type
):
2012 _toSchema
= {'interface': 'interface', 'endpoints': 'endpoints', 'id_': 'id', 'key': 'key', 'scope': 'scope'}
2013 _toPy
= {'id': 'id_', 'interface': 'interface', 'endpoints': 'endpoints', 'scope': 'scope', 'key': 'key'}
2014 def __init__(self
, endpoints
=None, id_
=None, interface
=None, key
=None, scope
=None):
2016 endpoints : typing.Sequence<+T_co>[~EndpointStatus]<~EndpointStatus>
2022 self
.endpoints
= [EndpointStatus
.from_json(o
) for o
in endpoints
or []]
2024 self
.interface
= interface
2029 class ResolveCharmResult(Type
):
2030 _toSchema
= {'url': 'url', 'error': 'error'}
2031 _toPy
= {'url': 'url', 'error': 'error'}
2032 def __init__(self
, error
=None, url
=None):
2041 class ResolveCharmResults(Type
):
2042 _toSchema
= {'urls': 'urls'}
2043 _toPy
= {'urls': 'urls'}
2044 def __init__(self
, urls
=None):
2046 urls : typing.Sequence<+T_co>[~ResolveCharmResult]<~ResolveCharmResult>
2048 self
.urls
= [ResolveCharmResult
.from_json(o
) for o
in urls
or []]
2051 class ResolveCharms(Type
):
2052 _toSchema
= {'references': 'references'}
2053 _toPy
= {'references': 'references'}
2054 def __init__(self
, references
=None):
2056 references : typing.Sequence<+T_co>[str]
2058 self
.references
= references
2061 class Resolved(Type
):
2062 _toSchema
= {'unit_name': 'unit-name', 'retry': 'retry'}
2063 _toPy
= {'unit-name': 'unit_name', 'retry': 'retry'}
2064 def __init__(self
, retry
=None, unit_name
=None):
2070 self
.unit_name
= unit_name
2073 class SetModelAgentVersion(Type
):
2074 _toSchema
= {'build': 'Build', 'patch': 'Patch', 'tag': 'Tag', 'minor': 'Minor', 'major': 'Major'}
2075 _toPy
= {'Tag': 'tag', 'Major': 'major', 'Patch': 'patch', 'Minor': 'minor', 'Build': 'build'}
2076 def __init__(self
, build
=None, major
=None, minor
=None, patch
=None, tag
=None):
2091 class SetModelDefaults(Type
):
2092 _toSchema
= {'config': 'config'}
2093 _toPy
= {'config': 'config'}
2094 def __init__(self
, config
=None):
2096 config : typing.Sequence<+T_co>[~ModelDefaultValues]<~ModelDefaultValues>
2098 self
.config
= [ModelDefaultValues
.from_json(o
) for o
in config
or []]
2101 class StatusHistoryFilter(Type
):
2102 _toSchema
= {'size': 'size', 'date': 'date', 'delta': 'delta'}
2103 _toPy
= {'size': 'size', 'date': 'date', 'delta': 'delta'}
2104 def __init__(self
, date
=None, delta
=None, size
=None):
2115 class StatusHistoryRequest(Type
):
2116 _toSchema
= {'historykind': 'historyKind', 'tag': 'tag', 'size': 'size', 'filter_': 'filter'}
2117 _toPy
= {'filter': 'filter_', 'historyKind': 'historykind', 'tag': 'tag', 'size': 'size'}
2118 def __init__(self
, filter_
=None, historykind
=None, size
=None, tag
=None):
2120 filter_ : StatusHistoryFilter
2125 self
.filter_
= StatusHistoryFilter
.from_json(filter_
) if filter_
else None
2126 self
.historykind
= historykind
2131 class StatusHistoryRequests(Type
):
2132 _toSchema
= {'requests': 'requests'}
2133 _toPy
= {'requests': 'requests'}
2134 def __init__(self
, requests
=None):
2136 requests : typing.Sequence<+T_co>[~StatusHistoryRequest]<~StatusHistoryRequest>
2138 self
.requests
= [StatusHistoryRequest
.from_json(o
) for o
in requests
or []]
2141 class StatusHistoryResult(Type
):
2142 _toSchema
= {'history': 'history', 'error': 'error'}
2143 _toPy
= {'history': 'history', 'error': 'error'}
2144 def __init__(self
, error
=None, history
=None):
2149 self
.error
= Error
.from_json(error
) if error
else None
2150 self
.history
= History
.from_json(history
) if history
else None
2153 class StatusHistoryResults(Type
):
2154 _toSchema
= {'results': 'results'}
2155 _toPy
= {'results': 'results'}
2156 def __init__(self
, results
=None):
2158 results : typing.Sequence<+T_co>[~StatusHistoryResult]<~StatusHistoryResult>
2160 self
.results
= [StatusHistoryResult
.from_json(o
) for o
in results
or []]
2163 class StatusParams(Type
):
2164 _toSchema
= {'patterns': 'patterns'}
2165 _toPy
= {'patterns': 'patterns'}
2166 def __init__(self
, patterns
=None):
2168 patterns : typing.Sequence<+T_co>[str]
2170 self
.patterns
= patterns
2174 _toSchema
= {'version': 'version', 'sha256': 'sha256', 'size': 'size', 'url': 'url'}
2175 _toPy
= {'version': 'version', 'sha256': 'sha256', 'size': 'size', 'url': 'url'}
2176 def __init__(self
, sha256
=None, size
=None, url
=None, version
=None):
2183 self
.sha256
= sha256
2186 self
.version
= Binary
.from_json(version
) if version
else None
2189 class UnitStatus(Type
):
2190 _toSchema
= {'workload_status': 'workload-status', 'opened_ports': 'opened-ports', 'subordinates': 'subordinates', 'workload_version': 'workload-version', 'public_address': 'public-address', 'charm': 'charm', 'agent_status': 'agent-status', 'machine': 'machine'}
2191 _toPy
= {'public-address': 'public_address', 'workload-version': 'workload_version', 'subordinates': 'subordinates', 'opened-ports': 'opened_ports', 'charm': 'charm', 'workload-status': 'workload_status', 'machine': 'machine', 'agent-status': 'agent_status'}
2192 def __init__(self
, agent_status
=None, charm
=None, machine
=None, opened_ports
=None, public_address
=None, subordinates
=None, workload_status
=None, workload_version
=None):
2194 agent_status : DetailedStatus
2197 opened_ports : typing.Sequence<+T_co>[str]
2198 public_address : str
2199 subordinates : typing.Mapping<~KT, +VT_co>[str, ~UnitStatus]<~UnitStatus>
2200 workload_status : DetailedStatus
2201 workload_version : str
2203 self
.agent_status
= DetailedStatus
.from_json(agent_status
) if agent_status
else None
2205 self
.machine
= machine
2206 self
.opened_ports
= opened_ports
2207 self
.public_address
= public_address
2208 self
.subordinates
= subordinates
2209 self
.workload_status
= DetailedStatus
.from_json(workload_status
) if workload_status
else None
2210 self
.workload_version
= workload_version
2213 class UnsetModelDefaults(Type
):
2214 _toSchema
= {'keys': 'keys'}
2215 _toPy
= {'keys': 'keys'}
2216 def __init__(self
, keys
=None):
2218 keys : typing.Sequence<+T_co>[~ModelUnsetKeys]<~ModelUnsetKeys>
2220 self
.keys
= [ModelUnsetKeys
.from_json(o
) for o
in keys
or []]
2224 _toSchema
= {'type_': 'type', 'identity_endpoint': 'identity-endpoint', 'storage_endpoint': 'storage-endpoint', 'regions': 'regions', 'auth_types': 'auth-types', 'endpoint': 'endpoint'}
2225 _toPy
= {'auth-types': 'auth_types', 'regions': 'regions', 'type': 'type_', 'identity-endpoint': 'identity_endpoint', 'endpoint': 'endpoint', 'storage-endpoint': 'storage_endpoint'}
2226 def __init__(self
, auth_types
=None, endpoint
=None, identity_endpoint
=None, regions
=None, storage_endpoint
=None, type_
=None):
2228 auth_types : typing.Sequence<+T_co>[str]
2230 identity_endpoint : str
2231 regions : typing.Sequence<+T_co>[~CloudRegion]<~CloudRegion>
2232 storage_endpoint : str
2235 self
.auth_types
= auth_types
2236 self
.endpoint
= endpoint
2237 self
.identity_endpoint
= identity_endpoint
2238 self
.regions
= [CloudRegion
.from_json(o
) for o
in regions
or []]
2239 self
.storage_endpoint
= storage_endpoint
2243 class CloudCredentialResult(Type
):
2244 _toSchema
= {'result': 'result', 'error': 'error'}
2245 _toPy
= {'result': 'result', 'error': 'error'}
2246 def __init__(self
, error
=None, result
=None):
2249 result : CloudCredential
2251 self
.error
= Error
.from_json(error
) if error
else None
2252 self
.result
= CloudCredential
.from_json(result
) if result
else None
2255 class CloudCredentialResults(Type
):
2256 _toSchema
= {'results': 'results'}
2257 _toPy
= {'results': 'results'}
2258 def __init__(self
, results
=None):
2260 results : typing.Sequence<+T_co>[~CloudCredentialResult]<~CloudCredentialResult>
2262 self
.results
= [CloudCredentialResult
.from_json(o
) for o
in results
or []]
2265 class CloudRegion(Type
):
2266 _toSchema
= {'name': 'name', 'endpoint': 'endpoint', 'storage_endpoint': 'storage-endpoint', 'identity_endpoint': 'identity-endpoint'}
2267 _toPy
= {'identity-endpoint': 'identity_endpoint', 'endpoint': 'endpoint', 'storage-endpoint': 'storage_endpoint', 'name': 'name'}
2268 def __init__(self
, endpoint
=None, identity_endpoint
=None, name
=None, storage_endpoint
=None):
2271 identity_endpoint : str
2273 storage_endpoint : str
2275 self
.endpoint
= endpoint
2276 self
.identity_endpoint
= identity_endpoint
2278 self
.storage_endpoint
= storage_endpoint
2281 class CloudResult(Type
):
2282 _toSchema
= {'cloud': 'cloud', 'error': 'error'}
2283 _toPy
= {'cloud': 'cloud', 'error': 'error'}
2284 def __init__(self
, cloud
=None, error
=None):
2289 self
.cloud
= Cloud
.from_json(cloud
) if cloud
else None
2290 self
.error
= Error
.from_json(error
) if error
else None
2293 class CloudResults(Type
):
2294 _toSchema
= {'results': 'results'}
2295 _toPy
= {'results': 'results'}
2296 def __init__(self
, results
=None):
2298 results : typing.Sequence<+T_co>[~CloudResult]<~CloudResult>
2300 self
.results
= [CloudResult
.from_json(o
) for o
in results
or []]
2303 class CloudsResult(Type
):
2304 _toSchema
= {'clouds': 'clouds'}
2305 _toPy
= {'clouds': 'clouds'}
2306 def __init__(self
, clouds
=None):
2308 clouds : typing.Mapping<~KT, +VT_co>[str, ~Cloud]<~Cloud>
2310 self
.clouds
= clouds
2313 class StringsResult(Type
):
2314 _toSchema
= {'result': 'result', 'error': 'error'}
2315 _toPy
= {'result': 'result', 'error': 'error'}
2316 def __init__(self
, error
=None, result
=None):
2319 result : typing.Sequence<+T_co>[str]
2321 self
.error
= Error
.from_json(error
) if error
else None
2322 self
.result
= result
2325 class StringsResults(Type
):
2326 _toSchema
= {'results': 'results'}
2327 _toPy
= {'results': 'results'}
2328 def __init__(self
, results
=None):
2330 results : typing.Sequence<+T_co>[~StringsResult]<~StringsResult>
2332 self
.results
= [StringsResult
.from_json(o
) for o
in results
or []]
2335 class UpdateCloudCredential(Type
):
2336 _toSchema
= {'tag': 'tag', 'credential': 'credential'}
2337 _toPy
= {'tag': 'tag', 'credential': 'credential'}
2338 def __init__(self
, credential
=None, tag
=None):
2340 credential : CloudCredential
2343 self
.credential
= CloudCredential
.from_json(credential
) if credential
else None
2347 class UpdateCloudCredentials(Type
):
2348 _toSchema
= {'credentials': 'credentials'}
2349 _toPy
= {'credentials': 'credentials'}
2350 def __init__(self
, credentials
=None):
2352 credentials : typing.Sequence<+T_co>[~UpdateCloudCredential]<~UpdateCloudCredential>
2354 self
.credentials
= [UpdateCloudCredential
.from_json(o
) for o
in credentials
or []]
2357 class UserCloud(Type
):
2358 _toSchema
= {'cloud_tag': 'cloud-tag', 'user_tag': 'user-tag'}
2359 _toPy
= {'cloud-tag': 'cloud_tag', 'user-tag': 'user_tag'}
2360 def __init__(self
, cloud_tag
=None, user_tag
=None):
2365 self
.cloud_tag
= cloud_tag
2366 self
.user_tag
= user_tag
2369 class UserClouds(Type
):
2370 _toSchema
= {'user_clouds': 'user-clouds'}
2371 _toPy
= {'user-clouds': 'user_clouds'}
2372 def __init__(self
, user_clouds
=None):
2374 user_clouds : typing.Sequence<+T_co>[~UserCloud]<~UserCloud>
2376 self
.user_clouds
= [UserCloud
.from_json(o
) for o
in user_clouds
or []]
2379 class DestroyControllerArgs(Type
):
2380 _toSchema
= {'destroy_models': 'destroy-models'}
2381 _toPy
= {'destroy-models': 'destroy_models'}
2382 def __init__(self
, destroy_models
=None):
2384 destroy_models : bool
2386 self
.destroy_models
= destroy_models
2389 class InitiateMigrationArgs(Type
):
2390 _toSchema
= {'specs': 'specs'}
2391 _toPy
= {'specs': 'specs'}
2392 def __init__(self
, specs
=None):
2394 specs : typing.Sequence<+T_co>[~MigrationSpec]<~MigrationSpec>
2396 self
.specs
= [MigrationSpec
.from_json(o
) for o
in specs
or []]
2399 class InitiateMigrationResult(Type
):
2400 _toSchema
= {'model_tag': 'model-tag', 'migration_id': 'migration-id', 'error': 'error'}
2401 _toPy
= {'model-tag': 'model_tag', 'migration-id': 'migration_id', 'error': 'error'}
2402 def __init__(self
, error
=None, migration_id
=None, model_tag
=None):
2408 self
.error
= Error
.from_json(error
) if error
else None
2409 self
.migration_id
= migration_id
2410 self
.model_tag
= model_tag
2413 class InitiateMigrationResults(Type
):
2414 _toSchema
= {'results': 'results'}
2415 _toPy
= {'results': 'results'}
2416 def __init__(self
, results
=None):
2418 results : typing.Sequence<+T_co>[~InitiateMigrationResult]<~InitiateMigrationResult>
2420 self
.results
= [InitiateMigrationResult
.from_json(o
) for o
in results
or []]
2423 class MigrationSpec(Type
):
2424 _toSchema
= {'model_tag': 'model-tag', 'target_info': 'target-info'}
2425 _toPy
= {'model-tag': 'model_tag', 'target-info': 'target_info'}
2426 def __init__(self
, model_tag
=None, target_info
=None):
2429 target_info : MigrationTargetInfo
2431 self
.model_tag
= model_tag
2432 self
.target_info
= MigrationTargetInfo
.from_json(target_info
) if target_info
else None
2435 class MigrationTargetInfo(Type
):
2436 _toSchema
= {'password': 'password', 'controller_tag': 'controller-tag', 'addrs': 'addrs', 'ca_cert': 'ca-cert', 'macaroon': 'macaroon', 'auth_tag': 'auth-tag'}
2437 _toPy
= {'auth-tag': 'auth_tag', 'password': 'password', 'ca-cert': 'ca_cert', 'addrs': 'addrs', 'macaroon': 'macaroon', 'controller-tag': 'controller_tag'}
2438 def __init__(self
, addrs
=None, auth_tag
=None, ca_cert
=None, controller_tag
=None, macaroon
=None, password
=None):
2440 addrs : typing.Sequence<+T_co>[str]
2443 controller_tag : str
2448 self
.auth_tag
= auth_tag
2449 self
.ca_cert
= ca_cert
2450 self
.controller_tag
= controller_tag
2451 self
.macaroon
= macaroon
2452 self
.password
= password
2456 _toSchema
= {'name': 'name', 'uuid': 'uuid', 'owner_tag': 'owner-tag'}
2457 _toPy
= {'name': 'name', 'owner-tag': 'owner_tag', 'uuid': 'uuid'}
2458 def __init__(self
, name
=None, owner_tag
=None, uuid
=None):
2465 self
.owner_tag
= owner_tag
2469 class ModelBlockInfo(Type
):
2470 _toSchema
= {'name': 'name', 'model_uuid': 'model-uuid', 'owner_tag': 'owner-tag', 'blocks': 'blocks'}
2471 _toPy
= {'name': 'name', 'owner-tag': 'owner_tag', 'model-uuid': 'model_uuid', 'blocks': 'blocks'}
2472 def __init__(self
, blocks
=None, model_uuid
=None, name
=None, owner_tag
=None):
2474 blocks : typing.Sequence<+T_co>[str]
2479 self
.blocks
= blocks
2480 self
.model_uuid
= model_uuid
2482 self
.owner_tag
= owner_tag
2485 class ModelBlockInfoList(Type
):
2486 _toSchema
= {'models': 'models'}
2487 _toPy
= {'models': 'models'}
2488 def __init__(self
, models
=None):
2490 models : typing.Sequence<+T_co>[~ModelBlockInfo]<~ModelBlockInfo>
2492 self
.models
= [ModelBlockInfo
.from_json(o
) for o
in models
or []]
2495 class ModelStatus(Type
):
2496 _toSchema
= {'life': 'life', 'application_count': 'application-count', 'owner_tag': 'owner-tag', 'model_tag': 'model-tag', 'hosted_machine_count': 'hosted-machine-count'}
2497 _toPy
= {'life': 'life', 'model-tag': 'model_tag', 'owner-tag': 'owner_tag', 'hosted-machine-count': 'hosted_machine_count', 'application-count': 'application_count'}
2498 def __init__(self
, application_count
=None, hosted_machine_count
=None, life
=None, model_tag
=None, owner_tag
=None):
2500 application_count : int
2501 hosted_machine_count : int
2506 self
.application_count
= application_count
2507 self
.hosted_machine_count
= hosted_machine_count
2509 self
.model_tag
= model_tag
2510 self
.owner_tag
= owner_tag
2513 class ModelStatusResults(Type
):
2514 _toSchema
= {'models': 'models'}
2515 _toPy
= {'models': 'models'}
2516 def __init__(self
, models
=None):
2518 models : typing.Sequence<+T_co>[~ModelStatus]<~ModelStatus>
2520 self
.models
= [ModelStatus
.from_json(o
) for o
in models
or []]
2523 class ModifyControllerAccess(Type
):
2524 _toSchema
= {'access': 'access', 'action': 'action', 'user_tag': 'user-tag'}
2525 _toPy
= {'access': 'access', 'action': 'action', 'user-tag': 'user_tag'}
2526 def __init__(self
, access
=None, action
=None, user_tag
=None):
2532 self
.access
= access
2533 self
.action
= action
2534 self
.user_tag
= user_tag
2537 class ModifyControllerAccessRequest(Type
):
2538 _toSchema
= {'changes': 'changes'}
2539 _toPy
= {'changes': 'changes'}
2540 def __init__(self
, changes
=None):
2542 changes : typing.Sequence<+T_co>[~ModifyControllerAccess]<~ModifyControllerAccess>
2544 self
.changes
= [ModifyControllerAccess
.from_json(o
) for o
in changes
or []]
2547 class RemoveBlocksArgs(Type
):
2548 _toSchema
= {'all_': 'all'}
2549 _toPy
= {'all': 'all_'}
2550 def __init__(self
, all_
=None):
2557 class UserAccess(Type
):
2558 _toSchema
= {'access': 'access', 'user_tag': 'user-tag'}
2559 _toPy
= {'access': 'access', 'user-tag': 'user_tag'}
2560 def __init__(self
, access
=None, user_tag
=None):
2565 self
.access
= access
2566 self
.user_tag
= user_tag
2569 class UserAccessResult(Type
):
2570 _toSchema
= {'result': 'result', 'error': 'error'}
2571 _toPy
= {'result': 'result', 'error': 'error'}
2572 def __init__(self
, error
=None, result
=None):
2577 self
.error
= Error
.from_json(error
) if error
else None
2578 self
.result
= UserAccess
.from_json(result
) if result
else None
2581 class UserAccessResults(Type
):
2582 _toSchema
= {'results': 'results'}
2583 _toPy
= {'results': 'results'}
2584 def __init__(self
, results
=None):
2586 results : typing.Sequence<+T_co>[~UserAccessResult]<~UserAccessResult>
2588 self
.results
= [UserAccessResult
.from_json(o
) for o
in results
or []]
2591 class UserModel(Type
):
2592 _toSchema
= {'last_connection': 'last-connection', 'model': 'model'}
2593 _toPy
= {'last-connection': 'last_connection', 'model': 'model'}
2594 def __init__(self
, last_connection
=None, model
=None):
2596 last_connection : str
2599 self
.last_connection
= last_connection
2600 self
.model
= Model
.from_json(model
) if model
else None
2603 class UserModelList(Type
):
2604 _toSchema
= {'user_models': 'user-models'}
2605 _toPy
= {'user-models': 'user_models'}
2606 def __init__(self
, user_models
=None):
2608 user_models : typing.Sequence<+T_co>[~UserModel]<~UserModel>
2610 self
.user_models
= [UserModel
.from_json(o
) for o
in user_models
or []]
2613 class BytesResult(Type
):
2614 _toSchema
= {'result': 'result'}
2615 _toPy
= {'result': 'result'}
2616 def __init__(self
, result
=None):
2618 result : typing.Sequence<+T_co>[int]
2620 self
.result
= result
2623 class DeployerConnectionValues(Type
):
2624 _toSchema
= {'api_addresses': 'api-addresses', 'state_addresses': 'state-addresses'}
2625 _toPy
= {'state-addresses': 'state_addresses', 'api-addresses': 'api_addresses'}
2626 def __init__(self
, api_addresses
=None, state_addresses
=None):
2628 api_addresses : typing.Sequence<+T_co>[str]
2629 state_addresses : typing.Sequence<+T_co>[str]
2631 self
.api_addresses
= api_addresses
2632 self
.state_addresses
= state_addresses
2635 class LifeResult(Type
):
2636 _toSchema
= {'life': 'life', 'error': 'error'}
2637 _toPy
= {'life': 'life', 'error': 'error'}
2638 def __init__(self
, error
=None, life
=None):
2643 self
.error
= Error
.from_json(error
) if error
else None
2647 class LifeResults(Type
):
2648 _toSchema
= {'results': 'results'}
2649 _toPy
= {'results': 'results'}
2650 def __init__(self
, results
=None):
2652 results : typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
2654 self
.results
= [LifeResult
.from_json(o
) for o
in results
or []]
2657 class StringsWatchResults(Type
):
2658 _toSchema
= {'results': 'results'}
2659 _toPy
= {'results': 'results'}
2660 def __init__(self
, results
=None):
2662 results : typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
2664 self
.results
= [StringsWatchResult
.from_json(o
) for o
in results
or []]
2667 class AddSubnetParams(Type
):
2668 _toSchema
= {'subnet_tag': 'subnet-tag', 'subnet_provider_id': 'subnet-provider-id', 'space_tag': 'space-tag', 'zones': 'zones'}
2669 _toPy
= {'subnet-tag': 'subnet_tag', 'subnet-provider-id': 'subnet_provider_id', 'zones': 'zones', 'space-tag': 'space_tag'}
2670 def __init__(self
, space_tag
=None, subnet_provider_id
=None, subnet_tag
=None, zones
=None):
2673 subnet_provider_id : str
2675 zones : typing.Sequence<+T_co>[str]
2677 self
.space_tag
= space_tag
2678 self
.subnet_provider_id
= subnet_provider_id
2679 self
.subnet_tag
= subnet_tag
2683 class AddSubnetsParams(Type
):
2684 _toSchema
= {'subnets': 'subnets'}
2685 _toPy
= {'subnets': 'subnets'}
2686 def __init__(self
, subnets
=None):
2688 subnets : typing.Sequence<+T_co>[~AddSubnetParams]<~AddSubnetParams>
2690 self
.subnets
= [AddSubnetParams
.from_json(o
) for o
in subnets
or []]
2693 class CreateSpaceParams(Type
):
2694 _toSchema
= {'provider_id': 'provider-id', 'space_tag': 'space-tag', 'subnet_tags': 'subnet-tags', 'public': 'public'}
2695 _toPy
= {'subnet-tags': 'subnet_tags', 'space-tag': 'space_tag', 'public': 'public', 'provider-id': 'provider_id'}
2696 def __init__(self
, provider_id
=None, public
=None, space_tag
=None, subnet_tags
=None):
2701 subnet_tags : typing.Sequence<+T_co>[str]
2703 self
.provider_id
= provider_id
2704 self
.public
= public
2705 self
.space_tag
= space_tag
2706 self
.subnet_tags
= subnet_tags
2709 class CreateSpacesParams(Type
):
2710 _toSchema
= {'spaces': 'spaces'}
2711 _toPy
= {'spaces': 'spaces'}
2712 def __init__(self
, spaces
=None):
2714 spaces : typing.Sequence<+T_co>[~CreateSpaceParams]<~CreateSpaceParams>
2716 self
.spaces
= [CreateSpaceParams
.from_json(o
) for o
in spaces
or []]
2719 class DiscoverSpacesResults(Type
):
2720 _toSchema
= {'results': 'results'}
2721 _toPy
= {'results': 'results'}
2722 def __init__(self
, results
=None):
2724 results : typing.Sequence<+T_co>[~ProviderSpace]<~ProviderSpace>
2726 self
.results
= [ProviderSpace
.from_json(o
) for o
in results
or []]
2729 class ListSubnetsResults(Type
):
2730 _toSchema
= {'results': 'results'}
2731 _toPy
= {'results': 'results'}
2732 def __init__(self
, results
=None):
2734 results : typing.Sequence<+T_co>[~Subnet]<~Subnet>
2736 self
.results
= [Subnet
.from_json(o
) for o
in results
or []]
2739 class ProviderSpace(Type
):
2740 _toSchema
= {'name': 'name', 'provider_id': 'provider-id', 'subnets': 'subnets', 'error': 'error'}
2741 _toPy
= {'name': 'name', 'subnets': 'subnets', 'provider-id': 'provider_id', 'error': 'error'}
2742 def __init__(self
, error
=None, name
=None, provider_id
=None, subnets
=None):
2747 subnets : typing.Sequence<+T_co>[~Subnet]<~Subnet>
2749 self
.error
= Error
.from_json(error
) if error
else None
2751 self
.provider_id
= provider_id
2752 self
.subnets
= [Subnet
.from_json(o
) for o
in subnets
or []]
2756 _toSchema
= {'status': 'status', 'provider_id': 'provider-id', 'space_tag': 'space-tag', 'vlan_tag': 'vlan-tag', 'zones': 'zones', 'life': 'life', 'cidr': 'cidr'}
2757 _toPy
= {'status': 'status', 'zones': 'zones', 'vlan-tag': 'vlan_tag', 'life': 'life', 'cidr': 'cidr', 'space-tag': 'space_tag', 'provider-id': 'provider_id'}
2758 def __init__(self
, cidr
=None, life
=None, provider_id
=None, space_tag
=None, status
=None, vlan_tag
=None, zones
=None):
2766 zones : typing.Sequence<+T_co>[str]
2770 self
.provider_id
= provider_id
2771 self
.space_tag
= space_tag
2772 self
.status
= status
2773 self
.vlan_tag
= vlan_tag
2777 class SubnetsFilters(Type
):
2778 _toSchema
= {'space_tag': 'space-tag', 'zone': 'zone'}
2779 _toPy
= {'space-tag': 'space_tag', 'zone': 'zone'}
2780 def __init__(self
, space_tag
=None, zone
=None):
2785 self
.space_tag
= space_tag
2789 class BlockDevice(Type
):
2790 _toSchema
= {'uuid': 'UUID', 'busaddress': 'BusAddress', 'size': 'Size', 'hardwareid': 'HardwareId', 'filesystemtype': 'FilesystemType', 'label': 'Label', 'devicelinks': 'DeviceLinks', 'inuse': 'InUse', 'mountpoint': 'MountPoint', 'devicename': 'DeviceName'}
2791 _toPy
= {'InUse': 'inuse', 'Size': 'size', 'Label': 'label', 'DeviceName': 'devicename', 'BusAddress': 'busaddress', 'FilesystemType': 'filesystemtype', 'MountPoint': 'mountpoint', 'UUID': 'uuid', 'HardwareId': 'hardwareid', 'DeviceLinks': 'devicelinks'}
2792 def __init__(self
, busaddress
=None, devicelinks
=None, devicename
=None, filesystemtype
=None, hardwareid
=None, inuse
=None, label
=None, mountpoint
=None, size
=None, uuid
=None):
2795 devicelinks : typing.Sequence<+T_co>[str]
2797 filesystemtype : str
2805 self
.busaddress
= busaddress
2806 self
.devicelinks
= devicelinks
2807 self
.devicename
= devicename
2808 self
.filesystemtype
= filesystemtype
2809 self
.hardwareid
= hardwareid
2812 self
.mountpoint
= mountpoint
2817 class MachineBlockDevices(Type
):
2818 _toSchema
= {'block_devices': 'block-devices', 'machine': 'machine'}
2819 _toPy
= {'block-devices': 'block_devices', 'machine': 'machine'}
2820 def __init__(self
, block_devices
=None, machine
=None):
2822 block_devices : typing.Sequence<+T_co>[~BlockDevice]<~BlockDevice>
2825 self
.block_devices
= [BlockDevice
.from_json(o
) for o
in block_devices
or []]
2826 self
.machine
= machine
2829 class SetMachineBlockDevices(Type
):
2830 _toSchema
= {'machine_block_devices': 'machine-block-devices'}
2831 _toPy
= {'machine-block-devices': 'machine_block_devices'}
2832 def __init__(self
, machine_block_devices
=None):
2834 machine_block_devices : typing.Sequence<+T_co>[~MachineBlockDevices]<~MachineBlockDevices>
2836 self
.machine_block_devices
= [MachineBlockDevices
.from_json(o
) for o
in machine_block_devices
or []]
2839 class EntitiesWatchResult(Type
):
2840 _toSchema
= {'changes': 'changes', 'watcher_id': 'watcher-id', 'error': 'error'}
2841 _toPy
= {'watcher-id': 'watcher_id', 'changes': 'changes', 'error': 'error'}
2842 def __init__(self
, changes
=None, error
=None, watcher_id
=None):
2844 changes : typing.Sequence<+T_co>[str]
2848 self
.changes
= changes
2849 self
.error
= Error
.from_json(error
) if error
else None
2850 self
.watcher_id
= watcher_id
2853 class MachineStorageId(Type
):
2854 _toSchema
= {'machine_tag': 'machine-tag', 'attachment_tag': 'attachment-tag'}
2855 _toPy
= {'attachment-tag': 'attachment_tag', 'machine-tag': 'machine_tag'}
2856 def __init__(self
, attachment_tag
=None, machine_tag
=None):
2858 attachment_tag : str
2861 self
.attachment_tag
= attachment_tag
2862 self
.machine_tag
= machine_tag
2865 class MachineStorageIdsWatchResult(Type
):
2866 _toSchema
= {'changes': 'changes', 'watcher_id': 'watcher-id', 'error': 'error'}
2867 _toPy
= {'watcher-id': 'watcher_id', 'changes': 'changes', 'error': 'error'}
2868 def __init__(self
, changes
=None, error
=None, watcher_id
=None):
2870 changes : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
2874 self
.changes
= [MachineStorageId
.from_json(o
) for o
in changes
or []]
2875 self
.error
= Error
.from_json(error
) if error
else None
2876 self
.watcher_id
= watcher_id
2879 class BoolResult(Type
):
2880 _toSchema
= {'result': 'result', 'error': 'error'}
2881 _toPy
= {'result': 'result', 'error': 'error'}
2882 def __init__(self
, error
=None, result
=None):
2887 self
.error
= Error
.from_json(error
) if error
else None
2888 self
.result
= result
2891 class BoolResults(Type
):
2892 _toSchema
= {'results': 'results'}
2893 _toPy
= {'results': 'results'}
2894 def __init__(self
, results
=None):
2896 results : typing.Sequence<+T_co>[~BoolResult]<~BoolResult>
2898 self
.results
= [BoolResult
.from_json(o
) for o
in results
or []]
2901 class MachinePortRange(Type
):
2902 _toSchema
= {'relation_tag': 'relation-tag', 'port_range': 'port-range', 'unit_tag': 'unit-tag'}
2903 _toPy
= {'relation-tag': 'relation_tag', 'port-range': 'port_range', 'unit-tag': 'unit_tag'}
2904 def __init__(self
, port_range
=None, relation_tag
=None, unit_tag
=None):
2906 port_range : PortRange
2910 self
.port_range
= PortRange
.from_json(port_range
) if port_range
else None
2911 self
.relation_tag
= relation_tag
2912 self
.unit_tag
= unit_tag
2915 class MachinePorts(Type
):
2916 _toSchema
= {'subnet_tag': 'subnet-tag', 'machine_tag': 'machine-tag'}
2917 _toPy
= {'subnet-tag': 'subnet_tag', 'machine-tag': 'machine_tag'}
2918 def __init__(self
, machine_tag
=None, subnet_tag
=None):
2923 self
.machine_tag
= machine_tag
2924 self
.subnet_tag
= subnet_tag
2927 class MachinePortsParams(Type
):
2928 _toSchema
= {'params': 'params'}
2929 _toPy
= {'params': 'params'}
2930 def __init__(self
, params
=None):
2932 params : typing.Sequence<+T_co>[~MachinePorts]<~MachinePorts>
2934 self
.params
= [MachinePorts
.from_json(o
) for o
in params
or []]
2937 class MachinePortsResult(Type
):
2938 _toSchema
= {'ports': 'ports', 'error': 'error'}
2939 _toPy
= {'ports': 'ports', 'error': 'error'}
2940 def __init__(self
, error
=None, ports
=None):
2943 ports : typing.Sequence<+T_co>[~MachinePortRange]<~MachinePortRange>
2945 self
.error
= Error
.from_json(error
) if error
else None
2946 self
.ports
= [MachinePortRange
.from_json(o
) for o
in ports
or []]
2949 class MachinePortsResults(Type
):
2950 _toSchema
= {'results': 'results'}
2951 _toPy
= {'results': 'results'}
2952 def __init__(self
, results
=None):
2954 results : typing.Sequence<+T_co>[~MachinePortsResult]<~MachinePortsResult>
2956 self
.results
= [MachinePortsResult
.from_json(o
) for o
in results
or []]
2959 class NotifyWatchResults(Type
):
2960 _toSchema
= {'results': 'results'}
2961 _toPy
= {'results': 'results'}
2962 def __init__(self
, results
=None):
2964 results : typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
2966 self
.results
= [NotifyWatchResult
.from_json(o
) for o
in results
or []]
2969 class PortRange(Type
):
2970 _toSchema
= {'from_port': 'from-port', 'to_port': 'to-port', 'protocol': 'protocol'}
2971 _toPy
= {'from-port': 'from_port', 'protocol': 'protocol', 'to-port': 'to_port'}
2972 def __init__(self
, from_port
=None, protocol
=None, to_port
=None):
2978 self
.from_port
= from_port
2979 self
.protocol
= protocol
2980 self
.to_port
= to_port
2983 class StringResults(Type
):
2984 _toSchema
= {'results': 'results'}
2985 _toPy
= {'results': 'results'}
2986 def __init__(self
, results
=None):
2988 results : typing.Sequence<+T_co>[~StringResult]<~StringResult>
2990 self
.results
= [StringResult
.from_json(o
) for o
in results
or []]
2993 class ControllersChangeResult(Type
):
2994 _toSchema
= {'result': 'result', 'error': 'error'}
2995 _toPy
= {'result': 'result', 'error': 'error'}
2996 def __init__(self
, error
=None, result
=None):
2999 result : ControllersChanges
3001 self
.error
= Error
.from_json(error
) if error
else None
3002 self
.result
= ControllersChanges
.from_json(result
) if result
else None
3005 class ControllersChangeResults(Type
):
3006 _toSchema
= {'results': 'results'}
3007 _toPy
= {'results': 'results'}
3008 def __init__(self
, results
=None):
3010 results : typing.Sequence<+T_co>[~ControllersChangeResult]<~ControllersChangeResult>
3012 self
.results
= [ControllersChangeResult
.from_json(o
) for o
in results
or []]
3015 class ControllersChanges(Type
):
3016 _toSchema
= {'removed': 'removed', 'demoted': 'demoted', 'added': 'added', 'maintained': 'maintained', 'converted': 'converted', 'promoted': 'promoted'}
3017 _toPy
= {'removed': 'removed', 'demoted': 'demoted', 'added': 'added', 'maintained': 'maintained', 'converted': 'converted', 'promoted': 'promoted'}
3018 def __init__(self
, added
=None, converted
=None, demoted
=None, maintained
=None, promoted
=None, removed
=None):
3020 added : typing.Sequence<+T_co>[str]
3021 converted : typing.Sequence<+T_co>[str]
3022 demoted : typing.Sequence<+T_co>[str]
3023 maintained : typing.Sequence<+T_co>[str]
3024 promoted : typing.Sequence<+T_co>[str]
3025 removed : typing.Sequence<+T_co>[str]
3028 self
.converted
= converted
3029 self
.demoted
= demoted
3030 self
.maintained
= maintained
3031 self
.promoted
= promoted
3032 self
.removed
= removed
3035 class ControllersSpec(Type
):
3036 _toSchema
= {'model_tag': 'model-tag', 'num_controllers': 'num-controllers', 'series': 'series', 'constraints': 'constraints', 'placement': 'placement'}
3037 _toPy
= {'model-tag': 'model_tag', 'placement': 'placement', 'num-controllers': 'num_controllers', 'constraints': 'constraints', 'series': 'series'}
3038 def __init__(self
, constraints
=None, model_tag
=None, num_controllers
=None, placement
=None, series
=None):
3042 num_controllers : int
3043 placement : typing.Sequence<+T_co>[str]
3046 self
.constraints
= Value
.from_json(constraints
) if constraints
else None
3047 self
.model_tag
= model_tag
3048 self
.num_controllers
= num_controllers
3049 self
.placement
= placement
3050 self
.series
= series
3053 class ControllersSpecs(Type
):
3054 _toSchema
= {'specs': 'specs'}
3055 _toPy
= {'specs': 'specs'}
3056 def __init__(self
, specs
=None):
3058 specs : typing.Sequence<+T_co>[~ControllersSpec]<~ControllersSpec>
3060 self
.specs
= [ControllersSpec
.from_json(o
) for o
in specs
or []]
3063 class HAMember(Type
):
3064 _toSchema
= {'tag': 'tag', 'series': 'series', 'public_address': 'public-address'}
3065 _toPy
= {'public-address': 'public_address', 'tag': 'tag', 'series': 'series'}
3066 def __init__(self
, public_address
=None, series
=None, tag
=None):
3068 public_address : Address
3072 self
.public_address
= Address
.from_json(public_address
) if public_address
else None
3073 self
.series
= series
3078 _toSchema
= {'votes': 'Votes', 'buildindexes': 'BuildIndexes', 'tags': 'Tags', 'arbiter': 'Arbiter', 'address': 'Address', 'priority': 'Priority', 'hidden': 'Hidden', 'id_': 'Id', 'slavedelay': 'SlaveDelay'}
3079 _toPy
= {'Id': 'id_', 'BuildIndexes': 'buildindexes', 'Address': 'address', 'SlaveDelay': 'slavedelay', 'Tags': 'tags', 'Votes': 'votes', 'Priority': 'priority', 'Hidden': 'hidden', 'Arbiter': 'arbiter'}
3080 def __init__(self
, address
=None, arbiter
=None, buildindexes
=None, hidden
=None, id_
=None, priority
=None, slavedelay
=None, tags
=None, votes
=None):
3089 tags : typing.Mapping<~KT, +VT_co>[str, str]
3092 self
.address
= address
3093 self
.arbiter
= arbiter
3094 self
.buildindexes
= buildindexes
3095 self
.hidden
= hidden
3097 self
.priority
= priority
3098 self
.slavedelay
= slavedelay
3103 class MongoUpgradeResults(Type
):
3104 _toSchema
= {'rs_members': 'rs-members', 'ha_members': 'ha-members', 'master': 'master'}
3105 _toPy
= {'ha-members': 'ha_members', 'rs-members': 'rs_members', 'master': 'master'}
3106 def __init__(self
, ha_members
=None, master
=None, rs_members
=None):
3108 ha_members : typing.Sequence<+T_co>[~HAMember]<~HAMember>
3110 rs_members : typing.Sequence<+T_co>[~Member]<~Member>
3112 self
.ha_members
= [HAMember
.from_json(o
) for o
in ha_members
or []]
3113 self
.master
= HAMember
.from_json(master
) if master
else None
3114 self
.rs_members
= [Member
.from_json(o
) for o
in rs_members
or []]
3117 class ResumeReplicationParams(Type
):
3118 _toSchema
= {'members': 'members'}
3119 _toPy
= {'members': 'members'}
3120 def __init__(self
, members
=None):
3122 members : typing.Sequence<+T_co>[~Member]<~Member>
3124 self
.members
= [Member
.from_json(o
) for o
in members
or []]
3127 class UpgradeMongoParams(Type
):
3128 _toSchema
= {'patch': 'Patch', 'minor': 'Minor', 'major': 'Major', 'storageengine': 'StorageEngine'}
3129 _toPy
= {'Major': 'major', 'Minor': 'minor', 'Patch': 'patch', 'StorageEngine': 'storageengine'}
3130 def __init__(self
, major
=None, minor
=None, patch
=None, storageengine
=None):
3140 self
.storageengine
= storageengine
3143 class Version(Type
):
3144 _toSchema
= {'patch': 'Patch', 'minor': 'Minor', 'major': 'Major', 'storageengine': 'StorageEngine'}
3145 _toPy
= {'Major': 'major', 'Minor': 'minor', 'Patch': 'patch', 'StorageEngine': 'storageengine'}
3146 def __init__(self
, major
=None, minor
=None, patch
=None, storageengine
=None):
3156 self
.storageengine
= storageengine
3159 class SSHHostKeySet(Type
):
3160 _toSchema
= {'entity_keys': 'entity-keys'}
3161 _toPy
= {'entity-keys': 'entity_keys'}
3162 def __init__(self
, entity_keys
=None):
3164 entity_keys : typing.Sequence<+T_co>[~SSHHostKeys]<~SSHHostKeys>
3166 self
.entity_keys
= [SSHHostKeys
.from_json(o
) for o
in entity_keys
or []]
3169 class SSHHostKeys(Type
):
3170 _toSchema
= {'tag': 'tag', 'public_keys': 'public-keys'}
3171 _toPy
= {'tag': 'tag', 'public-keys': 'public_keys'}
3172 def __init__(self
, public_keys
=None, tag
=None):
3174 public_keys : typing.Sequence<+T_co>[str]
3177 self
.public_keys
= public_keys
3181 class ImageFilterParams(Type
):
3182 _toSchema
= {'images': 'images'}
3183 _toPy
= {'images': 'images'}
3184 def __init__(self
, images
=None):
3186 images : typing.Sequence<+T_co>[~ImageSpec]<~ImageSpec>
3188 self
.images
= [ImageSpec
.from_json(o
) for o
in images
or []]
3191 class ImageMetadata(Type
):
3192 _toSchema
= {'kind': 'kind', 'created': 'created', 'url': 'url', 'series': 'series', 'arch': 'arch'}
3193 _toPy
= {'kind': 'kind', 'created': 'created', 'url': 'url', 'series': 'series', 'arch': 'arch'}
3194 def __init__(self
, arch
=None, created
=None, kind
=None, series
=None, url
=None):
3203 self
.created
= created
3205 self
.series
= series
3209 class ImageSpec(Type
):
3210 _toSchema
= {'kind': 'kind', 'series': 'series', 'arch': 'arch'}
3211 _toPy
= {'kind': 'kind', 'series': 'series', 'arch': 'arch'}
3212 def __init__(self
, arch
=None, kind
=None, series
=None):
3220 self
.series
= series
3223 class ListImageResult(Type
):
3224 _toSchema
= {'result': 'result'}
3225 _toPy
= {'result': 'result'}
3226 def __init__(self
, result
=None):
3228 result : typing.Sequence<+T_co>[~ImageMetadata]<~ImageMetadata>
3230 self
.result
= [ImageMetadata
.from_json(o
) for o
in result
or []]
3233 class CloudImageMetadata(Type
):
3234 _toSchema
= {'image_id': 'image-id', 'source': 'source', 'stream': 'stream', 'root_storage_type': 'root-storage-type', 'virt_type': 'virt-type', 'series': 'series', 'arch': 'arch', 'priority': 'priority', 'region': 'region', 'root_storage_size': 'root-storage-size', 'version': 'version'}
3235 _toPy
= {'source': 'source', 'stream': 'stream', 'series': 'series', 'root-storage-size': 'root_storage_size', 'image-id': 'image_id', 'virt-type': 'virt_type', 'priority': 'priority', 'arch': 'arch', 'region': 'region', 'root-storage-type': 'root_storage_type', 'version': 'version'}
3236 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):
3242 root_storage_size : int
3243 root_storage_type : str
3251 self
.image_id
= image_id
3252 self
.priority
= priority
3253 self
.region
= region
3254 self
.root_storage_size
= root_storage_size
3255 self
.root_storage_type
= root_storage_type
3256 self
.series
= series
3257 self
.source
= source
3258 self
.stream
= stream
3259 self
.version
= version
3260 self
.virt_type
= virt_type
3263 class CloudImageMetadataList(Type
):
3264 _toSchema
= {'metadata': 'metadata'}
3265 _toPy
= {'metadata': 'metadata'}
3266 def __init__(self
, metadata
=None):
3268 metadata : typing.Sequence<+T_co>[~CloudImageMetadata]<~CloudImageMetadata>
3270 self
.metadata
= [CloudImageMetadata
.from_json(o
) for o
in metadata
or []]
3273 class ImageMetadataFilter(Type
):
3274 _toSchema
= {'stream': 'stream', 'root_storage_type': 'root-storage-type', 'virt_type': 'virt-type', 'series': 'series', 'region': 'region', 'arches': 'arches'}
3275 _toPy
= {'stream': 'stream', 'arches': 'arches', 'series': 'series', 'virt-type': 'virt_type', 'region': 'region', 'root-storage-type': 'root_storage_type'}
3276 def __init__(self
, arches
=None, region
=None, root_storage_type
=None, series
=None, stream
=None, virt_type
=None):
3278 arches : typing.Sequence<+T_co>[str]
3280 root_storage_type : str
3281 series : typing.Sequence<+T_co>[str]
3285 self
.arches
= arches
3286 self
.region
= region
3287 self
.root_storage_type
= root_storage_type
3288 self
.series
= series
3289 self
.stream
= stream
3290 self
.virt_type
= virt_type
3293 class ListCloudImageMetadataResult(Type
):
3294 _toSchema
= {'result': 'result'}
3295 _toPy
= {'result': 'result'}
3296 def __init__(self
, result
=None):
3298 result : typing.Sequence<+T_co>[~CloudImageMetadata]<~CloudImageMetadata>
3300 self
.result
= [CloudImageMetadata
.from_json(o
) for o
in result
or []]
3303 class MetadataImageIds(Type
):
3304 _toSchema
= {'image_ids': 'image-ids'}
3305 _toPy
= {'image-ids': 'image_ids'}
3306 def __init__(self
, image_ids
=None):
3308 image_ids : typing.Sequence<+T_co>[str]
3310 self
.image_ids
= image_ids
3313 class MetadataSaveParams(Type
):
3314 _toSchema
= {'metadata': 'metadata'}
3315 _toPy
= {'metadata': 'metadata'}
3316 def __init__(self
, metadata
=None):
3318 metadata : typing.Sequence<+T_co>[~CloudImageMetadataList]<~CloudImageMetadataList>
3320 self
.metadata
= [CloudImageMetadataList
.from_json(o
) for o
in metadata
or []]
3323 class EntityStatusArgs(Type
):
3324 _toSchema
= {'info': 'info', 'data': 'data', 'tag': 'tag', 'status': 'status'}
3325 _toPy
= {'info': 'info', 'data': 'data', 'tag': 'tag', 'status': 'status'}
3326 def __init__(self
, data
=None, info
=None, status
=None, tag
=None):
3328 data : typing.Mapping<~KT, +VT_co>[str, typing.Any]
3335 self
.status
= status
3339 class MachineAddresses(Type
):
3340 _toSchema
= {'addresses': 'addresses', 'tag': 'tag'}
3341 _toPy
= {'addresses': 'addresses', 'tag': 'tag'}
3342 def __init__(self
, addresses
=None, tag
=None):
3344 addresses : typing.Sequence<+T_co>[~Address]<~Address>
3347 self
.addresses
= [Address
.from_json(o
) for o
in addresses
or []]
3351 class MachineAddressesResult(Type
):
3352 _toSchema
= {'addresses': 'addresses', 'error': 'error'}
3353 _toPy
= {'addresses': 'addresses', 'error': 'error'}
3354 def __init__(self
, addresses
=None, error
=None):
3356 addresses : typing.Sequence<+T_co>[~Address]<~Address>
3359 self
.addresses
= [Address
.from_json(o
) for o
in addresses
or []]
3360 self
.error
= Error
.from_json(error
) if error
else None
3363 class MachineAddressesResults(Type
):
3364 _toSchema
= {'results': 'results'}
3365 _toPy
= {'results': 'results'}
3366 def __init__(self
, results
=None):
3368 results : typing.Sequence<+T_co>[~MachineAddressesResult]<~MachineAddressesResult>
3370 self
.results
= [MachineAddressesResult
.from_json(o
) for o
in results
or []]
3373 class SetMachinesAddresses(Type
):
3374 _toSchema
= {'machine_addresses': 'machine-addresses'}
3375 _toPy
= {'machine-addresses': 'machine_addresses'}
3376 def __init__(self
, machine_addresses
=None):
3378 machine_addresses : typing.Sequence<+T_co>[~MachineAddresses]<~MachineAddresses>
3380 self
.machine_addresses
= [MachineAddresses
.from_json(o
) for o
in machine_addresses
or []]
3383 class SetStatus(Type
):
3384 _toSchema
= {'entities': 'entities'}
3385 _toPy
= {'entities': 'entities'}
3386 def __init__(self
, entities
=None):
3388 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
3390 self
.entities
= [EntityStatusArgs
.from_json(o
) for o
in entities
or []]
3393 class StatusResult(Type
):
3394 _toSchema
= {'info': 'info', 'data': 'data', 'since': 'since', 'error': 'error', 'life': 'life', 'status': 'status', 'id_': 'id'}
3395 _toPy
= {'info': 'info', 'data': 'data', 'since': 'since', 'error': 'error', 'life': 'life', 'status': 'status', 'id': 'id_'}
3396 def __init__(self
, data
=None, error
=None, id_
=None, info
=None, life
=None, since
=None, status
=None):
3398 data : typing.Mapping<~KT, +VT_co>[str, typing.Any]
3407 self
.error
= Error
.from_json(error
) if error
else None
3412 self
.status
= status
3415 class StatusResults(Type
):
3416 _toSchema
= {'results': 'results'}
3417 _toPy
= {'results': 'results'}
3418 def __init__(self
, results
=None):
3420 results : typing.Sequence<+T_co>[~StatusResult]<~StatusResult>
3422 self
.results
= [StatusResult
.from_json(o
) for o
in results
or []]
3425 class ListSSHKeys(Type
):
3426 _toSchema
= {'entities': 'entities', 'mode': 'mode'}
3427 _toPy
= {'entities': 'entities', 'mode': 'mode'}
3428 def __init__(self
, entities
=None, mode
=None):
3433 self
.entities
= Entities
.from_json(entities
) if entities
else None
3437 class ModifyUserSSHKeys(Type
):
3438 _toSchema
= {'ssh_keys': 'ssh-keys', 'user': 'user'}
3439 _toPy
= {'user': 'user', 'ssh-keys': 'ssh_keys'}
3440 def __init__(self
, ssh_keys
=None, user
=None):
3442 ssh_keys : typing.Sequence<+T_co>[str]
3445 self
.ssh_keys
= ssh_keys
3449 class ApplicationTag(Type
):
3450 _toSchema
= {'name': 'Name'}
3451 _toPy
= {'Name': 'name'}
3452 def __init__(self
, name
=None):
3459 class ClaimLeadershipBulkParams(Type
):
3460 _toSchema
= {'params': 'params'}
3461 _toPy
= {'params': 'params'}
3462 def __init__(self
, params
=None):
3464 params : typing.Sequence<+T_co>[~ClaimLeadershipParams]<~ClaimLeadershipParams>
3466 self
.params
= [ClaimLeadershipParams
.from_json(o
) for o
in params
or []]
3469 class ClaimLeadershipBulkResults(Type
):
3470 _toSchema
= {'results': 'results'}
3471 _toPy
= {'results': 'results'}
3472 def __init__(self
, results
=None):
3474 results : typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
3476 self
.results
= [ErrorResult
.from_json(o
) for o
in results
or []]
3479 class ClaimLeadershipParams(Type
):
3480 _toSchema
= {'unit_tag': 'unit-tag', 'duration': 'duration', 'application_tag': 'application-tag'}
3481 _toPy
= {'application-tag': 'application_tag', 'unit-tag': 'unit_tag', 'duration': 'duration'}
3482 def __init__(self
, application_tag
=None, duration
=None, unit_tag
=None):
3484 application_tag : str
3488 self
.application_tag
= application_tag
3489 self
.duration
= duration
3490 self
.unit_tag
= unit_tag
3493 class LogForwardingGetLastSentParams(Type
):
3494 _toSchema
= {'ids': 'ids'}
3495 _toPy
= {'ids': 'ids'}
3496 def __init__(self
, ids
=None):
3498 ids : typing.Sequence<+T_co>[~LogForwardingID]<~LogForwardingID>
3500 self
.ids
= [LogForwardingID
.from_json(o
) for o
in ids
or []]
3503 class LogForwardingGetLastSentResult(Type
):
3504 _toSchema
= {'record_id': 'record-id', 'record_timestamp': 'record-timestamp', 'err': 'err'}
3505 _toPy
= {'record-timestamp': 'record_timestamp', 'record-id': 'record_id', 'err': 'err'}
3506 def __init__(self
, err
=None, record_id
=None, record_timestamp
=None):
3510 record_timestamp : int
3512 self
.err
= Error
.from_json(err
) if err
else None
3513 self
.record_id
= record_id
3514 self
.record_timestamp
= record_timestamp
3517 class LogForwardingGetLastSentResults(Type
):
3518 _toSchema
= {'results': 'results'}
3519 _toPy
= {'results': 'results'}
3520 def __init__(self
, results
=None):
3522 results : typing.Sequence<+T_co>[~LogForwardingGetLastSentResult]<~LogForwardingGetLastSentResult>
3524 self
.results
= [LogForwardingGetLastSentResult
.from_json(o
) for o
in results
or []]
3527 class LogForwardingID(Type
):
3528 _toSchema
= {'model': 'model', 'sink': 'sink'}
3529 _toPy
= {'model': 'model', 'sink': 'sink'}
3530 def __init__(self
, model
=None, sink
=None):
3539 class LogForwardingSetLastSentParam(Type
):
3540 _toSchema
= {'record_id': 'record-id', 'logforwardingid': 'LogForwardingID', 'record_timestamp': 'record-timestamp'}
3541 _toPy
= {'record-id': 'record_id', 'LogForwardingID': 'logforwardingid', 'record-timestamp': 'record_timestamp'}
3542 def __init__(self
, logforwardingid
=None, record_id
=None, record_timestamp
=None):
3544 logforwardingid : LogForwardingID
3546 record_timestamp : int
3548 self
.logforwardingid
= LogForwardingID
.from_json(logforwardingid
) if logforwardingid
else None
3549 self
.record_id
= record_id
3550 self
.record_timestamp
= record_timestamp
3553 class LogForwardingSetLastSentParams(Type
):
3554 _toSchema
= {'params': 'params'}
3555 _toPy
= {'params': 'params'}
3556 def __init__(self
, params
=None):
3558 params : typing.Sequence<+T_co>[~LogForwardingSetLastSentParam]<~LogForwardingSetLastSentParam>
3560 self
.params
= [LogForwardingSetLastSentParam
.from_json(o
) for o
in params
or []]
3563 class ActionExecutionResult(Type
):
3564 _toSchema
= {'status': 'status', 'action_tag': 'action-tag', 'results': 'results', 'message': 'message'}
3565 _toPy
= {'status': 'status', 'results': 'results', 'action-tag': 'action_tag', 'message': 'message'}
3566 def __init__(self
, action_tag
=None, message
=None, results
=None, status
=None):
3570 results : typing.Mapping<~KT, +VT_co>[str, typing.Any]
3573 self
.action_tag
= action_tag
3574 self
.message
= message
3575 self
.results
= results
3576 self
.status
= status
3579 class ActionExecutionResults(Type
):
3580 _toSchema
= {'results': 'results'}
3581 _toPy
= {'results': 'results'}
3582 def __init__(self
, results
=None):
3584 results : typing.Sequence<+T_co>[~ActionExecutionResult]<~ActionExecutionResult>
3586 self
.results
= [ActionExecutionResult
.from_json(o
) for o
in results
or []]
3589 class EntitiesResult(Type
):
3590 _toSchema
= {'entities': 'entities', 'error': 'error'}
3591 _toPy
= {'entities': 'entities', 'error': 'error'}
3592 def __init__(self
, entities
=None, error
=None):
3594 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
3597 self
.entities
= [Entity
.from_json(o
) for o
in entities
or []]
3598 self
.error
= Error
.from_json(error
) if error
else None
3601 class EntitiesResults(Type
):
3602 _toSchema
= {'results': 'results'}
3603 _toPy
= {'results': 'results'}
3604 def __init__(self
, results
=None):
3606 results : typing.Sequence<+T_co>[~EntitiesResult]<~EntitiesResult>
3608 self
.results
= [EntitiesResult
.from_json(o
) for o
in results
or []]
3611 class ProviderInterfaceInfo(Type
):
3612 _toSchema
= {'provider_id': 'provider-id', 'mac_address': 'mac-address', 'interface_name': 'interface-name'}
3613 _toPy
= {'interface-name': 'interface_name', 'mac-address': 'mac_address', 'provider-id': 'provider_id'}
3614 def __init__(self
, interface_name
=None, mac_address
=None, provider_id
=None):
3616 interface_name : str
3620 self
.interface_name
= interface_name
3621 self
.mac_address
= mac_address
3622 self
.provider_id
= provider_id
3625 class ProviderInterfaceInfoResult(Type
):
3626 _toSchema
= {'interfaces': 'interfaces', 'machine_tag': 'machine-tag', 'error': 'error'}
3627 _toPy
= {'interfaces': 'interfaces', 'machine-tag': 'machine_tag', 'error': 'error'}
3628 def __init__(self
, error
=None, interfaces
=None, machine_tag
=None):
3631 interfaces : typing.Sequence<+T_co>[~ProviderInterfaceInfo]<~ProviderInterfaceInfo>
3634 self
.error
= Error
.from_json(error
) if error
else None
3635 self
.interfaces
= [ProviderInterfaceInfo
.from_json(o
) for o
in interfaces
or []]
3636 self
.machine_tag
= machine_tag
3639 class ProviderInterfaceInfoResults(Type
):
3640 _toSchema
= {'results': 'results'}
3641 _toPy
= {'results': 'results'}
3642 def __init__(self
, results
=None):
3644 results : typing.Sequence<+T_co>[~ProviderInterfaceInfoResult]<~ProviderInterfaceInfoResult>
3646 self
.results
= [ProviderInterfaceInfoResult
.from_json(o
) for o
in results
or []]
3649 class JobsResult(Type
):
3650 _toSchema
= {'jobs': 'jobs', 'error': 'error'}
3651 _toPy
= {'jobs': 'jobs', 'error': 'error'}
3652 def __init__(self
, error
=None, jobs
=None):
3655 jobs : typing.Sequence<+T_co>[str]
3657 self
.error
= Error
.from_json(error
) if error
else None
3661 class JobsResults(Type
):
3662 _toSchema
= {'results': 'results'}
3663 _toPy
= {'results': 'results'}
3664 def __init__(self
, results
=None):
3666 results : typing.Sequence<+T_co>[~JobsResult]<~JobsResult>
3668 self
.results
= [JobsResult
.from_json(o
) for o
in results
or []]
3671 class NetworkConfig(Type
):
3672 _toSchema
= {'provider_address_id': 'provider-address-id', 'provider_id': 'provider-id', 'cidr': 'cidr', 'config_type': 'config-type', 'disabled': 'disabled', 'address': 'address', 'provider_vlan_id': 'provider-vlan-id', 'dns_servers': 'dns-servers', 'interface_type': 'interface-type', 'mac_address': 'mac-address', 'no_auto_start': 'no-auto-start', 'dns_search_domains': 'dns-search-domains', 'provider_subnet_id': 'provider-subnet-id', 'device_index': 'device-index', 'interface_name': 'interface-name', 'parent_interface_name': 'parent-interface-name', 'mtu': 'mtu', 'gateway_address': 'gateway-address', 'provider_space_id': 'provider-space-id', 'vlan_tag': 'vlan-tag'}
3673 _toPy
= {'provider-vlan-id': 'provider_vlan_id', 'interface-name': 'interface_name', 'gateway-address': 'gateway_address', 'no-auto-start': 'no_auto_start', 'address': 'address', 'parent-interface-name': 'parent_interface_name', 'provider-subnet-id': 'provider_subnet_id', 'dns-search-domains': 'dns_search_domains', 'dns-servers': 'dns_servers', 'interface-type': 'interface_type', 'provider-space-id': 'provider_space_id', 'mac-address': 'mac_address', 'device-index': 'device_index', 'disabled': 'disabled', 'config-type': 'config_type', 'provider-address-id': 'provider_address_id', 'mtu': 'mtu', 'cidr': 'cidr', 'vlan-tag': 'vlan_tag', 'provider-id': 'provider_id'}
3674 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):
3681 dns_search_domains : typing.Sequence<+T_co>[str]
3682 dns_servers : typing.Sequence<+T_co>[str]
3683 gateway_address : str
3684 interface_name : str
3685 interface_type : str
3688 no_auto_start : bool
3689 parent_interface_name : str
3690 provider_address_id : str
3692 provider_space_id : str
3693 provider_subnet_id : str
3694 provider_vlan_id : str
3697 self
.address
= address
3699 self
.config_type
= config_type
3700 self
.device_index
= device_index
3701 self
.disabled
= disabled
3702 self
.dns_search_domains
= dns_search_domains
3703 self
.dns_servers
= dns_servers
3704 self
.gateway_address
= gateway_address
3705 self
.interface_name
= interface_name
3706 self
.interface_type
= interface_type
3707 self
.mac_address
= mac_address
3709 self
.no_auto_start
= no_auto_start
3710 self
.parent_interface_name
= parent_interface_name
3711 self
.provider_address_id
= provider_address_id
3712 self
.provider_id
= provider_id
3713 self
.provider_space_id
= provider_space_id
3714 self
.provider_subnet_id
= provider_subnet_id
3715 self
.provider_vlan_id
= provider_vlan_id
3716 self
.vlan_tag
= vlan_tag
3719 class SetMachineNetworkConfig(Type
):
3720 _toSchema
= {'config': 'config', 'tag': 'tag'}
3721 _toPy
= {'config': 'config', 'tag': 'tag'}
3722 def __init__(self
, config
=None, tag
=None):
3724 config : typing.Sequence<+T_co>[~NetworkConfig]<~NetworkConfig>
3727 self
.config
= [NetworkConfig
.from_json(o
) for o
in config
or []]
3731 class MeterStatusResult(Type
):
3732 _toSchema
= {'info': 'info', 'code': 'code', 'error': 'error'}
3733 _toPy
= {'info': 'info', 'code': 'code', 'error': 'error'}
3734 def __init__(self
, code
=None, error
=None, info
=None):
3741 self
.error
= Error
.from_json(error
) if error
else None
3745 class MeterStatusResults(Type
):
3746 _toSchema
= {'results': 'results'}
3747 _toPy
= {'results': 'results'}
3748 def __init__(self
, results
=None):
3750 results : typing.Sequence<+T_co>[~MeterStatusResult]<~MeterStatusResult>
3752 self
.results
= [MeterStatusResult
.from_json(o
) for o
in results
or []]
3756 _toSchema
= {'time': 'time', 'value': 'value', 'key': 'key'}
3757 _toPy
= {'time': 'time', 'value': 'value', 'key': 'key'}
3758 def __init__(self
, key
=None, time
=None, value
=None):
3769 class MetricBatch(Type
):
3770 _toSchema
= {'uuid': 'uuid', 'created': 'created', 'charm_url': 'charm-url', 'metrics': 'metrics'}
3771 _toPy
= {'uuid': 'uuid', 'charm-url': 'charm_url', 'created': 'created', 'metrics': 'metrics'}
3772 def __init__(self
, charm_url
=None, created
=None, metrics
=None, uuid
=None):
3776 metrics : typing.Sequence<+T_co>[~Metric]<~Metric>
3779 self
.charm_url
= charm_url
3780 self
.created
= created
3781 self
.metrics
= [Metric
.from_json(o
) for o
in metrics
or []]
3785 class MetricBatchParam(Type
):
3786 _toSchema
= {'batch': 'batch', 'tag': 'tag'}
3787 _toPy
= {'batch': 'batch', 'tag': 'tag'}
3788 def __init__(self
, batch
=None, tag
=None):
3793 self
.batch
= MetricBatch
.from_json(batch
) if batch
else None
3797 class MetricBatchParams(Type
):
3798 _toSchema
= {'batches': 'batches'}
3799 _toPy
= {'batches': 'batches'}
3800 def __init__(self
, batches
=None):
3802 batches : typing.Sequence<+T_co>[~MetricBatchParam]<~MetricBatchParam>
3804 self
.batches
= [MetricBatchParam
.from_json(o
) for o
in batches
or []]
3807 class EntityMetrics(Type
):
3808 _toSchema
= {'metrics': 'metrics', 'error': 'error'}
3809 _toPy
= {'metrics': 'metrics', 'error': 'error'}
3810 def __init__(self
, error
=None, metrics
=None):
3813 metrics : typing.Sequence<+T_co>[~MetricResult]<~MetricResult>
3815 self
.error
= Error
.from_json(error
) if error
else None
3816 self
.metrics
= [MetricResult
.from_json(o
) for o
in metrics
or []]
3819 class MeterStatusParam(Type
):
3820 _toSchema
= {'info': 'info', 'tag': 'tag', 'code': 'code'}
3821 _toPy
= {'info': 'info', 'tag': 'tag', 'code': 'code'}
3822 def __init__(self
, code
=None, info
=None, tag
=None):
3833 class MeterStatusParams(Type
):
3834 _toSchema
= {'statues': 'statues'}
3835 _toPy
= {'statues': 'statues'}
3836 def __init__(self
, statues
=None):
3838 statues : typing.Sequence<+T_co>[~MeterStatusParam]<~MeterStatusParam>
3840 self
.statues
= [MeterStatusParam
.from_json(o
) for o
in statues
or []]
3843 class MetricResult(Type
):
3844 _toSchema
= {'time': 'time', 'value': 'value', 'key': 'key'}
3845 _toPy
= {'time': 'time', 'value': 'value', 'key': 'key'}
3846 def __init__(self
, key
=None, time
=None, value
=None):
3857 class MetricResults(Type
):
3858 _toSchema
= {'results': 'results'}
3859 _toPy
= {'results': 'results'}
3860 def __init__(self
, results
=None):
3862 results : typing.Sequence<+T_co>[~EntityMetrics]<~EntityMetrics>
3864 self
.results
= [EntityMetrics
.from_json(o
) for o
in results
or []]
3867 class PhaseResult(Type
):
3868 _toSchema
= {'phase': 'phase', 'error': 'error'}
3869 _toPy
= {'phase': 'phase', 'error': 'error'}
3870 def __init__(self
, error
=None, phase
=None):
3875 self
.error
= Error
.from_json(error
) if error
else None
3879 class PhaseResults(Type
):
3880 _toSchema
= {'results': 'results'}
3881 _toPy
= {'results': 'results'}
3882 def __init__(self
, results
=None):
3884 results : typing.Sequence<+T_co>[~PhaseResult]<~PhaseResult>
3886 self
.results
= [PhaseResult
.from_json(o
) for o
in results
or []]
3889 class MasterMigrationStatus(Type
):
3890 _toSchema
= {'phase': 'phase', 'phase_changed_time': 'phase-changed-time', 'migration_id': 'migration-id', 'spec': 'spec'}
3891 _toPy
= {'phase': 'phase', 'phase-changed-time': 'phase_changed_time', 'migration-id': 'migration_id', 'spec': 'spec'}
3892 def __init__(self
, migration_id
=None, phase
=None, phase_changed_time
=None, spec
=None):
3896 phase_changed_time : str
3897 spec : MigrationSpec
3899 self
.migration_id
= migration_id
3901 self
.phase_changed_time
= phase_changed_time
3902 self
.spec
= MigrationSpec
.from_json(spec
) if spec
else None
3905 class MigrationModelInfo(Type
):
3906 _toSchema
= {'agent_version': 'agent-version', 'uuid': 'uuid', 'name': 'name'}
3907 _toPy
= {'name': 'name', 'uuid': 'uuid', 'agent-version': 'agent_version'}
3908 def __init__(self
, agent_version
=None, name
=None, uuid
=None):
3910 agent_version : Number
3914 self
.agent_version
= Number
.from_json(agent_version
) if agent_version
else None
3919 class MinionReports(Type
):
3920 _toSchema
= {'unknown_sample': 'unknown-sample', 'phase': 'phase', 'failed': 'failed', 'success_count': 'success-count', 'migration_id': 'migration-id', 'unknown_count': 'unknown-count'}
3921 _toPy
= {'phase': 'phase', 'failed': 'failed', 'success-count': 'success_count', 'migration-id': 'migration_id', 'unknown-sample': 'unknown_sample', 'unknown-count': 'unknown_count'}
3922 def __init__(self
, failed
=None, migration_id
=None, phase
=None, success_count
=None, unknown_count
=None, unknown_sample
=None):
3924 failed : typing.Sequence<+T_co>[str]
3929 unknown_sample : typing.Sequence<+T_co>[str]
3931 self
.failed
= failed
3932 self
.migration_id
= migration_id
3934 self
.success_count
= success_count
3935 self
.unknown_count
= unknown_count
3936 self
.unknown_sample
= unknown_sample
3939 class SerializedModel(Type
):
3940 _toSchema
= {'charms': 'charms', 'bytes_': 'bytes', 'tools': 'tools'}
3941 _toPy
= {'charms': 'charms', 'tools': 'tools', 'bytes': 'bytes_'}
3942 def __init__(self
, bytes_
=None, charms
=None, tools
=None):
3944 bytes_ : typing.Sequence<+T_co>[int]
3945 charms : typing.Sequence<+T_co>[str]
3946 tools : typing.Sequence<+T_co>[~SerializedModelTools]<~SerializedModelTools>
3948 self
.bytes_
= bytes_
3949 self
.charms
= charms
3950 self
.tools
= [SerializedModelTools
.from_json(o
) for o
in tools
or []]
3953 class SerializedModelTools(Type
):
3954 _toSchema
= {'uri': 'uri', 'version': 'version'}
3955 _toPy
= {'uri': 'uri', 'version': 'version'}
3956 def __init__(self
, uri
=None, version
=None):
3962 self
.version
= version
3965 class SetMigrationPhaseArgs(Type
):
3966 _toSchema
= {'phase': 'phase'}
3967 _toPy
= {'phase': 'phase'}
3968 def __init__(self
, phase
=None):
3975 class SetMigrationStatusMessageArgs(Type
):
3976 _toSchema
= {'message': 'message'}
3977 _toPy
= {'message': 'message'}
3978 def __init__(self
, message
=None):
3982 self
.message
= message
3985 class MinionReport(Type
):
3986 _toSchema
= {'success': 'success', 'phase': 'phase', 'migration_id': 'migration-id'}
3987 _toPy
= {'success': 'success', 'phase': 'phase', 'migration-id': 'migration_id'}
3988 def __init__(self
, migration_id
=None, phase
=None, success
=None):
3994 self
.migration_id
= migration_id
3996 self
.success
= success
3999 class MigrationStatus(Type
):
4000 _toSchema
= {'target_ca_cert': 'target-ca-cert', 'phase': 'phase', 'target_api_addrs': 'target-api-addrs', 'source_api_addrs': 'source-api-addrs', 'attempt': 'attempt', 'migration_id': 'migration-id', 'source_ca_cert': 'source-ca-cert'}
4001 _toPy
= {'phase': 'phase', 'source-ca-cert': 'source_ca_cert', 'target-api-addrs': 'target_api_addrs', 'target-ca-cert': 'target_ca_cert', 'source-api-addrs': 'source_api_addrs', 'attempt': 'attempt', 'migration-id': 'migration_id'}
4002 def __init__(self
, attempt
=None, migration_id
=None, phase
=None, source_api_addrs
=None, source_ca_cert
=None, target_api_addrs
=None, target_ca_cert
=None):
4007 source_api_addrs : typing.Sequence<+T_co>[str]
4008 source_ca_cert : str
4009 target_api_addrs : typing.Sequence<+T_co>[str]
4010 target_ca_cert : str
4012 self
.attempt
= attempt
4013 self
.migration_id
= migration_id
4015 self
.source_api_addrs
= source_api_addrs
4016 self
.source_ca_cert
= source_ca_cert
4017 self
.target_api_addrs
= target_api_addrs
4018 self
.target_ca_cert
= target_ca_cert
4021 class ModelArgs(Type
):
4022 _toSchema
= {'model_tag': 'model-tag'}
4023 _toPy
= {'model-tag': 'model_tag'}
4024 def __init__(self
, model_tag
=None):
4028 self
.model_tag
= model_tag
4031 class TargetPrechecksArgs(Type
):
4032 _toSchema
= {'build': 'Build', 'patch': 'Patch', 'tag': 'Tag', 'minor': 'Minor', 'major': 'Major'}
4033 _toPy
= {'Tag': 'tag', 'Major': 'major', 'Patch': 'patch', 'Minor': 'minor', 'Build': 'build'}
4034 def __init__(self
, build
=None, major
=None, minor
=None, patch
=None, tag
=None):
4049 class MapResult(Type
):
4050 _toSchema
= {'result': 'result', 'error': 'error'}
4051 _toPy
= {'result': 'result', 'error': 'error'}
4052 def __init__(self
, error
=None, result
=None):
4055 result : typing.Mapping<~KT, +VT_co>[str, typing.Any]
4057 self
.error
= Error
.from_json(error
) if error
else None
4058 self
.result
= result
4061 class MapResults(Type
):
4062 _toSchema
= {'results': 'results'}
4063 _toPy
= {'results': 'results'}
4064 def __init__(self
, results
=None):
4066 results : typing.Sequence<+T_co>[~MapResult]<~MapResult>
4068 self
.results
= [MapResult
.from_json(o
) for o
in results
or []]
4071 class ModelCreateArgs(Type
):
4072 _toSchema
= {'config': 'config', 'cloud_tag': 'cloud-tag', 'owner_tag': 'owner-tag', 'region': 'region', 'name': 'name', 'credential': 'credential'}
4073 _toPy
= {'config': 'config', 'region': 'region', 'name': 'name', 'owner-tag': 'owner_tag', 'cloud-tag': 'cloud_tag', 'credential': 'credential'}
4074 def __init__(self
, cloud_tag
=None, config
=None, credential
=None, name
=None, owner_tag
=None, region
=None):
4077 config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
4083 self
.cloud_tag
= cloud_tag
4084 self
.config
= config
4085 self
.credential
= credential
4087 self
.owner_tag
= owner_tag
4088 self
.region
= region
4091 class ModelInfoResult(Type
):
4092 _toSchema
= {'result': 'result', 'error': 'error'}
4093 _toPy
= {'result': 'result', 'error': 'error'}
4094 def __init__(self
, error
=None, result
=None):
4099 self
.error
= Error
.from_json(error
) if error
else None
4100 self
.result
= ModelInfo
.from_json(result
) if result
else None
4103 class ModelInfoResults(Type
):
4104 _toSchema
= {'results': 'results'}
4105 _toPy
= {'results': 'results'}
4106 def __init__(self
, results
=None):
4108 results : typing.Sequence<+T_co>[~ModelInfoResult]<~ModelInfoResult>
4110 self
.results
= [ModelInfoResult
.from_json(o
) for o
in results
or []]
4113 class ModifyModelAccess(Type
):
4114 _toSchema
= {'model_tag': 'model-tag', 'access': 'access', 'action': 'action', 'user_tag': 'user-tag'}
4115 _toPy
= {'model-tag': 'model_tag', 'access': 'access', 'action': 'action', 'user-tag': 'user_tag'}
4116 def __init__(self
, access
=None, action
=None, model_tag
=None, user_tag
=None):
4123 self
.access
= access
4124 self
.action
= action
4125 self
.model_tag
= model_tag
4126 self
.user_tag
= user_tag
4129 class ModifyModelAccessRequest(Type
):
4130 _toSchema
= {'changes': 'changes'}
4131 _toPy
= {'changes': 'changes'}
4132 def __init__(self
, changes
=None):
4134 changes : typing.Sequence<+T_co>[~ModifyModelAccess]<~ModifyModelAccess>
4136 self
.changes
= [ModifyModelAccess
.from_json(o
) for o
in changes
or []]
4139 class ConstraintsResult(Type
):
4140 _toSchema
= {'constraints': 'constraints', 'error': 'error'}
4141 _toPy
= {'constraints': 'constraints', 'error': 'error'}
4142 def __init__(self
, constraints
=None, error
=None):
4147 self
.constraints
= Value
.from_json(constraints
) if constraints
else None
4148 self
.error
= Error
.from_json(error
) if error
else None
4151 class ConstraintsResults(Type
):
4152 _toSchema
= {'results': 'results'}
4153 _toPy
= {'results': 'results'}
4154 def __init__(self
, results
=None):
4156 results : typing.Sequence<+T_co>[~ConstraintsResult]<~ConstraintsResult>
4158 self
.results
= [ConstraintsResult
.from_json(o
) for o
in results
or []]
4161 class ContainerConfig(Type
):
4162 _toSchema
= {'updatebehavior': 'UpdateBehavior', 'authorized_keys': 'authorized-keys', 'apt_mirror': 'apt-mirror', 'proxy': 'proxy', 'ssl_hostname_verification': 'ssl-hostname-verification', 'provider_type': 'provider-type', 'apt_proxy': 'apt-proxy'}
4163 _toPy
= {'ssl-hostname-verification': 'ssl_hostname_verification', 'apt-proxy': 'apt_proxy', 'proxy': 'proxy', 'apt-mirror': 'apt_mirror', 'UpdateBehavior': 'updatebehavior', 'authorized-keys': 'authorized_keys', 'provider-type': 'provider_type'}
4164 def __init__(self
, updatebehavior
=None, apt_mirror
=None, apt_proxy
=None, authorized_keys
=None, provider_type
=None, proxy
=None, ssl_hostname_verification
=None):
4166 updatebehavior : UpdateBehavior
4168 apt_proxy : Settings
4169 authorized_keys : str
4172 ssl_hostname_verification : bool
4174 self
.updatebehavior
= UpdateBehavior
.from_json(updatebehavior
) if updatebehavior
else None
4175 self
.apt_mirror
= apt_mirror
4176 self
.apt_proxy
= Settings
.from_json(apt_proxy
) if apt_proxy
else None
4177 self
.authorized_keys
= authorized_keys
4178 self
.provider_type
= provider_type
4179 self
.proxy
= Settings
.from_json(proxy
) if proxy
else None
4180 self
.ssl_hostname_verification
= ssl_hostname_verification
4183 class ContainerManagerConfig(Type
):
4184 _toSchema
= {'config': 'config'}
4185 _toPy
= {'config': 'config'}
4186 def __init__(self
, config
=None):
4188 config : typing.Mapping<~KT, +VT_co>[str, str]
4190 self
.config
= config
4193 class ContainerManagerConfigParams(Type
):
4194 _toSchema
= {'type_': 'type'}
4195 _toPy
= {'type': 'type_'}
4196 def __init__(self
, type_
=None):
4203 class DistributionGroupResult(Type
):
4204 _toSchema
= {'result': 'result', 'error': 'error'}
4205 _toPy
= {'result': 'result', 'error': 'error'}
4206 def __init__(self
, error
=None, result
=None):
4209 result : typing.Sequence<+T_co>[str]
4211 self
.error
= Error
.from_json(error
) if error
else None
4212 self
.result
= result
4215 class DistributionGroupResults(Type
):
4216 _toSchema
= {'results': 'results'}
4217 _toPy
= {'results': 'results'}
4218 def __init__(self
, results
=None):
4220 results : typing.Sequence<+T_co>[~DistributionGroupResult]<~DistributionGroupResult>
4222 self
.results
= [DistributionGroupResult
.from_json(o
) for o
in results
or []]
4225 class InstanceInfo(Type
):
4226 _toSchema
= {'volumes': 'volumes', 'nonce': 'nonce', 'characteristics': 'characteristics', 'instance_id': 'instance-id', 'network_config': 'network-config', 'tag': 'tag', 'volume_attachments': 'volume-attachments'}
4227 _toPy
= {'network-config': 'network_config', 'nonce': 'nonce', 'characteristics': 'characteristics', 'instance-id': 'instance_id', 'tag': 'tag', 'volumes': 'volumes', 'volume-attachments': 'volume_attachments'}
4228 def __init__(self
, characteristics
=None, instance_id
=None, network_config
=None, nonce
=None, tag
=None, volume_attachments
=None, volumes
=None):
4230 characteristics : HardwareCharacteristics
4232 network_config : typing.Sequence<+T_co>[~NetworkConfig]<~NetworkConfig>
4235 volume_attachments : typing.Mapping<~KT, +VT_co>[str, ~VolumeAttachmentInfo]<~VolumeAttachmentInfo>
4236 volumes : typing.Sequence<+T_co>[~Volume]<~Volume>
4238 self
.characteristics
= HardwareCharacteristics
.from_json(characteristics
) if characteristics
else None
4239 self
.instance_id
= instance_id
4240 self
.network_config
= [NetworkConfig
.from_json(o
) for o
in network_config
or []]
4243 self
.volume_attachments
= volume_attachments
4244 self
.volumes
= [Volume
.from_json(o
) for o
in volumes
or []]
4247 class InstancesInfo(Type
):
4248 _toSchema
= {'machines': 'machines'}
4249 _toPy
= {'machines': 'machines'}
4250 def __init__(self
, machines
=None):
4252 machines : typing.Sequence<+T_co>[~InstanceInfo]<~InstanceInfo>
4254 self
.machines
= [InstanceInfo
.from_json(o
) for o
in machines
or []]
4257 class MachineContainers(Type
):
4258 _toSchema
= {'machine_tag': 'machine-tag', 'container_types': 'container-types'}
4259 _toPy
= {'machine-tag': 'machine_tag', 'container-types': 'container_types'}
4260 def __init__(self
, container_types
=None, machine_tag
=None):
4262 container_types : typing.Sequence<+T_co>[str]
4265 self
.container_types
= container_types
4266 self
.machine_tag
= machine_tag
4269 class MachineContainersParams(Type
):
4270 _toSchema
= {'params': 'params'}
4271 _toPy
= {'params': 'params'}
4272 def __init__(self
, params
=None):
4274 params : typing.Sequence<+T_co>[~MachineContainers]<~MachineContainers>
4276 self
.params
= [MachineContainers
.from_json(o
) for o
in params
or []]
4279 class MachineNetworkConfigResult(Type
):
4280 _toSchema
= {'info': 'info', 'error': 'error'}
4281 _toPy
= {'info': 'info', 'error': 'error'}
4282 def __init__(self
, error
=None, info
=None):
4285 info : typing.Sequence<+T_co>[~NetworkConfig]<~NetworkConfig>
4287 self
.error
= Error
.from_json(error
) if error
else None
4288 self
.info
= [NetworkConfig
.from_json(o
) for o
in info
or []]
4291 class MachineNetworkConfigResults(Type
):
4292 _toSchema
= {'results': 'results'}
4293 _toPy
= {'results': 'results'}
4294 def __init__(self
, results
=None):
4296 results : typing.Sequence<+T_co>[~MachineNetworkConfigResult]<~MachineNetworkConfigResult>
4298 self
.results
= [MachineNetworkConfigResult
.from_json(o
) for o
in results
or []]
4301 class ProvisioningInfo(Type
):
4302 _toSchema
= {'tags': 'tags', 'volumes': 'volumes', 'controller_config': 'controller-config', 'constraints': 'constraints', 'series': 'series', 'placement': 'placement', 'endpoint_bindings': 'endpoint-bindings', 'subnets_to_zones': 'subnets-to-zones', 'image_metadata': 'image-metadata', 'jobs': 'jobs'}
4303 _toPy
= {'image-metadata': 'image_metadata', 'volumes': 'volumes', 'constraints': 'constraints', 'series': 'series', 'subnets-to-zones': 'subnets_to_zones', 'placement': 'placement', 'controller-config': 'controller_config', 'endpoint-bindings': 'endpoint_bindings', 'jobs': 'jobs', 'tags': 'tags'}
4304 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):
4307 controller_config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
4308 endpoint_bindings : typing.Mapping<~KT, +VT_co>[str, str]
4309 image_metadata : typing.Sequence<+T_co>[~CloudImageMetadata]<~CloudImageMetadata>
4310 jobs : typing.Sequence<+T_co>[str]
4313 subnets_to_zones : typing.Sequence<+T_co>[str]
4314 tags : typing.Mapping<~KT, +VT_co>[str, str]
4315 volumes : typing.Sequence<+T_co>[~VolumeParams]<~VolumeParams>
4317 self
.constraints
= Value
.from_json(constraints
) if constraints
else None
4318 self
.controller_config
= controller_config
4319 self
.endpoint_bindings
= endpoint_bindings
4320 self
.image_metadata
= [CloudImageMetadata
.from_json(o
) for o
in image_metadata
or []]
4322 self
.placement
= placement
4323 self
.series
= series
4324 self
.subnets_to_zones
= subnets_to_zones
4326 self
.volumes
= [VolumeParams
.from_json(o
) for o
in volumes
or []]
4329 class ProvisioningInfoResult(Type
):
4330 _toSchema
= {'result': 'result', 'error': 'error'}
4331 _toPy
= {'result': 'result', 'error': 'error'}
4332 def __init__(self
, error
=None, result
=None):
4335 result : ProvisioningInfo
4337 self
.error
= Error
.from_json(error
) if error
else None
4338 self
.result
= ProvisioningInfo
.from_json(result
) if result
else None
4341 class ProvisioningInfoResults(Type
):
4342 _toSchema
= {'results': 'results'}
4343 _toPy
= {'results': 'results'}
4344 def __init__(self
, results
=None):
4346 results : typing.Sequence<+T_co>[~ProvisioningInfoResult]<~ProvisioningInfoResult>
4348 self
.results
= [ProvisioningInfoResult
.from_json(o
) for o
in results
or []]
4351 class Settings(Type
):
4352 _toSchema
= {'https': 'Https', 'ftp': 'Ftp', 'noproxy': 'NoProxy', 'http': 'Http'}
4353 _toPy
= {'Http': 'http', 'Https': 'https', 'Ftp': 'ftp', 'NoProxy': 'noproxy'}
4354 def __init__(self
, ftp
=None, http
=None, https
=None, noproxy
=None):
4364 self
.noproxy
= noproxy
4367 class ToolsResult(Type
):
4368 _toSchema
= {'disable_ssl_hostname_verification': 'disable-ssl-hostname-verification', 'tools': 'tools', 'error': 'error'}
4369 _toPy
= {'disable-ssl-hostname-verification': 'disable_ssl_hostname_verification', 'tools': 'tools', 'error': 'error'}
4370 def __init__(self
, disable_ssl_hostname_verification
=None, error
=None, tools
=None):
4372 disable_ssl_hostname_verification : bool
4374 tools : typing.Sequence<+T_co>[~Tools]<~Tools>
4376 self
.disable_ssl_hostname_verification
= disable_ssl_hostname_verification
4377 self
.error
= Error
.from_json(error
) if error
else None
4378 self
.tools
= [Tools
.from_json(o
) for o
in tools
or []]
4381 class ToolsResults(Type
):
4382 _toSchema
= {'results': 'results'}
4383 _toPy
= {'results': 'results'}
4384 def __init__(self
, results
=None):
4386 results : typing.Sequence<+T_co>[~ToolsResult]<~ToolsResult>
4388 self
.results
= [ToolsResult
.from_json(o
) for o
in results
or []]
4391 class UpdateBehavior(Type
):
4392 _toSchema
= {'enable_os_upgrade': 'enable-os-upgrade', 'enable_os_refresh_update': 'enable-os-refresh-update'}
4393 _toPy
= {'enable-os-refresh-update': 'enable_os_refresh_update', 'enable-os-upgrade': 'enable_os_upgrade'}
4394 def __init__(self
, enable_os_refresh_update
=None, enable_os_upgrade
=None):
4396 enable_os_refresh_update : bool
4397 enable_os_upgrade : bool
4399 self
.enable_os_refresh_update
= enable_os_refresh_update
4400 self
.enable_os_upgrade
= enable_os_upgrade
4404 _toSchema
= {'info': 'info', 'volume_tag': 'volume-tag'}
4405 _toPy
= {'info': 'info', 'volume-tag': 'volume_tag'}
4406 def __init__(self
, info
=None, volume_tag
=None):
4411 self
.info
= VolumeInfo
.from_json(info
) if info
else None
4412 self
.volume_tag
= volume_tag
4415 class VolumeAttachmentInfo(Type
):
4416 _toSchema
= {'bus_address': 'bus-address', 'device_name': 'device-name', 'device_link': 'device-link', 'read_only': 'read-only'}
4417 _toPy
= {'device-link': 'device_link', 'read-only': 'read_only', 'device-name': 'device_name', 'bus-address': 'bus_address'}
4418 def __init__(self
, bus_address
=None, device_link
=None, device_name
=None, read_only
=None):
4425 self
.bus_address
= bus_address
4426 self
.device_link
= device_link
4427 self
.device_name
= device_name
4428 self
.read_only
= read_only
4431 class VolumeAttachmentParams(Type
):
4432 _toSchema
= {'read_only': 'read-only', 'volume_id': 'volume-id', 'instance_id': 'instance-id', 'provider': 'provider', 'volume_tag': 'volume-tag', 'machine_tag': 'machine-tag'}
4433 _toPy
= {'instance-id': 'instance_id', 'volume-id': 'volume_id', 'read-only': 'read_only', 'machine-tag': 'machine_tag', 'provider': 'provider', 'volume-tag': 'volume_tag'}
4434 def __init__(self
, instance_id
=None, machine_tag
=None, provider
=None, read_only
=None, volume_id
=None, volume_tag
=None):
4443 self
.instance_id
= instance_id
4444 self
.machine_tag
= machine_tag
4445 self
.provider
= provider
4446 self
.read_only
= read_only
4447 self
.volume_id
= volume_id
4448 self
.volume_tag
= volume_tag
4451 class VolumeInfo(Type
):
4452 _toSchema
= {'hardware_id': 'hardware-id', 'persistent': 'persistent', 'volume_id': 'volume-id', 'size': 'size'}
4453 _toPy
= {'persistent': 'persistent', 'size': 'size', 'volume-id': 'volume_id', 'hardware-id': 'hardware_id'}
4454 def __init__(self
, hardware_id
=None, persistent
=None, size
=None, volume_id
=None):
4461 self
.hardware_id
= hardware_id
4462 self
.persistent
= persistent
4464 self
.volume_id
= volume_id
4467 class VolumeParams(Type
):
4468 _toSchema
= {'attachment': 'attachment', 'size': 'size', 'tags': 'tags', 'attributes': 'attributes', 'provider': 'provider', 'volume_tag': 'volume-tag'}
4469 _toPy
= {'attachment': 'attachment', 'size': 'size', 'tags': 'tags', 'attributes': 'attributes', 'provider': 'provider', 'volume-tag': 'volume_tag'}
4470 def __init__(self
, attachment
=None, attributes
=None, provider
=None, size
=None, tags
=None, volume_tag
=None):
4472 attachment : VolumeAttachmentParams
4473 attributes : typing.Mapping<~KT, +VT_co>[str, typing.Any]
4476 tags : typing.Mapping<~KT, +VT_co>[str, str]
4479 self
.attachment
= VolumeAttachmentParams
.from_json(attachment
) if attachment
else None
4480 self
.attributes
= attributes
4481 self
.provider
= provider
4484 self
.volume_tag
= volume_tag
4487 class WatchContainer(Type
):
4488 _toSchema
= {'machine_tag': 'machine-tag', 'container_type': 'container-type'}
4489 _toPy
= {'machine-tag': 'machine_tag', 'container-type': 'container_type'}
4490 def __init__(self
, container_type
=None, machine_tag
=None):
4492 container_type : str
4495 self
.container_type
= container_type
4496 self
.machine_tag
= machine_tag
4499 class WatchContainers(Type
):
4500 _toSchema
= {'params': 'params'}
4501 _toPy
= {'params': 'params'}
4502 def __init__(self
, params
=None):
4504 params : typing.Sequence<+T_co>[~WatchContainer]<~WatchContainer>
4506 self
.params
= [WatchContainer
.from_json(o
) for o
in params
or []]
4509 class ProxyConfig(Type
):
4510 _toSchema
= {'https': 'https', 'ftp': 'ftp', 'no_proxy': 'no-proxy', 'http': 'http'}
4511 _toPy
= {'https': 'https', 'ftp': 'ftp', 'no-proxy': 'no_proxy', 'http': 'http'}
4512 def __init__(self
, ftp
=None, http
=None, https
=None, no_proxy
=None):
4522 self
.no_proxy
= no_proxy
4525 class ProxyConfigResult(Type
):
4526 _toSchema
= {'proxy_settings': 'proxy-settings', 'apt_proxy_settings': 'apt-proxy-settings', 'error': 'error'}
4527 _toPy
= {'proxy-settings': 'proxy_settings', 'error': 'error', 'apt-proxy-settings': 'apt_proxy_settings'}
4528 def __init__(self
, apt_proxy_settings
=None, error
=None, proxy_settings
=None):
4530 apt_proxy_settings : ProxyConfig
4532 proxy_settings : ProxyConfig
4534 self
.apt_proxy_settings
= ProxyConfig
.from_json(apt_proxy_settings
) if apt_proxy_settings
else None
4535 self
.error
= Error
.from_json(error
) if error
else None
4536 self
.proxy_settings
= ProxyConfig
.from_json(proxy_settings
) if proxy_settings
else None
4539 class ProxyConfigResults(Type
):
4540 _toSchema
= {'results': 'results'}
4541 _toPy
= {'results': 'results'}
4542 def __init__(self
, results
=None):
4544 results : typing.Sequence<+T_co>[~ProxyConfigResult]<~ProxyConfigResult>
4546 self
.results
= [ProxyConfigResult
.from_json(o
) for o
in results
or []]
4549 class RebootActionResult(Type
):
4550 _toSchema
= {'result': 'result', 'error': 'error'}
4551 _toPy
= {'result': 'result', 'error': 'error'}
4552 def __init__(self
, error
=None, result
=None):
4557 self
.error
= Error
.from_json(error
) if error
else None
4558 self
.result
= result
4561 class RebootActionResults(Type
):
4562 _toSchema
= {'results': 'results'}
4563 _toPy
= {'results': 'results'}
4564 def __init__(self
, results
=None):
4566 results : typing.Sequence<+T_co>[~RebootActionResult]<~RebootActionResult>
4568 self
.results
= [RebootActionResult
.from_json(o
) for o
in results
or []]
4571 class RelationUnitsChange(Type
):
4572 _toSchema
= {'departed': 'departed', 'changed': 'changed'}
4573 _toPy
= {'departed': 'departed', 'changed': 'changed'}
4574 def __init__(self
, changed
=None, departed
=None):
4576 changed : typing.Mapping<~KT, +VT_co>[str, ~UnitSettings]<~UnitSettings>
4577 departed : typing.Sequence<+T_co>[str]
4579 self
.changed
= changed
4580 self
.departed
= departed
4583 class RelationUnitsWatchResult(Type
):
4584 _toSchema
= {'changes': 'changes', 'watcher_id': 'watcher-id', 'error': 'error'}
4585 _toPy
= {'watcher-id': 'watcher_id', 'changes': 'changes', 'error': 'error'}
4586 def __init__(self
, changes
=None, error
=None, watcher_id
=None):
4588 changes : RelationUnitsChange
4592 self
.changes
= RelationUnitsChange
.from_json(changes
) if changes
else None
4593 self
.error
= Error
.from_json(error
) if error
else None
4594 self
.watcher_id
= watcher_id
4597 class UnitSettings(Type
):
4598 _toSchema
= {'version': 'version'}
4599 _toPy
= {'version': 'version'}
4600 def __init__(self
, version
=None):
4604 self
.version
= version
4607 class RetryStrategy(Type
):
4608 _toSchema
= {'max_retry_time': 'max-retry-time', 'should_retry': 'should-retry', 'jitter_retry_time': 'jitter-retry-time', 'min_retry_time': 'min-retry-time', 'retry_time_factor': 'retry-time-factor'}
4609 _toPy
= {'max-retry-time': 'max_retry_time', 'min-retry-time': 'min_retry_time', 'jitter-retry-time': 'jitter_retry_time', 'should-retry': 'should_retry', 'retry-time-factor': 'retry_time_factor'}
4610 def __init__(self
, jitter_retry_time
=None, max_retry_time
=None, min_retry_time
=None, retry_time_factor
=None, should_retry
=None):
4612 jitter_retry_time : bool
4613 max_retry_time : int
4614 min_retry_time : int
4615 retry_time_factor : int
4618 self
.jitter_retry_time
= jitter_retry_time
4619 self
.max_retry_time
= max_retry_time
4620 self
.min_retry_time
= min_retry_time
4621 self
.retry_time_factor
= retry_time_factor
4622 self
.should_retry
= should_retry
4625 class RetryStrategyResult(Type
):
4626 _toSchema
= {'result': 'result', 'error': 'error'}
4627 _toPy
= {'result': 'result', 'error': 'error'}
4628 def __init__(self
, error
=None, result
=None):
4631 result : RetryStrategy
4633 self
.error
= Error
.from_json(error
) if error
else None
4634 self
.result
= RetryStrategy
.from_json(result
) if result
else None
4637 class RetryStrategyResults(Type
):
4638 _toSchema
= {'results': 'results'}
4639 _toPy
= {'results': 'results'}
4640 def __init__(self
, results
=None):
4642 results : typing.Sequence<+T_co>[~RetryStrategyResult]<~RetryStrategyResult>
4644 self
.results
= [RetryStrategyResult
.from_json(o
) for o
in results
or []]
4647 class SSHAddressResult(Type
):
4648 _toSchema
= {'error': 'error', 'address': 'address'}
4649 _toPy
= {'error': 'error', 'address': 'address'}
4650 def __init__(self
, address
=None, error
=None):
4655 self
.address
= address
4656 self
.error
= Error
.from_json(error
) if error
else None
4659 class SSHAddressResults(Type
):
4660 _toSchema
= {'results': 'results'}
4661 _toPy
= {'results': 'results'}
4662 def __init__(self
, results
=None):
4664 results : typing.Sequence<+T_co>[~SSHAddressResult]<~SSHAddressResult>
4666 self
.results
= [SSHAddressResult
.from_json(o
) for o
in results
or []]
4669 class SSHProxyResult(Type
):
4670 _toSchema
= {'use_proxy': 'use-proxy'}
4671 _toPy
= {'use-proxy': 'use_proxy'}
4672 def __init__(self
, use_proxy
=None):
4676 self
.use_proxy
= use_proxy
4679 class SSHPublicKeysResult(Type
):
4680 _toSchema
= {'public_keys': 'public-keys', 'error': 'error'}
4681 _toPy
= {'public-keys': 'public_keys', 'error': 'error'}
4682 def __init__(self
, error
=None, public_keys
=None):
4685 public_keys : typing.Sequence<+T_co>[str]
4687 self
.error
= Error
.from_json(error
) if error
else None
4688 self
.public_keys
= public_keys
4691 class SSHPublicKeysResults(Type
):
4692 _toSchema
= {'results': 'results'}
4693 _toPy
= {'results': 'results'}
4694 def __init__(self
, results
=None):
4696 results : typing.Sequence<+T_co>[~SSHPublicKeysResult]<~SSHPublicKeysResult>
4698 self
.results
= [SSHPublicKeysResult
.from_json(o
) for o
in results
or []]
4701 class SingularClaim(Type
):
4702 _toSchema
= {'model_tag': 'model-tag', 'duration': 'duration', 'controller_tag': 'controller-tag'}
4703 _toPy
= {'model-tag': 'model_tag', 'controller-tag': 'controller_tag', 'duration': 'duration'}
4704 def __init__(self
, controller_tag
=None, duration
=None, model_tag
=None):
4706 controller_tag : str
4710 self
.controller_tag
= controller_tag
4711 self
.duration
= duration
4712 self
.model_tag
= model_tag
4715 class SingularClaims(Type
):
4716 _toSchema
= {'claims': 'claims'}
4717 _toPy
= {'claims': 'claims'}
4718 def __init__(self
, claims
=None):
4720 claims : typing.Sequence<+T_co>[~SingularClaim]<~SingularClaim>
4722 self
.claims
= [SingularClaim
.from_json(o
) for o
in claims
or []]
4725 class ListSpacesResults(Type
):
4726 _toSchema
= {'results': 'results'}
4727 _toPy
= {'results': 'results'}
4728 def __init__(self
, results
=None):
4730 results : typing.Sequence<+T_co>[~Space]<~Space>
4732 self
.results
= [Space
.from_json(o
) for o
in results
or []]
4736 _toSchema
= {'name': 'name', 'subnets': 'subnets', 'error': 'error'}
4737 _toPy
= {'name': 'name', 'subnets': 'subnets', 'error': 'error'}
4738 def __init__(self
, error
=None, name
=None, subnets
=None):
4742 subnets : typing.Sequence<+T_co>[~Subnet]<~Subnet>
4744 self
.error
= Error
.from_json(error
) if error
else None
4746 self
.subnets
= [Subnet
.from_json(o
) for o
in subnets
or []]
4749 class StatusHistoryPruneArgs(Type
):
4750 _toSchema
= {'max_history_time': 'max-history-time', 'max_history_mb': 'max-history-mb'}
4751 _toPy
= {'max-history-mb': 'max_history_mb', 'max-history-time': 'max_history_time'}
4752 def __init__(self
, max_history_mb
=None, max_history_time
=None):
4754 max_history_mb : int
4755 max_history_time : int
4757 self
.max_history_mb
= max_history_mb
4758 self
.max_history_time
= max_history_time
4761 class FilesystemAttachmentInfo(Type
):
4762 _toSchema
= {'read_only': 'read-only', 'mount_point': 'mount-point'}
4763 _toPy
= {'read-only': 'read_only', 'mount-point': 'mount_point'}
4764 def __init__(self
, mount_point
=None, read_only
=None):
4769 self
.mount_point
= mount_point
4770 self
.read_only
= read_only
4773 class FilesystemDetails(Type
):
4774 _toSchema
= {'info': 'info', 'machine_attachments': 'machine-attachments', 'status': 'status', 'storage': 'storage', 'filesystem_tag': 'filesystem-tag', 'volume_tag': 'volume-tag'}
4775 _toPy
= {'info': 'info', 'status': 'status', 'storage': 'storage', 'machine-attachments': 'machine_attachments', 'volume-tag': 'volume_tag', 'filesystem-tag': 'filesystem_tag'}
4776 def __init__(self
, filesystem_tag
=None, info
=None, machine_attachments
=None, status
=None, storage
=None, volume_tag
=None):
4778 filesystem_tag : str
4779 info : FilesystemInfo
4780 machine_attachments : typing.Mapping<~KT, +VT_co>[str, ~FilesystemAttachmentInfo]<~FilesystemAttachmentInfo>
4781 status : EntityStatus
4782 storage : StorageDetails
4785 self
.filesystem_tag
= filesystem_tag
4786 self
.info
= FilesystemInfo
.from_json(info
) if info
else None
4787 self
.machine_attachments
= machine_attachments
4788 self
.status
= EntityStatus
.from_json(status
) if status
else None
4789 self
.storage
= StorageDetails
.from_json(storage
) if storage
else None
4790 self
.volume_tag
= volume_tag
4793 class FilesystemDetailsListResult(Type
):
4794 _toSchema
= {'result': 'result', 'error': 'error'}
4795 _toPy
= {'result': 'result', 'error': 'error'}
4796 def __init__(self
, error
=None, result
=None):
4799 result : typing.Sequence<+T_co>[~FilesystemDetails]<~FilesystemDetails>
4801 self
.error
= Error
.from_json(error
) if error
else None
4802 self
.result
= [FilesystemDetails
.from_json(o
) for o
in result
or []]
4805 class FilesystemDetailsListResults(Type
):
4806 _toSchema
= {'results': 'results'}
4807 _toPy
= {'results': 'results'}
4808 def __init__(self
, results
=None):
4810 results : typing.Sequence<+T_co>[~FilesystemDetailsListResult]<~FilesystemDetailsListResult>
4812 self
.results
= [FilesystemDetailsListResult
.from_json(o
) for o
in results
or []]
4815 class FilesystemFilter(Type
):
4816 _toSchema
= {'machines': 'machines'}
4817 _toPy
= {'machines': 'machines'}
4818 def __init__(self
, machines
=None):
4820 machines : typing.Sequence<+T_co>[str]
4822 self
.machines
= machines
4825 class FilesystemFilters(Type
):
4826 _toSchema
= {'filters': 'filters'}
4827 _toPy
= {'filters': 'filters'}
4828 def __init__(self
, filters
=None):
4830 filters : typing.Sequence<+T_co>[~FilesystemFilter]<~FilesystemFilter>
4832 self
.filters
= [FilesystemFilter
.from_json(o
) for o
in filters
or []]
4835 class FilesystemInfo(Type
):
4836 _toSchema
= {'size': 'size', 'filesystem_id': 'filesystem-id'}
4837 _toPy
= {'size': 'size', 'filesystem-id': 'filesystem_id'}
4838 def __init__(self
, filesystem_id
=None, size
=None):
4843 self
.filesystem_id
= filesystem_id
4847 class StorageAddParams(Type
):
4848 _toSchema
= {'name': 'name', 'unit': 'unit', 'storage': 'storage'}
4849 _toPy
= {'name': 'name', 'unit': 'unit', 'storage': 'storage'}
4850 def __init__(self
, name
=None, storage
=None, unit
=None):
4853 storage : StorageConstraints
4857 self
.storage
= StorageConstraints
.from_json(storage
) if storage
else None
4861 class StorageAttachmentDetails(Type
):
4862 _toSchema
= {'unit_tag': 'unit-tag', 'machine_tag': 'machine-tag', 'storage_tag': 'storage-tag', 'location': 'location'}
4863 _toPy
= {'unit-tag': 'unit_tag', 'machine-tag': 'machine_tag', 'storage-tag': 'storage_tag', 'location': 'location'}
4864 def __init__(self
, location
=None, machine_tag
=None, storage_tag
=None, unit_tag
=None):
4871 self
.location
= location
4872 self
.machine_tag
= machine_tag
4873 self
.storage_tag
= storage_tag
4874 self
.unit_tag
= unit_tag
4877 class StorageConstraints(Type
):
4878 _toSchema
= {'size': 'size', 'pool': 'pool', 'count': 'count'}
4879 _toPy
= {'size': 'size', 'pool': 'pool', 'count': 'count'}
4880 def __init__(self
, count
=None, pool
=None, size
=None):
4891 class StorageDetails(Type
):
4892 _toSchema
= {'kind': 'kind', 'owner_tag': 'owner-tag', 'status': 'status', 'persistent': 'persistent', 'storage_tag': 'storage-tag', 'attachments': 'attachments'}
4893 _toPy
= {'kind': 'kind', 'storage-tag': 'storage_tag', 'status': 'status', 'owner-tag': 'owner_tag', 'persistent': 'persistent', 'attachments': 'attachments'}
4894 def __init__(self
, attachments
=None, kind
=None, owner_tag
=None, persistent
=None, status
=None, storage_tag
=None):
4896 attachments : typing.Mapping<~KT, +VT_co>[str, ~StorageAttachmentDetails]<~StorageAttachmentDetails>
4900 status : EntityStatus
4903 self
.attachments
= attachments
4905 self
.owner_tag
= owner_tag
4906 self
.persistent
= persistent
4907 self
.status
= EntityStatus
.from_json(status
) if status
else None
4908 self
.storage_tag
= storage_tag
4911 class StorageDetailsListResult(Type
):
4912 _toSchema
= {'result': 'result', 'error': 'error'}
4913 _toPy
= {'result': 'result', 'error': 'error'}
4914 def __init__(self
, error
=None, result
=None):
4917 result : typing.Sequence<+T_co>[~StorageDetails]<~StorageDetails>
4919 self
.error
= Error
.from_json(error
) if error
else None
4920 self
.result
= [StorageDetails
.from_json(o
) for o
in result
or []]
4923 class StorageDetailsListResults(Type
):
4924 _toSchema
= {'results': 'results'}
4925 _toPy
= {'results': 'results'}
4926 def __init__(self
, results
=None):
4928 results : typing.Sequence<+T_co>[~StorageDetailsListResult]<~StorageDetailsListResult>
4930 self
.results
= [StorageDetailsListResult
.from_json(o
) for o
in results
or []]
4933 class StorageDetailsResult(Type
):
4934 _toSchema
= {'result': 'result', 'error': 'error'}
4935 _toPy
= {'result': 'result', 'error': 'error'}
4936 def __init__(self
, error
=None, result
=None):
4939 result : StorageDetails
4941 self
.error
= Error
.from_json(error
) if error
else None
4942 self
.result
= StorageDetails
.from_json(result
) if result
else None
4945 class StorageDetailsResults(Type
):
4946 _toSchema
= {'results': 'results'}
4947 _toPy
= {'results': 'results'}
4948 def __init__(self
, results
=None):
4950 results : typing.Sequence<+T_co>[~StorageDetailsResult]<~StorageDetailsResult>
4952 self
.results
= [StorageDetailsResult
.from_json(o
) for o
in results
or []]
4955 class StorageFilter(Type
):
4965 class StorageFilters(Type
):
4966 _toSchema
= {'filters': 'filters'}
4967 _toPy
= {'filters': 'filters'}
4968 def __init__(self
, filters
=None):
4970 filters : typing.Sequence<+T_co>[~StorageFilter]<~StorageFilter>
4972 self
.filters
= [StorageFilter
.from_json(o
) for o
in filters
or []]
4975 class StoragePool(Type
):
4976 _toSchema
= {'name': 'name', 'attrs': 'attrs', 'provider': 'provider'}
4977 _toPy
= {'name': 'name', 'attrs': 'attrs', 'provider': 'provider'}
4978 def __init__(self
, attrs
=None, name
=None, provider
=None):
4980 attrs : typing.Mapping<~KT, +VT_co>[str, typing.Any]
4986 self
.provider
= provider
4989 class StoragePoolFilter(Type
):
4990 _toSchema
= {'names': 'names', 'providers': 'providers'}
4991 _toPy
= {'names': 'names', 'providers': 'providers'}
4992 def __init__(self
, names
=None, providers
=None):
4994 names : typing.Sequence<+T_co>[str]
4995 providers : typing.Sequence<+T_co>[str]
4998 self
.providers
= providers
5001 class StoragePoolFilters(Type
):
5002 _toSchema
= {'filters': 'filters'}
5003 _toPy
= {'filters': 'filters'}
5004 def __init__(self
, filters
=None):
5006 filters : typing.Sequence<+T_co>[~StoragePoolFilter]<~StoragePoolFilter>
5008 self
.filters
= [StoragePoolFilter
.from_json(o
) for o
in filters
or []]
5011 class StoragePoolsResult(Type
):
5012 _toSchema
= {'storage_pools': 'storage-pools', 'error': 'error'}
5013 _toPy
= {'storage-pools': 'storage_pools', 'error': 'error'}
5014 def __init__(self
, error
=None, storage_pools
=None):
5017 storage_pools : typing.Sequence<+T_co>[~StoragePool]<~StoragePool>
5019 self
.error
= Error
.from_json(error
) if error
else None
5020 self
.storage_pools
= [StoragePool
.from_json(o
) for o
in storage_pools
or []]
5023 class StoragePoolsResults(Type
):
5024 _toSchema
= {'results': 'results'}
5025 _toPy
= {'results': 'results'}
5026 def __init__(self
, results
=None):
5028 results : typing.Sequence<+T_co>[~StoragePoolsResult]<~StoragePoolsResult>
5030 self
.results
= [StoragePoolsResult
.from_json(o
) for o
in results
or []]
5033 class StoragesAddParams(Type
):
5034 _toSchema
= {'storages': 'storages'}
5035 _toPy
= {'storages': 'storages'}
5036 def __init__(self
, storages
=None):
5038 storages : typing.Sequence<+T_co>[~StorageAddParams]<~StorageAddParams>
5040 self
.storages
= [StorageAddParams
.from_json(o
) for o
in storages
or []]
5043 class VolumeDetails(Type
):
5044 _toSchema
= {'info': 'info', 'machine_attachments': 'machine-attachments', 'volume_tag': 'volume-tag', 'status': 'status', 'storage': 'storage'}
5045 _toPy
= {'info': 'info', 'status': 'status', 'machine-attachments': 'machine_attachments', 'volume-tag': 'volume_tag', 'storage': 'storage'}
5046 def __init__(self
, info
=None, machine_attachments
=None, status
=None, storage
=None, volume_tag
=None):
5049 machine_attachments : typing.Mapping<~KT, +VT_co>[str, ~VolumeAttachmentInfo]<~VolumeAttachmentInfo>
5050 status : EntityStatus
5051 storage : StorageDetails
5054 self
.info
= VolumeInfo
.from_json(info
) if info
else None
5055 self
.machine_attachments
= machine_attachments
5056 self
.status
= EntityStatus
.from_json(status
) if status
else None
5057 self
.storage
= StorageDetails
.from_json(storage
) if storage
else None
5058 self
.volume_tag
= volume_tag
5061 class VolumeDetailsListResult(Type
):
5062 _toSchema
= {'result': 'result', 'error': 'error'}
5063 _toPy
= {'result': 'result', 'error': 'error'}
5064 def __init__(self
, error
=None, result
=None):
5067 result : typing.Sequence<+T_co>[~VolumeDetails]<~VolumeDetails>
5069 self
.error
= Error
.from_json(error
) if error
else None
5070 self
.result
= [VolumeDetails
.from_json(o
) for o
in result
or []]
5073 class VolumeDetailsListResults(Type
):
5074 _toSchema
= {'results': 'results'}
5075 _toPy
= {'results': 'results'}
5076 def __init__(self
, results
=None):
5078 results : typing.Sequence<+T_co>[~VolumeDetailsListResult]<~VolumeDetailsListResult>
5080 self
.results
= [VolumeDetailsListResult
.from_json(o
) for o
in results
or []]
5083 class VolumeFilter(Type
):
5084 _toSchema
= {'machines': 'machines'}
5085 _toPy
= {'machines': 'machines'}
5086 def __init__(self
, machines
=None):
5088 machines : typing.Sequence<+T_co>[str]
5090 self
.machines
= machines
5093 class VolumeFilters(Type
):
5094 _toSchema
= {'filters': 'filters'}
5095 _toPy
= {'filters': 'filters'}
5096 def __init__(self
, filters
=None):
5098 filters : typing.Sequence<+T_co>[~VolumeFilter]<~VolumeFilter>
5100 self
.filters
= [VolumeFilter
.from_json(o
) for o
in filters
or []]
5103 class BlockDeviceResult(Type
):
5104 _toSchema
= {'result': 'result', 'error': 'error'}
5105 _toPy
= {'result': 'result', 'error': 'error'}
5106 def __init__(self
, error
=None, result
=None):
5109 result : BlockDevice
5111 self
.error
= Error
.from_json(error
) if error
else None
5112 self
.result
= BlockDevice
.from_json(result
) if result
else None
5115 class BlockDeviceResults(Type
):
5116 _toSchema
= {'results': 'results'}
5117 _toPy
= {'results': 'results'}
5118 def __init__(self
, results
=None):
5120 results : typing.Sequence<+T_co>[~BlockDeviceResult]<~BlockDeviceResult>
5122 self
.results
= [BlockDeviceResult
.from_json(o
) for o
in results
or []]
5125 class Filesystem(Type
):
5126 _toSchema
= {'info': 'info', 'filesystem_tag': 'filesystem-tag', 'volume_tag': 'volume-tag'}
5127 _toPy
= {'info': 'info', 'volume-tag': 'volume_tag', 'filesystem-tag': 'filesystem_tag'}
5128 def __init__(self
, filesystem_tag
=None, info
=None, volume_tag
=None):
5130 filesystem_tag : str
5131 info : FilesystemInfo
5134 self
.filesystem_tag
= filesystem_tag
5135 self
.info
= FilesystemInfo
.from_json(info
) if info
else None
5136 self
.volume_tag
= volume_tag
5139 class FilesystemAttachment(Type
):
5140 _toSchema
= {'info': 'info', 'filesystem_tag': 'filesystem-tag', 'machine_tag': 'machine-tag'}
5141 _toPy
= {'info': 'info', 'machine-tag': 'machine_tag', 'filesystem-tag': 'filesystem_tag'}
5142 def __init__(self
, filesystem_tag
=None, info
=None, machine_tag
=None):
5144 filesystem_tag : str
5145 info : FilesystemAttachmentInfo
5148 self
.filesystem_tag
= filesystem_tag
5149 self
.info
= FilesystemAttachmentInfo
.from_json(info
) if info
else None
5150 self
.machine_tag
= machine_tag
5153 class FilesystemAttachmentParams(Type
):
5154 _toSchema
= {'read_only': 'read-only', 'machine_tag': 'machine-tag', 'instance_id': 'instance-id', 'filesystem_id': 'filesystem-id', 'filesystem_tag': 'filesystem-tag', 'mount_point': 'mount-point', 'provider': 'provider'}
5155 _toPy
= {'instance-id': 'instance_id', 'provider': 'provider', 'read-only': 'read_only', 'machine-tag': 'machine_tag', 'filesystem-id': 'filesystem_id', 'mount-point': 'mount_point', 'filesystem-tag': 'filesystem_tag'}
5156 def __init__(self
, filesystem_id
=None, filesystem_tag
=None, instance_id
=None, machine_tag
=None, mount_point
=None, provider
=None, read_only
=None):
5159 filesystem_tag : str
5166 self
.filesystem_id
= filesystem_id
5167 self
.filesystem_tag
= filesystem_tag
5168 self
.instance_id
= instance_id
5169 self
.machine_tag
= machine_tag
5170 self
.mount_point
= mount_point
5171 self
.provider
= provider
5172 self
.read_only
= read_only
5175 class FilesystemAttachmentParamsResult(Type
):
5176 _toSchema
= {'result': 'result', 'error': 'error'}
5177 _toPy
= {'result': 'result', 'error': 'error'}
5178 def __init__(self
, error
=None, result
=None):
5181 result : FilesystemAttachmentParams
5183 self
.error
= Error
.from_json(error
) if error
else None
5184 self
.result
= FilesystemAttachmentParams
.from_json(result
) if result
else None
5187 class FilesystemAttachmentParamsResults(Type
):
5188 _toSchema
= {'results': 'results'}
5189 _toPy
= {'results': 'results'}
5190 def __init__(self
, results
=None):
5192 results : typing.Sequence<+T_co>[~FilesystemAttachmentParamsResult]<~FilesystemAttachmentParamsResult>
5194 self
.results
= [FilesystemAttachmentParamsResult
.from_json(o
) for o
in results
or []]
5197 class FilesystemAttachmentResult(Type
):
5198 _toSchema
= {'result': 'result', 'error': 'error'}
5199 _toPy
= {'result': 'result', 'error': 'error'}
5200 def __init__(self
, error
=None, result
=None):
5203 result : FilesystemAttachment
5205 self
.error
= Error
.from_json(error
) if error
else None
5206 self
.result
= FilesystemAttachment
.from_json(result
) if result
else None
5209 class FilesystemAttachmentResults(Type
):
5210 _toSchema
= {'results': 'results'}
5211 _toPy
= {'results': 'results'}
5212 def __init__(self
, results
=None):
5214 results : typing.Sequence<+T_co>[~FilesystemAttachmentResult]<~FilesystemAttachmentResult>
5216 self
.results
= [FilesystemAttachmentResult
.from_json(o
) for o
in results
or []]
5219 class FilesystemAttachments(Type
):
5220 _toSchema
= {'filesystem_attachments': 'filesystem-attachments'}
5221 _toPy
= {'filesystem-attachments': 'filesystem_attachments'}
5222 def __init__(self
, filesystem_attachments
=None):
5224 filesystem_attachments : typing.Sequence<+T_co>[~FilesystemAttachment]<~FilesystemAttachment>
5226 self
.filesystem_attachments
= [FilesystemAttachment
.from_json(o
) for o
in filesystem_attachments
or []]
5229 class FilesystemParams(Type
):
5230 _toSchema
= {'attachment': 'attachment', 'size': 'size', 'tags': 'tags', 'attributes': 'attributes', 'filesystem_tag': 'filesystem-tag', 'volume_tag': 'volume-tag', 'provider': 'provider'}
5231 _toPy
= {'attachment': 'attachment', 'size': 'size', 'tags': 'tags', 'attributes': 'attributes', 'provider': 'provider', 'volume-tag': 'volume_tag', 'filesystem-tag': 'filesystem_tag'}
5232 def __init__(self
, attachment
=None, attributes
=None, filesystem_tag
=None, provider
=None, size
=None, tags
=None, volume_tag
=None):
5234 attachment : FilesystemAttachmentParams
5235 attributes : typing.Mapping<~KT, +VT_co>[str, typing.Any]
5236 filesystem_tag : str
5239 tags : typing.Mapping<~KT, +VT_co>[str, str]
5242 self
.attachment
= FilesystemAttachmentParams
.from_json(attachment
) if attachment
else None
5243 self
.attributes
= attributes
5244 self
.filesystem_tag
= filesystem_tag
5245 self
.provider
= provider
5248 self
.volume_tag
= volume_tag
5251 class FilesystemParamsResult(Type
):
5252 _toSchema
= {'result': 'result', 'error': 'error'}
5253 _toPy
= {'result': 'result', 'error': 'error'}
5254 def __init__(self
, error
=None, result
=None):
5257 result : FilesystemParams
5259 self
.error
= Error
.from_json(error
) if error
else None
5260 self
.result
= FilesystemParams
.from_json(result
) if result
else None
5263 class FilesystemParamsResults(Type
):
5264 _toSchema
= {'results': 'results'}
5265 _toPy
= {'results': 'results'}
5266 def __init__(self
, results
=None):
5268 results : typing.Sequence<+T_co>[~FilesystemParamsResult]<~FilesystemParamsResult>
5270 self
.results
= [FilesystemParamsResult
.from_json(o
) for o
in results
or []]
5273 class FilesystemResult(Type
):
5274 _toSchema
= {'result': 'result', 'error': 'error'}
5275 _toPy
= {'result': 'result', 'error': 'error'}
5276 def __init__(self
, error
=None, result
=None):
5281 self
.error
= Error
.from_json(error
) if error
else None
5282 self
.result
= Filesystem
.from_json(result
) if result
else None
5285 class FilesystemResults(Type
):
5286 _toSchema
= {'results': 'results'}
5287 _toPy
= {'results': 'results'}
5288 def __init__(self
, results
=None):
5290 results : typing.Sequence<+T_co>[~FilesystemResult]<~FilesystemResult>
5292 self
.results
= [FilesystemResult
.from_json(o
) for o
in results
or []]
5295 class Filesystems(Type
):
5296 _toSchema
= {'filesystems': 'filesystems'}
5297 _toPy
= {'filesystems': 'filesystems'}
5298 def __init__(self
, filesystems
=None):
5300 filesystems : typing.Sequence<+T_co>[~Filesystem]<~Filesystem>
5302 self
.filesystems
= [Filesystem
.from_json(o
) for o
in filesystems
or []]
5305 class MachineStorageIds(Type
):
5306 _toSchema
= {'ids': 'ids'}
5307 _toPy
= {'ids': 'ids'}
5308 def __init__(self
, ids
=None):
5310 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
5312 self
.ids
= [MachineStorageId
.from_json(o
) for o
in ids
or []]
5315 class MachineStorageIdsWatchResults(Type
):
5316 _toSchema
= {'results': 'results'}
5317 _toPy
= {'results': 'results'}
5318 def __init__(self
, results
=None):
5320 results : typing.Sequence<+T_co>[~MachineStorageIdsWatchResult]<~MachineStorageIdsWatchResult>
5322 self
.results
= [MachineStorageIdsWatchResult
.from_json(o
) for o
in results
or []]
5325 class VolumeAttachment(Type
):
5326 _toSchema
= {'info': 'info', 'machine_tag': 'machine-tag', 'volume_tag': 'volume-tag'}
5327 _toPy
= {'info': 'info', 'machine-tag': 'machine_tag', 'volume-tag': 'volume_tag'}
5328 def __init__(self
, info
=None, machine_tag
=None, volume_tag
=None):
5330 info : VolumeAttachmentInfo
5334 self
.info
= VolumeAttachmentInfo
.from_json(info
) if info
else None
5335 self
.machine_tag
= machine_tag
5336 self
.volume_tag
= volume_tag
5339 class VolumeAttachmentParamsResult(Type
):
5340 _toSchema
= {'result': 'result', 'error': 'error'}
5341 _toPy
= {'result': 'result', 'error': 'error'}
5342 def __init__(self
, error
=None, result
=None):
5345 result : VolumeAttachmentParams
5347 self
.error
= Error
.from_json(error
) if error
else None
5348 self
.result
= VolumeAttachmentParams
.from_json(result
) if result
else None
5351 class VolumeAttachmentParamsResults(Type
):
5352 _toSchema
= {'results': 'results'}
5353 _toPy
= {'results': 'results'}
5354 def __init__(self
, results
=None):
5356 results : typing.Sequence<+T_co>[~VolumeAttachmentParamsResult]<~VolumeAttachmentParamsResult>
5358 self
.results
= [VolumeAttachmentParamsResult
.from_json(o
) for o
in results
or []]
5361 class VolumeAttachmentResult(Type
):
5362 _toSchema
= {'result': 'result', 'error': 'error'}
5363 _toPy
= {'result': 'result', 'error': 'error'}
5364 def __init__(self
, error
=None, result
=None):
5367 result : VolumeAttachment
5369 self
.error
= Error
.from_json(error
) if error
else None
5370 self
.result
= VolumeAttachment
.from_json(result
) if result
else None
5373 class VolumeAttachmentResults(Type
):
5374 _toSchema
= {'results': 'results'}
5375 _toPy
= {'results': 'results'}
5376 def __init__(self
, results
=None):
5378 results : typing.Sequence<+T_co>[~VolumeAttachmentResult]<~VolumeAttachmentResult>
5380 self
.results
= [VolumeAttachmentResult
.from_json(o
) for o
in results
or []]
5383 class VolumeAttachments(Type
):
5384 _toSchema
= {'volume_attachments': 'volume-attachments'}
5385 _toPy
= {'volume-attachments': 'volume_attachments'}
5386 def __init__(self
, volume_attachments
=None):
5388 volume_attachments : typing.Sequence<+T_co>[~VolumeAttachment]<~VolumeAttachment>
5390 self
.volume_attachments
= [VolumeAttachment
.from_json(o
) for o
in volume_attachments
or []]
5393 class VolumeParamsResult(Type
):
5394 _toSchema
= {'result': 'result', 'error': 'error'}
5395 _toPy
= {'result': 'result', 'error': 'error'}
5396 def __init__(self
, error
=None, result
=None):
5399 result : VolumeParams
5401 self
.error
= Error
.from_json(error
) if error
else None
5402 self
.result
= VolumeParams
.from_json(result
) if result
else None
5405 class VolumeParamsResults(Type
):
5406 _toSchema
= {'results': 'results'}
5407 _toPy
= {'results': 'results'}
5408 def __init__(self
, results
=None):
5410 results : typing.Sequence<+T_co>[~VolumeParamsResult]<~VolumeParamsResult>
5412 self
.results
= [VolumeParamsResult
.from_json(o
) for o
in results
or []]
5415 class VolumeResult(Type
):
5416 _toSchema
= {'result': 'result', 'error': 'error'}
5417 _toPy
= {'result': 'result', 'error': 'error'}
5418 def __init__(self
, error
=None, result
=None):
5423 self
.error
= Error
.from_json(error
) if error
else None
5424 self
.result
= Volume
.from_json(result
) if result
else None
5427 class VolumeResults(Type
):
5428 _toSchema
= {'results': 'results'}
5429 _toPy
= {'results': 'results'}
5430 def __init__(self
, results
=None):
5432 results : typing.Sequence<+T_co>[~VolumeResult]<~VolumeResult>
5434 self
.results
= [VolumeResult
.from_json(o
) for o
in results
or []]
5437 class Volumes(Type
):
5438 _toSchema
= {'volumes': 'volumes'}
5439 _toPy
= {'volumes': 'volumes'}
5440 def __init__(self
, volumes
=None):
5442 volumes : typing.Sequence<+T_co>[~Volume]<~Volume>
5444 self
.volumes
= [Volume
.from_json(o
) for o
in volumes
or []]
5447 class SpaceResult(Type
):
5448 _toSchema
= {'tag': 'tag', 'error': 'error'}
5449 _toPy
= {'tag': 'tag', 'error': 'error'}
5450 def __init__(self
, error
=None, tag
=None):
5455 self
.error
= Error
.from_json(error
) if error
else None
5459 class SpaceResults(Type
):
5460 _toSchema
= {'results': 'results'}
5461 _toPy
= {'results': 'results'}
5462 def __init__(self
, results
=None):
5464 results : typing.Sequence<+T_co>[~SpaceResult]<~SpaceResult>
5466 self
.results
= [SpaceResult
.from_json(o
) for o
in results
or []]
5469 class ZoneResult(Type
):
5470 _toSchema
= {'name': 'name', 'available': 'available', 'error': 'error'}
5471 _toPy
= {'name': 'name', 'available': 'available', 'error': 'error'}
5472 def __init__(self
, available
=None, error
=None, name
=None):
5478 self
.available
= available
5479 self
.error
= Error
.from_json(error
) if error
else None
5483 class ZoneResults(Type
):
5484 _toSchema
= {'results': 'results'}
5485 _toPy
= {'results': 'results'}
5486 def __init__(self
, results
=None):
5488 results : typing.Sequence<+T_co>[~ZoneResult]<~ZoneResult>
5490 self
.results
= [ZoneResult
.from_json(o
) for o
in results
or []]
5493 class UndertakerModelInfo(Type
):
5494 _toSchema
= {'is_system': 'is-system', 'life': 'life', 'uuid': 'uuid', 'global_name': 'global-name', 'name': 'name'}
5495 _toPy
= {'global-name': 'global_name', 'is-system': 'is_system', 'uuid': 'uuid', 'life': 'life', 'name': 'name'}
5496 def __init__(self
, global_name
=None, is_system
=None, life
=None, name
=None, uuid
=None):
5504 self
.global_name
= global_name
5505 self
.is_system
= is_system
5511 class UndertakerModelInfoResult(Type
):
5512 _toSchema
= {'result': 'result', 'error': 'error'}
5513 _toPy
= {'result': 'result', 'error': 'error'}
5514 def __init__(self
, error
=None, result
=None):
5517 result : UndertakerModelInfo
5519 self
.error
= Error
.from_json(error
) if error
else None
5520 self
.result
= UndertakerModelInfo
.from_json(result
) if result
else None
5523 class ApplicationStatusResult(Type
):
5524 _toSchema
= {'application': 'application', 'units': 'units', 'error': 'error'}
5525 _toPy
= {'application': 'application', 'units': 'units', 'error': 'error'}
5526 def __init__(self
, application
=None, error
=None, units
=None):
5528 application : StatusResult
5530 units : typing.Mapping<~KT, +VT_co>[str, ~StatusResult]<~StatusResult>
5532 self
.application
= StatusResult
.from_json(application
) if application
else None
5533 self
.error
= Error
.from_json(error
) if error
else None
5537 class ApplicationStatusResults(Type
):
5538 _toSchema
= {'results': 'results'}
5539 _toPy
= {'results': 'results'}
5540 def __init__(self
, results
=None):
5542 results : typing.Sequence<+T_co>[~ApplicationStatusResult]<~ApplicationStatusResult>
5544 self
.results
= [ApplicationStatusResult
.from_json(o
) for o
in results
or []]
5547 class CharmURLs(Type
):
5548 _toSchema
= {'urls': 'urls'}
5549 _toPy
= {'urls': 'urls'}
5550 def __init__(self
, urls
=None):
5552 urls : typing.Sequence<+T_co>[~CharmURL]<~CharmURL>
5554 self
.urls
= [CharmURL
.from_json(o
) for o
in urls
or []]
5557 class ConfigSettingsResult(Type
):
5558 _toSchema
= {'settings': 'settings', 'error': 'error'}
5559 _toPy
= {'settings': 'settings', 'error': 'error'}
5560 def __init__(self
, error
=None, settings
=None):
5563 settings : typing.Mapping<~KT, +VT_co>[str, typing.Any]
5565 self
.error
= Error
.from_json(error
) if error
else None
5566 self
.settings
= settings
5569 class ConfigSettingsResults(Type
):
5570 _toSchema
= {'results': 'results'}
5571 _toPy
= {'results': 'results'}
5572 def __init__(self
, results
=None):
5574 results : typing.Sequence<+T_co>[~ConfigSettingsResult]<~ConfigSettingsResult>
5576 self
.results
= [ConfigSettingsResult
.from_json(o
) for o
in results
or []]
5579 class Endpoint(Type
):
5580 _toSchema
= {'relation': 'relation', 'application_name': 'application-name'}
5581 _toPy
= {'relation': 'relation', 'application-name': 'application_name'}
5582 def __init__(self
, application_name
=None, relation
=None):
5584 application_name : str
5585 relation : CharmRelation
5587 self
.application_name
= application_name
5588 self
.relation
= CharmRelation
.from_json(relation
) if relation
else None
5591 class EntitiesCharmURL(Type
):
5592 _toSchema
= {'entities': 'entities'}
5593 _toPy
= {'entities': 'entities'}
5594 def __init__(self
, entities
=None):
5596 entities : typing.Sequence<+T_co>[~EntityCharmURL]<~EntityCharmURL>
5598 self
.entities
= [EntityCharmURL
.from_json(o
) for o
in entities
or []]
5601 class EntitiesPortRanges(Type
):
5602 _toSchema
= {'entities': 'entities'}
5603 _toPy
= {'entities': 'entities'}
5604 def __init__(self
, entities
=None):
5606 entities : typing.Sequence<+T_co>[~EntityPortRange]<~EntityPortRange>
5608 self
.entities
= [EntityPortRange
.from_json(o
) for o
in entities
or []]
5611 class EntityCharmURL(Type
):
5612 _toSchema
= {'tag': 'tag', 'charm_url': 'charm-url'}
5613 _toPy
= {'charm-url': 'charm_url', 'tag': 'tag'}
5614 def __init__(self
, charm_url
=None, tag
=None):
5619 self
.charm_url
= charm_url
5623 class EntityPortRange(Type
):
5624 _toSchema
= {'from_port': 'from-port', 'to_port': 'to-port', 'tag': 'tag', 'protocol': 'protocol'}
5625 _toPy
= {'from-port': 'from_port', 'tag': 'tag', 'protocol': 'protocol', 'to-port': 'to_port'}
5626 def __init__(self
, from_port
=None, protocol
=None, tag
=None, to_port
=None):
5633 self
.from_port
= from_port
5634 self
.protocol
= protocol
5636 self
.to_port
= to_port
5639 class EntityWorkloadVersion(Type
):
5640 _toSchema
= {'tag': 'tag', 'workload_version': 'workload-version'}
5641 _toPy
= {'tag': 'tag', 'workload-version': 'workload_version'}
5642 def __init__(self
, tag
=None, workload_version
=None):
5645 workload_version : str
5648 self
.workload_version
= workload_version
5651 class EntityWorkloadVersions(Type
):
5652 _toSchema
= {'entities': 'entities'}
5653 _toPy
= {'entities': 'entities'}
5654 def __init__(self
, entities
=None):
5656 entities : typing.Sequence<+T_co>[~EntityWorkloadVersion]<~EntityWorkloadVersion>
5658 self
.entities
= [EntityWorkloadVersion
.from_json(o
) for o
in entities
or []]
5661 class GetLeadershipSettingsBulkResults(Type
):
5662 _toSchema
= {'results': 'results'}
5663 _toPy
= {'results': 'results'}
5664 def __init__(self
, results
=None):
5666 results : typing.Sequence<+T_co>[~GetLeadershipSettingsResult]<~GetLeadershipSettingsResult>
5668 self
.results
= [GetLeadershipSettingsResult
.from_json(o
) for o
in results
or []]
5671 class GetLeadershipSettingsResult(Type
):
5672 _toSchema
= {'settings': 'settings', 'error': 'error'}
5673 _toPy
= {'settings': 'settings', 'error': 'error'}
5674 def __init__(self
, error
=None, settings
=None):
5677 settings : typing.Mapping<~KT, +VT_co>[str, str]
5679 self
.error
= Error
.from_json(error
) if error
else None
5680 self
.settings
= settings
5683 class IntResult(Type
):
5684 _toSchema
= {'result': 'result', 'error': 'error'}
5685 _toPy
= {'result': 'result', 'error': 'error'}
5686 def __init__(self
, error
=None, result
=None):
5691 self
.error
= Error
.from_json(error
) if error
else None
5692 self
.result
= result
5695 class IntResults(Type
):
5696 _toSchema
= {'results': 'results'}
5697 _toPy
= {'results': 'results'}
5698 def __init__(self
, results
=None):
5700 results : typing.Sequence<+T_co>[~IntResult]<~IntResult>
5702 self
.results
= [IntResult
.from_json(o
) for o
in results
or []]
5705 class MergeLeadershipSettingsBulkParams(Type
):
5706 _toSchema
= {'params': 'params'}
5707 _toPy
= {'params': 'params'}
5708 def __init__(self
, params
=None):
5710 params : typing.Sequence<+T_co>[~MergeLeadershipSettingsParam]<~MergeLeadershipSettingsParam>
5712 self
.params
= [MergeLeadershipSettingsParam
.from_json(o
) for o
in params
or []]
5715 class MergeLeadershipSettingsParam(Type
):
5716 _toSchema
= {'settings': 'settings', 'application_tag': 'application-tag'}
5717 _toPy
= {'application-tag': 'application_tag', 'settings': 'settings'}
5718 def __init__(self
, application_tag
=None, settings
=None):
5720 application_tag : str
5721 settings : typing.Mapping<~KT, +VT_co>[str, str]
5723 self
.application_tag
= application_tag
5724 self
.settings
= settings
5727 class ModelResult(Type
):
5728 _toSchema
= {'name': 'name', 'uuid': 'uuid', 'error': 'error'}
5729 _toPy
= {'name': 'name', 'uuid': 'uuid', 'error': 'error'}
5730 def __init__(self
, error
=None, name
=None, uuid
=None):
5736 self
.error
= Error
.from_json(error
) if error
else None
5741 class RelationIds(Type
):
5742 _toSchema
= {'relation_ids': 'relation-ids'}
5743 _toPy
= {'relation-ids': 'relation_ids'}
5744 def __init__(self
, relation_ids
=None):
5746 relation_ids : typing.Sequence<+T_co>[int]
5748 self
.relation_ids
= relation_ids
5751 class RelationResult(Type
):
5752 _toSchema
= {'life': 'life', 'endpoint': 'endpoint', 'id_': 'id', 'key': 'key', 'error': 'error'}
5753 _toPy
= {'life': 'life', 'endpoint': 'endpoint', 'id': 'id_', 'key': 'key', 'error': 'error'}
5754 def __init__(self
, endpoint
=None, error
=None, id_
=None, key
=None, life
=None):
5762 self
.endpoint
= Endpoint
.from_json(endpoint
) if endpoint
else None
5763 self
.error
= Error
.from_json(error
) if error
else None
5769 class RelationResults(Type
):
5770 _toSchema
= {'results': 'results'}
5771 _toPy
= {'results': 'results'}
5772 def __init__(self
, results
=None):
5774 results : typing.Sequence<+T_co>[~RelationResult]<~RelationResult>
5776 self
.results
= [RelationResult
.from_json(o
) for o
in results
or []]
5779 class RelationUnit(Type
):
5780 _toSchema
= {'relation': 'relation', 'unit': 'unit'}
5781 _toPy
= {'relation': 'relation', 'unit': 'unit'}
5782 def __init__(self
, relation
=None, unit
=None):
5787 self
.relation
= relation
5791 class RelationUnitPair(Type
):
5792 _toSchema
= {'relation': 'relation', 'local_unit': 'local-unit', 'remote_unit': 'remote-unit'}
5793 _toPy
= {'remote-unit': 'remote_unit', 'local-unit': 'local_unit', 'relation': 'relation'}
5794 def __init__(self
, local_unit
=None, relation
=None, remote_unit
=None):
5800 self
.local_unit
= local_unit
5801 self
.relation
= relation
5802 self
.remote_unit
= remote_unit
5805 class RelationUnitPairs(Type
):
5806 _toSchema
= {'relation_unit_pairs': 'relation-unit-pairs'}
5807 _toPy
= {'relation-unit-pairs': 'relation_unit_pairs'}
5808 def __init__(self
, relation_unit_pairs
=None):
5810 relation_unit_pairs : typing.Sequence<+T_co>[~RelationUnitPair]<~RelationUnitPair>
5812 self
.relation_unit_pairs
= [RelationUnitPair
.from_json(o
) for o
in relation_unit_pairs
or []]
5815 class RelationUnitSettings(Type
):
5816 _toSchema
= {'relation': 'relation', 'settings': 'settings', 'unit': 'unit'}
5817 _toPy
= {'relation': 'relation', 'settings': 'settings', 'unit': 'unit'}
5818 def __init__(self
, relation
=None, settings
=None, unit
=None):
5821 settings : typing.Mapping<~KT, +VT_co>[str, str]
5824 self
.relation
= relation
5825 self
.settings
= settings
5829 class RelationUnits(Type
):
5830 _toSchema
= {'relation_units': 'relation-units'}
5831 _toPy
= {'relation-units': 'relation_units'}
5832 def __init__(self
, relation_units
=None):
5834 relation_units : typing.Sequence<+T_co>[~RelationUnit]<~RelationUnit>
5836 self
.relation_units
= [RelationUnit
.from_json(o
) for o
in relation_units
or []]
5839 class RelationUnitsSettings(Type
):
5840 _toSchema
= {'relation_units': 'relation-units'}
5841 _toPy
= {'relation-units': 'relation_units'}
5842 def __init__(self
, relation_units
=None):
5844 relation_units : typing.Sequence<+T_co>[~RelationUnitSettings]<~RelationUnitSettings>
5846 self
.relation_units
= [RelationUnitSettings
.from_json(o
) for o
in relation_units
or []]
5849 class RelationUnitsWatchResults(Type
):
5850 _toSchema
= {'results': 'results'}
5851 _toPy
= {'results': 'results'}
5852 def __init__(self
, results
=None):
5854 results : typing.Sequence<+T_co>[~RelationUnitsWatchResult]<~RelationUnitsWatchResult>
5856 self
.results
= [RelationUnitsWatchResult
.from_json(o
) for o
in results
or []]
5859 class ResolvedModeResult(Type
):
5860 _toSchema
= {'mode': 'mode', 'error': 'error'}
5861 _toPy
= {'mode': 'mode', 'error': 'error'}
5862 def __init__(self
, error
=None, mode
=None):
5867 self
.error
= Error
.from_json(error
) if error
else None
5871 class ResolvedModeResults(Type
):
5872 _toSchema
= {'results': 'results'}
5873 _toPy
= {'results': 'results'}
5874 def __init__(self
, results
=None):
5876 results : typing.Sequence<+T_co>[~ResolvedModeResult]<~ResolvedModeResult>
5878 self
.results
= [ResolvedModeResult
.from_json(o
) for o
in results
or []]
5881 class SettingsResult(Type
):
5882 _toSchema
= {'settings': 'settings', 'error': 'error'}
5883 _toPy
= {'settings': 'settings', 'error': 'error'}
5884 def __init__(self
, error
=None, settings
=None):
5887 settings : typing.Mapping<~KT, +VT_co>[str, str]
5889 self
.error
= Error
.from_json(error
) if error
else None
5890 self
.settings
= settings
5893 class SettingsResults(Type
):
5894 _toSchema
= {'results': 'results'}
5895 _toPy
= {'results': 'results'}
5896 def __init__(self
, results
=None):
5898 results : typing.Sequence<+T_co>[~SettingsResult]<~SettingsResult>
5900 self
.results
= [SettingsResult
.from_json(o
) for o
in results
or []]
5903 class StorageAttachment(Type
):
5904 _toSchema
= {'kind': 'kind', 'owner_tag': 'owner-tag', 'location': 'location', 'life': 'life', 'storage_tag': 'storage-tag', 'unit_tag': 'unit-tag'}
5905 _toPy
= {'kind': 'kind', 'storage-tag': 'storage_tag', 'location': 'location', 'life': 'life', 'owner-tag': 'owner_tag', 'unit-tag': 'unit_tag'}
5906 def __init__(self
, kind
=None, life
=None, location
=None, owner_tag
=None, storage_tag
=None, unit_tag
=None):
5917 self
.location
= location
5918 self
.owner_tag
= owner_tag
5919 self
.storage_tag
= storage_tag
5920 self
.unit_tag
= unit_tag
5923 class StorageAttachmentId(Type
):
5924 _toSchema
= {'storage_tag': 'storage-tag', 'unit_tag': 'unit-tag'}
5925 _toPy
= {'unit-tag': 'unit_tag', 'storage-tag': 'storage_tag'}
5926 def __init__(self
, storage_tag
=None, unit_tag
=None):
5931 self
.storage_tag
= storage_tag
5932 self
.unit_tag
= unit_tag
5935 class StorageAttachmentIds(Type
):
5936 _toSchema
= {'ids': 'ids'}
5937 _toPy
= {'ids': 'ids'}
5938 def __init__(self
, ids
=None):
5940 ids : typing.Sequence<+T_co>[~StorageAttachmentId]<~StorageAttachmentId>
5942 self
.ids
= [StorageAttachmentId
.from_json(o
) for o
in ids
or []]
5945 class StorageAttachmentIdsResult(Type
):
5946 _toSchema
= {'result': 'result', 'error': 'error'}
5947 _toPy
= {'result': 'result', 'error': 'error'}
5948 def __init__(self
, error
=None, result
=None):
5951 result : StorageAttachmentIds
5953 self
.error
= Error
.from_json(error
) if error
else None
5954 self
.result
= StorageAttachmentIds
.from_json(result
) if result
else None
5957 class StorageAttachmentIdsResults(Type
):
5958 _toSchema
= {'results': 'results'}
5959 _toPy
= {'results': 'results'}
5960 def __init__(self
, results
=None):
5962 results : typing.Sequence<+T_co>[~StorageAttachmentIdsResult]<~StorageAttachmentIdsResult>
5964 self
.results
= [StorageAttachmentIdsResult
.from_json(o
) for o
in results
or []]
5967 class StorageAttachmentResult(Type
):
5968 _toSchema
= {'result': 'result', 'error': 'error'}
5969 _toPy
= {'result': 'result', 'error': 'error'}
5970 def __init__(self
, error
=None, result
=None):
5973 result : StorageAttachment
5975 self
.error
= Error
.from_json(error
) if error
else None
5976 self
.result
= StorageAttachment
.from_json(result
) if result
else None
5979 class StorageAttachmentResults(Type
):
5980 _toSchema
= {'results': 'results'}
5981 _toPy
= {'results': 'results'}
5982 def __init__(self
, results
=None):
5984 results : typing.Sequence<+T_co>[~StorageAttachmentResult]<~StorageAttachmentResult>
5986 self
.results
= [StorageAttachmentResult
.from_json(o
) for o
in results
or []]
5989 class StringBoolResult(Type
):
5990 _toSchema
= {'result': 'result', 'ok': 'ok', 'error': 'error'}
5991 _toPy
= {'result': 'result', 'ok': 'ok', 'error': 'error'}
5992 def __init__(self
, error
=None, ok
=None, result
=None):
5998 self
.error
= Error
.from_json(error
) if error
else None
6000 self
.result
= result
6003 class StringBoolResults(Type
):
6004 _toSchema
= {'results': 'results'}
6005 _toPy
= {'results': 'results'}
6006 def __init__(self
, results
=None):
6008 results : typing.Sequence<+T_co>[~StringBoolResult]<~StringBoolResult>
6010 self
.results
= [StringBoolResult
.from_json(o
) for o
in results
or []]
6013 class UnitNetworkConfig(Type
):
6014 _toSchema
= {'binding_name': 'binding-name', 'unit_tag': 'unit-tag'}
6015 _toPy
= {'binding-name': 'binding_name', 'unit-tag': 'unit_tag'}
6016 def __init__(self
, binding_name
=None, unit_tag
=None):
6021 self
.binding_name
= binding_name
6022 self
.unit_tag
= unit_tag
6025 class UnitNetworkConfigResult(Type
):
6026 _toSchema
= {'info': 'info', 'error': 'error'}
6027 _toPy
= {'info': 'info', 'error': 'error'}
6028 def __init__(self
, error
=None, info
=None):
6031 info : typing.Sequence<+T_co>[~NetworkConfig]<~NetworkConfig>
6033 self
.error
= Error
.from_json(error
) if error
else None
6034 self
.info
= [NetworkConfig
.from_json(o
) for o
in info
or []]
6037 class UnitNetworkConfigResults(Type
):
6038 _toSchema
= {'results': 'results'}
6039 _toPy
= {'results': 'results'}
6040 def __init__(self
, results
=None):
6042 results : typing.Sequence<+T_co>[~UnitNetworkConfigResult]<~UnitNetworkConfigResult>
6044 self
.results
= [UnitNetworkConfigResult
.from_json(o
) for o
in results
or []]
6047 class UnitsNetworkConfig(Type
):
6048 _toSchema
= {'args': 'args'}
6049 _toPy
= {'args': 'args'}
6050 def __init__(self
, args
=None):
6052 args : typing.Sequence<+T_co>[~UnitNetworkConfig]<~UnitNetworkConfig>
6054 self
.args
= [UnitNetworkConfig
.from_json(o
) for o
in args
or []]
6057 class EntitiesVersion(Type
):
6058 _toSchema
= {'agent_tools': 'agent-tools'}
6059 _toPy
= {'agent-tools': 'agent_tools'}
6060 def __init__(self
, agent_tools
=None):
6062 agent_tools : typing.Sequence<+T_co>[~EntityVersion]<~EntityVersion>
6064 self
.agent_tools
= [EntityVersion
.from_json(o
) for o
in agent_tools
or []]
6067 class EntityVersion(Type
):
6068 _toSchema
= {'tag': 'tag', 'tools': 'tools'}
6069 _toPy
= {'tag': 'tag', 'tools': 'tools'}
6070 def __init__(self
, tag
=None, tools
=None):
6076 self
.tools
= Version
.from_json(tools
) if tools
else None
6079 class VersionResult(Type
):
6080 _toSchema
= {'version': 'version', 'error': 'error'}
6081 _toPy
= {'version': 'version', 'error': 'error'}
6082 def __init__(self
, error
=None, version
=None):
6087 self
.error
= Error
.from_json(error
) if error
else None
6088 self
.version
= Number
.from_json(version
) if version
else None
6091 class VersionResults(Type
):
6092 _toSchema
= {'results': 'results'}
6093 _toPy
= {'results': 'results'}
6094 def __init__(self
, results
=None):
6096 results : typing.Sequence<+T_co>[~VersionResult]<~VersionResult>
6098 self
.results
= [VersionResult
.from_json(o
) for o
in results
or []]
6101 class AddUser(Type
):
6102 _toSchema
= {'display_name': 'display-name', 'username': 'username', 'password': 'password'}
6103 _toPy
= {'display-name': 'display_name', 'password': 'password', 'username': 'username'}
6104 def __init__(self
, display_name
=None, password
=None, username
=None):
6110 self
.display_name
= display_name
6111 self
.password
= password
6112 self
.username
= username
6115 class AddUserResult(Type
):
6116 _toSchema
= {'secret_key': 'secret-key', 'tag': 'tag', 'error': 'error'}
6117 _toPy
= {'tag': 'tag', 'secret-key': 'secret_key', 'error': 'error'}
6118 def __init__(self
, error
=None, secret_key
=None, tag
=None):
6121 secret_key : typing.Sequence<+T_co>[int]
6124 self
.error
= Error
.from_json(error
) if error
else None
6125 self
.secret_key
= secret_key
6129 class AddUserResults(Type
):
6130 _toSchema
= {'results': 'results'}
6131 _toPy
= {'results': 'results'}
6132 def __init__(self
, results
=None):
6134 results : typing.Sequence<+T_co>[~AddUserResult]<~AddUserResult>
6136 self
.results
= [AddUserResult
.from_json(o
) for o
in results
or []]
6139 class AddUsers(Type
):
6140 _toSchema
= {'users': 'users'}
6141 _toPy
= {'users': 'users'}
6142 def __init__(self
, users
=None):
6144 users : typing.Sequence<+T_co>[~AddUser]<~AddUser>
6146 self
.users
= [AddUser
.from_json(o
) for o
in users
or []]
6149 class MacaroonResult(Type
):
6150 _toSchema
= {'result': 'result', 'error': 'error'}
6151 _toPy
= {'result': 'result', 'error': 'error'}
6152 def __init__(self
, error
=None, result
=None):
6157 self
.error
= Error
.from_json(error
) if error
else None
6158 self
.result
= Macaroon
.from_json(result
) if result
else None
6161 class MacaroonResults(Type
):
6162 _toSchema
= {'results': 'results'}
6163 _toPy
= {'results': 'results'}
6164 def __init__(self
, results
=None):
6166 results : typing.Sequence<+T_co>[~MacaroonResult]<~MacaroonResult>
6168 self
.results
= [MacaroonResult
.from_json(o
) for o
in results
or []]
6171 class UserInfo(Type
):
6172 _toSchema
= {'display_name': 'display-name', 'username': 'username', 'last_connection': 'last-connection', 'disabled': 'disabled', 'access': 'access', 'created_by': 'created-by', 'date_created': 'date-created'}
6173 _toPy
= {'last-connection': 'last_connection', 'username': 'username', 'disabled': 'disabled', 'date-created': 'date_created', 'created-by': 'created_by', 'access': 'access', 'display-name': 'display_name'}
6174 def __init__(self
, access
=None, created_by
=None, date_created
=None, disabled
=None, display_name
=None, last_connection
=None, username
=None):
6181 last_connection : str
6184 self
.access
= access
6185 self
.created_by
= created_by
6186 self
.date_created
= date_created
6187 self
.disabled
= disabled
6188 self
.display_name
= display_name
6189 self
.last_connection
= last_connection
6190 self
.username
= username
6193 class UserInfoRequest(Type
):
6194 _toSchema
= {'include_disabled': 'include-disabled', 'entities': 'entities'}
6195 _toPy
= {'entities': 'entities', 'include-disabled': 'include_disabled'}
6196 def __init__(self
, entities
=None, include_disabled
=None):
6198 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6199 include_disabled : bool
6201 self
.entities
= [Entity
.from_json(o
) for o
in entities
or []]
6202 self
.include_disabled
= include_disabled
6205 class UserInfoResult(Type
):
6206 _toSchema
= {'result': 'result', 'error': 'error'}
6207 _toPy
= {'result': 'result', 'error': 'error'}
6208 def __init__(self
, error
=None, result
=None):
6213 self
.error
= Error
.from_json(error
) if error
else None
6214 self
.result
= UserInfo
.from_json(result
) if result
else None
6217 class UserInfoResults(Type
):
6218 _toSchema
= {'results': 'results'}
6219 _toPy
= {'results': 'results'}
6220 def __init__(self
, results
=None):
6222 results : typing.Sequence<+T_co>[~UserInfoResult]<~UserInfoResult>
6224 self
.results
= [UserInfoResult
.from_json(o
) for o
in results
or []]
6227 class ActionFacade(Type
):
6230 schema
= {'definitions': {'Action': {'additionalProperties': False,
6231 'properties': {'name': {'type': 'string'},
6232 'parameters': {'patternProperties': {'.*': {'additionalProperties': True,
6235 'receiver': {'type': 'string'},
6236 'tag': {'type': 'string'}},
6237 'required': ['tag', 'receiver', 'name'],
6239 'ActionResult': {'additionalProperties': False,
6240 'properties': {'action': {'$ref': '#/definitions/Action'},
6241 'completed': {'format': 'date-time',
6243 'enqueued': {'format': 'date-time',
6245 'error': {'$ref': '#/definitions/Error'},
6246 'message': {'type': 'string'},
6247 'output': {'patternProperties': {'.*': {'additionalProperties': True,
6250 'started': {'format': 'date-time',
6252 'status': {'type': 'string'}},
6254 'ActionResults': {'additionalProperties': False,
6255 'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'},
6258 'ActionSpec': {'additionalProperties': False,
6259 'properties': {'description': {'type': 'string'},
6260 'params': {'patternProperties': {'.*': {'additionalProperties': True,
6263 'required': ['description', 'params'],
6265 'Actions': {'additionalProperties': False,
6266 'properties': {'actions': {'items': {'$ref': '#/definitions/Action'},
6269 'ActionsByName': {'additionalProperties': False,
6270 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'},
6272 'error': {'$ref': '#/definitions/Error'},
6273 'name': {'type': 'string'}},
6275 'ActionsByNames': {'additionalProperties': False,
6276 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByName'},
6279 'ActionsByReceiver': {'additionalProperties': False,
6280 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'},
6282 'error': {'$ref': '#/definitions/Error'},
6283 'receiver': {'type': 'string'}},
6285 'ActionsByReceivers': {'additionalProperties': False,
6286 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByReceiver'},
6289 'ApplicationCharmActionsResult': {'additionalProperties': False,
6290 'properties': {'actions': {'patternProperties': {'.*': {'$ref': '#/definitions/ActionSpec'}},
6292 'application-tag': {'type': 'string'},
6293 'error': {'$ref': '#/definitions/Error'}},
6295 'ApplicationsCharmActionsResults': {'additionalProperties': False,
6296 'properties': {'results': {'items': {'$ref': '#/definitions/ApplicationCharmActionsResult'},
6299 'Entities': {'additionalProperties': False,
6300 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
6302 'required': ['entities'],
6304 'Entity': {'additionalProperties': False,
6305 'properties': {'tag': {'type': 'string'}},
6306 'required': ['tag'],
6308 'Error': {'additionalProperties': False,
6309 'properties': {'code': {'type': 'string'},
6310 'info': {'$ref': '#/definitions/ErrorInfo'},
6311 'message': {'type': 'string'}},
6312 'required': ['message', 'code'],
6314 'ErrorInfo': {'additionalProperties': False,
6315 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
6316 'macaroon-path': {'type': 'string'}},
6318 'FindActionsByNames': {'additionalProperties': False,
6319 'properties': {'names': {'items': {'type': 'string'},
6322 'FindTags': {'additionalProperties': False,
6323 'properties': {'prefixes': {'items': {'type': 'string'},
6325 'required': ['prefixes'],
6327 'FindTagsResults': {'additionalProperties': False,
6328 'properties': {'matches': {'patternProperties': {'.*': {'items': {'$ref': '#/definitions/Entity'},
6331 'required': ['matches'],
6333 'Macaroon': {'additionalProperties': False, 'type': 'object'},
6334 'RunParams': {'additionalProperties': False,
6335 'properties': {'applications': {'items': {'type': 'string'},
6337 'commands': {'type': 'string'},
6338 'machines': {'items': {'type': 'string'},
6340 'timeout': {'type': 'integer'},
6341 'units': {'items': {'type': 'string'},
6343 'required': ['commands', 'timeout'],
6345 'properties': {'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6346 'Result': {'$ref': '#/definitions/ActionResults'}},
6348 'ApplicationsCharmsActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6349 'Result': {'$ref': '#/definitions/ApplicationsCharmActionsResults'}},
6351 'Cancel': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6352 'Result': {'$ref': '#/definitions/ActionResults'}},
6354 'Enqueue': {'properties': {'Params': {'$ref': '#/definitions/Actions'},
6355 'Result': {'$ref': '#/definitions/ActionResults'}},
6357 'FindActionTagsByPrefix': {'properties': {'Params': {'$ref': '#/definitions/FindTags'},
6358 'Result': {'$ref': '#/definitions/FindTagsResults'}},
6360 'FindActionsByNames': {'properties': {'Params': {'$ref': '#/definitions/FindActionsByNames'},
6361 'Result': {'$ref': '#/definitions/ActionsByNames'}},
6363 'ListAll': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6364 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
6366 'ListCompleted': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6367 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
6369 'ListPending': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6370 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
6372 'ListRunning': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6373 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
6375 'Run': {'properties': {'Params': {'$ref': '#/definitions/RunParams'},
6376 'Result': {'$ref': '#/definitions/ActionResults'}},
6378 'RunOnAllMachines': {'properties': {'Params': {'$ref': '#/definitions/RunParams'},
6379 'Result': {'$ref': '#/definitions/ActionResults'}},
6384 @ReturnMapping(ActionResults
)
6385 async def Actions(self
, entities
):
6387 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6388 Returns -> typing.Sequence<+T_co>[~ActionResult]<~ActionResult>
6390 # map input types to rpc msg
6392 msg
= dict(type='Action', request
='Actions', version
=2, params
=params
)
6393 params
['entities'] = entities
6394 reply
= await self
.rpc(msg
)
6399 @ReturnMapping(ApplicationsCharmActionsResults
)
6400 async def ApplicationsCharmsActions(self
, entities
):
6402 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6403 Returns -> typing.Sequence<+T_co>[~ApplicationCharmActionsResult]<~ApplicationCharmActionsResult>
6405 # map input types to rpc msg
6407 msg
= dict(type='Action', request
='ApplicationsCharmsActions', version
=2, params
=params
)
6408 params
['entities'] = entities
6409 reply
= await self
.rpc(msg
)
6414 @ReturnMapping(ActionResults
)
6415 async def Cancel(self
, entities
):
6417 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6418 Returns -> typing.Sequence<+T_co>[~ActionResult]<~ActionResult>
6420 # map input types to rpc msg
6422 msg
= dict(type='Action', request
='Cancel', version
=2, params
=params
)
6423 params
['entities'] = entities
6424 reply
= await self
.rpc(msg
)
6429 @ReturnMapping(ActionResults
)
6430 async def Enqueue(self
, actions
):
6432 actions : typing.Sequence<+T_co>[~Action]<~Action>
6433 Returns -> typing.Sequence<+T_co>[~ActionResult]<~ActionResult>
6435 # map input types to rpc msg
6437 msg
= dict(type='Action', request
='Enqueue', version
=2, params
=params
)
6438 params
['actions'] = actions
6439 reply
= await self
.rpc(msg
)
6444 @ReturnMapping(FindTagsResults
)
6445 async def FindActionTagsByPrefix(self
, prefixes
):
6447 prefixes : typing.Sequence<+T_co>[str]
6448 Returns -> typing.Sequence<+T_co>[~Entity]<~Entity>
6450 # map input types to rpc msg
6452 msg
= dict(type='Action', request
='FindActionTagsByPrefix', version
=2, params
=params
)
6453 params
['prefixes'] = prefixes
6454 reply
= await self
.rpc(msg
)
6459 @ReturnMapping(ActionsByNames
)
6460 async def FindActionsByNames(self
, names
):
6462 names : typing.Sequence<+T_co>[str]
6463 Returns -> typing.Sequence<+T_co>[~ActionsByName]<~ActionsByName>
6465 # map input types to rpc msg
6467 msg
= dict(type='Action', request
='FindActionsByNames', version
=2, params
=params
)
6468 params
['names'] = names
6469 reply
= await self
.rpc(msg
)
6474 @ReturnMapping(ActionsByReceivers
)
6475 async def ListAll(self
, entities
):
6477 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6478 Returns -> typing.Sequence<+T_co>[~ActionsByReceiver]<~ActionsByReceiver>
6480 # map input types to rpc msg
6482 msg
= dict(type='Action', request
='ListAll', version
=2, params
=params
)
6483 params
['entities'] = entities
6484 reply
= await self
.rpc(msg
)
6489 @ReturnMapping(ActionsByReceivers
)
6490 async def ListCompleted(self
, entities
):
6492 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6493 Returns -> typing.Sequence<+T_co>[~ActionsByReceiver]<~ActionsByReceiver>
6495 # map input types to rpc msg
6497 msg
= dict(type='Action', request
='ListCompleted', version
=2, params
=params
)
6498 params
['entities'] = entities
6499 reply
= await self
.rpc(msg
)
6504 @ReturnMapping(ActionsByReceivers
)
6505 async def ListPending(self
, entities
):
6507 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6508 Returns -> typing.Sequence<+T_co>[~ActionsByReceiver]<~ActionsByReceiver>
6510 # map input types to rpc msg
6512 msg
= dict(type='Action', request
='ListPending', version
=2, params
=params
)
6513 params
['entities'] = entities
6514 reply
= await self
.rpc(msg
)
6519 @ReturnMapping(ActionsByReceivers
)
6520 async def ListRunning(self
, entities
):
6522 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6523 Returns -> typing.Sequence<+T_co>[~ActionsByReceiver]<~ActionsByReceiver>
6525 # map input types to rpc msg
6527 msg
= dict(type='Action', request
='ListRunning', version
=2, params
=params
)
6528 params
['entities'] = entities
6529 reply
= await self
.rpc(msg
)
6534 @ReturnMapping(ActionResults
)
6535 async def Run(self
, applications
, commands
, machines
, timeout
, units
):
6537 applications : typing.Sequence<+T_co>[str]
6539 machines : typing.Sequence<+T_co>[str]
6541 units : typing.Sequence<+T_co>[str]
6542 Returns -> typing.Sequence<+T_co>[~ActionResult]<~ActionResult>
6544 # map input types to rpc msg
6546 msg
= dict(type='Action', request
='Run', version
=2, params
=params
)
6547 params
['applications'] = applications
6548 params
['commands'] = commands
6549 params
['machines'] = machines
6550 params
['timeout'] = timeout
6551 params
['units'] = units
6552 reply
= await self
.rpc(msg
)
6557 @ReturnMapping(ActionResults
)
6558 async def RunOnAllMachines(self
, applications
, commands
, machines
, timeout
, units
):
6560 applications : typing.Sequence<+T_co>[str]
6562 machines : typing.Sequence<+T_co>[str]
6564 units : typing.Sequence<+T_co>[str]
6565 Returns -> typing.Sequence<+T_co>[~ActionResult]<~ActionResult>
6567 # map input types to rpc msg
6569 msg
= dict(type='Action', request
='RunOnAllMachines', version
=2, params
=params
)
6570 params
['applications'] = applications
6571 params
['commands'] = commands
6572 params
['machines'] = machines
6573 params
['timeout'] = timeout
6574 params
['units'] = units
6575 reply
= await self
.rpc(msg
)
6579 class AgentFacade(Type
):
6582 schema
= {'definitions': {'AgentGetEntitiesResult': {'additionalProperties': False,
6583 'properties': {'container-type': {'type': 'string'},
6584 'error': {'$ref': '#/definitions/Error'},
6585 'jobs': {'items': {'type': 'string'},
6587 'life': {'type': 'string'}},
6588 'required': ['life',
6592 'AgentGetEntitiesResults': {'additionalProperties': False,
6593 'properties': {'entities': {'items': {'$ref': '#/definitions/AgentGetEntitiesResult'},
6595 'required': ['entities'],
6597 'CloudCredential': {'additionalProperties': False,
6598 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}},
6600 'auth-type': {'type': 'string'},
6601 'redacted': {'items': {'type': 'string'},
6603 'required': ['auth-type'],
6605 'CloudSpec': {'additionalProperties': False,
6606 'properties': {'credential': {'$ref': '#/definitions/CloudCredential'},
6607 'endpoint': {'type': 'string'},
6608 'identity-endpoint': {'type': 'string'},
6609 'name': {'type': 'string'},
6610 'region': {'type': 'string'},
6611 'storage-endpoint': {'type': 'string'},
6612 'type': {'type': 'string'}},
6613 'required': ['type', 'name'],
6615 'CloudSpecResult': {'additionalProperties': False,
6616 'properties': {'error': {'$ref': '#/definitions/Error'},
6617 'result': {'$ref': '#/definitions/CloudSpec'}},
6619 'CloudSpecResults': {'additionalProperties': False,
6620 'properties': {'results': {'items': {'$ref': '#/definitions/CloudSpecResult'},
6623 'ControllerConfigResult': {'additionalProperties': False,
6624 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
6627 'required': ['config'],
6629 'Entities': {'additionalProperties': False,
6630 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
6632 'required': ['entities'],
6634 'Entity': {'additionalProperties': False,
6635 'properties': {'tag': {'type': 'string'}},
6636 'required': ['tag'],
6638 'EntityPassword': {'additionalProperties': False,
6639 'properties': {'password': {'type': 'string'},
6640 'tag': {'type': 'string'}},
6641 'required': ['tag', 'password'],
6643 'EntityPasswords': {'additionalProperties': False,
6644 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'},
6646 'required': ['changes'],
6648 'Error': {'additionalProperties': False,
6649 'properties': {'code': {'type': 'string'},
6650 'info': {'$ref': '#/definitions/ErrorInfo'},
6651 'message': {'type': 'string'}},
6652 'required': ['message', 'code'],
6654 'ErrorInfo': {'additionalProperties': False,
6655 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
6656 'macaroon-path': {'type': 'string'}},
6658 'ErrorResult': {'additionalProperties': False,
6659 'properties': {'error': {'$ref': '#/definitions/Error'}},
6661 'ErrorResults': {'additionalProperties': False,
6662 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
6664 'required': ['results'],
6666 'IsMasterResult': {'additionalProperties': False,
6667 'properties': {'master': {'type': 'boolean'}},
6668 'required': ['master'],
6670 'Macaroon': {'additionalProperties': False, 'type': 'object'},
6671 'ModelConfigResult': {'additionalProperties': False,
6672 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
6675 'required': ['config'],
6677 'NotifyWatchResult': {'additionalProperties': False,
6678 'properties': {'NotifyWatcherId': {'type': 'string'},
6679 'error': {'$ref': '#/definitions/Error'}},
6680 'required': ['NotifyWatcherId'],
6682 'StateServingInfo': {'additionalProperties': False,
6683 'properties': {'api-port': {'type': 'integer'},
6684 'ca-private-key': {'type': 'string'},
6685 'cert': {'type': 'string'},
6686 'private-key': {'type': 'string'},
6687 'shared-secret': {'type': 'string'},
6688 'state-port': {'type': 'integer'},
6689 'system-identity': {'type': 'string'}},
6690 'required': ['api-port',
6698 'properties': {'ClearReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6699 'Result': {'$ref': '#/definitions/ErrorResults'}},
6701 'CloudSpec': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6702 'Result': {'$ref': '#/definitions/CloudSpecResults'}},
6704 'ControllerConfig': {'properties': {'Result': {'$ref': '#/definitions/ControllerConfigResult'}},
6706 'GetEntities': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6707 'Result': {'$ref': '#/definitions/AgentGetEntitiesResults'}},
6709 'IsMaster': {'properties': {'Result': {'$ref': '#/definitions/IsMasterResult'}},
6711 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
6713 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
6714 'Result': {'$ref': '#/definitions/ErrorResults'}},
6716 'StateServingInfo': {'properties': {'Result': {'$ref': '#/definitions/StateServingInfo'}},
6718 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
6723 @ReturnMapping(ErrorResults
)
6724 async def ClearReboot(self
, entities
):
6726 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6727 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
6729 # map input types to rpc msg
6731 msg
= dict(type='Agent', request
='ClearReboot', version
=2, params
=params
)
6732 params
['entities'] = entities
6733 reply
= await self
.rpc(msg
)
6738 @ReturnMapping(CloudSpecResults
)
6739 async def CloudSpec(self
, entities
):
6741 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6742 Returns -> typing.Sequence<+T_co>[~CloudSpecResult]<~CloudSpecResult>
6744 # map input types to rpc msg
6746 msg
= dict(type='Agent', request
='CloudSpec', version
=2, params
=params
)
6747 params
['entities'] = entities
6748 reply
= await self
.rpc(msg
)
6753 @ReturnMapping(ControllerConfigResult
)
6754 async def ControllerConfig(self
):
6757 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
6759 # map input types to rpc msg
6761 msg
= dict(type='Agent', request
='ControllerConfig', version
=2, params
=params
)
6763 reply
= await self
.rpc(msg
)
6768 @ReturnMapping(AgentGetEntitiesResults
)
6769 async def GetEntities(self
, entities
):
6771 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
6772 Returns -> typing.Sequence<+T_co>[~AgentGetEntitiesResult]<~AgentGetEntitiesResult>
6774 # map input types to rpc msg
6776 msg
= dict(type='Agent', request
='GetEntities', version
=2, params
=params
)
6777 params
['entities'] = entities
6778 reply
= await self
.rpc(msg
)
6783 @ReturnMapping(IsMasterResult
)
6784 async def IsMaster(self
):
6789 # map input types to rpc msg
6791 msg
= dict(type='Agent', request
='IsMaster', version
=2, params
=params
)
6793 reply
= await self
.rpc(msg
)
6798 @ReturnMapping(ModelConfigResult
)
6799 async def ModelConfig(self
):
6802 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
6804 # map input types to rpc msg
6806 msg
= dict(type='Agent', request
='ModelConfig', version
=2, params
=params
)
6808 reply
= await self
.rpc(msg
)
6813 @ReturnMapping(ErrorResults
)
6814 async def SetPasswords(self
, changes
):
6816 changes : typing.Sequence<+T_co>[~EntityPassword]<~EntityPassword>
6817 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
6819 # map input types to rpc msg
6821 msg
= dict(type='Agent', request
='SetPasswords', version
=2, params
=params
)
6822 params
['changes'] = changes
6823 reply
= await self
.rpc(msg
)
6828 @ReturnMapping(StateServingInfo
)
6829 async def StateServingInfo(self
):
6832 Returns -> typing.Union[int, str]
6834 # map input types to rpc msg
6836 msg
= dict(type='Agent', request
='StateServingInfo', version
=2, params
=params
)
6838 reply
= await self
.rpc(msg
)
6843 @ReturnMapping(NotifyWatchResult
)
6844 async def WatchForModelConfigChanges(self
):
6847 Returns -> typing.Union[str, _ForwardRef('Error')]
6849 # map input types to rpc msg
6851 msg
= dict(type='Agent', request
='WatchForModelConfigChanges', version
=2, params
=params
)
6853 reply
= await self
.rpc(msg
)
6857 class AgentToolsFacade(Type
):
6860 schema
= {'properties': {'UpdateToolsAvailable': {'type': 'object'}}, 'type': 'object'}
6863 @ReturnMapping(None)
6864 async def UpdateToolsAvailable(self
):
6869 # map input types to rpc msg
6871 msg
= dict(type='AgentTools', request
='UpdateToolsAvailable', version
=1, params
=params
)
6873 reply
= await self
.rpc(msg
)
6877 class AllModelWatcherFacade(Type
):
6878 name
= 'AllModelWatcher'
6880 schema
= {'definitions': {'AllWatcherNextResults': {'additionalProperties': False,
6881 'properties': {'deltas': {'items': {'$ref': '#/definitions/Delta'},
6883 'required': ['deltas'],
6885 'Delta': {'additionalProperties': False,
6886 'properties': {'entity': {'additionalProperties': True,
6888 'removed': {'type': 'boolean'}},
6889 'required': ['removed', 'entity'],
6891 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherNextResults'}},
6893 'Stop': {'type': 'object'}},
6897 @ReturnMapping(AllWatcherNextResults
)
6898 async def Next(self
):
6901 Returns -> typing.Sequence<+T_co>[~Delta]<~Delta>
6903 # map input types to rpc msg
6905 msg
= dict(type='AllModelWatcher', request
='Next', version
=2, params
=params
)
6907 reply
= await self
.rpc(msg
)
6912 @ReturnMapping(None)
6913 async def Stop(self
):
6918 # map input types to rpc msg
6920 msg
= dict(type='AllModelWatcher', request
='Stop', version
=2, params
=params
)
6922 reply
= await self
.rpc(msg
)
6926 class AllWatcherFacade(Type
):
6929 schema
= {'definitions': {'AllWatcherNextResults': {'additionalProperties': False,
6930 'properties': {'deltas': {'items': {'$ref': '#/definitions/Delta'},
6932 'required': ['deltas'],
6934 'Delta': {'additionalProperties': False,
6935 'properties': {'entity': {'additionalProperties': True,
6937 'removed': {'type': 'boolean'}},
6938 'required': ['removed', 'entity'],
6940 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherNextResults'}},
6942 'Stop': {'type': 'object'}},
6946 @ReturnMapping(AllWatcherNextResults
)
6947 async def Next(self
):
6950 Returns -> typing.Sequence<+T_co>[~Delta]<~Delta>
6952 # map input types to rpc msg
6954 msg
= dict(type='AllWatcher', request
='Next', version
=1, params
=params
)
6956 reply
= await self
.rpc(msg
)
6961 @ReturnMapping(None)
6962 async def Stop(self
):
6967 # map input types to rpc msg
6969 msg
= dict(type='AllWatcher', request
='Stop', version
=1, params
=params
)
6971 reply
= await self
.rpc(msg
)
6975 class AnnotationsFacade(Type
):
6976 name
= 'Annotations'
6978 schema
= {'definitions': {'AnnotationsGetResult': {'additionalProperties': False,
6979 'properties': {'annotations': {'patternProperties': {'.*': {'type': 'string'}},
6981 'entity': {'type': 'string'},
6982 'error': {'$ref': '#/definitions/ErrorResult'}},
6983 'required': ['entity', 'annotations'],
6985 'AnnotationsGetResults': {'additionalProperties': False,
6986 'properties': {'results': {'items': {'$ref': '#/definitions/AnnotationsGetResult'},
6988 'required': ['results'],
6990 'AnnotationsSet': {'additionalProperties': False,
6991 'properties': {'annotations': {'items': {'$ref': '#/definitions/EntityAnnotations'},
6993 'required': ['annotations'],
6995 'Entities': {'additionalProperties': False,
6996 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
6998 'required': ['entities'],
7000 'Entity': {'additionalProperties': False,
7001 'properties': {'tag': {'type': 'string'}},
7002 'required': ['tag'],
7004 'EntityAnnotations': {'additionalProperties': False,
7005 'properties': {'annotations': {'patternProperties': {'.*': {'type': 'string'}},
7007 'entity': {'type': 'string'}},
7008 'required': ['entity', 'annotations'],
7010 'Error': {'additionalProperties': False,
7011 'properties': {'code': {'type': 'string'},
7012 'info': {'$ref': '#/definitions/ErrorInfo'},
7013 'message': {'type': 'string'}},
7014 'required': ['message', 'code'],
7016 'ErrorInfo': {'additionalProperties': False,
7017 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
7018 'macaroon-path': {'type': 'string'}},
7020 'ErrorResult': {'additionalProperties': False,
7021 'properties': {'error': {'$ref': '#/definitions/Error'}},
7023 'ErrorResults': {'additionalProperties': False,
7024 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
7026 'required': ['results'],
7028 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
7029 'properties': {'Get': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
7030 'Result': {'$ref': '#/definitions/AnnotationsGetResults'}},
7032 'Set': {'properties': {'Params': {'$ref': '#/definitions/AnnotationsSet'},
7033 'Result': {'$ref': '#/definitions/ErrorResults'}},
7038 @ReturnMapping(AnnotationsGetResults
)
7039 async def Get(self
, entities
):
7041 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
7042 Returns -> typing.Sequence<+T_co>[~AnnotationsGetResult]<~AnnotationsGetResult>
7044 # map input types to rpc msg
7046 msg
= dict(type='Annotations', request
='Get', version
=2, params
=params
)
7047 params
['entities'] = entities
7048 reply
= await self
.rpc(msg
)
7053 @ReturnMapping(ErrorResults
)
7054 async def Set(self
, annotations
):
7056 annotations : typing.Sequence<+T_co>[~EntityAnnotations]<~EntityAnnotations>
7057 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
7059 # map input types to rpc msg
7061 msg
= dict(type='Annotations', request
='Set', version
=2, params
=params
)
7062 params
['annotations'] = annotations
7063 reply
= await self
.rpc(msg
)
7067 class ApplicationFacade(Type
):
7068 name
= 'Application'
7070 schema
= {'definitions': {'AddApplicationUnits': {'additionalProperties': False,
7071 'properties': {'application': {'type': 'string'},
7072 'num-units': {'type': 'integer'},
7073 'placement': {'items': {'$ref': '#/definitions/Placement'},
7075 'required': ['application',
7079 'AddApplicationUnitsResults': {'additionalProperties': False,
7080 'properties': {'units': {'items': {'type': 'string'},
7082 'required': ['units'],
7084 'AddRelation': {'additionalProperties': False,
7085 'properties': {'endpoints': {'items': {'type': 'string'},
7087 'required': ['endpoints'],
7089 'AddRelationResults': {'additionalProperties': False,
7090 'properties': {'endpoints': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}},
7092 'required': ['endpoints'],
7094 'ApplicationCharmRelations': {'additionalProperties': False,
7095 'properties': {'application': {'type': 'string'}},
7096 'required': ['application'],
7098 'ApplicationCharmRelationsResults': {'additionalProperties': False,
7099 'properties': {'charm-relations': {'items': {'type': 'string'},
7101 'required': ['charm-relations'],
7103 'ApplicationDeploy': {'additionalProperties': False,
7104 'properties': {'application': {'type': 'string'},
7105 'channel': {'type': 'string'},
7106 'charm-url': {'type': 'string'},
7107 'config': {'patternProperties': {'.*': {'type': 'string'}},
7109 'config-yaml': {'type': 'string'},
7110 'constraints': {'$ref': '#/definitions/Value'},
7111 'endpoint-bindings': {'patternProperties': {'.*': {'type': 'string'}},
7113 'num-units': {'type': 'integer'},
7114 'placement': {'items': {'$ref': '#/definitions/Placement'},
7116 'resources': {'patternProperties': {'.*': {'type': 'string'}},
7118 'series': {'type': 'string'},
7119 'storage': {'patternProperties': {'.*': {'$ref': '#/definitions/Constraints'}},
7121 'required': ['application',
7129 'ApplicationDestroy': {'additionalProperties': False,
7130 'properties': {'application': {'type': 'string'}},
7131 'required': ['application'],
7133 'ApplicationExpose': {'additionalProperties': False,
7134 'properties': {'application': {'type': 'string'}},
7135 'required': ['application'],
7137 'ApplicationGet': {'additionalProperties': False,
7138 'properties': {'application': {'type': 'string'}},
7139 'required': ['application'],
7141 'ApplicationGetResults': {'additionalProperties': False,
7142 'properties': {'application': {'type': 'string'},
7143 'charm': {'type': 'string'},
7144 'config': {'patternProperties': {'.*': {'additionalProperties': True,
7147 'constraints': {'$ref': '#/definitions/Value'},
7148 'series': {'type': 'string'}},
7149 'required': ['application',
7155 'ApplicationMetricCredential': {'additionalProperties': False,
7156 'properties': {'application': {'type': 'string'},
7157 'metrics-credentials': {'items': {'type': 'integer'},
7159 'required': ['application',
7160 'metrics-credentials'],
7162 'ApplicationMetricCredentials': {'additionalProperties': False,
7163 'properties': {'creds': {'items': {'$ref': '#/definitions/ApplicationMetricCredential'},
7165 'required': ['creds'],
7167 'ApplicationSet': {'additionalProperties': False,
7168 'properties': {'application': {'type': 'string'},
7169 'options': {'patternProperties': {'.*': {'type': 'string'}},
7171 'required': ['application', 'options'],
7173 'ApplicationSetCharm': {'additionalProperties': False,
7174 'properties': {'application': {'type': 'string'},
7175 'channel': {'type': 'string'},
7176 'charm-url': {'type': 'string'},
7177 'force-series': {'type': 'boolean'},
7178 'force-units': {'type': 'boolean'},
7179 'resource-ids': {'patternProperties': {'.*': {'type': 'string'}},
7181 'required': ['application',
7187 'ApplicationUnexpose': {'additionalProperties': False,
7188 'properties': {'application': {'type': 'string'}},
7189 'required': ['application'],
7191 'ApplicationUnset': {'additionalProperties': False,
7192 'properties': {'application': {'type': 'string'},
7193 'options': {'items': {'type': 'string'},
7195 'required': ['application', 'options'],
7197 'ApplicationUpdate': {'additionalProperties': False,
7198 'properties': {'application': {'type': 'string'},
7199 'charm-url': {'type': 'string'},
7200 'constraints': {'$ref': '#/definitions/Value'},
7201 'force-charm-url': {'type': 'boolean'},
7202 'force-series': {'type': 'boolean'},
7203 'min-units': {'type': 'integer'},
7204 'settings': {'patternProperties': {'.*': {'type': 'string'}},
7206 'settings-yaml': {'type': 'string'}},
7207 'required': ['application',
7213 'ApplicationsDeploy': {'additionalProperties': False,
7214 'properties': {'applications': {'items': {'$ref': '#/definitions/ApplicationDeploy'},
7216 'required': ['applications'],
7218 'CharmRelation': {'additionalProperties': False,
7219 'properties': {'interface': {'type': 'string'},
7220 'limit': {'type': 'integer'},
7221 'name': {'type': 'string'},
7222 'optional': {'type': 'boolean'},
7223 'role': {'type': 'string'},
7224 'scope': {'type': 'string'}},
7225 'required': ['name',
7232 'Constraints': {'additionalProperties': False,
7233 'properties': {'Count': {'type': 'integer'},
7234 'Pool': {'type': 'string'},
7235 'Size': {'type': 'integer'}},
7236 'required': ['Pool', 'Size', 'Count'],
7238 'DestroyApplicationUnits': {'additionalProperties': False,
7239 'properties': {'unit-names': {'items': {'type': 'string'},
7241 'required': ['unit-names'],
7243 'DestroyRelation': {'additionalProperties': False,
7244 'properties': {'endpoints': {'items': {'type': 'string'},
7246 'required': ['endpoints'],
7248 'Error': {'additionalProperties': False,
7249 'properties': {'code': {'type': 'string'},
7250 'info': {'$ref': '#/definitions/ErrorInfo'},
7251 'message': {'type': 'string'}},
7252 'required': ['message', 'code'],
7254 'ErrorInfo': {'additionalProperties': False,
7255 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
7256 'macaroon-path': {'type': 'string'}},
7258 'ErrorResult': {'additionalProperties': False,
7259 'properties': {'error': {'$ref': '#/definitions/Error'}},
7261 'ErrorResults': {'additionalProperties': False,
7262 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
7264 'required': ['results'],
7266 'GetApplicationConstraints': {'additionalProperties': False,
7267 'properties': {'application': {'type': 'string'}},
7268 'required': ['application'],
7270 'GetConstraintsResults': {'additionalProperties': False,
7271 'properties': {'constraints': {'$ref': '#/definitions/Value'}},
7272 'required': ['constraints'],
7274 'Macaroon': {'additionalProperties': False, 'type': 'object'},
7275 'Placement': {'additionalProperties': False,
7276 'properties': {'directive': {'type': 'string'},
7277 'scope': {'type': 'string'}},
7278 'required': ['scope', 'directive'],
7280 'SetConstraints': {'additionalProperties': False,
7281 'properties': {'application': {'type': 'string'},
7282 'constraints': {'$ref': '#/definitions/Value'}},
7283 'required': ['application', 'constraints'],
7285 'StringResult': {'additionalProperties': False,
7286 'properties': {'error': {'$ref': '#/definitions/Error'},
7287 'result': {'type': 'string'}},
7288 'required': ['result'],
7290 'Value': {'additionalProperties': False,
7291 'properties': {'arch': {'type': 'string'},
7292 'container': {'type': 'string'},
7293 'cpu-cores': {'type': 'integer'},
7294 'cpu-power': {'type': 'integer'},
7295 'instance-type': {'type': 'string'},
7296 'mem': {'type': 'integer'},
7297 'root-disk': {'type': 'integer'},
7298 'spaces': {'items': {'type': 'string'},
7300 'tags': {'items': {'type': 'string'},
7302 'virt-type': {'type': 'string'}},
7304 'properties': {'AddRelation': {'properties': {'Params': {'$ref': '#/definitions/AddRelation'},
7305 'Result': {'$ref': '#/definitions/AddRelationResults'}},
7307 'AddUnits': {'properties': {'Params': {'$ref': '#/definitions/AddApplicationUnits'},
7308 'Result': {'$ref': '#/definitions/AddApplicationUnitsResults'}},
7310 'CharmRelations': {'properties': {'Params': {'$ref': '#/definitions/ApplicationCharmRelations'},
7311 'Result': {'$ref': '#/definitions/ApplicationCharmRelationsResults'}},
7313 'Deploy': {'properties': {'Params': {'$ref': '#/definitions/ApplicationsDeploy'},
7314 'Result': {'$ref': '#/definitions/ErrorResults'}},
7316 'Destroy': {'properties': {'Params': {'$ref': '#/definitions/ApplicationDestroy'}},
7318 'DestroyRelation': {'properties': {'Params': {'$ref': '#/definitions/DestroyRelation'}},
7320 'DestroyUnits': {'properties': {'Params': {'$ref': '#/definitions/DestroyApplicationUnits'}},
7322 'Expose': {'properties': {'Params': {'$ref': '#/definitions/ApplicationExpose'}},
7324 'Get': {'properties': {'Params': {'$ref': '#/definitions/ApplicationGet'},
7325 'Result': {'$ref': '#/definitions/ApplicationGetResults'}},
7327 'GetCharmURL': {'properties': {'Params': {'$ref': '#/definitions/ApplicationGet'},
7328 'Result': {'$ref': '#/definitions/StringResult'}},
7330 'GetConstraints': {'properties': {'Params': {'$ref': '#/definitions/GetApplicationConstraints'},
7331 'Result': {'$ref': '#/definitions/GetConstraintsResults'}},
7333 'Set': {'properties': {'Params': {'$ref': '#/definitions/ApplicationSet'}},
7335 'SetCharm': {'properties': {'Params': {'$ref': '#/definitions/ApplicationSetCharm'}},
7337 'SetConstraints': {'properties': {'Params': {'$ref': '#/definitions/SetConstraints'}},
7339 'SetMetricCredentials': {'properties': {'Params': {'$ref': '#/definitions/ApplicationMetricCredentials'},
7340 'Result': {'$ref': '#/definitions/ErrorResults'}},
7342 'Unexpose': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUnexpose'}},
7344 'Unset': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUnset'}},
7346 'Update': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUpdate'}},
7351 @ReturnMapping(AddRelationResults
)
7352 async def AddRelation(self
, endpoints
):
7354 endpoints : typing.Sequence<+T_co>[str]
7355 Returns -> typing.Mapping<~KT, +VT_co>[str, ~CharmRelation]<~CharmRelation>
7357 # map input types to rpc msg
7359 msg
= dict(type='Application', request
='AddRelation', version
=1, params
=params
)
7360 params
['endpoints'] = endpoints
7361 reply
= await self
.rpc(msg
)
7366 @ReturnMapping(AddApplicationUnitsResults
)
7367 async def AddUnits(self
, application
, num_units
, placement
):
7371 placement : typing.Sequence<+T_co>[~Placement]<~Placement>
7372 Returns -> typing.Sequence<+T_co>[str]
7374 # map input types to rpc msg
7376 msg
= dict(type='Application', request
='AddUnits', version
=1, params
=params
)
7377 params
['application'] = application
7378 params
['num-units'] = num_units
7379 params
['placement'] = placement
7380 reply
= await self
.rpc(msg
)
7385 @ReturnMapping(ApplicationCharmRelationsResults
)
7386 async def CharmRelations(self
, application
):
7389 Returns -> typing.Sequence<+T_co>[str]
7391 # map input types to rpc msg
7393 msg
= dict(type='Application', request
='CharmRelations', version
=1, params
=params
)
7394 params
['application'] = application
7395 reply
= await self
.rpc(msg
)
7400 @ReturnMapping(ErrorResults
)
7401 async def Deploy(self
, applications
):
7403 applications : typing.Sequence<+T_co>[~ApplicationDeploy]<~ApplicationDeploy>
7404 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
7406 # map input types to rpc msg
7408 msg
= dict(type='Application', request
='Deploy', version
=1, params
=params
)
7409 params
['applications'] = applications
7410 reply
= await self
.rpc(msg
)
7415 @ReturnMapping(None)
7416 async def Destroy(self
, application
):
7421 # map input types to rpc msg
7423 msg
= dict(type='Application', request
='Destroy', version
=1, params
=params
)
7424 params
['application'] = application
7425 reply
= await self
.rpc(msg
)
7430 @ReturnMapping(None)
7431 async def DestroyRelation(self
, endpoints
):
7433 endpoints : typing.Sequence<+T_co>[str]
7436 # map input types to rpc msg
7438 msg
= dict(type='Application', request
='DestroyRelation', version
=1, params
=params
)
7439 params
['endpoints'] = endpoints
7440 reply
= await self
.rpc(msg
)
7445 @ReturnMapping(None)
7446 async def DestroyUnits(self
, unit_names
):
7448 unit_names : typing.Sequence<+T_co>[str]
7451 # map input types to rpc msg
7453 msg
= dict(type='Application', request
='DestroyUnits', version
=1, params
=params
)
7454 params
['unit-names'] = unit_names
7455 reply
= await self
.rpc(msg
)
7460 @ReturnMapping(None)
7461 async def Expose(self
, application
):
7466 # map input types to rpc msg
7468 msg
= dict(type='Application', request
='Expose', version
=1, params
=params
)
7469 params
['application'] = application
7470 reply
= await self
.rpc(msg
)
7475 @ReturnMapping(ApplicationGetResults
)
7476 async def Get(self
, application
):
7479 Returns -> typing.Union[str, typing.Mapping<~KT, +VT_co>[str, typing.Any], _ForwardRef('Value')]
7481 # map input types to rpc msg
7483 msg
= dict(type='Application', request
='Get', version
=1, params
=params
)
7484 params
['application'] = application
7485 reply
= await self
.rpc(msg
)
7490 @ReturnMapping(StringResult
)
7491 async def GetCharmURL(self
, application
):
7494 Returns -> typing.Union[_ForwardRef('Error'), str]
7496 # map input types to rpc msg
7498 msg
= dict(type='Application', request
='GetCharmURL', version
=1, params
=params
)
7499 params
['application'] = application
7500 reply
= await self
.rpc(msg
)
7505 @ReturnMapping(GetConstraintsResults
)
7506 async def GetConstraints(self
, application
):
7511 # map input types to rpc msg
7513 msg
= dict(type='Application', request
='GetConstraints', version
=1, params
=params
)
7514 params
['application'] = application
7515 reply
= await self
.rpc(msg
)
7520 @ReturnMapping(None)
7521 async def Set(self
, application
, options
):
7524 options : typing.Mapping<~KT, +VT_co>[str, str]
7527 # map input types to rpc msg
7529 msg
= dict(type='Application', request
='Set', version
=1, params
=params
)
7530 params
['application'] = application
7531 params
['options'] = options
7532 reply
= await self
.rpc(msg
)
7537 @ReturnMapping(None)
7538 async def SetCharm(self
, application
, channel
, charm_url
, force_series
, force_units
, resource_ids
):
7545 resource_ids : typing.Mapping<~KT, +VT_co>[str, str]
7548 # map input types to rpc msg
7550 msg
= dict(type='Application', request
='SetCharm', version
=1, params
=params
)
7551 params
['application'] = application
7552 params
['channel'] = channel
7553 params
['charm-url'] = charm_url
7554 params
['force-series'] = force_series
7555 params
['force-units'] = force_units
7556 params
['resource-ids'] = resource_ids
7557 reply
= await self
.rpc(msg
)
7562 @ReturnMapping(None)
7563 async def SetConstraints(self
, application
, constraints
):
7569 # map input types to rpc msg
7571 msg
= dict(type='Application', request
='SetConstraints', version
=1, params
=params
)
7572 params
['application'] = application
7573 params
['constraints'] = constraints
7574 reply
= await self
.rpc(msg
)
7579 @ReturnMapping(ErrorResults
)
7580 async def SetMetricCredentials(self
, creds
):
7582 creds : typing.Sequence<+T_co>[~ApplicationMetricCredential]<~ApplicationMetricCredential>
7583 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
7585 # map input types to rpc msg
7587 msg
= dict(type='Application', request
='SetMetricCredentials', version
=1, params
=params
)
7588 params
['creds'] = creds
7589 reply
= await self
.rpc(msg
)
7594 @ReturnMapping(None)
7595 async def Unexpose(self
, application
):
7600 # map input types to rpc msg
7602 msg
= dict(type='Application', request
='Unexpose', version
=1, params
=params
)
7603 params
['application'] = application
7604 reply
= await self
.rpc(msg
)
7609 @ReturnMapping(None)
7610 async def Unset(self
, application
, options
):
7613 options : typing.Sequence<+T_co>[str]
7616 # map input types to rpc msg
7618 msg
= dict(type='Application', request
='Unset', version
=1, params
=params
)
7619 params
['application'] = application
7620 params
['options'] = options
7621 reply
= await self
.rpc(msg
)
7626 @ReturnMapping(None)
7627 async def Update(self
, application
, charm_url
, constraints
, force_charm_url
, force_series
, min_units
, settings
, settings_yaml
):
7632 force_charm_url : bool
7635 settings : typing.Mapping<~KT, +VT_co>[str, str]
7639 # map input types to rpc msg
7641 msg
= dict(type='Application', request
='Update', version
=1, params
=params
)
7642 params
['application'] = application
7643 params
['charm-url'] = charm_url
7644 params
['constraints'] = constraints
7645 params
['force-charm-url'] = force_charm_url
7646 params
['force-series'] = force_series
7647 params
['min-units'] = min_units
7648 params
['settings'] = settings
7649 params
['settings-yaml'] = settings_yaml
7650 reply
= await self
.rpc(msg
)
7654 class ApplicationScalerFacade(Type
):
7655 name
= 'ApplicationScaler'
7657 schema
= {'definitions': {'Entities': {'additionalProperties': False,
7658 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
7660 'required': ['entities'],
7662 'Entity': {'additionalProperties': False,
7663 'properties': {'tag': {'type': 'string'}},
7664 'required': ['tag'],
7666 'Error': {'additionalProperties': False,
7667 'properties': {'code': {'type': 'string'},
7668 'info': {'$ref': '#/definitions/ErrorInfo'},
7669 'message': {'type': 'string'}},
7670 'required': ['message', 'code'],
7672 'ErrorInfo': {'additionalProperties': False,
7673 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
7674 'macaroon-path': {'type': 'string'}},
7676 'ErrorResult': {'additionalProperties': False,
7677 'properties': {'error': {'$ref': '#/definitions/Error'}},
7679 'ErrorResults': {'additionalProperties': False,
7680 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
7682 'required': ['results'],
7684 'Macaroon': {'additionalProperties': False, 'type': 'object'},
7685 'StringsWatchResult': {'additionalProperties': False,
7686 'properties': {'changes': {'items': {'type': 'string'},
7688 'error': {'$ref': '#/definitions/Error'},
7689 'watcher-id': {'type': 'string'}},
7690 'required': ['watcher-id'],
7692 'properties': {'Rescale': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
7693 'Result': {'$ref': '#/definitions/ErrorResults'}},
7695 'Watch': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
7700 @ReturnMapping(ErrorResults
)
7701 async def Rescale(self
, entities
):
7703 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
7704 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
7706 # map input types to rpc msg
7708 msg
= dict(type='ApplicationScaler', request
='Rescale', version
=1, params
=params
)
7709 params
['entities'] = entities
7710 reply
= await self
.rpc(msg
)
7715 @ReturnMapping(StringsWatchResult
)
7716 async def Watch(self
):
7719 Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')]
7721 # map input types to rpc msg
7723 msg
= dict(type='ApplicationScaler', request
='Watch', version
=1, params
=params
)
7725 reply
= await self
.rpc(msg
)
7729 class BackupsFacade(Type
):
7732 schema
= {'definitions': {'BackupsCreateArgs': {'additionalProperties': False,
7733 'properties': {'notes': {'type': 'string'}},
7734 'required': ['notes'],
7736 'BackupsInfoArgs': {'additionalProperties': False,
7737 'properties': {'id': {'type': 'string'}},
7740 'BackupsListArgs': {'additionalProperties': False,
7742 'BackupsListResult': {'additionalProperties': False,
7743 'properties': {'list': {'items': {'$ref': '#/definitions/BackupsMetadataResult'},
7745 'required': ['list'],
7747 'BackupsMetadataResult': {'additionalProperties': False,
7748 'properties': {'ca-cert': {'type': 'string'},
7749 'ca-private-key': {'type': 'string'},
7750 'checksum': {'type': 'string'},
7751 'checksum-format': {'type': 'string'},
7752 'finished': {'format': 'date-time',
7754 'hostname': {'type': 'string'},
7755 'id': {'type': 'string'},
7756 'machine': {'type': 'string'},
7757 'model': {'type': 'string'},
7758 'notes': {'type': 'string'},
7759 'series': {'type': 'string'},
7760 'size': {'type': 'integer'},
7761 'started': {'format': 'date-time',
7763 'stored': {'format': 'date-time',
7765 'version': {'$ref': '#/definitions/Number'}},
7782 'BackupsRemoveArgs': {'additionalProperties': False,
7783 'properties': {'id': {'type': 'string'}},
7786 'Number': {'additionalProperties': False,
7787 'properties': {'Build': {'type': 'integer'},
7788 'Major': {'type': 'integer'},
7789 'Minor': {'type': 'integer'},
7790 'Patch': {'type': 'integer'},
7791 'Tag': {'type': 'string'}},
7792 'required': ['Major',
7798 'RestoreArgs': {'additionalProperties': False,
7799 'properties': {'backup-id': {'type': 'string'}},
7800 'required': ['backup-id'],
7802 'properties': {'Create': {'properties': {'Params': {'$ref': '#/definitions/BackupsCreateArgs'},
7803 'Result': {'$ref': '#/definitions/BackupsMetadataResult'}},
7805 'FinishRestore': {'type': 'object'},
7806 'Info': {'properties': {'Params': {'$ref': '#/definitions/BackupsInfoArgs'},
7807 'Result': {'$ref': '#/definitions/BackupsMetadataResult'}},
7809 'List': {'properties': {'Params': {'$ref': '#/definitions/BackupsListArgs'},
7810 'Result': {'$ref': '#/definitions/BackupsListResult'}},
7812 'PrepareRestore': {'type': 'object'},
7813 'Remove': {'properties': {'Params': {'$ref': '#/definitions/BackupsRemoveArgs'}},
7815 'Restore': {'properties': {'Params': {'$ref': '#/definitions/RestoreArgs'}},
7820 @ReturnMapping(BackupsMetadataResult
)
7821 async def Create(self
, notes
):
7824 Returns -> typing.Union[str, int, _ForwardRef('Number')]
7826 # map input types to rpc msg
7828 msg
= dict(type='Backups', request
='Create', version
=1, params
=params
)
7829 params
['notes'] = notes
7830 reply
= await self
.rpc(msg
)
7835 @ReturnMapping(None)
7836 async def FinishRestore(self
):
7841 # map input types to rpc msg
7843 msg
= dict(type='Backups', request
='FinishRestore', version
=1, params
=params
)
7845 reply
= await self
.rpc(msg
)
7850 @ReturnMapping(BackupsMetadataResult
)
7851 async def Info(self
, id_
):
7854 Returns -> typing.Union[str, int, _ForwardRef('Number')]
7856 # map input types to rpc msg
7858 msg
= dict(type='Backups', request
='Info', version
=1, params
=params
)
7860 reply
= await self
.rpc(msg
)
7865 @ReturnMapping(BackupsListResult
)
7866 async def List(self
):
7869 Returns -> typing.Sequence<+T_co>[~BackupsMetadataResult]<~BackupsMetadataResult>
7871 # map input types to rpc msg
7873 msg
= dict(type='Backups', request
='List', version
=1, params
=params
)
7875 reply
= await self
.rpc(msg
)
7880 @ReturnMapping(None)
7881 async def PrepareRestore(self
):
7886 # map input types to rpc msg
7888 msg
= dict(type='Backups', request
='PrepareRestore', version
=1, params
=params
)
7890 reply
= await self
.rpc(msg
)
7895 @ReturnMapping(None)
7896 async def Remove(self
, id_
):
7901 # map input types to rpc msg
7903 msg
= dict(type='Backups', request
='Remove', version
=1, params
=params
)
7905 reply
= await self
.rpc(msg
)
7910 @ReturnMapping(None)
7911 async def Restore(self
, backup_id
):
7916 # map input types to rpc msg
7918 msg
= dict(type='Backups', request
='Restore', version
=1, params
=params
)
7919 params
['backup-id'] = backup_id
7920 reply
= await self
.rpc(msg
)
7924 class BlockFacade(Type
):
7927 schema
= {'definitions': {'Block': {'additionalProperties': False,
7928 'properties': {'id': {'type': 'string'},
7929 'message': {'type': 'string'},
7930 'tag': {'type': 'string'},
7931 'type': {'type': 'string'}},
7932 'required': ['id', 'tag', 'type'],
7934 'BlockResult': {'additionalProperties': False,
7935 'properties': {'error': {'$ref': '#/definitions/Error'},
7936 'result': {'$ref': '#/definitions/Block'}},
7937 'required': ['result'],
7939 'BlockResults': {'additionalProperties': False,
7940 'properties': {'results': {'items': {'$ref': '#/definitions/BlockResult'},
7943 'BlockSwitchParams': {'additionalProperties': False,
7944 'properties': {'message': {'type': 'string'},
7945 'type': {'type': 'string'}},
7946 'required': ['type'],
7948 'Error': {'additionalProperties': False,
7949 'properties': {'code': {'type': 'string'},
7950 'info': {'$ref': '#/definitions/ErrorInfo'},
7951 'message': {'type': 'string'}},
7952 'required': ['message', 'code'],
7954 'ErrorInfo': {'additionalProperties': False,
7955 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
7956 'macaroon-path': {'type': 'string'}},
7958 'ErrorResult': {'additionalProperties': False,
7959 'properties': {'error': {'$ref': '#/definitions/Error'}},
7961 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
7962 'properties': {'List': {'properties': {'Result': {'$ref': '#/definitions/BlockResults'}},
7964 'SwitchBlockOff': {'properties': {'Params': {'$ref': '#/definitions/BlockSwitchParams'},
7965 'Result': {'$ref': '#/definitions/ErrorResult'}},
7967 'SwitchBlockOn': {'properties': {'Params': {'$ref': '#/definitions/BlockSwitchParams'},
7968 'Result': {'$ref': '#/definitions/ErrorResult'}},
7973 @ReturnMapping(BlockResults
)
7974 async def List(self
):
7977 Returns -> typing.Sequence<+T_co>[~BlockResult]<~BlockResult>
7979 # map input types to rpc msg
7981 msg
= dict(type='Block', request
='List', version
=2, params
=params
)
7983 reply
= await self
.rpc(msg
)
7988 @ReturnMapping(ErrorResult
)
7989 async def SwitchBlockOff(self
, message
, type_
):
7995 # map input types to rpc msg
7997 msg
= dict(type='Block', request
='SwitchBlockOff', version
=2, params
=params
)
7998 params
['message'] = message
7999 params
['type'] = type_
8000 reply
= await self
.rpc(msg
)
8005 @ReturnMapping(ErrorResult
)
8006 async def SwitchBlockOn(self
, message
, type_
):
8012 # map input types to rpc msg
8014 msg
= dict(type='Block', request
='SwitchBlockOn', version
=2, params
=params
)
8015 params
['message'] = message
8016 params
['type'] = type_
8017 reply
= await self
.rpc(msg
)
8021 class CharmRevisionUpdaterFacade(Type
):
8022 name
= 'CharmRevisionUpdater'
8024 schema
= {'definitions': {'Error': {'additionalProperties': False,
8025 'properties': {'code': {'type': 'string'},
8026 'info': {'$ref': '#/definitions/ErrorInfo'},
8027 'message': {'type': 'string'}},
8028 'required': ['message', 'code'],
8030 'ErrorInfo': {'additionalProperties': False,
8031 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
8032 'macaroon-path': {'type': 'string'}},
8034 'ErrorResult': {'additionalProperties': False,
8035 'properties': {'error': {'$ref': '#/definitions/Error'}},
8037 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
8038 'properties': {'UpdateLatestRevisions': {'properties': {'Result': {'$ref': '#/definitions/ErrorResult'}},
8043 @ReturnMapping(ErrorResult
)
8044 async def UpdateLatestRevisions(self
):
8049 # map input types to rpc msg
8051 msg
= dict(type='CharmRevisionUpdater', request
='UpdateLatestRevisions', version
=2, params
=params
)
8053 reply
= await self
.rpc(msg
)
8057 class CharmsFacade(Type
):
8060 schema
= {'definitions': {'CharmActionSpec': {'additionalProperties': False,
8061 'properties': {'description': {'type': 'string'},
8062 'params': {'patternProperties': {'.*': {'additionalProperties': True,
8065 'required': ['description', 'params'],
8067 'CharmActions': {'additionalProperties': False,
8068 'properties': {'specs': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmActionSpec'}},
8071 'CharmInfo': {'additionalProperties': False,
8072 'properties': {'actions': {'$ref': '#/definitions/CharmActions'},
8073 'config': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmOption'}},
8075 'meta': {'$ref': '#/definitions/CharmMeta'},
8076 'metrics': {'$ref': '#/definitions/CharmMetrics'},
8077 'revision': {'type': 'integer'},
8078 'url': {'type': 'string'}},
8079 'required': ['revision', 'url', 'config'],
8081 'CharmMeta': {'additionalProperties': False,
8082 'properties': {'categories': {'items': {'type': 'string'},
8084 'description': {'type': 'string'},
8085 'extra-bindings': {'patternProperties': {'.*': {'type': 'string'}},
8087 'min-juju-version': {'type': 'string'},
8088 'name': {'type': 'string'},
8089 'payload-classes': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmPayloadClass'}},
8091 'peers': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}},
8093 'provides': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}},
8095 'requires': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}},
8097 'resources': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmResourceMeta'}},
8099 'series': {'items': {'type': 'string'},
8101 'storage': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmStorage'}},
8103 'subordinate': {'type': 'boolean'},
8104 'summary': {'type': 'string'},
8105 'tags': {'items': {'type': 'string'},
8107 'terms': {'items': {'type': 'string'},
8109 'required': ['name',
8114 'CharmMetric': {'additionalProperties': False,
8115 'properties': {'description': {'type': 'string'},
8116 'type': {'type': 'string'}},
8117 'required': ['type', 'description'],
8119 'CharmMetrics': {'additionalProperties': False,
8120 'properties': {'metrics': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmMetric'}},
8122 'required': ['metrics'],
8124 'CharmOption': {'additionalProperties': False,
8125 'properties': {'default': {'additionalProperties': True,
8127 'description': {'type': 'string'},
8128 'type': {'type': 'string'}},
8129 'required': ['type'],
8131 'CharmPayloadClass': {'additionalProperties': False,
8132 'properties': {'name': {'type': 'string'},
8133 'type': {'type': 'string'}},
8134 'required': ['name', 'type'],
8136 'CharmRelation': {'additionalProperties': False,
8137 'properties': {'interface': {'type': 'string'},
8138 'limit': {'type': 'integer'},
8139 'name': {'type': 'string'},
8140 'optional': {'type': 'boolean'},
8141 'role': {'type': 'string'},
8142 'scope': {'type': 'string'}},
8143 'required': ['name',
8150 'CharmResourceMeta': {'additionalProperties': False,
8151 'properties': {'description': {'type': 'string'},
8152 'name': {'type': 'string'},
8153 'path': {'type': 'string'},
8154 'type': {'type': 'string'}},
8155 'required': ['name',
8160 'CharmStorage': {'additionalProperties': False,
8161 'properties': {'count-max': {'type': 'integer'},
8162 'count-min': {'type': 'integer'},
8163 'description': {'type': 'string'},
8164 'location': {'type': 'string'},
8165 'minimum-size': {'type': 'integer'},
8166 'name': {'type': 'string'},
8167 'properties': {'items': {'type': 'string'},
8169 'read-only': {'type': 'boolean'},
8170 'shared': {'type': 'boolean'},
8171 'type': {'type': 'string'}},
8172 'required': ['name',
8181 'CharmURL': {'additionalProperties': False,
8182 'properties': {'url': {'type': 'string'}},
8183 'required': ['url'],
8185 'CharmsList': {'additionalProperties': False,
8186 'properties': {'names': {'items': {'type': 'string'},
8188 'required': ['names'],
8190 'CharmsListResult': {'additionalProperties': False,
8191 'properties': {'charm-urls': {'items': {'type': 'string'},
8193 'required': ['charm-urls'],
8195 'IsMeteredResult': {'additionalProperties': False,
8196 'properties': {'metered': {'type': 'boolean'}},
8197 'required': ['metered'],
8199 'properties': {'CharmInfo': {'properties': {'Params': {'$ref': '#/definitions/CharmURL'},
8200 'Result': {'$ref': '#/definitions/CharmInfo'}},
8202 'IsMetered': {'properties': {'Params': {'$ref': '#/definitions/CharmURL'},
8203 'Result': {'$ref': '#/definitions/IsMeteredResult'}},
8205 'List': {'properties': {'Params': {'$ref': '#/definitions/CharmsList'},
8206 'Result': {'$ref': '#/definitions/CharmsListResult'}},
8211 @ReturnMapping(CharmInfo
)
8212 async def CharmInfo(self
, url
):
8215 Returns -> typing.Union[_ForwardRef('CharmActions'), typing.Mapping<~KT, +VT_co>[str, ~CharmOption]<~CharmOption>, _ForwardRef('CharmMeta'), _ForwardRef('CharmMetrics'), int, str]
8217 # map input types to rpc msg
8219 msg
= dict(type='Charms', request
='CharmInfo', version
=2, params
=params
)
8221 reply
= await self
.rpc(msg
)
8226 @ReturnMapping(IsMeteredResult
)
8227 async def IsMetered(self
, url
):
8232 # map input types to rpc msg
8234 msg
= dict(type='Charms', request
='IsMetered', version
=2, params
=params
)
8236 reply
= await self
.rpc(msg
)
8241 @ReturnMapping(CharmsListResult
)
8242 async def List(self
, names
):
8244 names : typing.Sequence<+T_co>[str]
8245 Returns -> typing.Sequence<+T_co>[str]
8247 # map input types to rpc msg
8249 msg
= dict(type='Charms', request
='List', version
=2, params
=params
)
8250 params
['names'] = names
8251 reply
= await self
.rpc(msg
)
8255 class CleanerFacade(Type
):
8258 schema
= {'definitions': {'Error': {'additionalProperties': False,
8259 'properties': {'code': {'type': 'string'},
8260 'info': {'$ref': '#/definitions/ErrorInfo'},
8261 'message': {'type': 'string'}},
8262 'required': ['message', 'code'],
8264 'ErrorInfo': {'additionalProperties': False,
8265 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
8266 'macaroon-path': {'type': 'string'}},
8268 'Macaroon': {'additionalProperties': False, 'type': 'object'},
8269 'NotifyWatchResult': {'additionalProperties': False,
8270 'properties': {'NotifyWatcherId': {'type': 'string'},
8271 'error': {'$ref': '#/definitions/Error'}},
8272 'required': ['NotifyWatcherId'],
8274 'properties': {'Cleanup': {'type': 'object'},
8275 'WatchCleanups': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
8280 @ReturnMapping(None)
8281 async def Cleanup(self
):
8286 # map input types to rpc msg
8288 msg
= dict(type='Cleaner', request
='Cleanup', version
=2, params
=params
)
8290 reply
= await self
.rpc(msg
)
8295 @ReturnMapping(NotifyWatchResult
)
8296 async def WatchCleanups(self
):
8299 Returns -> typing.Union[str, _ForwardRef('Error')]
8301 # map input types to rpc msg
8303 msg
= dict(type='Cleaner', request
='WatchCleanups', version
=2, params
=params
)
8305 reply
= await self
.rpc(msg
)
8309 class ClientFacade(Type
):
8312 schema
= {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
8313 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
8316 'required': ['servers'],
8318 'AddCharm': {'additionalProperties': False,
8319 'properties': {'channel': {'type': 'string'},
8320 'url': {'type': 'string'}},
8321 'required': ['url', 'channel'],
8323 'AddCharmWithAuthorization': {'additionalProperties': False,
8324 'properties': {'channel': {'type': 'string'},
8325 'macaroon': {'$ref': '#/definitions/Macaroon'},
8326 'url': {'type': 'string'}},
8331 'AddMachineParams': {'additionalProperties': False,
8332 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
8334 'constraints': {'$ref': '#/definitions/Value'},
8335 'container-type': {'type': 'string'},
8336 'disks': {'items': {'$ref': '#/definitions/Constraints'},
8338 'hardware-characteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
8339 'instance-id': {'type': 'string'},
8340 'jobs': {'items': {'type': 'string'},
8342 'nonce': {'type': 'string'},
8343 'parent-id': {'type': 'string'},
8344 'placement': {'$ref': '#/definitions/Placement'},
8345 'series': {'type': 'string'}},
8346 'required': ['series',
8353 'hardware-characteristics',
8356 'AddMachines': {'additionalProperties': False,
8357 'properties': {'params': {'items': {'$ref': '#/definitions/AddMachineParams'},
8359 'required': ['params'],
8361 'AddMachinesResult': {'additionalProperties': False,
8362 'properties': {'error': {'$ref': '#/definitions/Error'},
8363 'machine': {'type': 'string'}},
8364 'required': ['machine'],
8366 'AddMachinesResults': {'additionalProperties': False,
8367 'properties': {'machines': {'items': {'$ref': '#/definitions/AddMachinesResult'},
8369 'required': ['machines'],
8371 'Address': {'additionalProperties': False,
8372 'properties': {'scope': {'type': 'string'},
8373 'space-name': {'type': 'string'},
8374 'type': {'type': 'string'},
8375 'value': {'type': 'string'}},
8376 'required': ['value', 'type', 'scope'],
8378 'AgentVersionResult': {'additionalProperties': False,
8379 'properties': {'version': {'$ref': '#/definitions/Number'}},
8380 'required': ['version'],
8382 'AllWatcherId': {'additionalProperties': False,
8383 'properties': {'watcher-id': {'type': 'string'}},
8384 'required': ['watcher-id'],
8386 'ApplicationStatus': {'additionalProperties': False,
8387 'properties': {'can-upgrade-to': {'type': 'string'},
8388 'charm': {'type': 'string'},
8389 'err': {'additionalProperties': True,
8391 'exposed': {'type': 'boolean'},
8392 'life': {'type': 'string'},
8393 'meter-statuses': {'patternProperties': {'.*': {'$ref': '#/definitions/MeterStatus'}},
8395 'relations': {'patternProperties': {'.*': {'items': {'type': 'string'},
8398 'series': {'type': 'string'},
8399 'status': {'$ref': '#/definitions/DetailedStatus'},
8400 'subordinate-to': {'items': {'type': 'string'},
8402 'units': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitStatus'}},
8404 'workload-version': {'type': 'string'}},
8405 'required': ['charm',
8415 'workload-version'],
8417 'Binary': {'additionalProperties': False,
8418 'properties': {'Arch': {'type': 'string'},
8419 'Number': {'$ref': '#/definitions/Number'},
8420 'Series': {'type': 'string'}},
8421 'required': ['Number', 'Series', 'Arch'],
8423 'BundleChangesChange': {'additionalProperties': False,
8424 'properties': {'args': {'items': {'additionalProperties': True,
8427 'id': {'type': 'string'},
8428 'method': {'type': 'string'},
8429 'requires': {'items': {'type': 'string'},
8436 'ConfigValue': {'additionalProperties': False,
8437 'properties': {'source': {'type': 'string'},
8438 'value': {'additionalProperties': True,
8440 'required': ['value', 'source'],
8442 'Constraints': {'additionalProperties': False,
8443 'properties': {'Count': {'type': 'integer'},
8444 'Pool': {'type': 'string'},
8445 'Size': {'type': 'integer'}},
8446 'required': ['Pool', 'Size', 'Count'],
8448 'DestroyMachines': {'additionalProperties': False,
8449 'properties': {'force': {'type': 'boolean'},
8450 'machine-names': {'items': {'type': 'string'},
8452 'required': ['machine-names', 'force'],
8454 'DetailedStatus': {'additionalProperties': False,
8455 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
8458 'err': {'additionalProperties': True,
8460 'info': {'type': 'string'},
8461 'kind': {'type': 'string'},
8462 'life': {'type': 'string'},
8463 'since': {'format': 'date-time',
8465 'status': {'type': 'string'},
8466 'version': {'type': 'string'}},
8467 'required': ['status',
8475 'EndpointStatus': {'additionalProperties': False,
8476 'properties': {'application': {'type': 'string'},
8477 'name': {'type': 'string'},
8478 'role': {'type': 'string'},
8479 'subordinate': {'type': 'boolean'}},
8480 'required': ['application',
8485 'Entities': {'additionalProperties': False,
8486 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
8488 'required': ['entities'],
8490 'Entity': {'additionalProperties': False,
8491 'properties': {'tag': {'type': 'string'}},
8492 'required': ['tag'],
8494 'EntityStatus': {'additionalProperties': False,
8495 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
8498 'info': {'type': 'string'},
8499 'since': {'format': 'date-time',
8501 'status': {'type': 'string'}},
8502 'required': ['status', 'info', 'since'],
8504 'Error': {'additionalProperties': False,
8505 'properties': {'code': {'type': 'string'},
8506 'info': {'$ref': '#/definitions/ErrorInfo'},
8507 'message': {'type': 'string'}},
8508 'required': ['message', 'code'],
8510 'ErrorInfo': {'additionalProperties': False,
8511 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
8512 'macaroon-path': {'type': 'string'}},
8514 'ErrorResult': {'additionalProperties': False,
8515 'properties': {'error': {'$ref': '#/definitions/Error'}},
8517 'ErrorResults': {'additionalProperties': False,
8518 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
8520 'required': ['results'],
8522 'FindToolsParams': {'additionalProperties': False,
8523 'properties': {'arch': {'type': 'string'},
8524 'major': {'type': 'integer'},
8525 'minor': {'type': 'integer'},
8526 'number': {'$ref': '#/definitions/Number'},
8527 'series': {'type': 'string'}},
8528 'required': ['number',
8534 'FindToolsResult': {'additionalProperties': False,
8535 'properties': {'error': {'$ref': '#/definitions/Error'},
8536 'list': {'items': {'$ref': '#/definitions/Tools'},
8538 'required': ['list'],
8540 'FullStatus': {'additionalProperties': False,
8541 'properties': {'applications': {'patternProperties': {'.*': {'$ref': '#/definitions/ApplicationStatus'}},
8543 'machines': {'patternProperties': {'.*': {'$ref': '#/definitions/MachineStatus'}},
8545 'model': {'$ref': '#/definitions/ModelStatusInfo'},
8546 'relations': {'items': {'$ref': '#/definitions/RelationStatus'},
8548 'required': ['model',
8553 'GetBundleChangesParams': {'additionalProperties': False,
8554 'properties': {'yaml': {'type': 'string'}},
8555 'required': ['yaml'],
8557 'GetBundleChangesResults': {'additionalProperties': False,
8558 'properties': {'changes': {'items': {'$ref': '#/definitions/BundleChangesChange'},
8560 'errors': {'items': {'type': 'string'},
8563 'GetConstraintsResults': {'additionalProperties': False,
8564 'properties': {'constraints': {'$ref': '#/definitions/Value'}},
8565 'required': ['constraints'],
8567 'HardwareCharacteristics': {'additionalProperties': False,
8568 'properties': {'arch': {'type': 'string'},
8569 'availability-zone': {'type': 'string'},
8570 'cpu-cores': {'type': 'integer'},
8571 'cpu-power': {'type': 'integer'},
8572 'mem': {'type': 'integer'},
8573 'root-disk': {'type': 'integer'},
8574 'tags': {'items': {'type': 'string'},
8577 'History': {'additionalProperties': False,
8578 'properties': {'error': {'$ref': '#/definitions/Error'},
8579 'statuses': {'items': {'$ref': '#/definitions/DetailedStatus'},
8581 'required': ['statuses'],
8583 'HostPort': {'additionalProperties': False,
8584 'properties': {'Address': {'$ref': '#/definitions/Address'},
8585 'port': {'type': 'integer'}},
8586 'required': ['Address', 'port'],
8588 'Macaroon': {'additionalProperties': False, 'type': 'object'},
8589 'MachineStatus': {'additionalProperties': False,
8590 'properties': {'agent-status': {'$ref': '#/definitions/DetailedStatus'},
8591 'containers': {'patternProperties': {'.*': {'$ref': '#/definitions/MachineStatus'}},
8593 'dns-name': {'type': 'string'},
8594 'hardware': {'type': 'string'},
8595 'has-vote': {'type': 'boolean'},
8596 'id': {'type': 'string'},
8597 'instance-id': {'type': 'string'},
8598 'instance-status': {'$ref': '#/definitions/DetailedStatus'},
8599 'jobs': {'items': {'type': 'string'},
8601 'series': {'type': 'string'},
8602 'wants-vote': {'type': 'boolean'}},
8603 'required': ['agent-status',
8615 'MeterStatus': {'additionalProperties': False,
8616 'properties': {'color': {'type': 'string'},
8617 'message': {'type': 'string'}},
8618 'required': ['color', 'message'],
8620 'ModelConfigResults': {'additionalProperties': False,
8621 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ConfigValue'}},
8623 'required': ['config'],
8625 'ModelDefaultValues': {'additionalProperties': False,
8626 'properties': {'cloud-region': {'type': 'string'},
8627 'cloud-tag': {'type': 'string'},
8628 'config': {'patternProperties': {'.*': {'additionalProperties': True,
8631 'required': ['config'],
8633 'ModelDefaults': {'additionalProperties': False,
8634 'properties': {'controller': {'additionalProperties': True,
8636 'default': {'additionalProperties': True,
8638 'regions': {'items': {'$ref': '#/definitions/RegionDefaults'},
8641 'ModelDefaultsResult': {'additionalProperties': False,
8642 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ModelDefaults'}},
8644 'required': ['config'],
8646 'ModelInfo': {'additionalProperties': False,
8647 'properties': {'cloud': {'type': 'string'},
8648 'cloud-credential-tag': {'type': 'string'},
8649 'cloud-region': {'type': 'string'},
8650 'controller-uuid': {'type': 'string'},
8651 'default-series': {'type': 'string'},
8652 'life': {'type': 'string'},
8653 'name': {'type': 'string'},
8654 'owner-tag': {'type': 'string'},
8655 'provider-type': {'type': 'string'},
8656 'status': {'$ref': '#/definitions/EntityStatus'},
8657 'users': {'items': {'$ref': '#/definitions/ModelUserInfo'},
8659 'uuid': {'type': 'string'}},
8660 'required': ['name',
8671 'ModelSet': {'additionalProperties': False,
8672 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
8675 'required': ['config'],
8677 'ModelStatusInfo': {'additionalProperties': False,
8678 'properties': {'available-version': {'type': 'string'},
8679 'cloud': {'type': 'string'},
8680 'migration': {'type': 'string'},
8681 'name': {'type': 'string'},
8682 'region': {'type': 'string'},
8683 'version': {'type': 'string'}},
8684 'required': ['name',
8687 'available-version'],
8689 'ModelUnset': {'additionalProperties': False,
8690 'properties': {'keys': {'items': {'type': 'string'},
8692 'required': ['keys'],
8694 'ModelUnsetKeys': {'additionalProperties': False,
8695 'properties': {'cloud-region': {'type': 'string'},
8696 'cloud-tag': {'type': 'string'},
8697 'keys': {'items': {'type': 'string'},
8699 'required': ['keys'],
8701 'ModelUserInfo': {'additionalProperties': False,
8702 'properties': {'access': {'type': 'string'},
8703 'display-name': {'type': 'string'},
8704 'last-connection': {'format': 'date-time',
8706 'user': {'type': 'string'}},
8707 'required': ['user',
8712 'ModelUserInfoResult': {'additionalProperties': False,
8713 'properties': {'error': {'$ref': '#/definitions/Error'},
8714 'result': {'$ref': '#/definitions/ModelUserInfo'}},
8716 'ModelUserInfoResults': {'additionalProperties': False,
8717 'properties': {'results': {'items': {'$ref': '#/definitions/ModelUserInfoResult'},
8719 'required': ['results'],
8721 'Number': {'additionalProperties': False,
8722 'properties': {'Build': {'type': 'integer'},
8723 'Major': {'type': 'integer'},
8724 'Minor': {'type': 'integer'},
8725 'Patch': {'type': 'integer'},
8726 'Tag': {'type': 'string'}},
8727 'required': ['Major',
8733 'Placement': {'additionalProperties': False,
8734 'properties': {'directive': {'type': 'string'},
8735 'scope': {'type': 'string'}},
8736 'required': ['scope', 'directive'],
8738 'PrivateAddress': {'additionalProperties': False,
8739 'properties': {'target': {'type': 'string'}},
8740 'required': ['target'],
8742 'PrivateAddressResults': {'additionalProperties': False,
8743 'properties': {'private-address': {'type': 'string'}},
8744 'required': ['private-address'],
8746 'ProvisioningScriptParams': {'additionalProperties': False,
8747 'properties': {'data-dir': {'type': 'string'},
8748 'disable-package-commands': {'type': 'boolean'},
8749 'machine-id': {'type': 'string'},
8750 'nonce': {'type': 'string'}},
8751 'required': ['machine-id',
8754 'disable-package-commands'],
8756 'ProvisioningScriptResult': {'additionalProperties': False,
8757 'properties': {'script': {'type': 'string'}},
8758 'required': ['script'],
8760 'PublicAddress': {'additionalProperties': False,
8761 'properties': {'target': {'type': 'string'}},
8762 'required': ['target'],
8764 'PublicAddressResults': {'additionalProperties': False,
8765 'properties': {'public-address': {'type': 'string'}},
8766 'required': ['public-address'],
8768 'RegionDefaults': {'additionalProperties': False,
8769 'properties': {'region-name': {'type': 'string'},
8770 'value': {'additionalProperties': True,
8772 'required': ['region-name', 'value'],
8774 'RelationStatus': {'additionalProperties': False,
8775 'properties': {'endpoints': {'items': {'$ref': '#/definitions/EndpointStatus'},
8777 'id': {'type': 'integer'},
8778 'interface': {'type': 'string'},
8779 'key': {'type': 'string'},
8780 'scope': {'type': 'string'}},
8787 'ResolveCharmResult': {'additionalProperties': False,
8788 'properties': {'error': {'type': 'string'},
8789 'url': {'type': 'string'}},
8791 'ResolveCharmResults': {'additionalProperties': False,
8792 'properties': {'urls': {'items': {'$ref': '#/definitions/ResolveCharmResult'},
8794 'required': ['urls'],
8796 'ResolveCharms': {'additionalProperties': False,
8797 'properties': {'references': {'items': {'type': 'string'},
8799 'required': ['references'],
8801 'Resolved': {'additionalProperties': False,
8802 'properties': {'retry': {'type': 'boolean'},
8803 'unit-name': {'type': 'string'}},
8804 'required': ['unit-name', 'retry'],
8806 'SetConstraints': {'additionalProperties': False,
8807 'properties': {'application': {'type': 'string'},
8808 'constraints': {'$ref': '#/definitions/Value'}},
8809 'required': ['application', 'constraints'],
8811 'SetModelAgentVersion': {'additionalProperties': False,
8812 'properties': {'version': {'$ref': '#/definitions/Number'}},
8813 'required': ['version'],
8815 'SetModelDefaults': {'additionalProperties': False,
8816 'properties': {'config': {'items': {'$ref': '#/definitions/ModelDefaultValues'},
8818 'required': ['config'],
8820 'StatusHistoryFilter': {'additionalProperties': False,
8821 'properties': {'date': {'format': 'date-time',
8823 'delta': {'type': 'integer'},
8824 'size': {'type': 'integer'}},
8825 'required': ['size', 'date', 'delta'],
8827 'StatusHistoryRequest': {'additionalProperties': False,
8828 'properties': {'filter': {'$ref': '#/definitions/StatusHistoryFilter'},
8829 'historyKind': {'type': 'string'},
8830 'size': {'type': 'integer'},
8831 'tag': {'type': 'string'}},
8832 'required': ['historyKind',
8837 'StatusHistoryRequests': {'additionalProperties': False,
8838 'properties': {'requests': {'items': {'$ref': '#/definitions/StatusHistoryRequest'},
8840 'required': ['requests'],
8842 'StatusHistoryResult': {'additionalProperties': False,
8843 'properties': {'error': {'$ref': '#/definitions/Error'},
8844 'history': {'$ref': '#/definitions/History'}},
8845 'required': ['history'],
8847 'StatusHistoryResults': {'additionalProperties': False,
8848 'properties': {'results': {'items': {'$ref': '#/definitions/StatusHistoryResult'},
8850 'required': ['results'],
8852 'StatusParams': {'additionalProperties': False,
8853 'properties': {'patterns': {'items': {'type': 'string'},
8855 'required': ['patterns'],
8857 'Tools': {'additionalProperties': False,
8858 'properties': {'sha256': {'type': 'string'},
8859 'size': {'type': 'integer'},
8860 'url': {'type': 'string'},
8861 'version': {'$ref': '#/definitions/Binary'}},
8862 'required': ['version', 'url', 'size'],
8864 'UnitStatus': {'additionalProperties': False,
8865 'properties': {'agent-status': {'$ref': '#/definitions/DetailedStatus'},
8866 'charm': {'type': 'string'},
8867 'machine': {'type': 'string'},
8868 'opened-ports': {'items': {'type': 'string'},
8870 'public-address': {'type': 'string'},
8871 'subordinates': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitStatus'}},
8873 'workload-status': {'$ref': '#/definitions/DetailedStatus'},
8874 'workload-version': {'type': 'string'}},
8875 'required': ['agent-status',
8884 'UnsetModelDefaults': {'additionalProperties': False,
8885 'properties': {'keys': {'items': {'$ref': '#/definitions/ModelUnsetKeys'},
8887 'required': ['keys'],
8889 'Value': {'additionalProperties': False,
8890 'properties': {'arch': {'type': 'string'},
8891 'container': {'type': 'string'},
8892 'cpu-cores': {'type': 'integer'},
8893 'cpu-power': {'type': 'integer'},
8894 'instance-type': {'type': 'string'},
8895 'mem': {'type': 'integer'},
8896 'root-disk': {'type': 'integer'},
8897 'spaces': {'items': {'type': 'string'},
8899 'tags': {'items': {'type': 'string'},
8901 'virt-type': {'type': 'string'}},
8903 'properties': {'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
8905 'AbortCurrentUpgrade': {'type': 'object'},
8906 'AddCharm': {'properties': {'Params': {'$ref': '#/definitions/AddCharm'}},
8908 'AddCharmWithAuthorization': {'properties': {'Params': {'$ref': '#/definitions/AddCharmWithAuthorization'}},
8910 'AddMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
8911 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
8913 'AddMachinesV2': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
8914 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
8916 'AgentVersion': {'properties': {'Result': {'$ref': '#/definitions/AgentVersionResult'}},
8918 'DestroyMachines': {'properties': {'Params': {'$ref': '#/definitions/DestroyMachines'}},
8920 'FindTools': {'properties': {'Params': {'$ref': '#/definitions/FindToolsParams'},
8921 'Result': {'$ref': '#/definitions/FindToolsResult'}},
8923 'FullStatus': {'properties': {'Params': {'$ref': '#/definitions/StatusParams'},
8924 'Result': {'$ref': '#/definitions/FullStatus'}},
8926 'GetBundleChanges': {'properties': {'Params': {'$ref': '#/definitions/GetBundleChangesParams'},
8927 'Result': {'$ref': '#/definitions/GetBundleChangesResults'}},
8929 'GetModelConstraints': {'properties': {'Result': {'$ref': '#/definitions/GetConstraintsResults'}},
8931 'InjectMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
8932 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
8934 'ModelDefaults': {'properties': {'Result': {'$ref': '#/definitions/ModelDefaultsResult'}},
8936 'ModelGet': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}},
8938 'ModelInfo': {'properties': {'Result': {'$ref': '#/definitions/ModelInfo'}},
8940 'ModelSet': {'properties': {'Params': {'$ref': '#/definitions/ModelSet'}},
8942 'ModelUnset': {'properties': {'Params': {'$ref': '#/definitions/ModelUnset'}},
8944 'ModelUserInfo': {'properties': {'Result': {'$ref': '#/definitions/ModelUserInfoResults'}},
8946 'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/PrivateAddress'},
8947 'Result': {'$ref': '#/definitions/PrivateAddressResults'}},
8949 'ProvisioningScript': {'properties': {'Params': {'$ref': '#/definitions/ProvisioningScriptParams'},
8950 'Result': {'$ref': '#/definitions/ProvisioningScriptResult'}},
8952 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/PublicAddress'},
8953 'Result': {'$ref': '#/definitions/PublicAddressResults'}},
8955 'ResolveCharms': {'properties': {'Params': {'$ref': '#/definitions/ResolveCharms'},
8956 'Result': {'$ref': '#/definitions/ResolveCharmResults'}},
8958 'Resolved': {'properties': {'Params': {'$ref': '#/definitions/Resolved'}},
8960 'RetryProvisioning': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
8961 'Result': {'$ref': '#/definitions/ErrorResults'}},
8963 'SetModelAgentVersion': {'properties': {'Params': {'$ref': '#/definitions/SetModelAgentVersion'}},
8965 'SetModelConstraints': {'properties': {'Params': {'$ref': '#/definitions/SetConstraints'}},
8967 'SetModelDefaults': {'properties': {'Params': {'$ref': '#/definitions/SetModelDefaults'},
8968 'Result': {'$ref': '#/definitions/ErrorResults'}},
8970 'StatusHistory': {'properties': {'Params': {'$ref': '#/definitions/StatusHistoryRequests'},
8971 'Result': {'$ref': '#/definitions/StatusHistoryResults'}},
8973 'UnsetModelDefaults': {'properties': {'Params': {'$ref': '#/definitions/UnsetModelDefaults'},
8974 'Result': {'$ref': '#/definitions/ErrorResults'}},
8976 'WatchAll': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherId'}},
8981 @ReturnMapping(APIHostPortsResult
)
8982 async def APIHostPorts(self
):
8985 Returns -> typing.Sequence<+T_co>[~HostPort]<~HostPort>
8987 # map input types to rpc msg
8989 msg
= dict(type='Client', request
='APIHostPorts', version
=1, params
=params
)
8991 reply
= await self
.rpc(msg
)
8996 @ReturnMapping(None)
8997 async def AbortCurrentUpgrade(self
):
9002 # map input types to rpc msg
9004 msg
= dict(type='Client', request
='AbortCurrentUpgrade', version
=1, params
=params
)
9006 reply
= await self
.rpc(msg
)
9011 @ReturnMapping(None)
9012 async def AddCharm(self
, channel
, url
):
9018 # map input types to rpc msg
9020 msg
= dict(type='Client', request
='AddCharm', version
=1, params
=params
)
9021 params
['channel'] = channel
9023 reply
= await self
.rpc(msg
)
9028 @ReturnMapping(None)
9029 async def AddCharmWithAuthorization(self
, channel
, macaroon
, url
):
9036 # map input types to rpc msg
9038 msg
= dict(type='Client', request
='AddCharmWithAuthorization', version
=1, params
=params
)
9039 params
['channel'] = channel
9040 params
['macaroon'] = macaroon
9042 reply
= await self
.rpc(msg
)
9047 @ReturnMapping(AddMachinesResults
)
9048 async def AddMachines(self
, params
):
9050 params : typing.Sequence<+T_co>[~AddMachineParams]<~AddMachineParams>
9051 Returns -> typing.Sequence<+T_co>[~AddMachinesResult]<~AddMachinesResult>
9053 # map input types to rpc msg
9055 msg
= dict(type='Client', request
='AddMachines', version
=1, params
=params
)
9056 params
['params'] = params
9057 reply
= await self
.rpc(msg
)
9062 @ReturnMapping(AddMachinesResults
)
9063 async def AddMachinesV2(self
, params
):
9065 params : typing.Sequence<+T_co>[~AddMachineParams]<~AddMachineParams>
9066 Returns -> typing.Sequence<+T_co>[~AddMachinesResult]<~AddMachinesResult>
9068 # map input types to rpc msg
9070 msg
= dict(type='Client', request
='AddMachinesV2', version
=1, params
=params
)
9071 params
['params'] = params
9072 reply
= await self
.rpc(msg
)
9077 @ReturnMapping(AgentVersionResult
)
9078 async def AgentVersion(self
):
9083 # map input types to rpc msg
9085 msg
= dict(type='Client', request
='AgentVersion', version
=1, params
=params
)
9087 reply
= await self
.rpc(msg
)
9092 @ReturnMapping(None)
9093 async def DestroyMachines(self
, force
, machine_names
):
9096 machine_names : typing.Sequence<+T_co>[str]
9099 # map input types to rpc msg
9101 msg
= dict(type='Client', request
='DestroyMachines', version
=1, params
=params
)
9102 params
['force'] = force
9103 params
['machine-names'] = machine_names
9104 reply
= await self
.rpc(msg
)
9109 @ReturnMapping(FindToolsResult
)
9110 async def FindTools(self
, arch
, major
, minor
, number
, series
):
9117 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[~Tools]<~Tools>]
9119 # map input types to rpc msg
9121 msg
= dict(type='Client', request
='FindTools', version
=1, params
=params
)
9122 params
['arch'] = arch
9123 params
['major'] = major
9124 params
['minor'] = minor
9125 params
['number'] = number
9126 params
['series'] = series
9127 reply
= await self
.rpc(msg
)
9132 @ReturnMapping(FullStatus
)
9133 async def FullStatus(self
, patterns
):
9135 patterns : typing.Sequence<+T_co>[str]
9136 Returns -> typing.Union[typing.Mapping<~KT, +VT_co>[str, ~MachineStatus]<~MachineStatus>, _ForwardRef('ModelStatusInfo'), typing.Sequence<+T_co>[~RelationStatus]<~RelationStatus>]
9138 # map input types to rpc msg
9140 msg
= dict(type='Client', request
='FullStatus', version
=1, params
=params
)
9141 params
['patterns'] = patterns
9142 reply
= await self
.rpc(msg
)
9147 @ReturnMapping(GetBundleChangesResults
)
9148 async def GetBundleChanges(self
, yaml
):
9151 Returns -> typing.Sequence<+T_co>[~BundleChangesChange]<~BundleChangesChange>
9153 # map input types to rpc msg
9155 msg
= dict(type='Client', request
='GetBundleChanges', version
=1, params
=params
)
9156 params
['yaml'] = yaml
9157 reply
= await self
.rpc(msg
)
9162 @ReturnMapping(GetConstraintsResults
)
9163 async def GetModelConstraints(self
):
9168 # map input types to rpc msg
9170 msg
= dict(type='Client', request
='GetModelConstraints', version
=1, params
=params
)
9172 reply
= await self
.rpc(msg
)
9177 @ReturnMapping(AddMachinesResults
)
9178 async def InjectMachines(self
, params
):
9180 params : typing.Sequence<+T_co>[~AddMachineParams]<~AddMachineParams>
9181 Returns -> typing.Sequence<+T_co>[~AddMachinesResult]<~AddMachinesResult>
9183 # map input types to rpc msg
9185 msg
= dict(type='Client', request
='InjectMachines', version
=1, params
=params
)
9186 params
['params'] = params
9187 reply
= await self
.rpc(msg
)
9192 @ReturnMapping(ModelDefaultsResult
)
9193 async def ModelDefaults(self
):
9196 Returns -> typing.Mapping<~KT, +VT_co>[str, ~ModelDefaults]<~ModelDefaults>
9198 # map input types to rpc msg
9200 msg
= dict(type='Client', request
='ModelDefaults', version
=1, params
=params
)
9202 reply
= await self
.rpc(msg
)
9207 @ReturnMapping(ModelConfigResults
)
9208 async def ModelGet(self
):
9211 Returns -> typing.Mapping<~KT, +VT_co>[str, ~ConfigValue]<~ConfigValue>
9213 # map input types to rpc msg
9215 msg
= dict(type='Client', request
='ModelGet', version
=1, params
=params
)
9217 reply
= await self
.rpc(msg
)
9222 @ReturnMapping(ModelInfo
)
9223 async def ModelInfo(self
):
9226 Returns -> typing.Union[_ForwardRef('EntityStatus'), typing.Sequence<+T_co>[~ModelUserInfo]<~ModelUserInfo>]
9228 # map input types to rpc msg
9230 msg
= dict(type='Client', request
='ModelInfo', version
=1, params
=params
)
9232 reply
= await self
.rpc(msg
)
9237 @ReturnMapping(None)
9238 async def ModelSet(self
, config
):
9240 config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
9243 # map input types to rpc msg
9245 msg
= dict(type='Client', request
='ModelSet', version
=1, params
=params
)
9246 params
['config'] = config
9247 reply
= await self
.rpc(msg
)
9252 @ReturnMapping(None)
9253 async def ModelUnset(self
, keys
):
9255 keys : typing.Sequence<+T_co>[str]
9258 # map input types to rpc msg
9260 msg
= dict(type='Client', request
='ModelUnset', version
=1, params
=params
)
9261 params
['keys'] = keys
9262 reply
= await self
.rpc(msg
)
9267 @ReturnMapping(ModelUserInfoResults
)
9268 async def ModelUserInfo(self
):
9271 Returns -> typing.Sequence<+T_co>[~ModelUserInfoResult]<~ModelUserInfoResult>
9273 # map input types to rpc msg
9275 msg
= dict(type='Client', request
='ModelUserInfo', version
=1, params
=params
)
9277 reply
= await self
.rpc(msg
)
9282 @ReturnMapping(PrivateAddressResults
)
9283 async def PrivateAddress(self
, target
):
9288 # map input types to rpc msg
9290 msg
= dict(type='Client', request
='PrivateAddress', version
=1, params
=params
)
9291 params
['target'] = target
9292 reply
= await self
.rpc(msg
)
9297 @ReturnMapping(ProvisioningScriptResult
)
9298 async def ProvisioningScript(self
, data_dir
, disable_package_commands
, machine_id
, nonce
):
9301 disable_package_commands : bool
9306 # map input types to rpc msg
9308 msg
= dict(type='Client', request
='ProvisioningScript', version
=1, params
=params
)
9309 params
['data-dir'] = data_dir
9310 params
['disable-package-commands'] = disable_package_commands
9311 params
['machine-id'] = machine_id
9312 params
['nonce'] = nonce
9313 reply
= await self
.rpc(msg
)
9318 @ReturnMapping(PublicAddressResults
)
9319 async def PublicAddress(self
, target
):
9324 # map input types to rpc msg
9326 msg
= dict(type='Client', request
='PublicAddress', version
=1, params
=params
)
9327 params
['target'] = target
9328 reply
= await self
.rpc(msg
)
9333 @ReturnMapping(ResolveCharmResults
)
9334 async def ResolveCharms(self
, references
):
9336 references : typing.Sequence<+T_co>[str]
9337 Returns -> typing.Sequence<+T_co>[~ResolveCharmResult]<~ResolveCharmResult>
9339 # map input types to rpc msg
9341 msg
= dict(type='Client', request
='ResolveCharms', version
=1, params
=params
)
9342 params
['references'] = references
9343 reply
= await self
.rpc(msg
)
9348 @ReturnMapping(None)
9349 async def Resolved(self
, retry
, unit_name
):
9355 # map input types to rpc msg
9357 msg
= dict(type='Client', request
='Resolved', version
=1, params
=params
)
9358 params
['retry'] = retry
9359 params
['unit-name'] = unit_name
9360 reply
= await self
.rpc(msg
)
9365 @ReturnMapping(ErrorResults
)
9366 async def RetryProvisioning(self
, entities
):
9368 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
9369 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
9371 # map input types to rpc msg
9373 msg
= dict(type='Client', request
='RetryProvisioning', version
=1, params
=params
)
9374 params
['entities'] = entities
9375 reply
= await self
.rpc(msg
)
9380 @ReturnMapping(None)
9381 async def SetModelAgentVersion(self
, build
, major
, minor
, patch
, tag
):
9390 # map input types to rpc msg
9392 msg
= dict(type='Client', request
='SetModelAgentVersion', version
=1, params
=params
)
9393 params
['Build'] = build
9394 params
['Major'] = major
9395 params
['Minor'] = minor
9396 params
['Patch'] = patch
9398 reply
= await self
.rpc(msg
)
9403 @ReturnMapping(None)
9404 async def SetModelConstraints(self
, application
, constraints
):
9410 # map input types to rpc msg
9412 msg
= dict(type='Client', request
='SetModelConstraints', version
=1, params
=params
)
9413 params
['application'] = application
9414 params
['constraints'] = constraints
9415 reply
= await self
.rpc(msg
)
9420 @ReturnMapping(ErrorResults
)
9421 async def SetModelDefaults(self
, config
):
9423 config : typing.Sequence<+T_co>[~ModelDefaultValues]<~ModelDefaultValues>
9424 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
9426 # map input types to rpc msg
9428 msg
= dict(type='Client', request
='SetModelDefaults', version
=1, params
=params
)
9429 params
['config'] = config
9430 reply
= await self
.rpc(msg
)
9435 @ReturnMapping(StatusHistoryResults
)
9436 async def StatusHistory(self
, requests
):
9438 requests : typing.Sequence<+T_co>[~StatusHistoryRequest]<~StatusHistoryRequest>
9439 Returns -> typing.Sequence<+T_co>[~StatusHistoryResult]<~StatusHistoryResult>
9441 # map input types to rpc msg
9443 msg
= dict(type='Client', request
='StatusHistory', version
=1, params
=params
)
9444 params
['requests'] = requests
9445 reply
= await self
.rpc(msg
)
9450 @ReturnMapping(ErrorResults
)
9451 async def UnsetModelDefaults(self
, keys
):
9453 keys : typing.Sequence<+T_co>[~ModelUnsetKeys]<~ModelUnsetKeys>
9454 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
9456 # map input types to rpc msg
9458 msg
= dict(type='Client', request
='UnsetModelDefaults', version
=1, params
=params
)
9459 params
['keys'] = keys
9460 reply
= await self
.rpc(msg
)
9465 @ReturnMapping(AllWatcherId
)
9466 async def WatchAll(self
):
9471 # map input types to rpc msg
9473 msg
= dict(type='Client', request
='WatchAll', version
=1, params
=params
)
9475 reply
= await self
.rpc(msg
)
9479 class CloudFacade(Type
):
9482 schema
= {'definitions': {'Cloud': {'additionalProperties': False,
9483 'properties': {'auth-types': {'items': {'type': 'string'},
9485 'endpoint': {'type': 'string'},
9486 'identity-endpoint': {'type': 'string'},
9487 'regions': {'items': {'$ref': '#/definitions/CloudRegion'},
9489 'storage-endpoint': {'type': 'string'},
9490 'type': {'type': 'string'}},
9491 'required': ['type'],
9493 'CloudCredential': {'additionalProperties': False,
9494 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}},
9496 'auth-type': {'type': 'string'},
9497 'redacted': {'items': {'type': 'string'},
9499 'required': ['auth-type'],
9501 'CloudCredentialResult': {'additionalProperties': False,
9502 'properties': {'error': {'$ref': '#/definitions/Error'},
9503 'result': {'$ref': '#/definitions/CloudCredential'}},
9505 'CloudCredentialResults': {'additionalProperties': False,
9506 'properties': {'results': {'items': {'$ref': '#/definitions/CloudCredentialResult'},
9509 'CloudRegion': {'additionalProperties': False,
9510 'properties': {'endpoint': {'type': 'string'},
9511 'identity-endpoint': {'type': 'string'},
9512 'name': {'type': 'string'},
9513 'storage-endpoint': {'type': 'string'}},
9514 'required': ['name'],
9516 'CloudResult': {'additionalProperties': False,
9517 'properties': {'cloud': {'$ref': '#/definitions/Cloud'},
9518 'error': {'$ref': '#/definitions/Error'}},
9520 'CloudResults': {'additionalProperties': False,
9521 'properties': {'results': {'items': {'$ref': '#/definitions/CloudResult'},
9524 'CloudsResult': {'additionalProperties': False,
9525 'properties': {'clouds': {'patternProperties': {'.*': {'$ref': '#/definitions/Cloud'}},
9528 'Entities': {'additionalProperties': False,
9529 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
9531 'required': ['entities'],
9533 'Entity': {'additionalProperties': False,
9534 'properties': {'tag': {'type': 'string'}},
9535 'required': ['tag'],
9537 'Error': {'additionalProperties': False,
9538 'properties': {'code': {'type': 'string'},
9539 'info': {'$ref': '#/definitions/ErrorInfo'},
9540 'message': {'type': 'string'}},
9541 'required': ['message', 'code'],
9543 'ErrorInfo': {'additionalProperties': False,
9544 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
9545 'macaroon-path': {'type': 'string'}},
9547 'ErrorResult': {'additionalProperties': False,
9548 'properties': {'error': {'$ref': '#/definitions/Error'}},
9550 'ErrorResults': {'additionalProperties': False,
9551 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
9553 'required': ['results'],
9555 'Macaroon': {'additionalProperties': False, 'type': 'object'},
9556 'StringResult': {'additionalProperties': False,
9557 'properties': {'error': {'$ref': '#/definitions/Error'},
9558 'result': {'type': 'string'}},
9559 'required': ['result'],
9561 'StringsResult': {'additionalProperties': False,
9562 'properties': {'error': {'$ref': '#/definitions/Error'},
9563 'result': {'items': {'type': 'string'},
9566 'StringsResults': {'additionalProperties': False,
9567 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
9569 'required': ['results'],
9571 'UpdateCloudCredential': {'additionalProperties': False,
9572 'properties': {'credential': {'$ref': '#/definitions/CloudCredential'},
9573 'tag': {'type': 'string'}},
9574 'required': ['tag', 'credential'],
9576 'UpdateCloudCredentials': {'additionalProperties': False,
9577 'properties': {'credentials': {'items': {'$ref': '#/definitions/UpdateCloudCredential'},
9580 'UserCloud': {'additionalProperties': False,
9581 'properties': {'cloud-tag': {'type': 'string'},
9582 'user-tag': {'type': 'string'}},
9583 'required': ['user-tag', 'cloud-tag'],
9585 'UserClouds': {'additionalProperties': False,
9586 'properties': {'user-clouds': {'items': {'$ref': '#/definitions/UserCloud'},
9589 'properties': {'Cloud': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9590 'Result': {'$ref': '#/definitions/CloudResults'}},
9592 'Clouds': {'properties': {'Result': {'$ref': '#/definitions/CloudsResult'}},
9594 'Credential': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9595 'Result': {'$ref': '#/definitions/CloudCredentialResults'}},
9597 'DefaultCloud': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
9599 'RevokeCredentials': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9600 'Result': {'$ref': '#/definitions/ErrorResults'}},
9602 'UpdateCredentials': {'properties': {'Params': {'$ref': '#/definitions/UpdateCloudCredentials'},
9603 'Result': {'$ref': '#/definitions/ErrorResults'}},
9605 'UserCredentials': {'properties': {'Params': {'$ref': '#/definitions/UserClouds'},
9606 'Result': {'$ref': '#/definitions/StringsResults'}},
9611 @ReturnMapping(CloudResults
)
9612 async def Cloud(self
, entities
):
9614 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
9615 Returns -> typing.Sequence<+T_co>[~CloudResult]<~CloudResult>
9617 # map input types to rpc msg
9619 msg
= dict(type='Cloud', request
='Cloud', version
=1, params
=params
)
9620 params
['entities'] = entities
9621 reply
= await self
.rpc(msg
)
9626 @ReturnMapping(CloudsResult
)
9627 async def Clouds(self
):
9630 Returns -> typing.Mapping<~KT, +VT_co>[str, ~Cloud]<~Cloud>
9632 # map input types to rpc msg
9634 msg
= dict(type='Cloud', request
='Clouds', version
=1, params
=params
)
9636 reply
= await self
.rpc(msg
)
9641 @ReturnMapping(CloudCredentialResults
)
9642 async def Credential(self
, entities
):
9644 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
9645 Returns -> typing.Sequence<+T_co>[~CloudCredentialResult]<~CloudCredentialResult>
9647 # map input types to rpc msg
9649 msg
= dict(type='Cloud', request
='Credential', version
=1, params
=params
)
9650 params
['entities'] = entities
9651 reply
= await self
.rpc(msg
)
9656 @ReturnMapping(StringResult
)
9657 async def DefaultCloud(self
):
9660 Returns -> typing.Union[_ForwardRef('Error'), str]
9662 # map input types to rpc msg
9664 msg
= dict(type='Cloud', request
='DefaultCloud', version
=1, params
=params
)
9666 reply
= await self
.rpc(msg
)
9671 @ReturnMapping(ErrorResults
)
9672 async def RevokeCredentials(self
, entities
):
9674 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
9675 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
9677 # map input types to rpc msg
9679 msg
= dict(type='Cloud', request
='RevokeCredentials', version
=1, params
=params
)
9680 params
['entities'] = entities
9681 reply
= await self
.rpc(msg
)
9686 @ReturnMapping(ErrorResults
)
9687 async def UpdateCredentials(self
, credentials
):
9689 credentials : typing.Sequence<+T_co>[~UpdateCloudCredential]<~UpdateCloudCredential>
9690 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
9692 # map input types to rpc msg
9694 msg
= dict(type='Cloud', request
='UpdateCredentials', version
=1, params
=params
)
9695 params
['credentials'] = credentials
9696 reply
= await self
.rpc(msg
)
9701 @ReturnMapping(StringsResults
)
9702 async def UserCredentials(self
, user_clouds
):
9704 user_clouds : typing.Sequence<+T_co>[~UserCloud]<~UserCloud>
9705 Returns -> typing.Sequence<+T_co>[~StringsResult]<~StringsResult>
9707 # map input types to rpc msg
9709 msg
= dict(type='Cloud', request
='UserCredentials', version
=1, params
=params
)
9710 params
['user-clouds'] = user_clouds
9711 reply
= await self
.rpc(msg
)
9715 class ControllerFacade(Type
):
9718 schema
= {'definitions': {'AllWatcherId': {'additionalProperties': False,
9719 'properties': {'watcher-id': {'type': 'string'}},
9720 'required': ['watcher-id'],
9722 'CloudCredential': {'additionalProperties': False,
9723 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}},
9725 'auth-type': {'type': 'string'},
9726 'redacted': {'items': {'type': 'string'},
9728 'required': ['auth-type'],
9730 'CloudSpec': {'additionalProperties': False,
9731 'properties': {'credential': {'$ref': '#/definitions/CloudCredential'},
9732 'endpoint': {'type': 'string'},
9733 'identity-endpoint': {'type': 'string'},
9734 'name': {'type': 'string'},
9735 'region': {'type': 'string'},
9736 'storage-endpoint': {'type': 'string'},
9737 'type': {'type': 'string'}},
9738 'required': ['type', 'name'],
9740 'CloudSpecResult': {'additionalProperties': False,
9741 'properties': {'error': {'$ref': '#/definitions/Error'},
9742 'result': {'$ref': '#/definitions/CloudSpec'}},
9744 'CloudSpecResults': {'additionalProperties': False,
9745 'properties': {'results': {'items': {'$ref': '#/definitions/CloudSpecResult'},
9748 'ConfigValue': {'additionalProperties': False,
9749 'properties': {'source': {'type': 'string'},
9750 'value': {'additionalProperties': True,
9752 'required': ['value', 'source'],
9754 'ControllerConfigResult': {'additionalProperties': False,
9755 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
9758 'required': ['config'],
9760 'DestroyControllerArgs': {'additionalProperties': False,
9761 'properties': {'destroy-models': {'type': 'boolean'}},
9762 'required': ['destroy-models'],
9764 'Entities': {'additionalProperties': False,
9765 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
9767 'required': ['entities'],
9769 'Entity': {'additionalProperties': False,
9770 'properties': {'tag': {'type': 'string'}},
9771 'required': ['tag'],
9773 'Error': {'additionalProperties': False,
9774 'properties': {'code': {'type': 'string'},
9775 'info': {'$ref': '#/definitions/ErrorInfo'},
9776 'message': {'type': 'string'}},
9777 'required': ['message', 'code'],
9779 'ErrorInfo': {'additionalProperties': False,
9780 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
9781 'macaroon-path': {'type': 'string'}},
9783 'ErrorResult': {'additionalProperties': False,
9784 'properties': {'error': {'$ref': '#/definitions/Error'}},
9786 'ErrorResults': {'additionalProperties': False,
9787 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
9789 'required': ['results'],
9791 'InitiateMigrationArgs': {'additionalProperties': False,
9792 'properties': {'specs': {'items': {'$ref': '#/definitions/MigrationSpec'},
9794 'required': ['specs'],
9796 'InitiateMigrationResult': {'additionalProperties': False,
9797 'properties': {'error': {'$ref': '#/definitions/Error'},
9798 'migration-id': {'type': 'string'},
9799 'model-tag': {'type': 'string'}},
9800 'required': ['model-tag',
9803 'InitiateMigrationResults': {'additionalProperties': False,
9804 'properties': {'results': {'items': {'$ref': '#/definitions/InitiateMigrationResult'},
9806 'required': ['results'],
9808 'Macaroon': {'additionalProperties': False, 'type': 'object'},
9809 'MigrationSpec': {'additionalProperties': False,
9810 'properties': {'model-tag': {'type': 'string'},
9811 'target-info': {'$ref': '#/definitions/MigrationTargetInfo'}},
9812 'required': ['model-tag', 'target-info'],
9814 'MigrationTargetInfo': {'additionalProperties': False,
9815 'properties': {'addrs': {'items': {'type': 'string'},
9817 'auth-tag': {'type': 'string'},
9818 'ca-cert': {'type': 'string'},
9819 'controller-tag': {'type': 'string'},
9820 'macaroon': {'type': 'string'},
9821 'password': {'type': 'string'}},
9822 'required': ['controller-tag',
9827 'Model': {'additionalProperties': False,
9828 'properties': {'name': {'type': 'string'},
9829 'owner-tag': {'type': 'string'},
9830 'uuid': {'type': 'string'}},
9831 'required': ['name', 'uuid', 'owner-tag'],
9833 'ModelBlockInfo': {'additionalProperties': False,
9834 'properties': {'blocks': {'items': {'type': 'string'},
9836 'model-uuid': {'type': 'string'},
9837 'name': {'type': 'string'},
9838 'owner-tag': {'type': 'string'}},
9839 'required': ['name',
9844 'ModelBlockInfoList': {'additionalProperties': False,
9845 'properties': {'models': {'items': {'$ref': '#/definitions/ModelBlockInfo'},
9848 'ModelConfigResults': {'additionalProperties': False,
9849 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ConfigValue'}},
9851 'required': ['config'],
9853 'ModelStatus': {'additionalProperties': False,
9854 'properties': {'application-count': {'type': 'integer'},
9855 'hosted-machine-count': {'type': 'integer'},
9856 'life': {'type': 'string'},
9857 'model-tag': {'type': 'string'},
9858 'owner-tag': {'type': 'string'}},
9859 'required': ['model-tag',
9861 'hosted-machine-count',
9862 'application-count',
9865 'ModelStatusResults': {'additionalProperties': False,
9866 'properties': {'models': {'items': {'$ref': '#/definitions/ModelStatus'},
9868 'required': ['models'],
9870 'ModifyControllerAccess': {'additionalProperties': False,
9871 'properties': {'access': {'type': 'string'},
9872 'action': {'type': 'string'},
9873 'user-tag': {'type': 'string'}},
9874 'required': ['user-tag',
9878 'ModifyControllerAccessRequest': {'additionalProperties': False,
9879 'properties': {'changes': {'items': {'$ref': '#/definitions/ModifyControllerAccess'},
9881 'required': ['changes'],
9883 'RemoveBlocksArgs': {'additionalProperties': False,
9884 'properties': {'all': {'type': 'boolean'}},
9885 'required': ['all'],
9887 'UserAccess': {'additionalProperties': False,
9888 'properties': {'access': {'type': 'string'},
9889 'user-tag': {'type': 'string'}},
9890 'required': ['user-tag', 'access'],
9892 'UserAccessResult': {'additionalProperties': False,
9893 'properties': {'error': {'$ref': '#/definitions/Error'},
9894 'result': {'$ref': '#/definitions/UserAccess'}},
9896 'UserAccessResults': {'additionalProperties': False,
9897 'properties': {'results': {'items': {'$ref': '#/definitions/UserAccessResult'},
9900 'UserModel': {'additionalProperties': False,
9901 'properties': {'last-connection': {'format': 'date-time',
9903 'model': {'$ref': '#/definitions/Model'}},
9904 'required': ['model', 'last-connection'],
9906 'UserModelList': {'additionalProperties': False,
9907 'properties': {'user-models': {'items': {'$ref': '#/definitions/UserModel'},
9909 'required': ['user-models'],
9911 'properties': {'AllModels': {'properties': {'Result': {'$ref': '#/definitions/UserModelList'}},
9913 'CloudSpec': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9914 'Result': {'$ref': '#/definitions/CloudSpecResults'}},
9916 'ControllerConfig': {'properties': {'Result': {'$ref': '#/definitions/ControllerConfigResult'}},
9918 'DestroyController': {'properties': {'Params': {'$ref': '#/definitions/DestroyControllerArgs'}},
9920 'GetControllerAccess': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9921 'Result': {'$ref': '#/definitions/UserAccessResults'}},
9923 'InitiateMigration': {'properties': {'Params': {'$ref': '#/definitions/InitiateMigrationArgs'},
9924 'Result': {'$ref': '#/definitions/InitiateMigrationResults'}},
9926 'ListBlockedModels': {'properties': {'Result': {'$ref': '#/definitions/ModelBlockInfoList'}},
9928 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}},
9930 'ModelStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9931 'Result': {'$ref': '#/definitions/ModelStatusResults'}},
9933 'ModifyControllerAccess': {'properties': {'Params': {'$ref': '#/definitions/ModifyControllerAccessRequest'},
9934 'Result': {'$ref': '#/definitions/ErrorResults'}},
9936 'RemoveBlocks': {'properties': {'Params': {'$ref': '#/definitions/RemoveBlocksArgs'}},
9938 'WatchAllModels': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherId'}},
9943 @ReturnMapping(UserModelList
)
9944 async def AllModels(self
):
9947 Returns -> typing.Sequence<+T_co>[~UserModel]<~UserModel>
9949 # map input types to rpc msg
9951 msg
= dict(type='Controller', request
='AllModels', version
=3, params
=params
)
9953 reply
= await self
.rpc(msg
)
9958 @ReturnMapping(CloudSpecResults
)
9959 async def CloudSpec(self
, entities
):
9961 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
9962 Returns -> typing.Sequence<+T_co>[~CloudSpecResult]<~CloudSpecResult>
9964 # map input types to rpc msg
9966 msg
= dict(type='Controller', request
='CloudSpec', version
=3, params
=params
)
9967 params
['entities'] = entities
9968 reply
= await self
.rpc(msg
)
9973 @ReturnMapping(ControllerConfigResult
)
9974 async def ControllerConfig(self
):
9977 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
9979 # map input types to rpc msg
9981 msg
= dict(type='Controller', request
='ControllerConfig', version
=3, params
=params
)
9983 reply
= await self
.rpc(msg
)
9988 @ReturnMapping(None)
9989 async def DestroyController(self
, destroy_models
):
9991 destroy_models : bool
9994 # map input types to rpc msg
9996 msg
= dict(type='Controller', request
='DestroyController', version
=3, params
=params
)
9997 params
['destroy-models'] = destroy_models
9998 reply
= await self
.rpc(msg
)
10003 @ReturnMapping(UserAccessResults
)
10004 async def GetControllerAccess(self
, entities
):
10006 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
10007 Returns -> typing.Sequence<+T_co>[~UserAccessResult]<~UserAccessResult>
10009 # map input types to rpc msg
10011 msg
= dict(type='Controller', request
='GetControllerAccess', version
=3, params
=params
)
10012 params
['entities'] = entities
10013 reply
= await self
.rpc(msg
)
10018 @ReturnMapping(InitiateMigrationResults
)
10019 async def InitiateMigration(self
, specs
):
10021 specs : typing.Sequence<+T_co>[~MigrationSpec]<~MigrationSpec>
10022 Returns -> typing.Sequence<+T_co>[~InitiateMigrationResult]<~InitiateMigrationResult>
10024 # map input types to rpc msg
10026 msg
= dict(type='Controller', request
='InitiateMigration', version
=3, params
=params
)
10027 params
['specs'] = specs
10028 reply
= await self
.rpc(msg
)
10033 @ReturnMapping(ModelBlockInfoList
)
10034 async def ListBlockedModels(self
):
10037 Returns -> typing.Sequence<+T_co>[~ModelBlockInfo]<~ModelBlockInfo>
10039 # map input types to rpc msg
10041 msg
= dict(type='Controller', request
='ListBlockedModels', version
=3, params
=params
)
10043 reply
= await self
.rpc(msg
)
10048 @ReturnMapping(ModelConfigResults
)
10049 async def ModelConfig(self
):
10052 Returns -> typing.Mapping<~KT, +VT_co>[str, ~ConfigValue]<~ConfigValue>
10054 # map input types to rpc msg
10056 msg
= dict(type='Controller', request
='ModelConfig', version
=3, params
=params
)
10058 reply
= await self
.rpc(msg
)
10063 @ReturnMapping(ModelStatusResults
)
10064 async def ModelStatus(self
, entities
):
10066 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
10067 Returns -> typing.Sequence<+T_co>[~ModelStatus]<~ModelStatus>
10069 # map input types to rpc msg
10071 msg
= dict(type='Controller', request
='ModelStatus', version
=3, params
=params
)
10072 params
['entities'] = entities
10073 reply
= await self
.rpc(msg
)
10078 @ReturnMapping(ErrorResults
)
10079 async def ModifyControllerAccess(self
, changes
):
10081 changes : typing.Sequence<+T_co>[~ModifyControllerAccess]<~ModifyControllerAccess>
10082 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
10084 # map input types to rpc msg
10086 msg
= dict(type='Controller', request
='ModifyControllerAccess', version
=3, params
=params
)
10087 params
['changes'] = changes
10088 reply
= await self
.rpc(msg
)
10093 @ReturnMapping(None)
10094 async def RemoveBlocks(self
, all_
):
10099 # map input types to rpc msg
10101 msg
= dict(type='Controller', request
='RemoveBlocks', version
=3, params
=params
)
10102 params
['all'] = all_
10103 reply
= await self
.rpc(msg
)
10108 @ReturnMapping(AllWatcherId
)
10109 async def WatchAllModels(self
):
10114 # map input types to rpc msg
10116 msg
= dict(type='Controller', request
='WatchAllModels', version
=3, params
=params
)
10118 reply
= await self
.rpc(msg
)
10122 class DeployerFacade(Type
):
10125 schema
= {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
10126 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
10129 'required': ['servers'],
10131 'Address': {'additionalProperties': False,
10132 'properties': {'scope': {'type': 'string'},
10133 'space-name': {'type': 'string'},
10134 'type': {'type': 'string'},
10135 'value': {'type': 'string'}},
10136 'required': ['value', 'type', 'scope'],
10138 'BytesResult': {'additionalProperties': False,
10139 'properties': {'result': {'items': {'type': 'integer'},
10141 'required': ['result'],
10143 'DeployerConnectionValues': {'additionalProperties': False,
10144 'properties': {'api-addresses': {'items': {'type': 'string'},
10146 'state-addresses': {'items': {'type': 'string'},
10148 'required': ['state-addresses',
10151 'Entities': {'additionalProperties': False,
10152 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
10154 'required': ['entities'],
10156 'Entity': {'additionalProperties': False,
10157 'properties': {'tag': {'type': 'string'}},
10158 'required': ['tag'],
10160 'EntityPassword': {'additionalProperties': False,
10161 'properties': {'password': {'type': 'string'},
10162 'tag': {'type': 'string'}},
10163 'required': ['tag', 'password'],
10165 'EntityPasswords': {'additionalProperties': False,
10166 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'},
10168 'required': ['changes'],
10170 'Error': {'additionalProperties': False,
10171 'properties': {'code': {'type': 'string'},
10172 'info': {'$ref': '#/definitions/ErrorInfo'},
10173 'message': {'type': 'string'}},
10174 'required': ['message', 'code'],
10176 'ErrorInfo': {'additionalProperties': False,
10177 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
10178 'macaroon-path': {'type': 'string'}},
10180 'ErrorResult': {'additionalProperties': False,
10181 'properties': {'error': {'$ref': '#/definitions/Error'}},
10183 'ErrorResults': {'additionalProperties': False,
10184 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
10186 'required': ['results'],
10188 'HostPort': {'additionalProperties': False,
10189 'properties': {'Address': {'$ref': '#/definitions/Address'},
10190 'port': {'type': 'integer'}},
10191 'required': ['Address', 'port'],
10193 'LifeResult': {'additionalProperties': False,
10194 'properties': {'error': {'$ref': '#/definitions/Error'},
10195 'life': {'type': 'string'}},
10196 'required': ['life'],
10198 'LifeResults': {'additionalProperties': False,
10199 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
10201 'required': ['results'],
10203 'Macaroon': {'additionalProperties': False, 'type': 'object'},
10204 'NotifyWatchResult': {'additionalProperties': False,
10205 'properties': {'NotifyWatcherId': {'type': 'string'},
10206 'error': {'$ref': '#/definitions/Error'}},
10207 'required': ['NotifyWatcherId'],
10209 'StringResult': {'additionalProperties': False,
10210 'properties': {'error': {'$ref': '#/definitions/Error'},
10211 'result': {'type': 'string'}},
10212 'required': ['result'],
10214 'StringsResult': {'additionalProperties': False,
10215 'properties': {'error': {'$ref': '#/definitions/Error'},
10216 'result': {'items': {'type': 'string'},
10219 'StringsWatchResult': {'additionalProperties': False,
10220 'properties': {'changes': {'items': {'type': 'string'},
10222 'error': {'$ref': '#/definitions/Error'},
10223 'watcher-id': {'type': 'string'}},
10224 'required': ['watcher-id'],
10226 'StringsWatchResults': {'additionalProperties': False,
10227 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
10229 'required': ['results'],
10230 'type': 'object'}},
10231 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
10233 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
10235 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
10237 'ConnectionInfo': {'properties': {'Result': {'$ref': '#/definitions/DeployerConnectionValues'}},
10239 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10240 'Result': {'$ref': '#/definitions/LifeResults'}},
10242 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
10244 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10245 'Result': {'$ref': '#/definitions/ErrorResults'}},
10247 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
10248 'Result': {'$ref': '#/definitions/ErrorResults'}},
10250 'StateAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
10252 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
10254 'WatchUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10255 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
10256 'type': 'object'}},
10260 @ReturnMapping(StringsResult
)
10261 async def APIAddresses(self
):
10264 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[str]]
10266 # map input types to rpc msg
10268 msg
= dict(type='Deployer', request
='APIAddresses', version
=1, params
=params
)
10270 reply
= await self
.rpc(msg
)
10275 @ReturnMapping(APIHostPortsResult
)
10276 async def APIHostPorts(self
):
10279 Returns -> typing.Sequence<+T_co>[~HostPort]<~HostPort>
10281 # map input types to rpc msg
10283 msg
= dict(type='Deployer', request
='APIHostPorts', version
=1, params
=params
)
10285 reply
= await self
.rpc(msg
)
10290 @ReturnMapping(BytesResult
)
10291 async def CACert(self
):
10294 Returns -> typing.Sequence<+T_co>[int]
10296 # map input types to rpc msg
10298 msg
= dict(type='Deployer', request
='CACert', version
=1, params
=params
)
10300 reply
= await self
.rpc(msg
)
10305 @ReturnMapping(DeployerConnectionValues
)
10306 async def ConnectionInfo(self
):
10309 Returns -> typing.Sequence<+T_co>[str]
10311 # map input types to rpc msg
10313 msg
= dict(type='Deployer', request
='ConnectionInfo', version
=1, params
=params
)
10315 reply
= await self
.rpc(msg
)
10320 @ReturnMapping(LifeResults
)
10321 async def Life(self
, entities
):
10323 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
10324 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
10326 # map input types to rpc msg
10328 msg
= dict(type='Deployer', request
='Life', version
=1, params
=params
)
10329 params
['entities'] = entities
10330 reply
= await self
.rpc(msg
)
10335 @ReturnMapping(StringResult
)
10336 async def ModelUUID(self
):
10339 Returns -> typing.Union[_ForwardRef('Error'), str]
10341 # map input types to rpc msg
10343 msg
= dict(type='Deployer', request
='ModelUUID', version
=1, params
=params
)
10345 reply
= await self
.rpc(msg
)
10350 @ReturnMapping(ErrorResults
)
10351 async def Remove(self
, entities
):
10353 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
10354 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
10356 # map input types to rpc msg
10358 msg
= dict(type='Deployer', request
='Remove', version
=1, params
=params
)
10359 params
['entities'] = entities
10360 reply
= await self
.rpc(msg
)
10365 @ReturnMapping(ErrorResults
)
10366 async def SetPasswords(self
, changes
):
10368 changes : typing.Sequence<+T_co>[~EntityPassword]<~EntityPassword>
10369 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
10371 # map input types to rpc msg
10373 msg
= dict(type='Deployer', request
='SetPasswords', version
=1, params
=params
)
10374 params
['changes'] = changes
10375 reply
= await self
.rpc(msg
)
10380 @ReturnMapping(StringsResult
)
10381 async def StateAddresses(self
):
10384 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[str]]
10386 # map input types to rpc msg
10388 msg
= dict(type='Deployer', request
='StateAddresses', version
=1, params
=params
)
10390 reply
= await self
.rpc(msg
)
10395 @ReturnMapping(NotifyWatchResult
)
10396 async def WatchAPIHostPorts(self
):
10399 Returns -> typing.Union[str, _ForwardRef('Error')]
10401 # map input types to rpc msg
10403 msg
= dict(type='Deployer', request
='WatchAPIHostPorts', version
=1, params
=params
)
10405 reply
= await self
.rpc(msg
)
10410 @ReturnMapping(StringsWatchResults
)
10411 async def WatchUnits(self
, entities
):
10413 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
10414 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
10416 # map input types to rpc msg
10418 msg
= dict(type='Deployer', request
='WatchUnits', version
=1, params
=params
)
10419 params
['entities'] = entities
10420 reply
= await self
.rpc(msg
)
10424 class DiscoverSpacesFacade(Type
):
10425 name
= 'DiscoverSpaces'
10427 schema
= {'definitions': {'AddSubnetParams': {'additionalProperties': False,
10428 'properties': {'space-tag': {'type': 'string'},
10429 'subnet-provider-id': {'type': 'string'},
10430 'subnet-tag': {'type': 'string'},
10431 'zones': {'items': {'type': 'string'},
10433 'required': ['space-tag'],
10435 'AddSubnetsParams': {'additionalProperties': False,
10436 'properties': {'subnets': {'items': {'$ref': '#/definitions/AddSubnetParams'},
10438 'required': ['subnets'],
10440 'CreateSpaceParams': {'additionalProperties': False,
10441 'properties': {'provider-id': {'type': 'string'},
10442 'public': {'type': 'boolean'},
10443 'space-tag': {'type': 'string'},
10444 'subnet-tags': {'items': {'type': 'string'},
10446 'required': ['subnet-tags',
10450 'CreateSpacesParams': {'additionalProperties': False,
10451 'properties': {'spaces': {'items': {'$ref': '#/definitions/CreateSpaceParams'},
10453 'required': ['spaces'],
10455 'DiscoverSpacesResults': {'additionalProperties': False,
10456 'properties': {'results': {'items': {'$ref': '#/definitions/ProviderSpace'},
10458 'required': ['results'],
10460 'Error': {'additionalProperties': False,
10461 'properties': {'code': {'type': 'string'},
10462 'info': {'$ref': '#/definitions/ErrorInfo'},
10463 'message': {'type': 'string'}},
10464 'required': ['message', 'code'],
10466 'ErrorInfo': {'additionalProperties': False,
10467 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
10468 'macaroon-path': {'type': 'string'}},
10470 'ErrorResult': {'additionalProperties': False,
10471 'properties': {'error': {'$ref': '#/definitions/Error'}},
10473 'ErrorResults': {'additionalProperties': False,
10474 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
10476 'required': ['results'],
10478 'ListSubnetsResults': {'additionalProperties': False,
10479 'properties': {'results': {'items': {'$ref': '#/definitions/Subnet'},
10481 'required': ['results'],
10483 'Macaroon': {'additionalProperties': False, 'type': 'object'},
10484 'ModelConfigResult': {'additionalProperties': False,
10485 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
10486 'type': 'object'}},
10487 'type': 'object'}},
10488 'required': ['config'],
10490 'ProviderSpace': {'additionalProperties': False,
10491 'properties': {'error': {'$ref': '#/definitions/Error'},
10492 'name': {'type': 'string'},
10493 'provider-id': {'type': 'string'},
10494 'subnets': {'items': {'$ref': '#/definitions/Subnet'},
10496 'required': ['name',
10500 'Subnet': {'additionalProperties': False,
10501 'properties': {'cidr': {'type': 'string'},
10502 'life': {'type': 'string'},
10503 'provider-id': {'type': 'string'},
10504 'space-tag': {'type': 'string'},
10505 'status': {'type': 'string'},
10506 'vlan-tag': {'type': 'integer'},
10507 'zones': {'items': {'type': 'string'},
10509 'required': ['cidr',
10515 'SubnetsFilters': {'additionalProperties': False,
10516 'properties': {'space-tag': {'type': 'string'},
10517 'zone': {'type': 'string'}},
10518 'type': 'object'}},
10519 'properties': {'AddSubnets': {'properties': {'Params': {'$ref': '#/definitions/AddSubnetsParams'},
10520 'Result': {'$ref': '#/definitions/ErrorResults'}},
10522 'CreateSpaces': {'properties': {'Params': {'$ref': '#/definitions/CreateSpacesParams'},
10523 'Result': {'$ref': '#/definitions/ErrorResults'}},
10525 'ListSpaces': {'properties': {'Result': {'$ref': '#/definitions/DiscoverSpacesResults'}},
10527 'ListSubnets': {'properties': {'Params': {'$ref': '#/definitions/SubnetsFilters'},
10528 'Result': {'$ref': '#/definitions/ListSubnetsResults'}},
10530 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
10531 'type': 'object'}},
10535 @ReturnMapping(ErrorResults
)
10536 async def AddSubnets(self
, subnets
):
10538 subnets : typing.Sequence<+T_co>[~AddSubnetParams]<~AddSubnetParams>
10539 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
10541 # map input types to rpc msg
10543 msg
= dict(type='DiscoverSpaces', request
='AddSubnets', version
=2, params
=params
)
10544 params
['subnets'] = subnets
10545 reply
= await self
.rpc(msg
)
10550 @ReturnMapping(ErrorResults
)
10551 async def CreateSpaces(self
, spaces
):
10553 spaces : typing.Sequence<+T_co>[~CreateSpaceParams]<~CreateSpaceParams>
10554 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
10556 # map input types to rpc msg
10558 msg
= dict(type='DiscoverSpaces', request
='CreateSpaces', version
=2, params
=params
)
10559 params
['spaces'] = spaces
10560 reply
= await self
.rpc(msg
)
10565 @ReturnMapping(DiscoverSpacesResults
)
10566 async def ListSpaces(self
):
10569 Returns -> typing.Sequence<+T_co>[~ProviderSpace]<~ProviderSpace>
10571 # map input types to rpc msg
10573 msg
= dict(type='DiscoverSpaces', request
='ListSpaces', version
=2, params
=params
)
10575 reply
= await self
.rpc(msg
)
10580 @ReturnMapping(ListSubnetsResults
)
10581 async def ListSubnets(self
, space_tag
, zone
):
10585 Returns -> typing.Sequence<+T_co>[~Subnet]<~Subnet>
10587 # map input types to rpc msg
10589 msg
= dict(type='DiscoverSpaces', request
='ListSubnets', version
=2, params
=params
)
10590 params
['space-tag'] = space_tag
10591 params
['zone'] = zone
10592 reply
= await self
.rpc(msg
)
10597 @ReturnMapping(ModelConfigResult
)
10598 async def ModelConfig(self
):
10601 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
10603 # map input types to rpc msg
10605 msg
= dict(type='DiscoverSpaces', request
='ModelConfig', version
=2, params
=params
)
10607 reply
= await self
.rpc(msg
)
10611 class DiskManagerFacade(Type
):
10612 name
= 'DiskManager'
10614 schema
= {'definitions': {'BlockDevice': {'additionalProperties': False,
10615 'properties': {'BusAddress': {'type': 'string'},
10616 'DeviceLinks': {'items': {'type': 'string'},
10618 'DeviceName': {'type': 'string'},
10619 'FilesystemType': {'type': 'string'},
10620 'HardwareId': {'type': 'string'},
10621 'InUse': {'type': 'boolean'},
10622 'Label': {'type': 'string'},
10623 'MountPoint': {'type': 'string'},
10624 'Size': {'type': 'integer'},
10625 'UUID': {'type': 'string'}},
10626 'required': ['DeviceName',
10637 'Error': {'additionalProperties': False,
10638 'properties': {'code': {'type': 'string'},
10639 'info': {'$ref': '#/definitions/ErrorInfo'},
10640 'message': {'type': 'string'}},
10641 'required': ['message', 'code'],
10643 'ErrorInfo': {'additionalProperties': False,
10644 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
10645 'macaroon-path': {'type': 'string'}},
10647 'ErrorResult': {'additionalProperties': False,
10648 'properties': {'error': {'$ref': '#/definitions/Error'}},
10650 'ErrorResults': {'additionalProperties': False,
10651 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
10653 'required': ['results'],
10655 'Macaroon': {'additionalProperties': False, 'type': 'object'},
10656 'MachineBlockDevices': {'additionalProperties': False,
10657 'properties': {'block-devices': {'items': {'$ref': '#/definitions/BlockDevice'},
10659 'machine': {'type': 'string'}},
10660 'required': ['machine'],
10662 'SetMachineBlockDevices': {'additionalProperties': False,
10663 'properties': {'machine-block-devices': {'items': {'$ref': '#/definitions/MachineBlockDevices'},
10665 'required': ['machine-block-devices'],
10666 'type': 'object'}},
10667 'properties': {'SetMachineBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/SetMachineBlockDevices'},
10668 'Result': {'$ref': '#/definitions/ErrorResults'}},
10669 'type': 'object'}},
10673 @ReturnMapping(ErrorResults
)
10674 async def SetMachineBlockDevices(self
, machine_block_devices
):
10676 machine_block_devices : typing.Sequence<+T_co>[~MachineBlockDevices]<~MachineBlockDevices>
10677 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
10679 # map input types to rpc msg
10681 msg
= dict(type='DiskManager', request
='SetMachineBlockDevices', version
=2, params
=params
)
10682 params
['machine-block-devices'] = machine_block_devices
10683 reply
= await self
.rpc(msg
)
10687 class EntityWatcherFacade(Type
):
10688 name
= 'EntityWatcher'
10690 schema
= {'definitions': {'EntitiesWatchResult': {'additionalProperties': False,
10691 'properties': {'changes': {'items': {'type': 'string'},
10693 'error': {'$ref': '#/definitions/Error'},
10694 'watcher-id': {'type': 'string'}},
10695 'required': ['watcher-id'],
10697 'Error': {'additionalProperties': False,
10698 'properties': {'code': {'type': 'string'},
10699 'info': {'$ref': '#/definitions/ErrorInfo'},
10700 'message': {'type': 'string'}},
10701 'required': ['message', 'code'],
10703 'ErrorInfo': {'additionalProperties': False,
10704 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
10705 'macaroon-path': {'type': 'string'}},
10707 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
10708 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/EntitiesWatchResult'}},
10710 'Stop': {'type': 'object'}},
10714 @ReturnMapping(EntitiesWatchResult
)
10715 async def Next(self
):
10718 Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')]
10720 # map input types to rpc msg
10722 msg
= dict(type='EntityWatcher', request
='Next', version
=2, params
=params
)
10724 reply
= await self
.rpc(msg
)
10729 @ReturnMapping(None)
10730 async def Stop(self
):
10735 # map input types to rpc msg
10737 msg
= dict(type='EntityWatcher', request
='Stop', version
=2, params
=params
)
10739 reply
= await self
.rpc(msg
)
10743 class FilesystemAttachmentsWatcherFacade(Type
):
10744 name
= 'FilesystemAttachmentsWatcher'
10746 schema
= {'definitions': {'Error': {'additionalProperties': False,
10747 'properties': {'code': {'type': 'string'},
10748 'info': {'$ref': '#/definitions/ErrorInfo'},
10749 'message': {'type': 'string'}},
10750 'required': ['message', 'code'],
10752 'ErrorInfo': {'additionalProperties': False,
10753 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
10754 'macaroon-path': {'type': 'string'}},
10756 'Macaroon': {'additionalProperties': False, 'type': 'object'},
10757 'MachineStorageId': {'additionalProperties': False,
10758 'properties': {'attachment-tag': {'type': 'string'},
10759 'machine-tag': {'type': 'string'}},
10760 'required': ['machine-tag',
10763 'MachineStorageIdsWatchResult': {'additionalProperties': False,
10764 'properties': {'changes': {'items': {'$ref': '#/definitions/MachineStorageId'},
10766 'error': {'$ref': '#/definitions/Error'},
10767 'watcher-id': {'type': 'string'}},
10768 'required': ['watcher-id',
10770 'type': 'object'}},
10771 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResult'}},
10773 'Stop': {'type': 'object'}},
10777 @ReturnMapping(MachineStorageIdsWatchResult
)
10778 async def Next(self
):
10781 Returns -> typing.Union[typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>, _ForwardRef('Error')]
10783 # map input types to rpc msg
10785 msg
= dict(type='FilesystemAttachmentsWatcher', request
='Next', version
=2, params
=params
)
10787 reply
= await self
.rpc(msg
)
10792 @ReturnMapping(None)
10793 async def Stop(self
):
10798 # map input types to rpc msg
10800 msg
= dict(type='FilesystemAttachmentsWatcher', request
='Stop', version
=2, params
=params
)
10802 reply
= await self
.rpc(msg
)
10806 class FirewallerFacade(Type
):
10807 name
= 'Firewaller'
10809 schema
= {'definitions': {'BoolResult': {'additionalProperties': False,
10810 'properties': {'error': {'$ref': '#/definitions/Error'},
10811 'result': {'type': 'boolean'}},
10812 'required': ['result'],
10814 'BoolResults': {'additionalProperties': False,
10815 'properties': {'results': {'items': {'$ref': '#/definitions/BoolResult'},
10817 'required': ['results'],
10819 'CloudCredential': {'additionalProperties': False,
10820 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}},
10822 'auth-type': {'type': 'string'},
10823 'redacted': {'items': {'type': 'string'},
10825 'required': ['auth-type'],
10827 'CloudSpec': {'additionalProperties': False,
10828 'properties': {'credential': {'$ref': '#/definitions/CloudCredential'},
10829 'endpoint': {'type': 'string'},
10830 'identity-endpoint': {'type': 'string'},
10831 'name': {'type': 'string'},
10832 'region': {'type': 'string'},
10833 'storage-endpoint': {'type': 'string'},
10834 'type': {'type': 'string'}},
10835 'required': ['type', 'name'],
10837 'CloudSpecResult': {'additionalProperties': False,
10838 'properties': {'error': {'$ref': '#/definitions/Error'},
10839 'result': {'$ref': '#/definitions/CloudSpec'}},
10841 'CloudSpecResults': {'additionalProperties': False,
10842 'properties': {'results': {'items': {'$ref': '#/definitions/CloudSpecResult'},
10845 'Entities': {'additionalProperties': False,
10846 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
10848 'required': ['entities'],
10850 'Entity': {'additionalProperties': False,
10851 'properties': {'tag': {'type': 'string'}},
10852 'required': ['tag'],
10854 'Error': {'additionalProperties': False,
10855 'properties': {'code': {'type': 'string'},
10856 'info': {'$ref': '#/definitions/ErrorInfo'},
10857 'message': {'type': 'string'}},
10858 'required': ['message', 'code'],
10860 'ErrorInfo': {'additionalProperties': False,
10861 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
10862 'macaroon-path': {'type': 'string'}},
10864 'LifeResult': {'additionalProperties': False,
10865 'properties': {'error': {'$ref': '#/definitions/Error'},
10866 'life': {'type': 'string'}},
10867 'required': ['life'],
10869 'LifeResults': {'additionalProperties': False,
10870 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
10872 'required': ['results'],
10874 'Macaroon': {'additionalProperties': False, 'type': 'object'},
10875 'MachinePortRange': {'additionalProperties': False,
10876 'properties': {'port-range': {'$ref': '#/definitions/PortRange'},
10877 'relation-tag': {'type': 'string'},
10878 'unit-tag': {'type': 'string'}},
10879 'required': ['unit-tag',
10883 'MachinePorts': {'additionalProperties': False,
10884 'properties': {'machine-tag': {'type': 'string'},
10885 'subnet-tag': {'type': 'string'}},
10886 'required': ['machine-tag', 'subnet-tag'],
10888 'MachinePortsParams': {'additionalProperties': False,
10889 'properties': {'params': {'items': {'$ref': '#/definitions/MachinePorts'},
10891 'required': ['params'],
10893 'MachinePortsResult': {'additionalProperties': False,
10894 'properties': {'error': {'$ref': '#/definitions/Error'},
10895 'ports': {'items': {'$ref': '#/definitions/MachinePortRange'},
10897 'required': ['ports'],
10899 'MachinePortsResults': {'additionalProperties': False,
10900 'properties': {'results': {'items': {'$ref': '#/definitions/MachinePortsResult'},
10902 'required': ['results'],
10904 'ModelConfigResult': {'additionalProperties': False,
10905 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
10906 'type': 'object'}},
10907 'type': 'object'}},
10908 'required': ['config'],
10910 'NotifyWatchResult': {'additionalProperties': False,
10911 'properties': {'NotifyWatcherId': {'type': 'string'},
10912 'error': {'$ref': '#/definitions/Error'}},
10913 'required': ['NotifyWatcherId'],
10915 'NotifyWatchResults': {'additionalProperties': False,
10916 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
10918 'required': ['results'],
10920 'PortRange': {'additionalProperties': False,
10921 'properties': {'from-port': {'type': 'integer'},
10922 'protocol': {'type': 'string'},
10923 'to-port': {'type': 'integer'}},
10924 'required': ['from-port', 'to-port', 'protocol'],
10926 'StringResult': {'additionalProperties': False,
10927 'properties': {'error': {'$ref': '#/definitions/Error'},
10928 'result': {'type': 'string'}},
10929 'required': ['result'],
10931 'StringResults': {'additionalProperties': False,
10932 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
10934 'required': ['results'],
10936 'StringsResult': {'additionalProperties': False,
10937 'properties': {'error': {'$ref': '#/definitions/Error'},
10938 'result': {'items': {'type': 'string'},
10941 'StringsResults': {'additionalProperties': False,
10942 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
10944 'required': ['results'],
10946 'StringsWatchResult': {'additionalProperties': False,
10947 'properties': {'changes': {'items': {'type': 'string'},
10949 'error': {'$ref': '#/definitions/Error'},
10950 'watcher-id': {'type': 'string'}},
10951 'required': ['watcher-id'],
10953 'StringsWatchResults': {'additionalProperties': False,
10954 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
10956 'required': ['results'],
10957 'type': 'object'}},
10958 'properties': {'CloudSpec': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10959 'Result': {'$ref': '#/definitions/CloudSpecResults'}},
10961 'GetAssignedMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10962 'Result': {'$ref': '#/definitions/StringResults'}},
10964 'GetExposed': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10965 'Result': {'$ref': '#/definitions/BoolResults'}},
10967 'GetMachineActiveSubnets': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10968 'Result': {'$ref': '#/definitions/StringsResults'}},
10970 'GetMachinePorts': {'properties': {'Params': {'$ref': '#/definitions/MachinePortsParams'},
10971 'Result': {'$ref': '#/definitions/MachinePortsResults'}},
10973 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10974 'Result': {'$ref': '#/definitions/StringResults'}},
10976 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10977 'Result': {'$ref': '#/definitions/LifeResults'}},
10979 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
10981 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10982 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
10984 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
10986 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
10988 'WatchOpenedPorts': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10989 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
10991 'WatchUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10992 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
10993 'type': 'object'}},
10997 @ReturnMapping(CloudSpecResults
)
10998 async def CloudSpec(self
, entities
):
11000 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
11001 Returns -> typing.Sequence<+T_co>[~CloudSpecResult]<~CloudSpecResult>
11003 # map input types to rpc msg
11005 msg
= dict(type='Firewaller', request
='CloudSpec', version
=3, params
=params
)
11006 params
['entities'] = entities
11007 reply
= await self
.rpc(msg
)
11012 @ReturnMapping(StringResults
)
11013 async def GetAssignedMachine(self
, entities
):
11015 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
11016 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
11018 # map input types to rpc msg
11020 msg
= dict(type='Firewaller', request
='GetAssignedMachine', version
=3, params
=params
)
11021 params
['entities'] = entities
11022 reply
= await self
.rpc(msg
)
11027 @ReturnMapping(BoolResults
)
11028 async def GetExposed(self
, entities
):
11030 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
11031 Returns -> typing.Sequence<+T_co>[~BoolResult]<~BoolResult>
11033 # map input types to rpc msg
11035 msg
= dict(type='Firewaller', request
='GetExposed', version
=3, params
=params
)
11036 params
['entities'] = entities
11037 reply
= await self
.rpc(msg
)
11042 @ReturnMapping(StringsResults
)
11043 async def GetMachineActiveSubnets(self
, entities
):
11045 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
11046 Returns -> typing.Sequence<+T_co>[~StringsResult]<~StringsResult>
11048 # map input types to rpc msg
11050 msg
= dict(type='Firewaller', request
='GetMachineActiveSubnets', version
=3, params
=params
)
11051 params
['entities'] = entities
11052 reply
= await self
.rpc(msg
)
11057 @ReturnMapping(MachinePortsResults
)
11058 async def GetMachinePorts(self
, params
):
11060 params : typing.Sequence<+T_co>[~MachinePorts]<~MachinePorts>
11061 Returns -> typing.Sequence<+T_co>[~MachinePortsResult]<~MachinePortsResult>
11063 # map input types to rpc msg
11065 msg
= dict(type='Firewaller', request
='GetMachinePorts', version
=3, params
=params
)
11066 params
['params'] = params
11067 reply
= await self
.rpc(msg
)
11072 @ReturnMapping(StringResults
)
11073 async def InstanceId(self
, entities
):
11075 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
11076 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
11078 # map input types to rpc msg
11080 msg
= dict(type='Firewaller', request
='InstanceId', version
=3, params
=params
)
11081 params
['entities'] = entities
11082 reply
= await self
.rpc(msg
)
11087 @ReturnMapping(LifeResults
)
11088 async def Life(self
, entities
):
11090 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
11091 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
11093 # map input types to rpc msg
11095 msg
= dict(type='Firewaller', request
='Life', version
=3, params
=params
)
11096 params
['entities'] = entities
11097 reply
= await self
.rpc(msg
)
11102 @ReturnMapping(ModelConfigResult
)
11103 async def ModelConfig(self
):
11106 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
11108 # map input types to rpc msg
11110 msg
= dict(type='Firewaller', request
='ModelConfig', version
=3, params
=params
)
11112 reply
= await self
.rpc(msg
)
11117 @ReturnMapping(NotifyWatchResults
)
11118 async def Watch(self
, entities
):
11120 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
11121 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
11123 # map input types to rpc msg
11125 msg
= dict(type='Firewaller', request
='Watch', version
=3, params
=params
)
11126 params
['entities'] = entities
11127 reply
= await self
.rpc(msg
)
11132 @ReturnMapping(NotifyWatchResult
)
11133 async def WatchForModelConfigChanges(self
):
11136 Returns -> typing.Union[str, _ForwardRef('Error')]
11138 # map input types to rpc msg
11140 msg
= dict(type='Firewaller', request
='WatchForModelConfigChanges', version
=3, params
=params
)
11142 reply
= await self
.rpc(msg
)
11147 @ReturnMapping(StringsWatchResult
)
11148 async def WatchModelMachines(self
):
11151 Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')]
11153 # map input types to rpc msg
11155 msg
= dict(type='Firewaller', request
='WatchModelMachines', version
=3, params
=params
)
11157 reply
= await self
.rpc(msg
)
11162 @ReturnMapping(StringsWatchResults
)
11163 async def WatchOpenedPorts(self
, entities
):
11165 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
11166 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
11168 # map input types to rpc msg
11170 msg
= dict(type='Firewaller', request
='WatchOpenedPorts', version
=3, params
=params
)
11171 params
['entities'] = entities
11172 reply
= await self
.rpc(msg
)
11177 @ReturnMapping(StringsWatchResults
)
11178 async def WatchUnits(self
, entities
):
11180 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
11181 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
11183 # map input types to rpc msg
11185 msg
= dict(type='Firewaller', request
='WatchUnits', version
=3, params
=params
)
11186 params
['entities'] = entities
11187 reply
= await self
.rpc(msg
)
11191 class HighAvailabilityFacade(Type
):
11192 name
= 'HighAvailability'
11194 schema
= {'definitions': {'Address': {'additionalProperties': False,
11195 'properties': {'Scope': {'type': 'string'},
11196 'SpaceName': {'type': 'string'},
11197 'SpaceProviderId': {'type': 'string'},
11198 'Type': {'type': 'string'},
11199 'Value': {'type': 'string'}},
11200 'required': ['Value',
11204 'SpaceProviderId'],
11206 'ControllersChangeResult': {'additionalProperties': False,
11207 'properties': {'error': {'$ref': '#/definitions/Error'},
11208 'result': {'$ref': '#/definitions/ControllersChanges'}},
11209 'required': ['result'],
11211 'ControllersChangeResults': {'additionalProperties': False,
11212 'properties': {'results': {'items': {'$ref': '#/definitions/ControllersChangeResult'},
11214 'required': ['results'],
11216 'ControllersChanges': {'additionalProperties': False,
11217 'properties': {'added': {'items': {'type': 'string'},
11219 'converted': {'items': {'type': 'string'},
11221 'demoted': {'items': {'type': 'string'},
11223 'maintained': {'items': {'type': 'string'},
11225 'promoted': {'items': {'type': 'string'},
11227 'removed': {'items': {'type': 'string'},
11230 'ControllersSpec': {'additionalProperties': False,
11231 'properties': {'constraints': {'$ref': '#/definitions/Value'},
11232 'model-tag': {'type': 'string'},
11233 'num-controllers': {'type': 'integer'},
11234 'placement': {'items': {'type': 'string'},
11236 'series': {'type': 'string'}},
11237 'required': ['model-tag',
11238 'num-controllers'],
11240 'ControllersSpecs': {'additionalProperties': False,
11241 'properties': {'specs': {'items': {'$ref': '#/definitions/ControllersSpec'},
11243 'required': ['specs'],
11245 'Error': {'additionalProperties': False,
11246 'properties': {'code': {'type': 'string'},
11247 'info': {'$ref': '#/definitions/ErrorInfo'},
11248 'message': {'type': 'string'}},
11249 'required': ['message', 'code'],
11251 'ErrorInfo': {'additionalProperties': False,
11252 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
11253 'macaroon-path': {'type': 'string'}},
11255 'HAMember': {'additionalProperties': False,
11256 'properties': {'public-address': {'$ref': '#/definitions/Address'},
11257 'series': {'type': 'string'},
11258 'tag': {'type': 'string'}},
11259 'required': ['tag', 'public-address', 'series'],
11261 'Macaroon': {'additionalProperties': False, 'type': 'object'},
11262 'Member': {'additionalProperties': False,
11263 'properties': {'Address': {'type': 'string'},
11264 'Arbiter': {'type': 'boolean'},
11265 'BuildIndexes': {'type': 'boolean'},
11266 'Hidden': {'type': 'boolean'},
11267 'Id': {'type': 'integer'},
11268 'Priority': {'type': 'number'},
11269 'SlaveDelay': {'type': 'integer'},
11270 'Tags': {'patternProperties': {'.*': {'type': 'string'}},
11272 'Votes': {'type': 'integer'}},
11283 'MongoUpgradeResults': {'additionalProperties': False,
11284 'properties': {'ha-members': {'items': {'$ref': '#/definitions/HAMember'},
11286 'master': {'$ref': '#/definitions/HAMember'},
11287 'rs-members': {'items': {'$ref': '#/definitions/Member'},
11289 'required': ['rs-members',
11293 'ResumeReplicationParams': {'additionalProperties': False,
11294 'properties': {'members': {'items': {'$ref': '#/definitions/Member'},
11296 'required': ['members'],
11298 'UpgradeMongoParams': {'additionalProperties': False,
11299 'properties': {'target': {'$ref': '#/definitions/Version'}},
11300 'required': ['target'],
11302 'Value': {'additionalProperties': False,
11303 'properties': {'arch': {'type': 'string'},
11304 'container': {'type': 'string'},
11305 'cpu-cores': {'type': 'integer'},
11306 'cpu-power': {'type': 'integer'},
11307 'instance-type': {'type': 'string'},
11308 'mem': {'type': 'integer'},
11309 'root-disk': {'type': 'integer'},
11310 'spaces': {'items': {'type': 'string'},
11312 'tags': {'items': {'type': 'string'},
11314 'virt-type': {'type': 'string'}},
11316 'Version': {'additionalProperties': False,
11317 'properties': {'Major': {'type': 'integer'},
11318 'Minor': {'type': 'integer'},
11319 'Patch': {'type': 'string'},
11320 'StorageEngine': {'type': 'string'}},
11321 'required': ['Major',
11325 'type': 'object'}},
11326 'properties': {'EnableHA': {'properties': {'Params': {'$ref': '#/definitions/ControllersSpecs'},
11327 'Result': {'$ref': '#/definitions/ControllersChangeResults'}},
11329 'ResumeHAReplicationAfterUpgrade': {'properties': {'Params': {'$ref': '#/definitions/ResumeReplicationParams'}},
11331 'StopHAReplicationForUpgrade': {'properties': {'Params': {'$ref': '#/definitions/UpgradeMongoParams'},
11332 'Result': {'$ref': '#/definitions/MongoUpgradeResults'}},
11333 'type': 'object'}},
11337 @ReturnMapping(ControllersChangeResults
)
11338 async def EnableHA(self
, specs
):
11340 specs : typing.Sequence<+T_co>[~ControllersSpec]<~ControllersSpec>
11341 Returns -> typing.Sequence<+T_co>[~ControllersChangeResult]<~ControllersChangeResult>
11343 # map input types to rpc msg
11345 msg
= dict(type='HighAvailability', request
='EnableHA', version
=2, params
=params
)
11346 params
['specs'] = specs
11347 reply
= await self
.rpc(msg
)
11352 @ReturnMapping(None)
11353 async def ResumeHAReplicationAfterUpgrade(self
, members
):
11355 members : typing.Sequence<+T_co>[~Member]<~Member>
11358 # map input types to rpc msg
11360 msg
= dict(type='HighAvailability', request
='ResumeHAReplicationAfterUpgrade', version
=2, params
=params
)
11361 params
['members'] = members
11362 reply
= await self
.rpc(msg
)
11367 @ReturnMapping(MongoUpgradeResults
)
11368 async def StopHAReplicationForUpgrade(self
, major
, minor
, patch
, storageengine
):
11373 storageengine : str
11374 Returns -> typing.Union[_ForwardRef('HAMember'), typing.Sequence<+T_co>[~Member]<~Member>]
11376 # map input types to rpc msg
11378 msg
= dict(type='HighAvailability', request
='StopHAReplicationForUpgrade', version
=2, params
=params
)
11379 params
['Major'] = major
11380 params
['Minor'] = minor
11381 params
['Patch'] = patch
11382 params
['StorageEngine'] = storageengine
11383 reply
= await self
.rpc(msg
)
11387 class HostKeyReporterFacade(Type
):
11388 name
= 'HostKeyReporter'
11390 schema
= {'definitions': {'Error': {'additionalProperties': False,
11391 'properties': {'code': {'type': 'string'},
11392 'info': {'$ref': '#/definitions/ErrorInfo'},
11393 'message': {'type': 'string'}},
11394 'required': ['message', 'code'],
11396 'ErrorInfo': {'additionalProperties': False,
11397 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
11398 'macaroon-path': {'type': 'string'}},
11400 'ErrorResult': {'additionalProperties': False,
11401 'properties': {'error': {'$ref': '#/definitions/Error'}},
11403 'ErrorResults': {'additionalProperties': False,
11404 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
11406 'required': ['results'],
11408 'Macaroon': {'additionalProperties': False, 'type': 'object'},
11409 'SSHHostKeySet': {'additionalProperties': False,
11410 'properties': {'entity-keys': {'items': {'$ref': '#/definitions/SSHHostKeys'},
11412 'required': ['entity-keys'],
11414 'SSHHostKeys': {'additionalProperties': False,
11415 'properties': {'public-keys': {'items': {'type': 'string'},
11417 'tag': {'type': 'string'}},
11418 'required': ['tag', 'public-keys'],
11419 'type': 'object'}},
11420 'properties': {'ReportKeys': {'properties': {'Params': {'$ref': '#/definitions/SSHHostKeySet'},
11421 'Result': {'$ref': '#/definitions/ErrorResults'}},
11422 'type': 'object'}},
11426 @ReturnMapping(ErrorResults
)
11427 async def ReportKeys(self
, entity_keys
):
11429 entity_keys : typing.Sequence<+T_co>[~SSHHostKeys]<~SSHHostKeys>
11430 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
11432 # map input types to rpc msg
11434 msg
= dict(type='HostKeyReporter', request
='ReportKeys', version
=1, params
=params
)
11435 params
['entity-keys'] = entity_keys
11436 reply
= await self
.rpc(msg
)
11440 class ImageManagerFacade(Type
):
11441 name
= 'ImageManager'
11443 schema
= {'definitions': {'Error': {'additionalProperties': False,
11444 'properties': {'code': {'type': 'string'},
11445 'info': {'$ref': '#/definitions/ErrorInfo'},
11446 'message': {'type': 'string'}},
11447 'required': ['message', 'code'],
11449 'ErrorInfo': {'additionalProperties': False,
11450 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
11451 'macaroon-path': {'type': 'string'}},
11453 'ErrorResult': {'additionalProperties': False,
11454 'properties': {'error': {'$ref': '#/definitions/Error'}},
11456 'ErrorResults': {'additionalProperties': False,
11457 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
11459 'required': ['results'],
11461 'ImageFilterParams': {'additionalProperties': False,
11462 'properties': {'images': {'items': {'$ref': '#/definitions/ImageSpec'},
11464 'required': ['images'],
11466 'ImageMetadata': {'additionalProperties': False,
11467 'properties': {'arch': {'type': 'string'},
11468 'created': {'format': 'date-time',
11470 'kind': {'type': 'string'},
11471 'series': {'type': 'string'},
11472 'url': {'type': 'string'}},
11473 'required': ['kind',
11479 'ImageSpec': {'additionalProperties': False,
11480 'properties': {'arch': {'type': 'string'},
11481 'kind': {'type': 'string'},
11482 'series': {'type': 'string'}},
11483 'required': ['kind', 'arch', 'series'],
11485 'ListImageResult': {'additionalProperties': False,
11486 'properties': {'result': {'items': {'$ref': '#/definitions/ImageMetadata'},
11488 'required': ['result'],
11490 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
11491 'properties': {'DeleteImages': {'properties': {'Params': {'$ref': '#/definitions/ImageFilterParams'},
11492 'Result': {'$ref': '#/definitions/ErrorResults'}},
11494 'ListImages': {'properties': {'Params': {'$ref': '#/definitions/ImageFilterParams'},
11495 'Result': {'$ref': '#/definitions/ListImageResult'}},
11496 'type': 'object'}},
11500 @ReturnMapping(ErrorResults
)
11501 async def DeleteImages(self
, images
):
11503 images : typing.Sequence<+T_co>[~ImageSpec]<~ImageSpec>
11504 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
11506 # map input types to rpc msg
11508 msg
= dict(type='ImageManager', request
='DeleteImages', version
=2, params
=params
)
11509 params
['images'] = images
11510 reply
= await self
.rpc(msg
)
11515 @ReturnMapping(ListImageResult
)
11516 async def ListImages(self
, images
):
11518 images : typing.Sequence<+T_co>[~ImageSpec]<~ImageSpec>
11519 Returns -> typing.Sequence<+T_co>[~ImageMetadata]<~ImageMetadata>
11521 # map input types to rpc msg
11523 msg
= dict(type='ImageManager', request
='ListImages', version
=2, params
=params
)
11524 params
['images'] = images
11525 reply
= await self
.rpc(msg
)
11529 class ImageMetadataFacade(Type
):
11530 name
= 'ImageMetadata'
11532 schema
= {'definitions': {'CloudImageMetadata': {'additionalProperties': False,
11533 'properties': {'arch': {'type': 'string'},
11534 'image-id': {'type': 'string'},
11535 'priority': {'type': 'integer'},
11536 'region': {'type': 'string'},
11537 'root-storage-size': {'type': 'integer'},
11538 'root-storage-type': {'type': 'string'},
11539 'series': {'type': 'string'},
11540 'source': {'type': 'string'},
11541 'stream': {'type': 'string'},
11542 'version': {'type': 'string'},
11543 'virt-type': {'type': 'string'}},
11544 'required': ['image-id',
11552 'CloudImageMetadataList': {'additionalProperties': False,
11553 'properties': {'metadata': {'items': {'$ref': '#/definitions/CloudImageMetadata'},
11556 'Error': {'additionalProperties': False,
11557 'properties': {'code': {'type': 'string'},
11558 'info': {'$ref': '#/definitions/ErrorInfo'},
11559 'message': {'type': 'string'}},
11560 'required': ['message', 'code'],
11562 'ErrorInfo': {'additionalProperties': False,
11563 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
11564 'macaroon-path': {'type': 'string'}},
11566 'ErrorResult': {'additionalProperties': False,
11567 'properties': {'error': {'$ref': '#/definitions/Error'}},
11569 'ErrorResults': {'additionalProperties': False,
11570 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
11572 'required': ['results'],
11574 'ImageMetadataFilter': {'additionalProperties': False,
11575 'properties': {'arches': {'items': {'type': 'string'},
11577 'region': {'type': 'string'},
11578 'root-storage-type': {'type': 'string'},
11579 'series': {'items': {'type': 'string'},
11581 'stream': {'type': 'string'},
11582 'virt-type': {'type': 'string'}},
11584 'ListCloudImageMetadataResult': {'additionalProperties': False,
11585 'properties': {'result': {'items': {'$ref': '#/definitions/CloudImageMetadata'},
11587 'required': ['result'],
11589 'Macaroon': {'additionalProperties': False, 'type': 'object'},
11590 'MetadataImageIds': {'additionalProperties': False,
11591 'properties': {'image-ids': {'items': {'type': 'string'},
11593 'required': ['image-ids'],
11595 'MetadataSaveParams': {'additionalProperties': False,
11596 'properties': {'metadata': {'items': {'$ref': '#/definitions/CloudImageMetadataList'},
11598 'type': 'object'}},
11599 'properties': {'Delete': {'properties': {'Params': {'$ref': '#/definitions/MetadataImageIds'},
11600 'Result': {'$ref': '#/definitions/ErrorResults'}},
11602 'List': {'properties': {'Params': {'$ref': '#/definitions/ImageMetadataFilter'},
11603 'Result': {'$ref': '#/definitions/ListCloudImageMetadataResult'}},
11605 'Save': {'properties': {'Params': {'$ref': '#/definitions/MetadataSaveParams'},
11606 'Result': {'$ref': '#/definitions/ErrorResults'}},
11608 'UpdateFromPublishedImages': {'type': 'object'}},
11612 @ReturnMapping(ErrorResults
)
11613 async def Delete(self
, image_ids
):
11615 image_ids : typing.Sequence<+T_co>[str]
11616 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
11618 # map input types to rpc msg
11620 msg
= dict(type='ImageMetadata', request
='Delete', version
=2, params
=params
)
11621 params
['image-ids'] = image_ids
11622 reply
= await self
.rpc(msg
)
11627 @ReturnMapping(ListCloudImageMetadataResult
)
11628 async def List(self
, arches
, region
, root_storage_type
, series
, stream
, virt_type
):
11630 arches : typing.Sequence<+T_co>[str]
11632 root_storage_type : str
11633 series : typing.Sequence<+T_co>[str]
11636 Returns -> typing.Sequence<+T_co>[~CloudImageMetadata]<~CloudImageMetadata>
11638 # map input types to rpc msg
11640 msg
= dict(type='ImageMetadata', request
='List', version
=2, params
=params
)
11641 params
['arches'] = arches
11642 params
['region'] = region
11643 params
['root-storage-type'] = root_storage_type
11644 params
['series'] = series
11645 params
['stream'] = stream
11646 params
['virt-type'] = virt_type
11647 reply
= await self
.rpc(msg
)
11652 @ReturnMapping(ErrorResults
)
11653 async def Save(self
, metadata
):
11655 metadata : typing.Sequence<+T_co>[~CloudImageMetadataList]<~CloudImageMetadataList>
11656 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
11658 # map input types to rpc msg
11660 msg
= dict(type='ImageMetadata', request
='Save', version
=2, params
=params
)
11661 params
['metadata'] = metadata
11662 reply
= await self
.rpc(msg
)
11667 @ReturnMapping(None)
11668 async def UpdateFromPublishedImages(self
):
11673 # map input types to rpc msg
11675 msg
= dict(type='ImageMetadata', request
='UpdateFromPublishedImages', version
=2, params
=params
)
11677 reply
= await self
.rpc(msg
)
11681 class InstancePollerFacade(Type
):
11682 name
= 'InstancePoller'
11684 schema
= {'definitions': {'Address': {'additionalProperties': False,
11685 'properties': {'scope': {'type': 'string'},
11686 'space-name': {'type': 'string'},
11687 'type': {'type': 'string'},
11688 'value': {'type': 'string'}},
11689 'required': ['value', 'type', 'scope'],
11691 'BoolResult': {'additionalProperties': False,
11692 'properties': {'error': {'$ref': '#/definitions/Error'},
11693 'result': {'type': 'boolean'}},
11694 'required': ['result'],
11696 'BoolResults': {'additionalProperties': False,
11697 'properties': {'results': {'items': {'$ref': '#/definitions/BoolResult'},
11699 'required': ['results'],
11701 'Entities': {'additionalProperties': False,
11702 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
11704 'required': ['entities'],
11706 'Entity': {'additionalProperties': False,
11707 'properties': {'tag': {'type': 'string'}},
11708 'required': ['tag'],
11710 'EntityStatusArgs': {'additionalProperties': False,
11711 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
11712 'type': 'object'}},
11714 'info': {'type': 'string'},
11715 'status': {'type': 'string'},
11716 'tag': {'type': 'string'}},
11717 'required': ['tag',
11722 'Error': {'additionalProperties': False,
11723 'properties': {'code': {'type': 'string'},
11724 'info': {'$ref': '#/definitions/ErrorInfo'},
11725 'message': {'type': 'string'}},
11726 'required': ['message', 'code'],
11728 'ErrorInfo': {'additionalProperties': False,
11729 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
11730 'macaroon-path': {'type': 'string'}},
11732 'ErrorResult': {'additionalProperties': False,
11733 'properties': {'error': {'$ref': '#/definitions/Error'}},
11735 'ErrorResults': {'additionalProperties': False,
11736 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
11738 'required': ['results'],
11740 'LifeResult': {'additionalProperties': False,
11741 'properties': {'error': {'$ref': '#/definitions/Error'},
11742 'life': {'type': 'string'}},
11743 'required': ['life'],
11745 'LifeResults': {'additionalProperties': False,
11746 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
11748 'required': ['results'],
11750 'Macaroon': {'additionalProperties': False, 'type': 'object'},
11751 'MachineAddresses': {'additionalProperties': False,
11752 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
11754 'tag': {'type': 'string'}},
11755 'required': ['tag', 'addresses'],
11757 'MachineAddressesResult': {'additionalProperties': False,
11758 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
11760 'error': {'$ref': '#/definitions/Error'}},
11761 'required': ['addresses'],
11763 'MachineAddressesResults': {'additionalProperties': False,
11764 'properties': {'results': {'items': {'$ref': '#/definitions/MachineAddressesResult'},
11766 'required': ['results'],
11768 'ModelConfigResult': {'additionalProperties': False,
11769 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
11770 'type': 'object'}},
11771 'type': 'object'}},
11772 'required': ['config'],
11774 'NotifyWatchResult': {'additionalProperties': False,
11775 'properties': {'NotifyWatcherId': {'type': 'string'},
11776 'error': {'$ref': '#/definitions/Error'}},
11777 'required': ['NotifyWatcherId'],
11779 'SetMachinesAddresses': {'additionalProperties': False,
11780 'properties': {'machine-addresses': {'items': {'$ref': '#/definitions/MachineAddresses'},
11782 'required': ['machine-addresses'],
11784 'SetStatus': {'additionalProperties': False,
11785 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
11787 'required': ['entities'],
11789 'StatusResult': {'additionalProperties': False,
11790 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
11791 'type': 'object'}},
11793 'error': {'$ref': '#/definitions/Error'},
11794 'id': {'type': 'string'},
11795 'info': {'type': 'string'},
11796 'life': {'type': 'string'},
11797 'since': {'format': 'date-time',
11799 'status': {'type': 'string'}},
11807 'StatusResults': {'additionalProperties': False,
11808 'properties': {'results': {'items': {'$ref': '#/definitions/StatusResult'},
11810 'required': ['results'],
11812 'StringResult': {'additionalProperties': False,
11813 'properties': {'error': {'$ref': '#/definitions/Error'},
11814 'result': {'type': 'string'}},
11815 'required': ['result'],
11817 'StringResults': {'additionalProperties': False,
11818 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
11820 'required': ['results'],
11822 'StringsWatchResult': {'additionalProperties': False,
11823 'properties': {'changes': {'items': {'type': 'string'},
11825 'error': {'$ref': '#/definitions/Error'},
11826 'watcher-id': {'type': 'string'}},
11827 'required': ['watcher-id'],
11828 'type': 'object'}},
11829 'properties': {'AreManuallyProvisioned': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11830 'Result': {'$ref': '#/definitions/BoolResults'}},
11832 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11833 'Result': {'$ref': '#/definitions/StringResults'}},
11835 'InstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11836 'Result': {'$ref': '#/definitions/StatusResults'}},
11838 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11839 'Result': {'$ref': '#/definitions/LifeResults'}},
11841 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
11843 'ProviderAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11844 'Result': {'$ref': '#/definitions/MachineAddressesResults'}},
11846 'SetInstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
11847 'Result': {'$ref': '#/definitions/ErrorResults'}},
11849 'SetProviderAddresses': {'properties': {'Params': {'$ref': '#/definitions/SetMachinesAddresses'},
11850 'Result': {'$ref': '#/definitions/ErrorResults'}},
11852 'Status': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11853 'Result': {'$ref': '#/definitions/StatusResults'}},
11855 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
11857 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
11858 'type': 'object'}},
11862 @ReturnMapping(BoolResults
)
11863 async def AreManuallyProvisioned(self
, entities
):
11865 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
11866 Returns -> typing.Sequence<+T_co>[~BoolResult]<~BoolResult>
11868 # map input types to rpc msg
11870 msg
= dict(type='InstancePoller', request
='AreManuallyProvisioned', version
=3, params
=params
)
11871 params
['entities'] = entities
11872 reply
= await self
.rpc(msg
)
11877 @ReturnMapping(StringResults
)
11878 async def InstanceId(self
, entities
):
11880 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
11881 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
11883 # map input types to rpc msg
11885 msg
= dict(type='InstancePoller', request
='InstanceId', version
=3, params
=params
)
11886 params
['entities'] = entities
11887 reply
= await self
.rpc(msg
)
11892 @ReturnMapping(StatusResults
)
11893 async def InstanceStatus(self
, entities
):
11895 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
11896 Returns -> typing.Sequence<+T_co>[~StatusResult]<~StatusResult>
11898 # map input types to rpc msg
11900 msg
= dict(type='InstancePoller', request
='InstanceStatus', version
=3, params
=params
)
11901 params
['entities'] = entities
11902 reply
= await self
.rpc(msg
)
11907 @ReturnMapping(LifeResults
)
11908 async def Life(self
, entities
):
11910 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
11911 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
11913 # map input types to rpc msg
11915 msg
= dict(type='InstancePoller', request
='Life', version
=3, params
=params
)
11916 params
['entities'] = entities
11917 reply
= await self
.rpc(msg
)
11922 @ReturnMapping(ModelConfigResult
)
11923 async def ModelConfig(self
):
11926 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
11928 # map input types to rpc msg
11930 msg
= dict(type='InstancePoller', request
='ModelConfig', version
=3, params
=params
)
11932 reply
= await self
.rpc(msg
)
11937 @ReturnMapping(MachineAddressesResults
)
11938 async def ProviderAddresses(self
, entities
):
11940 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
11941 Returns -> typing.Sequence<+T_co>[~MachineAddressesResult]<~MachineAddressesResult>
11943 # map input types to rpc msg
11945 msg
= dict(type='InstancePoller', request
='ProviderAddresses', version
=3, params
=params
)
11946 params
['entities'] = entities
11947 reply
= await self
.rpc(msg
)
11952 @ReturnMapping(ErrorResults
)
11953 async def SetInstanceStatus(self
, entities
):
11955 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
11956 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
11958 # map input types to rpc msg
11960 msg
= dict(type='InstancePoller', request
='SetInstanceStatus', version
=3, params
=params
)
11961 params
['entities'] = entities
11962 reply
= await self
.rpc(msg
)
11967 @ReturnMapping(ErrorResults
)
11968 async def SetProviderAddresses(self
, machine_addresses
):
11970 machine_addresses : typing.Sequence<+T_co>[~MachineAddresses]<~MachineAddresses>
11971 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
11973 # map input types to rpc msg
11975 msg
= dict(type='InstancePoller', request
='SetProviderAddresses', version
=3, params
=params
)
11976 params
['machine-addresses'] = machine_addresses
11977 reply
= await self
.rpc(msg
)
11982 @ReturnMapping(StatusResults
)
11983 async def Status(self
, entities
):
11985 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
11986 Returns -> typing.Sequence<+T_co>[~StatusResult]<~StatusResult>
11988 # map input types to rpc msg
11990 msg
= dict(type='InstancePoller', request
='Status', version
=3, params
=params
)
11991 params
['entities'] = entities
11992 reply
= await self
.rpc(msg
)
11997 @ReturnMapping(NotifyWatchResult
)
11998 async def WatchForModelConfigChanges(self
):
12001 Returns -> typing.Union[str, _ForwardRef('Error')]
12003 # map input types to rpc msg
12005 msg
= dict(type='InstancePoller', request
='WatchForModelConfigChanges', version
=3, params
=params
)
12007 reply
= await self
.rpc(msg
)
12012 @ReturnMapping(StringsWatchResult
)
12013 async def WatchModelMachines(self
):
12016 Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')]
12018 # map input types to rpc msg
12020 msg
= dict(type='InstancePoller', request
='WatchModelMachines', version
=3, params
=params
)
12022 reply
= await self
.rpc(msg
)
12026 class KeyManagerFacade(Type
):
12027 name
= 'KeyManager'
12029 schema
= {'definitions': {'Entities': {'additionalProperties': False,
12030 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
12032 'required': ['entities'],
12034 'Entity': {'additionalProperties': False,
12035 'properties': {'tag': {'type': 'string'}},
12036 'required': ['tag'],
12038 'Error': {'additionalProperties': False,
12039 'properties': {'code': {'type': 'string'},
12040 'info': {'$ref': '#/definitions/ErrorInfo'},
12041 'message': {'type': 'string'}},
12042 'required': ['message', 'code'],
12044 'ErrorInfo': {'additionalProperties': False,
12045 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
12046 'macaroon-path': {'type': 'string'}},
12048 'ErrorResult': {'additionalProperties': False,
12049 'properties': {'error': {'$ref': '#/definitions/Error'}},
12051 'ErrorResults': {'additionalProperties': False,
12052 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
12054 'required': ['results'],
12056 'ListSSHKeys': {'additionalProperties': False,
12057 'properties': {'entities': {'$ref': '#/definitions/Entities'},
12058 'mode': {'type': 'boolean'}},
12059 'required': ['entities', 'mode'],
12061 'Macaroon': {'additionalProperties': False, 'type': 'object'},
12062 'ModifyUserSSHKeys': {'additionalProperties': False,
12063 'properties': {'ssh-keys': {'items': {'type': 'string'},
12065 'user': {'type': 'string'}},
12066 'required': ['user', 'ssh-keys'],
12068 'StringsResult': {'additionalProperties': False,
12069 'properties': {'error': {'$ref': '#/definitions/Error'},
12070 'result': {'items': {'type': 'string'},
12073 'StringsResults': {'additionalProperties': False,
12074 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
12076 'required': ['results'],
12077 'type': 'object'}},
12078 'properties': {'AddKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'},
12079 'Result': {'$ref': '#/definitions/ErrorResults'}},
12081 'DeleteKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'},
12082 'Result': {'$ref': '#/definitions/ErrorResults'}},
12084 'ImportKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'},
12085 'Result': {'$ref': '#/definitions/ErrorResults'}},
12087 'ListKeys': {'properties': {'Params': {'$ref': '#/definitions/ListSSHKeys'},
12088 'Result': {'$ref': '#/definitions/StringsResults'}},
12089 'type': 'object'}},
12093 @ReturnMapping(ErrorResults
)
12094 async def AddKeys(self
, ssh_keys
, user
):
12096 ssh_keys : typing.Sequence<+T_co>[str]
12098 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
12100 # map input types to rpc msg
12102 msg
= dict(type='KeyManager', request
='AddKeys', version
=1, params
=params
)
12103 params
['ssh-keys'] = ssh_keys
12104 params
['user'] = user
12105 reply
= await self
.rpc(msg
)
12110 @ReturnMapping(ErrorResults
)
12111 async def DeleteKeys(self
, ssh_keys
, user
):
12113 ssh_keys : typing.Sequence<+T_co>[str]
12115 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
12117 # map input types to rpc msg
12119 msg
= dict(type='KeyManager', request
='DeleteKeys', version
=1, params
=params
)
12120 params
['ssh-keys'] = ssh_keys
12121 params
['user'] = user
12122 reply
= await self
.rpc(msg
)
12127 @ReturnMapping(ErrorResults
)
12128 async def ImportKeys(self
, ssh_keys
, user
):
12130 ssh_keys : typing.Sequence<+T_co>[str]
12132 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
12134 # map input types to rpc msg
12136 msg
= dict(type='KeyManager', request
='ImportKeys', version
=1, params
=params
)
12137 params
['ssh-keys'] = ssh_keys
12138 params
['user'] = user
12139 reply
= await self
.rpc(msg
)
12144 @ReturnMapping(StringsResults
)
12145 async def ListKeys(self
, entities
, mode
):
12147 entities : Entities
12149 Returns -> typing.Sequence<+T_co>[~StringsResult]<~StringsResult>
12151 # map input types to rpc msg
12153 msg
= dict(type='KeyManager', request
='ListKeys', version
=1, params
=params
)
12154 params
['entities'] = entities
12155 params
['mode'] = mode
12156 reply
= await self
.rpc(msg
)
12160 class KeyUpdaterFacade(Type
):
12161 name
= 'KeyUpdater'
12163 schema
= {'definitions': {'Entities': {'additionalProperties': False,
12164 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
12166 'required': ['entities'],
12168 'Entity': {'additionalProperties': False,
12169 'properties': {'tag': {'type': 'string'}},
12170 'required': ['tag'],
12172 'Error': {'additionalProperties': False,
12173 'properties': {'code': {'type': 'string'},
12174 'info': {'$ref': '#/definitions/ErrorInfo'},
12175 'message': {'type': 'string'}},
12176 'required': ['message', 'code'],
12178 'ErrorInfo': {'additionalProperties': False,
12179 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
12180 'macaroon-path': {'type': 'string'}},
12182 'Macaroon': {'additionalProperties': False, 'type': 'object'},
12183 'NotifyWatchResult': {'additionalProperties': False,
12184 'properties': {'NotifyWatcherId': {'type': 'string'},
12185 'error': {'$ref': '#/definitions/Error'}},
12186 'required': ['NotifyWatcherId'],
12188 'NotifyWatchResults': {'additionalProperties': False,
12189 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
12191 'required': ['results'],
12193 'StringsResult': {'additionalProperties': False,
12194 'properties': {'error': {'$ref': '#/definitions/Error'},
12195 'result': {'items': {'type': 'string'},
12198 'StringsResults': {'additionalProperties': False,
12199 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
12201 'required': ['results'],
12202 'type': 'object'}},
12203 'properties': {'AuthorisedKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12204 'Result': {'$ref': '#/definitions/StringsResults'}},
12206 'WatchAuthorisedKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12207 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
12208 'type': 'object'}},
12212 @ReturnMapping(StringsResults
)
12213 async def AuthorisedKeys(self
, entities
):
12215 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12216 Returns -> typing.Sequence<+T_co>[~StringsResult]<~StringsResult>
12218 # map input types to rpc msg
12220 msg
= dict(type='KeyUpdater', request
='AuthorisedKeys', version
=1, params
=params
)
12221 params
['entities'] = entities
12222 reply
= await self
.rpc(msg
)
12227 @ReturnMapping(NotifyWatchResults
)
12228 async def WatchAuthorisedKeys(self
, entities
):
12230 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12231 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
12233 # map input types to rpc msg
12235 msg
= dict(type='KeyUpdater', request
='WatchAuthorisedKeys', version
=1, params
=params
)
12236 params
['entities'] = entities
12237 reply
= await self
.rpc(msg
)
12241 class LeadershipServiceFacade(Type
):
12242 name
= 'LeadershipService'
12244 schema
= {'definitions': {'ApplicationTag': {'additionalProperties': False,
12245 'properties': {'Name': {'type': 'string'}},
12246 'required': ['Name'],
12248 'ClaimLeadershipBulkParams': {'additionalProperties': False,
12249 'properties': {'params': {'items': {'$ref': '#/definitions/ClaimLeadershipParams'},
12251 'required': ['params'],
12253 'ClaimLeadershipBulkResults': {'additionalProperties': False,
12254 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
12256 'required': ['results'],
12258 'ClaimLeadershipParams': {'additionalProperties': False,
12259 'properties': {'application-tag': {'type': 'string'},
12260 'duration': {'type': 'number'},
12261 'unit-tag': {'type': 'string'}},
12262 'required': ['application-tag',
12266 'Error': {'additionalProperties': False,
12267 'properties': {'code': {'type': 'string'},
12268 'info': {'$ref': '#/definitions/ErrorInfo'},
12269 'message': {'type': 'string'}},
12270 'required': ['message', 'code'],
12272 'ErrorInfo': {'additionalProperties': False,
12273 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
12274 'macaroon-path': {'type': 'string'}},
12276 'ErrorResult': {'additionalProperties': False,
12277 'properties': {'error': {'$ref': '#/definitions/Error'}},
12279 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
12280 'properties': {'BlockUntilLeadershipReleased': {'properties': {'Params': {'$ref': '#/definitions/ApplicationTag'},
12281 'Result': {'$ref': '#/definitions/ErrorResult'}},
12283 'ClaimLeadership': {'properties': {'Params': {'$ref': '#/definitions/ClaimLeadershipBulkParams'},
12284 'Result': {'$ref': '#/definitions/ClaimLeadershipBulkResults'}},
12285 'type': 'object'}},
12289 @ReturnMapping(ErrorResult
)
12290 async def BlockUntilLeadershipReleased(self
, name
):
12295 # map input types to rpc msg
12297 msg
= dict(type='LeadershipService', request
='BlockUntilLeadershipReleased', version
=2, params
=params
)
12298 params
['Name'] = name
12299 reply
= await self
.rpc(msg
)
12304 @ReturnMapping(ClaimLeadershipBulkResults
)
12305 async def ClaimLeadership(self
, params
):
12307 params : typing.Sequence<+T_co>[~ClaimLeadershipParams]<~ClaimLeadershipParams>
12308 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
12310 # map input types to rpc msg
12312 msg
= dict(type='LeadershipService', request
='ClaimLeadership', version
=2, params
=params
)
12313 params
['params'] = params
12314 reply
= await self
.rpc(msg
)
12318 class LifeFlagFacade(Type
):
12321 schema
= {'definitions': {'Entities': {'additionalProperties': False,
12322 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
12324 'required': ['entities'],
12326 'Entity': {'additionalProperties': False,
12327 'properties': {'tag': {'type': 'string'}},
12328 'required': ['tag'],
12330 'Error': {'additionalProperties': False,
12331 'properties': {'code': {'type': 'string'},
12332 'info': {'$ref': '#/definitions/ErrorInfo'},
12333 'message': {'type': 'string'}},
12334 'required': ['message', 'code'],
12336 'ErrorInfo': {'additionalProperties': False,
12337 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
12338 'macaroon-path': {'type': 'string'}},
12340 'LifeResult': {'additionalProperties': False,
12341 'properties': {'error': {'$ref': '#/definitions/Error'},
12342 'life': {'type': 'string'}},
12343 'required': ['life'],
12345 'LifeResults': {'additionalProperties': False,
12346 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
12348 'required': ['results'],
12350 'Macaroon': {'additionalProperties': False, 'type': 'object'},
12351 'NotifyWatchResult': {'additionalProperties': False,
12352 'properties': {'NotifyWatcherId': {'type': 'string'},
12353 'error': {'$ref': '#/definitions/Error'}},
12354 'required': ['NotifyWatcherId'],
12356 'NotifyWatchResults': {'additionalProperties': False,
12357 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
12359 'required': ['results'],
12360 'type': 'object'}},
12361 'properties': {'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12362 'Result': {'$ref': '#/definitions/LifeResults'}},
12364 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12365 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
12366 'type': 'object'}},
12370 @ReturnMapping(LifeResults
)
12371 async def Life(self
, entities
):
12373 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12374 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
12376 # map input types to rpc msg
12378 msg
= dict(type='LifeFlag', request
='Life', version
=1, params
=params
)
12379 params
['entities'] = entities
12380 reply
= await self
.rpc(msg
)
12385 @ReturnMapping(NotifyWatchResults
)
12386 async def Watch(self
, entities
):
12388 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12389 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
12391 # map input types to rpc msg
12393 msg
= dict(type='LifeFlag', request
='Watch', version
=1, params
=params
)
12394 params
['entities'] = entities
12395 reply
= await self
.rpc(msg
)
12399 class LogForwardingFacade(Type
):
12400 name
= 'LogForwarding'
12402 schema
= {'definitions': {'Error': {'additionalProperties': False,
12403 'properties': {'code': {'type': 'string'},
12404 'info': {'$ref': '#/definitions/ErrorInfo'},
12405 'message': {'type': 'string'}},
12406 'required': ['message', 'code'],
12408 'ErrorInfo': {'additionalProperties': False,
12409 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
12410 'macaroon-path': {'type': 'string'}},
12412 'ErrorResult': {'additionalProperties': False,
12413 'properties': {'error': {'$ref': '#/definitions/Error'}},
12415 'ErrorResults': {'additionalProperties': False,
12416 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
12418 'required': ['results'],
12420 'LogForwardingGetLastSentParams': {'additionalProperties': False,
12421 'properties': {'ids': {'items': {'$ref': '#/definitions/LogForwardingID'},
12423 'required': ['ids'],
12425 'LogForwardingGetLastSentResult': {'additionalProperties': False,
12426 'properties': {'err': {'$ref': '#/definitions/Error'},
12427 'record-id': {'type': 'integer'},
12428 'record-timestamp': {'type': 'integer'}},
12429 'required': ['record-id',
12430 'record-timestamp',
12433 'LogForwardingGetLastSentResults': {'additionalProperties': False,
12434 'properties': {'results': {'items': {'$ref': '#/definitions/LogForwardingGetLastSentResult'},
12436 'required': ['results'],
12438 'LogForwardingID': {'additionalProperties': False,
12439 'properties': {'model': {'type': 'string'},
12440 'sink': {'type': 'string'}},
12441 'required': ['model', 'sink'],
12443 'LogForwardingSetLastSentParam': {'additionalProperties': False,
12444 'properties': {'LogForwardingID': {'$ref': '#/definitions/LogForwardingID'},
12445 'record-id': {'type': 'integer'},
12446 'record-timestamp': {'type': 'integer'}},
12447 'required': ['LogForwardingID',
12449 'record-timestamp'],
12451 'LogForwardingSetLastSentParams': {'additionalProperties': False,
12452 'properties': {'params': {'items': {'$ref': '#/definitions/LogForwardingSetLastSentParam'},
12454 'required': ['params'],
12456 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
12457 'properties': {'GetLastSent': {'properties': {'Params': {'$ref': '#/definitions/LogForwardingGetLastSentParams'},
12458 'Result': {'$ref': '#/definitions/LogForwardingGetLastSentResults'}},
12460 'SetLastSent': {'properties': {'Params': {'$ref': '#/definitions/LogForwardingSetLastSentParams'},
12461 'Result': {'$ref': '#/definitions/ErrorResults'}},
12462 'type': 'object'}},
12466 @ReturnMapping(LogForwardingGetLastSentResults
)
12467 async def GetLastSent(self
, ids
):
12469 ids : typing.Sequence<+T_co>[~LogForwardingID]<~LogForwardingID>
12470 Returns -> typing.Sequence<+T_co>[~LogForwardingGetLastSentResult]<~LogForwardingGetLastSentResult>
12472 # map input types to rpc msg
12474 msg
= dict(type='LogForwarding', request
='GetLastSent', version
=1, params
=params
)
12475 params
['ids'] = ids
12476 reply
= await self
.rpc(msg
)
12481 @ReturnMapping(ErrorResults
)
12482 async def SetLastSent(self
, params
):
12484 params : typing.Sequence<+T_co>[~LogForwardingSetLastSentParam]<~LogForwardingSetLastSentParam>
12485 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
12487 # map input types to rpc msg
12489 msg
= dict(type='LogForwarding', request
='SetLastSent', version
=1, params
=params
)
12490 params
['params'] = params
12491 reply
= await self
.rpc(msg
)
12495 class LoggerFacade(Type
):
12498 schema
= {'definitions': {'Entities': {'additionalProperties': False,
12499 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
12501 'required': ['entities'],
12503 'Entity': {'additionalProperties': False,
12504 'properties': {'tag': {'type': 'string'}},
12505 'required': ['tag'],
12507 'Error': {'additionalProperties': False,
12508 'properties': {'code': {'type': 'string'},
12509 'info': {'$ref': '#/definitions/ErrorInfo'},
12510 'message': {'type': 'string'}},
12511 'required': ['message', 'code'],
12513 'ErrorInfo': {'additionalProperties': False,
12514 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
12515 'macaroon-path': {'type': 'string'}},
12517 'Macaroon': {'additionalProperties': False, 'type': 'object'},
12518 'NotifyWatchResult': {'additionalProperties': False,
12519 'properties': {'NotifyWatcherId': {'type': 'string'},
12520 'error': {'$ref': '#/definitions/Error'}},
12521 'required': ['NotifyWatcherId'],
12523 'NotifyWatchResults': {'additionalProperties': False,
12524 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
12526 'required': ['results'],
12528 'StringResult': {'additionalProperties': False,
12529 'properties': {'error': {'$ref': '#/definitions/Error'},
12530 'result': {'type': 'string'}},
12531 'required': ['result'],
12533 'StringResults': {'additionalProperties': False,
12534 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
12536 'required': ['results'],
12537 'type': 'object'}},
12538 'properties': {'LoggingConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12539 'Result': {'$ref': '#/definitions/StringResults'}},
12541 'WatchLoggingConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12542 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
12543 'type': 'object'}},
12547 @ReturnMapping(StringResults
)
12548 async def LoggingConfig(self
, entities
):
12550 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12551 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
12553 # map input types to rpc msg
12555 msg
= dict(type='Logger', request
='LoggingConfig', version
=1, params
=params
)
12556 params
['entities'] = entities
12557 reply
= await self
.rpc(msg
)
12562 @ReturnMapping(NotifyWatchResults
)
12563 async def WatchLoggingConfig(self
, entities
):
12565 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12566 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
12568 # map input types to rpc msg
12570 msg
= dict(type='Logger', request
='WatchLoggingConfig', version
=1, params
=params
)
12571 params
['entities'] = entities
12572 reply
= await self
.rpc(msg
)
12576 class MachineActionsFacade(Type
):
12577 name
= 'MachineActions'
12579 schema
= {'definitions': {'Action': {'additionalProperties': False,
12580 'properties': {'name': {'type': 'string'},
12581 'parameters': {'patternProperties': {'.*': {'additionalProperties': True,
12582 'type': 'object'}},
12584 'receiver': {'type': 'string'},
12585 'tag': {'type': 'string'}},
12586 'required': ['tag', 'receiver', 'name'],
12588 'ActionExecutionResult': {'additionalProperties': False,
12589 'properties': {'action-tag': {'type': 'string'},
12590 'message': {'type': 'string'},
12591 'results': {'patternProperties': {'.*': {'additionalProperties': True,
12592 'type': 'object'}},
12594 'status': {'type': 'string'}},
12595 'required': ['action-tag', 'status'],
12597 'ActionExecutionResults': {'additionalProperties': False,
12598 'properties': {'results': {'items': {'$ref': '#/definitions/ActionExecutionResult'},
12601 'ActionResult': {'additionalProperties': False,
12602 'properties': {'action': {'$ref': '#/definitions/Action'},
12603 'completed': {'format': 'date-time',
12605 'enqueued': {'format': 'date-time',
12607 'error': {'$ref': '#/definitions/Error'},
12608 'message': {'type': 'string'},
12609 'output': {'patternProperties': {'.*': {'additionalProperties': True,
12610 'type': 'object'}},
12612 'started': {'format': 'date-time',
12614 'status': {'type': 'string'}},
12616 'ActionResults': {'additionalProperties': False,
12617 'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'},
12620 'ActionsByReceiver': {'additionalProperties': False,
12621 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'},
12623 'error': {'$ref': '#/definitions/Error'},
12624 'receiver': {'type': 'string'}},
12626 'ActionsByReceivers': {'additionalProperties': False,
12627 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByReceiver'},
12630 'Entities': {'additionalProperties': False,
12631 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
12633 'required': ['entities'],
12635 'Entity': {'additionalProperties': False,
12636 'properties': {'tag': {'type': 'string'}},
12637 'required': ['tag'],
12639 'Error': {'additionalProperties': False,
12640 'properties': {'code': {'type': 'string'},
12641 'info': {'$ref': '#/definitions/ErrorInfo'},
12642 'message': {'type': 'string'}},
12643 'required': ['message', 'code'],
12645 'ErrorInfo': {'additionalProperties': False,
12646 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
12647 'macaroon-path': {'type': 'string'}},
12649 'ErrorResult': {'additionalProperties': False,
12650 'properties': {'error': {'$ref': '#/definitions/Error'}},
12652 'ErrorResults': {'additionalProperties': False,
12653 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
12655 'required': ['results'],
12657 'Macaroon': {'additionalProperties': False, 'type': 'object'},
12658 'StringsWatchResult': {'additionalProperties': False,
12659 'properties': {'changes': {'items': {'type': 'string'},
12661 'error': {'$ref': '#/definitions/Error'},
12662 'watcher-id': {'type': 'string'}},
12663 'required': ['watcher-id'],
12665 'StringsWatchResults': {'additionalProperties': False,
12666 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
12668 'required': ['results'],
12669 'type': 'object'}},
12670 'properties': {'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12671 'Result': {'$ref': '#/definitions/ActionResults'}},
12673 'BeginActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12674 'Result': {'$ref': '#/definitions/ErrorResults'}},
12676 'FinishActions': {'properties': {'Params': {'$ref': '#/definitions/ActionExecutionResults'},
12677 'Result': {'$ref': '#/definitions/ErrorResults'}},
12679 'RunningActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12680 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
12682 'WatchActionNotifications': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12683 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
12684 'type': 'object'}},
12688 @ReturnMapping(ActionResults
)
12689 async def Actions(self
, entities
):
12691 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12692 Returns -> typing.Sequence<+T_co>[~ActionResult]<~ActionResult>
12694 # map input types to rpc msg
12696 msg
= dict(type='MachineActions', request
='Actions', version
=1, params
=params
)
12697 params
['entities'] = entities
12698 reply
= await self
.rpc(msg
)
12703 @ReturnMapping(ErrorResults
)
12704 async def BeginActions(self
, entities
):
12706 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12707 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
12709 # map input types to rpc msg
12711 msg
= dict(type='MachineActions', request
='BeginActions', version
=1, params
=params
)
12712 params
['entities'] = entities
12713 reply
= await self
.rpc(msg
)
12718 @ReturnMapping(ErrorResults
)
12719 async def FinishActions(self
, results
):
12721 results : typing.Sequence<+T_co>[~ActionExecutionResult]<~ActionExecutionResult>
12722 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
12724 # map input types to rpc msg
12726 msg
= dict(type='MachineActions', request
='FinishActions', version
=1, params
=params
)
12727 params
['results'] = results
12728 reply
= await self
.rpc(msg
)
12733 @ReturnMapping(ActionsByReceivers
)
12734 async def RunningActions(self
, entities
):
12736 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12737 Returns -> typing.Sequence<+T_co>[~ActionsByReceiver]<~ActionsByReceiver>
12739 # map input types to rpc msg
12741 msg
= dict(type='MachineActions', request
='RunningActions', version
=1, params
=params
)
12742 params
['entities'] = entities
12743 reply
= await self
.rpc(msg
)
12748 @ReturnMapping(StringsWatchResults
)
12749 async def WatchActionNotifications(self
, entities
):
12751 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12752 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
12754 # map input types to rpc msg
12756 msg
= dict(type='MachineActions', request
='WatchActionNotifications', version
=1, params
=params
)
12757 params
['entities'] = entities
12758 reply
= await self
.rpc(msg
)
12762 class MachineManagerFacade(Type
):
12763 name
= 'MachineManager'
12765 schema
= {'definitions': {'AddMachineParams': {'additionalProperties': False,
12766 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
12768 'constraints': {'$ref': '#/definitions/Value'},
12769 'container-type': {'type': 'string'},
12770 'disks': {'items': {'$ref': '#/definitions/Constraints'},
12772 'hardware-characteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
12773 'instance-id': {'type': 'string'},
12774 'jobs': {'items': {'type': 'string'},
12776 'nonce': {'type': 'string'},
12777 'parent-id': {'type': 'string'},
12778 'placement': {'$ref': '#/definitions/Placement'},
12779 'series': {'type': 'string'}},
12780 'required': ['series',
12787 'hardware-characteristics',
12790 'AddMachines': {'additionalProperties': False,
12791 'properties': {'params': {'items': {'$ref': '#/definitions/AddMachineParams'},
12793 'required': ['params'],
12795 'AddMachinesResult': {'additionalProperties': False,
12796 'properties': {'error': {'$ref': '#/definitions/Error'},
12797 'machine': {'type': 'string'}},
12798 'required': ['machine'],
12800 'AddMachinesResults': {'additionalProperties': False,
12801 'properties': {'machines': {'items': {'$ref': '#/definitions/AddMachinesResult'},
12803 'required': ['machines'],
12805 'Address': {'additionalProperties': False,
12806 'properties': {'scope': {'type': 'string'},
12807 'space-name': {'type': 'string'},
12808 'type': {'type': 'string'},
12809 'value': {'type': 'string'}},
12810 'required': ['value', 'type', 'scope'],
12812 'Constraints': {'additionalProperties': False,
12813 'properties': {'Count': {'type': 'integer'},
12814 'Pool': {'type': 'string'},
12815 'Size': {'type': 'integer'}},
12816 'required': ['Pool', 'Size', 'Count'],
12818 'Error': {'additionalProperties': False,
12819 'properties': {'code': {'type': 'string'},
12820 'info': {'$ref': '#/definitions/ErrorInfo'},
12821 'message': {'type': 'string'}},
12822 'required': ['message', 'code'],
12824 'ErrorInfo': {'additionalProperties': False,
12825 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
12826 'macaroon-path': {'type': 'string'}},
12828 'HardwareCharacteristics': {'additionalProperties': False,
12829 'properties': {'arch': {'type': 'string'},
12830 'availability-zone': {'type': 'string'},
12831 'cpu-cores': {'type': 'integer'},
12832 'cpu-power': {'type': 'integer'},
12833 'mem': {'type': 'integer'},
12834 'root-disk': {'type': 'integer'},
12835 'tags': {'items': {'type': 'string'},
12838 'Macaroon': {'additionalProperties': False, 'type': 'object'},
12839 'Placement': {'additionalProperties': False,
12840 'properties': {'directive': {'type': 'string'},
12841 'scope': {'type': 'string'}},
12842 'required': ['scope', 'directive'],
12844 'Value': {'additionalProperties': False,
12845 'properties': {'arch': {'type': 'string'},
12846 'container': {'type': 'string'},
12847 'cpu-cores': {'type': 'integer'},
12848 'cpu-power': {'type': 'integer'},
12849 'instance-type': {'type': 'string'},
12850 'mem': {'type': 'integer'},
12851 'root-disk': {'type': 'integer'},
12852 'spaces': {'items': {'type': 'string'},
12854 'tags': {'items': {'type': 'string'},
12856 'virt-type': {'type': 'string'}},
12857 'type': 'object'}},
12858 'properties': {'AddMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
12859 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
12860 'type': 'object'}},
12864 @ReturnMapping(AddMachinesResults
)
12865 async def AddMachines(self
, params
):
12867 params : typing.Sequence<+T_co>[~AddMachineParams]<~AddMachineParams>
12868 Returns -> typing.Sequence<+T_co>[~AddMachinesResult]<~AddMachinesResult>
12870 # map input types to rpc msg
12872 msg
= dict(type='MachineManager', request
='AddMachines', version
=2, params
=params
)
12873 params
['params'] = params
12874 reply
= await self
.rpc(msg
)
12878 class MachineUndertakerFacade(Type
):
12879 name
= 'MachineUndertaker'
12881 schema
= {'definitions': {'Entities': {'additionalProperties': False,
12882 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
12884 'required': ['entities'],
12886 'EntitiesResult': {'additionalProperties': False,
12887 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
12889 'error': {'$ref': '#/definitions/Error'}},
12890 'required': ['entities'],
12892 'EntitiesResults': {'additionalProperties': False,
12893 'properties': {'results': {'items': {'$ref': '#/definitions/EntitiesResult'},
12895 'required': ['results'],
12897 'Entity': {'additionalProperties': False,
12898 'properties': {'tag': {'type': 'string'}},
12899 'required': ['tag'],
12901 'Error': {'additionalProperties': False,
12902 'properties': {'code': {'type': 'string'},
12903 'info': {'$ref': '#/definitions/ErrorInfo'},
12904 'message': {'type': 'string'}},
12905 'required': ['message', 'code'],
12907 'ErrorInfo': {'additionalProperties': False,
12908 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
12909 'macaroon-path': {'type': 'string'}},
12911 'Macaroon': {'additionalProperties': False, 'type': 'object'},
12912 'NotifyWatchResult': {'additionalProperties': False,
12913 'properties': {'NotifyWatcherId': {'type': 'string'},
12914 'error': {'$ref': '#/definitions/Error'}},
12915 'required': ['NotifyWatcherId'],
12917 'NotifyWatchResults': {'additionalProperties': False,
12918 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
12920 'required': ['results'],
12922 'ProviderInterfaceInfo': {'additionalProperties': False,
12923 'properties': {'interface-name': {'type': 'string'},
12924 'mac-address': {'type': 'string'},
12925 'provider-id': {'type': 'string'}},
12926 'required': ['interface-name',
12930 'ProviderInterfaceInfoResult': {'additionalProperties': False,
12931 'properties': {'error': {'$ref': '#/definitions/Error'},
12932 'interfaces': {'items': {'$ref': '#/definitions/ProviderInterfaceInfo'},
12934 'machine-tag': {'type': 'string'}},
12935 'required': ['machine-tag',
12938 'ProviderInterfaceInfoResults': {'additionalProperties': False,
12939 'properties': {'results': {'items': {'$ref': '#/definitions/ProviderInterfaceInfoResult'},
12941 'required': ['results'],
12942 'type': 'object'}},
12943 'properties': {'AllMachineRemovals': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12944 'Result': {'$ref': '#/definitions/EntitiesResults'}},
12946 'CompleteMachineRemovals': {'properties': {'Params': {'$ref': '#/definitions/Entities'}},
12948 'GetMachineProviderInterfaceInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12949 'Result': {'$ref': '#/definitions/ProviderInterfaceInfoResults'}},
12951 'WatchMachineRemovals': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12952 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
12953 'type': 'object'}},
12957 @ReturnMapping(EntitiesResults
)
12958 async def AllMachineRemovals(self
, entities
):
12960 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12961 Returns -> typing.Sequence<+T_co>[~EntitiesResult]<~EntitiesResult>
12963 # map input types to rpc msg
12965 msg
= dict(type='MachineUndertaker', request
='AllMachineRemovals', version
=1, params
=params
)
12966 params
['entities'] = entities
12967 reply
= await self
.rpc(msg
)
12972 @ReturnMapping(None)
12973 async def CompleteMachineRemovals(self
, entities
):
12975 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12978 # map input types to rpc msg
12980 msg
= dict(type='MachineUndertaker', request
='CompleteMachineRemovals', version
=1, params
=params
)
12981 params
['entities'] = entities
12982 reply
= await self
.rpc(msg
)
12987 @ReturnMapping(ProviderInterfaceInfoResults
)
12988 async def GetMachineProviderInterfaceInfo(self
, entities
):
12990 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
12991 Returns -> typing.Sequence<+T_co>[~ProviderInterfaceInfoResult]<~ProviderInterfaceInfoResult>
12993 # map input types to rpc msg
12995 msg
= dict(type='MachineUndertaker', request
='GetMachineProviderInterfaceInfo', version
=1, params
=params
)
12996 params
['entities'] = entities
12997 reply
= await self
.rpc(msg
)
13002 @ReturnMapping(NotifyWatchResults
)
13003 async def WatchMachineRemovals(self
, entities
):
13005 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13006 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
13008 # map input types to rpc msg
13010 msg
= dict(type='MachineUndertaker', request
='WatchMachineRemovals', version
=1, params
=params
)
13011 params
['entities'] = entities
13012 reply
= await self
.rpc(msg
)
13016 class MachinerFacade(Type
):
13019 schema
= {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
13020 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
13023 'required': ['servers'],
13025 'Address': {'additionalProperties': False,
13026 'properties': {'scope': {'type': 'string'},
13027 'space-name': {'type': 'string'},
13028 'type': {'type': 'string'},
13029 'value': {'type': 'string'}},
13030 'required': ['value', 'type', 'scope'],
13032 'BytesResult': {'additionalProperties': False,
13033 'properties': {'result': {'items': {'type': 'integer'},
13035 'required': ['result'],
13037 'Entities': {'additionalProperties': False,
13038 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
13040 'required': ['entities'],
13042 'Entity': {'additionalProperties': False,
13043 'properties': {'tag': {'type': 'string'}},
13044 'required': ['tag'],
13046 'EntityStatusArgs': {'additionalProperties': False,
13047 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
13048 'type': 'object'}},
13050 'info': {'type': 'string'},
13051 'status': {'type': 'string'},
13052 'tag': {'type': 'string'}},
13053 'required': ['tag',
13058 'Error': {'additionalProperties': False,
13059 'properties': {'code': {'type': 'string'},
13060 'info': {'$ref': '#/definitions/ErrorInfo'},
13061 'message': {'type': 'string'}},
13062 'required': ['message', 'code'],
13064 'ErrorInfo': {'additionalProperties': False,
13065 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
13066 'macaroon-path': {'type': 'string'}},
13068 'ErrorResult': {'additionalProperties': False,
13069 'properties': {'error': {'$ref': '#/definitions/Error'}},
13071 'ErrorResults': {'additionalProperties': False,
13072 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
13074 'required': ['results'],
13076 'HostPort': {'additionalProperties': False,
13077 'properties': {'Address': {'$ref': '#/definitions/Address'},
13078 'port': {'type': 'integer'}},
13079 'required': ['Address', 'port'],
13081 'JobsResult': {'additionalProperties': False,
13082 'properties': {'error': {'$ref': '#/definitions/Error'},
13083 'jobs': {'items': {'type': 'string'},
13085 'required': ['jobs'],
13087 'JobsResults': {'additionalProperties': False,
13088 'properties': {'results': {'items': {'$ref': '#/definitions/JobsResult'},
13090 'required': ['results'],
13092 'LifeResult': {'additionalProperties': False,
13093 'properties': {'error': {'$ref': '#/definitions/Error'},
13094 'life': {'type': 'string'}},
13095 'required': ['life'],
13097 'LifeResults': {'additionalProperties': False,
13098 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
13100 'required': ['results'],
13102 'Macaroon': {'additionalProperties': False, 'type': 'object'},
13103 'MachineAddresses': {'additionalProperties': False,
13104 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
13106 'tag': {'type': 'string'}},
13107 'required': ['tag', 'addresses'],
13109 'NetworkConfig': {'additionalProperties': False,
13110 'properties': {'address': {'type': 'string'},
13111 'cidr': {'type': 'string'},
13112 'config-type': {'type': 'string'},
13113 'device-index': {'type': 'integer'},
13114 'disabled': {'type': 'boolean'},
13115 'dns-search-domains': {'items': {'type': 'string'},
13117 'dns-servers': {'items': {'type': 'string'},
13119 'gateway-address': {'type': 'string'},
13120 'interface-name': {'type': 'string'},
13121 'interface-type': {'type': 'string'},
13122 'mac-address': {'type': 'string'},
13123 'mtu': {'type': 'integer'},
13124 'no-auto-start': {'type': 'boolean'},
13125 'parent-interface-name': {'type': 'string'},
13126 'provider-address-id': {'type': 'string'},
13127 'provider-id': {'type': 'string'},
13128 'provider-space-id': {'type': 'string'},
13129 'provider-subnet-id': {'type': 'string'},
13130 'provider-vlan-id': {'type': 'string'},
13131 'vlan-tag': {'type': 'integer'}},
13132 'required': ['device-index',
13137 'provider-subnet-id',
13138 'provider-space-id',
13139 'provider-address-id',
13140 'provider-vlan-id',
13143 'parent-interface-name',
13147 'NotifyWatchResult': {'additionalProperties': False,
13148 'properties': {'NotifyWatcherId': {'type': 'string'},
13149 'error': {'$ref': '#/definitions/Error'}},
13150 'required': ['NotifyWatcherId'],
13152 'NotifyWatchResults': {'additionalProperties': False,
13153 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
13155 'required': ['results'],
13157 'SetMachineNetworkConfig': {'additionalProperties': False,
13158 'properties': {'config': {'items': {'$ref': '#/definitions/NetworkConfig'},
13160 'tag': {'type': 'string'}},
13161 'required': ['tag', 'config'],
13163 'SetMachinesAddresses': {'additionalProperties': False,
13164 'properties': {'machine-addresses': {'items': {'$ref': '#/definitions/MachineAddresses'},
13166 'required': ['machine-addresses'],
13168 'SetStatus': {'additionalProperties': False,
13169 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
13171 'required': ['entities'],
13173 'StringResult': {'additionalProperties': False,
13174 'properties': {'error': {'$ref': '#/definitions/Error'},
13175 'result': {'type': 'string'}},
13176 'required': ['result'],
13178 'StringsResult': {'additionalProperties': False,
13179 'properties': {'error': {'$ref': '#/definitions/Error'},
13180 'result': {'items': {'type': 'string'},
13182 'type': 'object'}},
13183 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
13185 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
13187 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
13189 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13190 'Result': {'$ref': '#/definitions/ErrorResults'}},
13192 'Jobs': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13193 'Result': {'$ref': '#/definitions/JobsResults'}},
13195 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13196 'Result': {'$ref': '#/definitions/LifeResults'}},
13198 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
13200 'SetMachineAddresses': {'properties': {'Params': {'$ref': '#/definitions/SetMachinesAddresses'},
13201 'Result': {'$ref': '#/definitions/ErrorResults'}},
13203 'SetObservedNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/SetMachineNetworkConfig'}},
13205 'SetProviderNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13206 'Result': {'$ref': '#/definitions/ErrorResults'}},
13208 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
13209 'Result': {'$ref': '#/definitions/ErrorResults'}},
13211 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
13212 'Result': {'$ref': '#/definitions/ErrorResults'}},
13214 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13215 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
13217 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
13218 'type': 'object'}},
13222 @ReturnMapping(StringsResult
)
13223 async def APIAddresses(self
):
13226 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[str]]
13228 # map input types to rpc msg
13230 msg
= dict(type='Machiner', request
='APIAddresses', version
=1, params
=params
)
13232 reply
= await self
.rpc(msg
)
13237 @ReturnMapping(APIHostPortsResult
)
13238 async def APIHostPorts(self
):
13241 Returns -> typing.Sequence<+T_co>[~HostPort]<~HostPort>
13243 # map input types to rpc msg
13245 msg
= dict(type='Machiner', request
='APIHostPorts', version
=1, params
=params
)
13247 reply
= await self
.rpc(msg
)
13252 @ReturnMapping(BytesResult
)
13253 async def CACert(self
):
13256 Returns -> typing.Sequence<+T_co>[int]
13258 # map input types to rpc msg
13260 msg
= dict(type='Machiner', request
='CACert', version
=1, params
=params
)
13262 reply
= await self
.rpc(msg
)
13267 @ReturnMapping(ErrorResults
)
13268 async def EnsureDead(self
, entities
):
13270 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13271 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
13273 # map input types to rpc msg
13275 msg
= dict(type='Machiner', request
='EnsureDead', version
=1, params
=params
)
13276 params
['entities'] = entities
13277 reply
= await self
.rpc(msg
)
13282 @ReturnMapping(JobsResults
)
13283 async def Jobs(self
, entities
):
13285 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13286 Returns -> typing.Sequence<+T_co>[~JobsResult]<~JobsResult>
13288 # map input types to rpc msg
13290 msg
= dict(type='Machiner', request
='Jobs', version
=1, params
=params
)
13291 params
['entities'] = entities
13292 reply
= await self
.rpc(msg
)
13297 @ReturnMapping(LifeResults
)
13298 async def Life(self
, entities
):
13300 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13301 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
13303 # map input types to rpc msg
13305 msg
= dict(type='Machiner', request
='Life', version
=1, params
=params
)
13306 params
['entities'] = entities
13307 reply
= await self
.rpc(msg
)
13312 @ReturnMapping(StringResult
)
13313 async def ModelUUID(self
):
13316 Returns -> typing.Union[_ForwardRef('Error'), str]
13318 # map input types to rpc msg
13320 msg
= dict(type='Machiner', request
='ModelUUID', version
=1, params
=params
)
13322 reply
= await self
.rpc(msg
)
13327 @ReturnMapping(ErrorResults
)
13328 async def SetMachineAddresses(self
, machine_addresses
):
13330 machine_addresses : typing.Sequence<+T_co>[~MachineAddresses]<~MachineAddresses>
13331 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
13333 # map input types to rpc msg
13335 msg
= dict(type='Machiner', request
='SetMachineAddresses', version
=1, params
=params
)
13336 params
['machine-addresses'] = machine_addresses
13337 reply
= await self
.rpc(msg
)
13342 @ReturnMapping(None)
13343 async def SetObservedNetworkConfig(self
, config
, tag
):
13345 config : typing.Sequence<+T_co>[~NetworkConfig]<~NetworkConfig>
13349 # map input types to rpc msg
13351 msg
= dict(type='Machiner', request
='SetObservedNetworkConfig', version
=1, params
=params
)
13352 params
['config'] = config
13353 params
['tag'] = tag
13354 reply
= await self
.rpc(msg
)
13359 @ReturnMapping(ErrorResults
)
13360 async def SetProviderNetworkConfig(self
, entities
):
13362 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13363 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
13365 # map input types to rpc msg
13367 msg
= dict(type='Machiner', request
='SetProviderNetworkConfig', version
=1, params
=params
)
13368 params
['entities'] = entities
13369 reply
= await self
.rpc(msg
)
13374 @ReturnMapping(ErrorResults
)
13375 async def SetStatus(self
, entities
):
13377 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
13378 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
13380 # map input types to rpc msg
13382 msg
= dict(type='Machiner', request
='SetStatus', version
=1, params
=params
)
13383 params
['entities'] = entities
13384 reply
= await self
.rpc(msg
)
13389 @ReturnMapping(ErrorResults
)
13390 async def UpdateStatus(self
, entities
):
13392 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
13393 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
13395 # map input types to rpc msg
13397 msg
= dict(type='Machiner', request
='UpdateStatus', version
=1, params
=params
)
13398 params
['entities'] = entities
13399 reply
= await self
.rpc(msg
)
13404 @ReturnMapping(NotifyWatchResults
)
13405 async def Watch(self
, entities
):
13407 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13408 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
13410 # map input types to rpc msg
13412 msg
= dict(type='Machiner', request
='Watch', version
=1, params
=params
)
13413 params
['entities'] = entities
13414 reply
= await self
.rpc(msg
)
13419 @ReturnMapping(NotifyWatchResult
)
13420 async def WatchAPIHostPorts(self
):
13423 Returns -> typing.Union[str, _ForwardRef('Error')]
13425 # map input types to rpc msg
13427 msg
= dict(type='Machiner', request
='WatchAPIHostPorts', version
=1, params
=params
)
13429 reply
= await self
.rpc(msg
)
13433 class MeterStatusFacade(Type
):
13434 name
= 'MeterStatus'
13436 schema
= {'definitions': {'Entities': {'additionalProperties': False,
13437 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
13439 'required': ['entities'],
13441 'Entity': {'additionalProperties': False,
13442 'properties': {'tag': {'type': 'string'}},
13443 'required': ['tag'],
13445 'Error': {'additionalProperties': False,
13446 'properties': {'code': {'type': 'string'},
13447 'info': {'$ref': '#/definitions/ErrorInfo'},
13448 'message': {'type': 'string'}},
13449 'required': ['message', 'code'],
13451 'ErrorInfo': {'additionalProperties': False,
13452 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
13453 'macaroon-path': {'type': 'string'}},
13455 'Macaroon': {'additionalProperties': False, 'type': 'object'},
13456 'MeterStatusResult': {'additionalProperties': False,
13457 'properties': {'code': {'type': 'string'},
13458 'error': {'$ref': '#/definitions/Error'},
13459 'info': {'type': 'string'}},
13460 'required': ['code', 'info'],
13462 'MeterStatusResults': {'additionalProperties': False,
13463 'properties': {'results': {'items': {'$ref': '#/definitions/MeterStatusResult'},
13465 'required': ['results'],
13467 'NotifyWatchResult': {'additionalProperties': False,
13468 'properties': {'NotifyWatcherId': {'type': 'string'},
13469 'error': {'$ref': '#/definitions/Error'}},
13470 'required': ['NotifyWatcherId'],
13472 'NotifyWatchResults': {'additionalProperties': False,
13473 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
13475 'required': ['results'],
13476 'type': 'object'}},
13477 'properties': {'GetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13478 'Result': {'$ref': '#/definitions/MeterStatusResults'}},
13480 'WatchMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13481 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
13482 'type': 'object'}},
13486 @ReturnMapping(MeterStatusResults
)
13487 async def GetMeterStatus(self
, entities
):
13489 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13490 Returns -> typing.Sequence<+T_co>[~MeterStatusResult]<~MeterStatusResult>
13492 # map input types to rpc msg
13494 msg
= dict(type='MeterStatus', request
='GetMeterStatus', version
=1, params
=params
)
13495 params
['entities'] = entities
13496 reply
= await self
.rpc(msg
)
13501 @ReturnMapping(NotifyWatchResults
)
13502 async def WatchMeterStatus(self
, entities
):
13504 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13505 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
13507 # map input types to rpc msg
13509 msg
= dict(type='MeterStatus', request
='WatchMeterStatus', version
=1, params
=params
)
13510 params
['entities'] = entities
13511 reply
= await self
.rpc(msg
)
13515 class MetricsAdderFacade(Type
):
13516 name
= 'MetricsAdder'
13518 schema
= {'definitions': {'Error': {'additionalProperties': False,
13519 'properties': {'code': {'type': 'string'},
13520 'info': {'$ref': '#/definitions/ErrorInfo'},
13521 'message': {'type': 'string'}},
13522 'required': ['message', 'code'],
13524 'ErrorInfo': {'additionalProperties': False,
13525 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
13526 'macaroon-path': {'type': 'string'}},
13528 'ErrorResult': {'additionalProperties': False,
13529 'properties': {'error': {'$ref': '#/definitions/Error'}},
13531 'ErrorResults': {'additionalProperties': False,
13532 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
13534 'required': ['results'],
13536 'Macaroon': {'additionalProperties': False, 'type': 'object'},
13537 'Metric': {'additionalProperties': False,
13538 'properties': {'key': {'type': 'string'},
13539 'time': {'format': 'date-time',
13541 'value': {'type': 'string'}},
13542 'required': ['key', 'value', 'time'],
13544 'MetricBatch': {'additionalProperties': False,
13545 'properties': {'charm-url': {'type': 'string'},
13546 'created': {'format': 'date-time',
13548 'metrics': {'items': {'$ref': '#/definitions/Metric'},
13550 'uuid': {'type': 'string'}},
13551 'required': ['uuid',
13556 'MetricBatchParam': {'additionalProperties': False,
13557 'properties': {'batch': {'$ref': '#/definitions/MetricBatch'},
13558 'tag': {'type': 'string'}},
13559 'required': ['tag', 'batch'],
13561 'MetricBatchParams': {'additionalProperties': False,
13562 'properties': {'batches': {'items': {'$ref': '#/definitions/MetricBatchParam'},
13564 'required': ['batches'],
13565 'type': 'object'}},
13566 'properties': {'AddMetricBatches': {'properties': {'Params': {'$ref': '#/definitions/MetricBatchParams'},
13567 'Result': {'$ref': '#/definitions/ErrorResults'}},
13568 'type': 'object'}},
13572 @ReturnMapping(ErrorResults
)
13573 async def AddMetricBatches(self
, batches
):
13575 batches : typing.Sequence<+T_co>[~MetricBatchParam]<~MetricBatchParam>
13576 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
13578 # map input types to rpc msg
13580 msg
= dict(type='MetricsAdder', request
='AddMetricBatches', version
=2, params
=params
)
13581 params
['batches'] = batches
13582 reply
= await self
.rpc(msg
)
13586 class MetricsDebugFacade(Type
):
13587 name
= 'MetricsDebug'
13589 schema
= {'definitions': {'Entities': {'additionalProperties': False,
13590 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
13592 'required': ['entities'],
13594 'Entity': {'additionalProperties': False,
13595 'properties': {'tag': {'type': 'string'}},
13596 'required': ['tag'],
13598 'EntityMetrics': {'additionalProperties': False,
13599 'properties': {'error': {'$ref': '#/definitions/Error'},
13600 'metrics': {'items': {'$ref': '#/definitions/MetricResult'},
13603 'Error': {'additionalProperties': False,
13604 'properties': {'code': {'type': 'string'},
13605 'info': {'$ref': '#/definitions/ErrorInfo'},
13606 'message': {'type': 'string'}},
13607 'required': ['message', 'code'],
13609 'ErrorInfo': {'additionalProperties': False,
13610 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
13611 'macaroon-path': {'type': 'string'}},
13613 'ErrorResult': {'additionalProperties': False,
13614 'properties': {'error': {'$ref': '#/definitions/Error'}},
13616 'ErrorResults': {'additionalProperties': False,
13617 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
13619 'required': ['results'],
13621 'Macaroon': {'additionalProperties': False, 'type': 'object'},
13622 'MeterStatusParam': {'additionalProperties': False,
13623 'properties': {'code': {'type': 'string'},
13624 'info': {'type': 'string'},
13625 'tag': {'type': 'string'}},
13626 'required': ['tag', 'code', 'info'],
13628 'MeterStatusParams': {'additionalProperties': False,
13629 'properties': {'statues': {'items': {'$ref': '#/definitions/MeterStatusParam'},
13631 'required': ['statues'],
13633 'MetricResult': {'additionalProperties': False,
13634 'properties': {'key': {'type': 'string'},
13635 'time': {'format': 'date-time',
13637 'value': {'type': 'string'}},
13638 'required': ['time', 'key', 'value'],
13640 'MetricResults': {'additionalProperties': False,
13641 'properties': {'results': {'items': {'$ref': '#/definitions/EntityMetrics'},
13643 'required': ['results'],
13644 'type': 'object'}},
13645 'properties': {'GetMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13646 'Result': {'$ref': '#/definitions/MetricResults'}},
13648 'SetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/MeterStatusParams'},
13649 'Result': {'$ref': '#/definitions/ErrorResults'}},
13650 'type': 'object'}},
13654 @ReturnMapping(MetricResults
)
13655 async def GetMetrics(self
, entities
):
13657 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13658 Returns -> typing.Sequence<+T_co>[~EntityMetrics]<~EntityMetrics>
13660 # map input types to rpc msg
13662 msg
= dict(type='MetricsDebug', request
='GetMetrics', version
=2, params
=params
)
13663 params
['entities'] = entities
13664 reply
= await self
.rpc(msg
)
13669 @ReturnMapping(ErrorResults
)
13670 async def SetMeterStatus(self
, statues
):
13672 statues : typing.Sequence<+T_co>[~MeterStatusParam]<~MeterStatusParam>
13673 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
13675 # map input types to rpc msg
13677 msg
= dict(type='MetricsDebug', request
='SetMeterStatus', version
=2, params
=params
)
13678 params
['statues'] = statues
13679 reply
= await self
.rpc(msg
)
13683 class MetricsManagerFacade(Type
):
13684 name
= 'MetricsManager'
13686 schema
= {'definitions': {'Entities': {'additionalProperties': False,
13687 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
13689 'required': ['entities'],
13691 'Entity': {'additionalProperties': False,
13692 'properties': {'tag': {'type': 'string'}},
13693 'required': ['tag'],
13695 'Error': {'additionalProperties': False,
13696 'properties': {'code': {'type': 'string'},
13697 'info': {'$ref': '#/definitions/ErrorInfo'},
13698 'message': {'type': 'string'}},
13699 'required': ['message', 'code'],
13701 'ErrorInfo': {'additionalProperties': False,
13702 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
13703 'macaroon-path': {'type': 'string'}},
13705 'ErrorResult': {'additionalProperties': False,
13706 'properties': {'error': {'$ref': '#/definitions/Error'}},
13708 'ErrorResults': {'additionalProperties': False,
13709 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
13711 'required': ['results'],
13713 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
13714 'properties': {'CleanupOldMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13715 'Result': {'$ref': '#/definitions/ErrorResults'}},
13717 'SendMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13718 'Result': {'$ref': '#/definitions/ErrorResults'}},
13719 'type': 'object'}},
13723 @ReturnMapping(ErrorResults
)
13724 async def CleanupOldMetrics(self
, entities
):
13726 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13727 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
13729 # map input types to rpc msg
13731 msg
= dict(type='MetricsManager', request
='CleanupOldMetrics', version
=1, params
=params
)
13732 params
['entities'] = entities
13733 reply
= await self
.rpc(msg
)
13738 @ReturnMapping(ErrorResults
)
13739 async def SendMetrics(self
, entities
):
13741 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13742 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
13744 # map input types to rpc msg
13746 msg
= dict(type='MetricsManager', request
='SendMetrics', version
=1, params
=params
)
13747 params
['entities'] = entities
13748 reply
= await self
.rpc(msg
)
13752 class MigrationFlagFacade(Type
):
13753 name
= 'MigrationFlag'
13755 schema
= {'definitions': {'Entities': {'additionalProperties': False,
13756 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
13758 'required': ['entities'],
13760 'Entity': {'additionalProperties': False,
13761 'properties': {'tag': {'type': 'string'}},
13762 'required': ['tag'],
13764 'Error': {'additionalProperties': False,
13765 'properties': {'code': {'type': 'string'},
13766 'info': {'$ref': '#/definitions/ErrorInfo'},
13767 'message': {'type': 'string'}},
13768 'required': ['message', 'code'],
13770 'ErrorInfo': {'additionalProperties': False,
13771 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
13772 'macaroon-path': {'type': 'string'}},
13774 'Macaroon': {'additionalProperties': False, 'type': 'object'},
13775 'NotifyWatchResult': {'additionalProperties': False,
13776 'properties': {'NotifyWatcherId': {'type': 'string'},
13777 'error': {'$ref': '#/definitions/Error'}},
13778 'required': ['NotifyWatcherId'],
13780 'NotifyWatchResults': {'additionalProperties': False,
13781 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
13783 'required': ['results'],
13785 'PhaseResult': {'additionalProperties': False,
13786 'properties': {'error': {'$ref': '#/definitions/Error'},
13787 'phase': {'type': 'string'}},
13789 'PhaseResults': {'additionalProperties': False,
13790 'properties': {'results': {'items': {'$ref': '#/definitions/PhaseResult'},
13792 'required': ['results'],
13793 'type': 'object'}},
13794 'properties': {'Phase': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13795 'Result': {'$ref': '#/definitions/PhaseResults'}},
13797 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13798 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
13799 'type': 'object'}},
13803 @ReturnMapping(PhaseResults
)
13804 async def Phase(self
, entities
):
13806 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13807 Returns -> typing.Sequence<+T_co>[~PhaseResult]<~PhaseResult>
13809 # map input types to rpc msg
13811 msg
= dict(type='MigrationFlag', request
='Phase', version
=1, params
=params
)
13812 params
['entities'] = entities
13813 reply
= await self
.rpc(msg
)
13818 @ReturnMapping(NotifyWatchResults
)
13819 async def Watch(self
, entities
):
13821 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
13822 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
13824 # map input types to rpc msg
13826 msg
= dict(type='MigrationFlag', request
='Watch', version
=1, params
=params
)
13827 params
['entities'] = entities
13828 reply
= await self
.rpc(msg
)
13832 class MigrationMasterFacade(Type
):
13833 name
= 'MigrationMaster'
13835 schema
= {'definitions': {'Error': {'additionalProperties': False,
13836 'properties': {'code': {'type': 'string'},
13837 'info': {'$ref': '#/definitions/ErrorInfo'},
13838 'message': {'type': 'string'}},
13839 'required': ['message', 'code'],
13841 'ErrorInfo': {'additionalProperties': False,
13842 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
13843 'macaroon-path': {'type': 'string'}},
13845 'Macaroon': {'additionalProperties': False, 'type': 'object'},
13846 'MasterMigrationStatus': {'additionalProperties': False,
13847 'properties': {'migration-id': {'type': 'string'},
13848 'phase': {'type': 'string'},
13849 'phase-changed-time': {'format': 'date-time',
13851 'spec': {'$ref': '#/definitions/MigrationSpec'}},
13852 'required': ['spec',
13855 'phase-changed-time'],
13857 'MigrationModelInfo': {'additionalProperties': False,
13858 'properties': {'agent-version': {'$ref': '#/definitions/Number'},
13859 'name': {'type': 'string'},
13860 'uuid': {'type': 'string'}},
13861 'required': ['uuid',
13865 'MigrationSpec': {'additionalProperties': False,
13866 'properties': {'model-tag': {'type': 'string'},
13867 'target-info': {'$ref': '#/definitions/MigrationTargetInfo'}},
13868 'required': ['model-tag', 'target-info'],
13870 'MigrationTargetInfo': {'additionalProperties': False,
13871 'properties': {'addrs': {'items': {'type': 'string'},
13873 'auth-tag': {'type': 'string'},
13874 'ca-cert': {'type': 'string'},
13875 'controller-tag': {'type': 'string'},
13876 'macaroon': {'type': 'string'},
13877 'password': {'type': 'string'}},
13878 'required': ['controller-tag',
13883 'MinionReports': {'additionalProperties': False,
13884 'properties': {'failed': {'items': {'type': 'string'},
13886 'migration-id': {'type': 'string'},
13887 'phase': {'type': 'string'},
13888 'success-count': {'type': 'integer'},
13889 'unknown-count': {'type': 'integer'},
13890 'unknown-sample': {'items': {'type': 'string'},
13892 'required': ['migration-id',
13899 'NotifyWatchResult': {'additionalProperties': False,
13900 'properties': {'NotifyWatcherId': {'type': 'string'},
13901 'error': {'$ref': '#/definitions/Error'}},
13902 'required': ['NotifyWatcherId'],
13904 'Number': {'additionalProperties': False,
13905 'properties': {'Build': {'type': 'integer'},
13906 'Major': {'type': 'integer'},
13907 'Minor': {'type': 'integer'},
13908 'Patch': {'type': 'integer'},
13909 'Tag': {'type': 'string'}},
13910 'required': ['Major',
13916 'SerializedModel': {'additionalProperties': False,
13917 'properties': {'bytes': {'items': {'type': 'integer'},
13919 'charms': {'items': {'type': 'string'},
13921 'tools': {'items': {'$ref': '#/definitions/SerializedModelTools'},
13923 'required': ['bytes', 'charms', 'tools'],
13925 'SerializedModelTools': {'additionalProperties': False,
13926 'properties': {'uri': {'type': 'string'},
13927 'version': {'type': 'string'}},
13928 'required': ['version', 'uri'],
13930 'SetMigrationPhaseArgs': {'additionalProperties': False,
13931 'properties': {'phase': {'type': 'string'}},
13932 'required': ['phase'],
13934 'SetMigrationStatusMessageArgs': {'additionalProperties': False,
13935 'properties': {'message': {'type': 'string'}},
13936 'required': ['message'],
13937 'type': 'object'}},
13938 'properties': {'Export': {'properties': {'Result': {'$ref': '#/definitions/SerializedModel'}},
13940 'MigrationStatus': {'properties': {'Result': {'$ref': '#/definitions/MasterMigrationStatus'}},
13942 'MinionReports': {'properties': {'Result': {'$ref': '#/definitions/MinionReports'}},
13944 'ModelInfo': {'properties': {'Result': {'$ref': '#/definitions/MigrationModelInfo'}},
13946 'Prechecks': {'type': 'object'},
13947 'Reap': {'type': 'object'},
13948 'SetPhase': {'properties': {'Params': {'$ref': '#/definitions/SetMigrationPhaseArgs'}},
13950 'SetStatusMessage': {'properties': {'Params': {'$ref': '#/definitions/SetMigrationStatusMessageArgs'}},
13952 'Watch': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
13954 'WatchMinionReports': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
13955 'type': 'object'}},
13959 @ReturnMapping(SerializedModel
)
13960 async def Export(self
):
13963 Returns -> typing.Sequence<+T_co>[~SerializedModelTools]<~SerializedModelTools>
13965 # map input types to rpc msg
13967 msg
= dict(type='MigrationMaster', request
='Export', version
=1, params
=params
)
13969 reply
= await self
.rpc(msg
)
13974 @ReturnMapping(MasterMigrationStatus
)
13975 async def MigrationStatus(self
):
13978 Returns -> typing.Union[str, _ForwardRef('MigrationSpec')]
13980 # map input types to rpc msg
13982 msg
= dict(type='MigrationMaster', request
='MigrationStatus', version
=1, params
=params
)
13984 reply
= await self
.rpc(msg
)
13989 @ReturnMapping(MinionReports
)
13990 async def MinionReports(self
):
13993 Returns -> typing.Union[typing.Sequence<+T_co>[str], int]
13995 # map input types to rpc msg
13997 msg
= dict(type='MigrationMaster', request
='MinionReports', version
=1, params
=params
)
13999 reply
= await self
.rpc(msg
)
14004 @ReturnMapping(MigrationModelInfo
)
14005 async def ModelInfo(self
):
14008 Returns -> typing.Union[_ForwardRef('Number'), str]
14010 # map input types to rpc msg
14012 msg
= dict(type='MigrationMaster', request
='ModelInfo', version
=1, params
=params
)
14014 reply
= await self
.rpc(msg
)
14019 @ReturnMapping(None)
14020 async def Prechecks(self
):
14025 # map input types to rpc msg
14027 msg
= dict(type='MigrationMaster', request
='Prechecks', version
=1, params
=params
)
14029 reply
= await self
.rpc(msg
)
14034 @ReturnMapping(None)
14035 async def Reap(self
):
14040 # map input types to rpc msg
14042 msg
= dict(type='MigrationMaster', request
='Reap', version
=1, params
=params
)
14044 reply
= await self
.rpc(msg
)
14049 @ReturnMapping(None)
14050 async def SetPhase(self
, phase
):
14055 # map input types to rpc msg
14057 msg
= dict(type='MigrationMaster', request
='SetPhase', version
=1, params
=params
)
14058 params
['phase'] = phase
14059 reply
= await self
.rpc(msg
)
14064 @ReturnMapping(None)
14065 async def SetStatusMessage(self
, message
):
14070 # map input types to rpc msg
14072 msg
= dict(type='MigrationMaster', request
='SetStatusMessage', version
=1, params
=params
)
14073 params
['message'] = message
14074 reply
= await self
.rpc(msg
)
14079 @ReturnMapping(NotifyWatchResult
)
14080 async def Watch(self
):
14083 Returns -> typing.Union[str, _ForwardRef('Error')]
14085 # map input types to rpc msg
14087 msg
= dict(type='MigrationMaster', request
='Watch', version
=1, params
=params
)
14089 reply
= await self
.rpc(msg
)
14094 @ReturnMapping(NotifyWatchResult
)
14095 async def WatchMinionReports(self
):
14098 Returns -> typing.Union[str, _ForwardRef('Error')]
14100 # map input types to rpc msg
14102 msg
= dict(type='MigrationMaster', request
='WatchMinionReports', version
=1, params
=params
)
14104 reply
= await self
.rpc(msg
)
14108 class MigrationMinionFacade(Type
):
14109 name
= 'MigrationMinion'
14111 schema
= {'definitions': {'Error': {'additionalProperties': False,
14112 'properties': {'code': {'type': 'string'},
14113 'info': {'$ref': '#/definitions/ErrorInfo'},
14114 'message': {'type': 'string'}},
14115 'required': ['message', 'code'],
14117 'ErrorInfo': {'additionalProperties': False,
14118 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
14119 'macaroon-path': {'type': 'string'}},
14121 'Macaroon': {'additionalProperties': False, 'type': 'object'},
14122 'MinionReport': {'additionalProperties': False,
14123 'properties': {'migration-id': {'type': 'string'},
14124 'phase': {'type': 'string'},
14125 'success': {'type': 'boolean'}},
14126 'required': ['migration-id',
14130 'NotifyWatchResult': {'additionalProperties': False,
14131 'properties': {'NotifyWatcherId': {'type': 'string'},
14132 'error': {'$ref': '#/definitions/Error'}},
14133 'required': ['NotifyWatcherId'],
14134 'type': 'object'}},
14135 'properties': {'Report': {'properties': {'Params': {'$ref': '#/definitions/MinionReport'}},
14137 'Watch': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
14138 'type': 'object'}},
14142 @ReturnMapping(None)
14143 async def Report(self
, migration_id
, phase
, success
):
14150 # map input types to rpc msg
14152 msg
= dict(type='MigrationMinion', request
='Report', version
=1, params
=params
)
14153 params
['migration-id'] = migration_id
14154 params
['phase'] = phase
14155 params
['success'] = success
14156 reply
= await self
.rpc(msg
)
14161 @ReturnMapping(NotifyWatchResult
)
14162 async def Watch(self
):
14165 Returns -> typing.Union[str, _ForwardRef('Error')]
14167 # map input types to rpc msg
14169 msg
= dict(type='MigrationMinion', request
='Watch', version
=1, params
=params
)
14171 reply
= await self
.rpc(msg
)
14175 class MigrationStatusWatcherFacade(Type
):
14176 name
= 'MigrationStatusWatcher'
14178 schema
= {'definitions': {'MigrationStatus': {'additionalProperties': False,
14179 'properties': {'attempt': {'type': 'integer'},
14180 'migration-id': {'type': 'string'},
14181 'phase': {'type': 'string'},
14182 'source-api-addrs': {'items': {'type': 'string'},
14184 'source-ca-cert': {'type': 'string'},
14185 'target-api-addrs': {'items': {'type': 'string'},
14187 'target-ca-cert': {'type': 'string'}},
14188 'required': ['migration-id',
14191 'source-api-addrs',
14193 'target-api-addrs',
14195 'type': 'object'}},
14196 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MigrationStatus'}},
14198 'Stop': {'type': 'object'}},
14202 @ReturnMapping(MigrationStatus
)
14203 async def Next(self
):
14206 Returns -> typing.Union[int, typing.Sequence<+T_co>[str]]
14208 # map input types to rpc msg
14210 msg
= dict(type='MigrationStatusWatcher', request
='Next', version
=1, params
=params
)
14212 reply
= await self
.rpc(msg
)
14217 @ReturnMapping(None)
14218 async def Stop(self
):
14223 # map input types to rpc msg
14225 msg
= dict(type='MigrationStatusWatcher', request
='Stop', version
=1, params
=params
)
14227 reply
= await self
.rpc(msg
)
14231 class MigrationTargetFacade(Type
):
14232 name
= 'MigrationTarget'
14234 schema
= {'definitions': {'ModelArgs': {'additionalProperties': False,
14235 'properties': {'model-tag': {'type': 'string'}},
14236 'required': ['model-tag'],
14238 'Number': {'additionalProperties': False,
14239 'properties': {'Build': {'type': 'integer'},
14240 'Major': {'type': 'integer'},
14241 'Minor': {'type': 'integer'},
14242 'Patch': {'type': 'integer'},
14243 'Tag': {'type': 'string'}},
14244 'required': ['Major',
14250 'SerializedModel': {'additionalProperties': False,
14251 'properties': {'bytes': {'items': {'type': 'integer'},
14253 'charms': {'items': {'type': 'string'},
14255 'tools': {'items': {'$ref': '#/definitions/SerializedModelTools'},
14257 'required': ['bytes', 'charms', 'tools'],
14259 'SerializedModelTools': {'additionalProperties': False,
14260 'properties': {'uri': {'type': 'string'},
14261 'version': {'type': 'string'}},
14262 'required': ['version', 'uri'],
14264 'TargetPrechecksArgs': {'additionalProperties': False,
14265 'properties': {'agent-version': {'$ref': '#/definitions/Number'}},
14266 'required': ['agent-version'],
14267 'type': 'object'}},
14268 'properties': {'Abort': {'properties': {'Params': {'$ref': '#/definitions/ModelArgs'}},
14270 'Activate': {'properties': {'Params': {'$ref': '#/definitions/ModelArgs'}},
14272 'Import': {'properties': {'Params': {'$ref': '#/definitions/SerializedModel'}},
14274 'Prechecks': {'properties': {'Params': {'$ref': '#/definitions/TargetPrechecksArgs'}},
14275 'type': 'object'}},
14279 @ReturnMapping(None)
14280 async def Abort(self
, model_tag
):
14285 # map input types to rpc msg
14287 msg
= dict(type='MigrationTarget', request
='Abort', version
=1, params
=params
)
14288 params
['model-tag'] = model_tag
14289 reply
= await self
.rpc(msg
)
14294 @ReturnMapping(None)
14295 async def Activate(self
, model_tag
):
14300 # map input types to rpc msg
14302 msg
= dict(type='MigrationTarget', request
='Activate', version
=1, params
=params
)
14303 params
['model-tag'] = model_tag
14304 reply
= await self
.rpc(msg
)
14309 @ReturnMapping(None)
14310 async def Import(self
, bytes_
, charms
, tools
):
14312 bytes_ : typing.Sequence<+T_co>[int]
14313 charms : typing.Sequence<+T_co>[str]
14314 tools : typing.Sequence<+T_co>[~SerializedModelTools]<~SerializedModelTools>
14317 # map input types to rpc msg
14319 msg
= dict(type='MigrationTarget', request
='Import', version
=1, params
=params
)
14320 params
['bytes'] = bytes_
14321 params
['charms'] = charms
14322 params
['tools'] = tools
14323 reply
= await self
.rpc(msg
)
14328 @ReturnMapping(None)
14329 async def Prechecks(self
, build
, major
, minor
, patch
, tag
):
14338 # map input types to rpc msg
14340 msg
= dict(type='MigrationTarget', request
='Prechecks', version
=1, params
=params
)
14341 params
['Build'] = build
14342 params
['Major'] = major
14343 params
['Minor'] = minor
14344 params
['Patch'] = patch
14345 params
['Tag'] = tag
14346 reply
= await self
.rpc(msg
)
14350 class ModelConfigFacade(Type
):
14351 name
= 'ModelConfig'
14353 schema
= {'definitions': {'ConfigValue': {'additionalProperties': False,
14354 'properties': {'source': {'type': 'string'},
14355 'value': {'additionalProperties': True,
14356 'type': 'object'}},
14357 'required': ['value', 'source'],
14359 'Error': {'additionalProperties': False,
14360 'properties': {'code': {'type': 'string'},
14361 'info': {'$ref': '#/definitions/ErrorInfo'},
14362 'message': {'type': 'string'}},
14363 'required': ['message', 'code'],
14365 'ErrorInfo': {'additionalProperties': False,
14366 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
14367 'macaroon-path': {'type': 'string'}},
14369 'ErrorResult': {'additionalProperties': False,
14370 'properties': {'error': {'$ref': '#/definitions/Error'}},
14372 'ErrorResults': {'additionalProperties': False,
14373 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
14375 'required': ['results'],
14377 'Macaroon': {'additionalProperties': False, 'type': 'object'},
14378 'ModelConfigResults': {'additionalProperties': False,
14379 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ConfigValue'}},
14380 'type': 'object'}},
14381 'required': ['config'],
14383 'ModelDefaultValues': {'additionalProperties': False,
14384 'properties': {'cloud-region': {'type': 'string'},
14385 'cloud-tag': {'type': 'string'},
14386 'config': {'patternProperties': {'.*': {'additionalProperties': True,
14387 'type': 'object'}},
14388 'type': 'object'}},
14389 'required': ['config'],
14391 'ModelDefaults': {'additionalProperties': False,
14392 'properties': {'controller': {'additionalProperties': True,
14394 'default': {'additionalProperties': True,
14396 'regions': {'items': {'$ref': '#/definitions/RegionDefaults'},
14399 'ModelDefaultsResult': {'additionalProperties': False,
14400 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ModelDefaults'}},
14401 'type': 'object'}},
14402 'required': ['config'],
14404 'ModelSet': {'additionalProperties': False,
14405 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
14406 'type': 'object'}},
14407 'type': 'object'}},
14408 'required': ['config'],
14410 'ModelUnset': {'additionalProperties': False,
14411 'properties': {'keys': {'items': {'type': 'string'},
14413 'required': ['keys'],
14415 'ModelUnsetKeys': {'additionalProperties': False,
14416 'properties': {'cloud-region': {'type': 'string'},
14417 'cloud-tag': {'type': 'string'},
14418 'keys': {'items': {'type': 'string'},
14420 'required': ['keys'],
14422 'RegionDefaults': {'additionalProperties': False,
14423 'properties': {'region-name': {'type': 'string'},
14424 'value': {'additionalProperties': True,
14425 'type': 'object'}},
14426 'required': ['region-name', 'value'],
14428 'SetModelDefaults': {'additionalProperties': False,
14429 'properties': {'config': {'items': {'$ref': '#/definitions/ModelDefaultValues'},
14431 'required': ['config'],
14433 'UnsetModelDefaults': {'additionalProperties': False,
14434 'properties': {'keys': {'items': {'$ref': '#/definitions/ModelUnsetKeys'},
14436 'required': ['keys'],
14437 'type': 'object'}},
14438 'properties': {'ModelDefaults': {'properties': {'Result': {'$ref': '#/definitions/ModelDefaultsResult'}},
14440 'ModelGet': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}},
14442 'ModelSet': {'properties': {'Params': {'$ref': '#/definitions/ModelSet'}},
14444 'ModelUnset': {'properties': {'Params': {'$ref': '#/definitions/ModelUnset'}},
14446 'SetModelDefaults': {'properties': {'Params': {'$ref': '#/definitions/SetModelDefaults'},
14447 'Result': {'$ref': '#/definitions/ErrorResults'}},
14449 'UnsetModelDefaults': {'properties': {'Params': {'$ref': '#/definitions/UnsetModelDefaults'},
14450 'Result': {'$ref': '#/definitions/ErrorResults'}},
14451 'type': 'object'}},
14455 @ReturnMapping(ModelDefaultsResult
)
14456 async def ModelDefaults(self
):
14459 Returns -> typing.Mapping<~KT, +VT_co>[str, ~ModelDefaults]<~ModelDefaults>
14461 # map input types to rpc msg
14463 msg
= dict(type='ModelConfig', request
='ModelDefaults', version
=1, params
=params
)
14465 reply
= await self
.rpc(msg
)
14470 @ReturnMapping(ModelConfigResults
)
14471 async def ModelGet(self
):
14474 Returns -> typing.Mapping<~KT, +VT_co>[str, ~ConfigValue]<~ConfigValue>
14476 # map input types to rpc msg
14478 msg
= dict(type='ModelConfig', request
='ModelGet', version
=1, params
=params
)
14480 reply
= await self
.rpc(msg
)
14485 @ReturnMapping(None)
14486 async def ModelSet(self
, config
):
14488 config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
14491 # map input types to rpc msg
14493 msg
= dict(type='ModelConfig', request
='ModelSet', version
=1, params
=params
)
14494 params
['config'] = config
14495 reply
= await self
.rpc(msg
)
14500 @ReturnMapping(None)
14501 async def ModelUnset(self
, keys
):
14503 keys : typing.Sequence<+T_co>[str]
14506 # map input types to rpc msg
14508 msg
= dict(type='ModelConfig', request
='ModelUnset', version
=1, params
=params
)
14509 params
['keys'] = keys
14510 reply
= await self
.rpc(msg
)
14515 @ReturnMapping(ErrorResults
)
14516 async def SetModelDefaults(self
, config
):
14518 config : typing.Sequence<+T_co>[~ModelDefaultValues]<~ModelDefaultValues>
14519 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
14521 # map input types to rpc msg
14523 msg
= dict(type='ModelConfig', request
='SetModelDefaults', version
=1, params
=params
)
14524 params
['config'] = config
14525 reply
= await self
.rpc(msg
)
14530 @ReturnMapping(ErrorResults
)
14531 async def UnsetModelDefaults(self
, keys
):
14533 keys : typing.Sequence<+T_co>[~ModelUnsetKeys]<~ModelUnsetKeys>
14534 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
14536 # map input types to rpc msg
14538 msg
= dict(type='ModelConfig', request
='UnsetModelDefaults', version
=1, params
=params
)
14539 params
['keys'] = keys
14540 reply
= await self
.rpc(msg
)
14544 class ModelManagerFacade(Type
):
14545 name
= 'ModelManager'
14547 schema
= {'definitions': {'Entities': {'additionalProperties': False,
14548 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
14550 'required': ['entities'],
14552 'Entity': {'additionalProperties': False,
14553 'properties': {'tag': {'type': 'string'}},
14554 'required': ['tag'],
14556 'EntityStatus': {'additionalProperties': False,
14557 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
14558 'type': 'object'}},
14560 'info': {'type': 'string'},
14561 'since': {'format': 'date-time',
14563 'status': {'type': 'string'}},
14564 'required': ['status', 'info', 'since'],
14566 'Error': {'additionalProperties': False,
14567 'properties': {'code': {'type': 'string'},
14568 'info': {'$ref': '#/definitions/ErrorInfo'},
14569 'message': {'type': 'string'}},
14570 'required': ['message', 'code'],
14572 'ErrorInfo': {'additionalProperties': False,
14573 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
14574 'macaroon-path': {'type': 'string'}},
14576 'ErrorResult': {'additionalProperties': False,
14577 'properties': {'error': {'$ref': '#/definitions/Error'}},
14579 'ErrorResults': {'additionalProperties': False,
14580 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
14582 'required': ['results'],
14584 'Macaroon': {'additionalProperties': False, 'type': 'object'},
14585 'MapResult': {'additionalProperties': False,
14586 'properties': {'error': {'$ref': '#/definitions/Error'},
14587 'result': {'patternProperties': {'.*': {'additionalProperties': True,
14588 'type': 'object'}},
14589 'type': 'object'}},
14590 'required': ['result'],
14592 'MapResults': {'additionalProperties': False,
14593 'properties': {'results': {'items': {'$ref': '#/definitions/MapResult'},
14595 'required': ['results'],
14597 'Model': {'additionalProperties': False,
14598 'properties': {'name': {'type': 'string'},
14599 'owner-tag': {'type': 'string'},
14600 'uuid': {'type': 'string'}},
14601 'required': ['name', 'uuid', 'owner-tag'],
14603 'ModelCreateArgs': {'additionalProperties': False,
14604 'properties': {'cloud-tag': {'type': 'string'},
14605 'config': {'patternProperties': {'.*': {'additionalProperties': True,
14606 'type': 'object'}},
14608 'credential': {'type': 'string'},
14609 'name': {'type': 'string'},
14610 'owner-tag': {'type': 'string'},
14611 'region': {'type': 'string'}},
14612 'required': ['name', 'owner-tag'],
14614 'ModelInfo': {'additionalProperties': False,
14615 'properties': {'cloud': {'type': 'string'},
14616 'cloud-credential-tag': {'type': 'string'},
14617 'cloud-region': {'type': 'string'},
14618 'controller-uuid': {'type': 'string'},
14619 'default-series': {'type': 'string'},
14620 'life': {'type': 'string'},
14621 'name': {'type': 'string'},
14622 'owner-tag': {'type': 'string'},
14623 'provider-type': {'type': 'string'},
14624 'status': {'$ref': '#/definitions/EntityStatus'},
14625 'users': {'items': {'$ref': '#/definitions/ModelUserInfo'},
14627 'uuid': {'type': 'string'}},
14628 'required': ['name',
14639 'ModelInfoResult': {'additionalProperties': False,
14640 'properties': {'error': {'$ref': '#/definitions/Error'},
14641 'result': {'$ref': '#/definitions/ModelInfo'}},
14643 'ModelInfoResults': {'additionalProperties': False,
14644 'properties': {'results': {'items': {'$ref': '#/definitions/ModelInfoResult'},
14646 'required': ['results'],
14648 'ModelUserInfo': {'additionalProperties': False,
14649 'properties': {'access': {'type': 'string'},
14650 'display-name': {'type': 'string'},
14651 'last-connection': {'format': 'date-time',
14653 'user': {'type': 'string'}},
14654 'required': ['user',
14659 'ModifyModelAccess': {'additionalProperties': False,
14660 'properties': {'access': {'type': 'string'},
14661 'action': {'type': 'string'},
14662 'model-tag': {'type': 'string'},
14663 'user-tag': {'type': 'string'}},
14664 'required': ['user-tag',
14669 'ModifyModelAccessRequest': {'additionalProperties': False,
14670 'properties': {'changes': {'items': {'$ref': '#/definitions/ModifyModelAccess'},
14672 'required': ['changes'],
14674 'UserModel': {'additionalProperties': False,
14675 'properties': {'last-connection': {'format': 'date-time',
14677 'model': {'$ref': '#/definitions/Model'}},
14678 'required': ['model', 'last-connection'],
14680 'UserModelList': {'additionalProperties': False,
14681 'properties': {'user-models': {'items': {'$ref': '#/definitions/UserModel'},
14683 'required': ['user-models'],
14684 'type': 'object'}},
14685 'properties': {'CreateModel': {'properties': {'Params': {'$ref': '#/definitions/ModelCreateArgs'},
14686 'Result': {'$ref': '#/definitions/ModelInfo'}},
14688 'DestroyModel': {'type': 'object'},
14689 'DestroyModels': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14690 'Result': {'$ref': '#/definitions/ErrorResults'}},
14692 'DumpModels': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14693 'Result': {'$ref': '#/definitions/MapResults'}},
14695 'DumpModelsDB': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14696 'Result': {'$ref': '#/definitions/MapResults'}},
14698 'ListModels': {'properties': {'Params': {'$ref': '#/definitions/Entity'},
14699 'Result': {'$ref': '#/definitions/UserModelList'}},
14701 'ModelInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14702 'Result': {'$ref': '#/definitions/ModelInfoResults'}},
14704 'ModifyModelAccess': {'properties': {'Params': {'$ref': '#/definitions/ModifyModelAccessRequest'},
14705 'Result': {'$ref': '#/definitions/ErrorResults'}},
14706 'type': 'object'}},
14710 @ReturnMapping(ModelInfo
)
14711 async def CreateModel(self
, cloud_tag
, config
, credential
, name
, owner_tag
, region
):
14714 config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
14719 Returns -> typing.Union[_ForwardRef('EntityStatus'), typing.Sequence<+T_co>[~ModelUserInfo]<~ModelUserInfo>]
14721 # map input types to rpc msg
14723 msg
= dict(type='ModelManager', request
='CreateModel', version
=2, params
=params
)
14724 params
['cloud-tag'] = cloud_tag
14725 params
['config'] = config
14726 params
['credential'] = credential
14727 params
['name'] = name
14728 params
['owner-tag'] = owner_tag
14729 params
['region'] = region
14730 reply
= await self
.rpc(msg
)
14735 @ReturnMapping(None)
14736 async def DestroyModel(self
):
14741 # map input types to rpc msg
14743 msg
= dict(type='ModelManager', request
='DestroyModel', version
=2, params
=params
)
14745 reply
= await self
.rpc(msg
)
14750 @ReturnMapping(ErrorResults
)
14751 async def DestroyModels(self
, entities
):
14753 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
14754 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
14756 # map input types to rpc msg
14758 msg
= dict(type='ModelManager', request
='DestroyModels', version
=2, params
=params
)
14759 params
['entities'] = entities
14760 reply
= await self
.rpc(msg
)
14765 @ReturnMapping(MapResults
)
14766 async def DumpModels(self
, entities
):
14768 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
14769 Returns -> typing.Sequence<+T_co>[~MapResult]<~MapResult>
14771 # map input types to rpc msg
14773 msg
= dict(type='ModelManager', request
='DumpModels', version
=2, params
=params
)
14774 params
['entities'] = entities
14775 reply
= await self
.rpc(msg
)
14780 @ReturnMapping(MapResults
)
14781 async def DumpModelsDB(self
, entities
):
14783 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
14784 Returns -> typing.Sequence<+T_co>[~MapResult]<~MapResult>
14786 # map input types to rpc msg
14788 msg
= dict(type='ModelManager', request
='DumpModelsDB', version
=2, params
=params
)
14789 params
['entities'] = entities
14790 reply
= await self
.rpc(msg
)
14795 @ReturnMapping(UserModelList
)
14796 async def ListModels(self
, tag
):
14799 Returns -> typing.Sequence<+T_co>[~UserModel]<~UserModel>
14801 # map input types to rpc msg
14803 msg
= dict(type='ModelManager', request
='ListModels', version
=2, params
=params
)
14804 params
['tag'] = tag
14805 reply
= await self
.rpc(msg
)
14810 @ReturnMapping(ModelInfoResults
)
14811 async def ModelInfo(self
, entities
):
14813 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
14814 Returns -> typing.Sequence<+T_co>[~ModelInfoResult]<~ModelInfoResult>
14816 # map input types to rpc msg
14818 msg
= dict(type='ModelManager', request
='ModelInfo', version
=2, params
=params
)
14819 params
['entities'] = entities
14820 reply
= await self
.rpc(msg
)
14825 @ReturnMapping(ErrorResults
)
14826 async def ModifyModelAccess(self
, changes
):
14828 changes : typing.Sequence<+T_co>[~ModifyModelAccess]<~ModifyModelAccess>
14829 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
14831 # map input types to rpc msg
14833 msg
= dict(type='ModelManager', request
='ModifyModelAccess', version
=2, params
=params
)
14834 params
['changes'] = changes
14835 reply
= await self
.rpc(msg
)
14839 class NotifyWatcherFacade(Type
):
14840 name
= 'NotifyWatcher'
14842 schema
= {'properties': {'Next': {'type': 'object'}, 'Stop': {'type': 'object'}},
14846 @ReturnMapping(None)
14847 async def Next(self
):
14852 # map input types to rpc msg
14854 msg
= dict(type='NotifyWatcher', request
='Next', version
=1, params
=params
)
14856 reply
= await self
.rpc(msg
)
14861 @ReturnMapping(None)
14862 async def Stop(self
):
14867 # map input types to rpc msg
14869 msg
= dict(type='NotifyWatcher', request
='Stop', version
=1, params
=params
)
14871 reply
= await self
.rpc(msg
)
14875 class PingerFacade(Type
):
14878 schema
= {'properties': {'Ping': {'type': 'object'}, 'Stop': {'type': 'object'}},
14882 @ReturnMapping(None)
14883 async def Ping(self
):
14888 # map input types to rpc msg
14890 msg
= dict(type='Pinger', request
='Ping', version
=1, params
=params
)
14892 reply
= await self
.rpc(msg
)
14897 @ReturnMapping(None)
14898 async def Stop(self
):
14903 # map input types to rpc msg
14905 msg
= dict(type='Pinger', request
='Stop', version
=1, params
=params
)
14907 reply
= await self
.rpc(msg
)
14911 class ProvisionerFacade(Type
):
14912 name
= 'Provisioner'
14914 schema
= {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
14915 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
14918 'required': ['servers'],
14920 'Address': {'additionalProperties': False,
14921 'properties': {'scope': {'type': 'string'},
14922 'space-name': {'type': 'string'},
14923 'type': {'type': 'string'},
14924 'value': {'type': 'string'}},
14925 'required': ['value', 'type', 'scope'],
14927 'Binary': {'additionalProperties': False,
14928 'properties': {'Arch': {'type': 'string'},
14929 'Number': {'$ref': '#/definitions/Number'},
14930 'Series': {'type': 'string'}},
14931 'required': ['Number', 'Series', 'Arch'],
14933 'BytesResult': {'additionalProperties': False,
14934 'properties': {'result': {'items': {'type': 'integer'},
14936 'required': ['result'],
14938 'CloudImageMetadata': {'additionalProperties': False,
14939 'properties': {'arch': {'type': 'string'},
14940 'image-id': {'type': 'string'},
14941 'priority': {'type': 'integer'},
14942 'region': {'type': 'string'},
14943 'root-storage-size': {'type': 'integer'},
14944 'root-storage-type': {'type': 'string'},
14945 'series': {'type': 'string'},
14946 'source': {'type': 'string'},
14947 'stream': {'type': 'string'},
14948 'version': {'type': 'string'},
14949 'virt-type': {'type': 'string'}},
14950 'required': ['image-id',
14958 'ConstraintsResult': {'additionalProperties': False,
14959 'properties': {'constraints': {'$ref': '#/definitions/Value'},
14960 'error': {'$ref': '#/definitions/Error'}},
14961 'required': ['constraints'],
14963 'ConstraintsResults': {'additionalProperties': False,
14964 'properties': {'results': {'items': {'$ref': '#/definitions/ConstraintsResult'},
14966 'required': ['results'],
14968 'ContainerConfig': {'additionalProperties': False,
14969 'properties': {'UpdateBehavior': {'$ref': '#/definitions/UpdateBehavior'},
14970 'apt-mirror': {'type': 'string'},
14971 'apt-proxy': {'$ref': '#/definitions/Settings'},
14972 'authorized-keys': {'type': 'string'},
14973 'provider-type': {'type': 'string'},
14974 'proxy': {'$ref': '#/definitions/Settings'},
14975 'ssl-hostname-verification': {'type': 'boolean'}},
14976 'required': ['provider-type',
14978 'ssl-hostname-verification',
14984 'ContainerManagerConfig': {'additionalProperties': False,
14985 'properties': {'config': {'patternProperties': {'.*': {'type': 'string'}},
14986 'type': 'object'}},
14987 'required': ['config'],
14989 'ContainerManagerConfigParams': {'additionalProperties': False,
14990 'properties': {'type': {'type': 'string'}},
14991 'required': ['type'],
14993 'ControllerConfigResult': {'additionalProperties': False,
14994 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
14995 'type': 'object'}},
14996 'type': 'object'}},
14997 'required': ['config'],
14999 'DistributionGroupResult': {'additionalProperties': False,
15000 'properties': {'error': {'$ref': '#/definitions/Error'},
15001 'result': {'items': {'type': 'string'},
15003 'required': ['result'],
15005 'DistributionGroupResults': {'additionalProperties': False,
15006 'properties': {'results': {'items': {'$ref': '#/definitions/DistributionGroupResult'},
15008 'required': ['results'],
15010 'Entities': {'additionalProperties': False,
15011 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
15013 'required': ['entities'],
15015 'Entity': {'additionalProperties': False,
15016 'properties': {'tag': {'type': 'string'}},
15017 'required': ['tag'],
15019 'EntityPassword': {'additionalProperties': False,
15020 'properties': {'password': {'type': 'string'},
15021 'tag': {'type': 'string'}},
15022 'required': ['tag', 'password'],
15024 'EntityPasswords': {'additionalProperties': False,
15025 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'},
15027 'required': ['changes'],
15029 'EntityStatusArgs': {'additionalProperties': False,
15030 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
15031 'type': 'object'}},
15033 'info': {'type': 'string'},
15034 'status': {'type': 'string'},
15035 'tag': {'type': 'string'}},
15036 'required': ['tag',
15041 'Error': {'additionalProperties': False,
15042 'properties': {'code': {'type': 'string'},
15043 'info': {'$ref': '#/definitions/ErrorInfo'},
15044 'message': {'type': 'string'}},
15045 'required': ['message', 'code'],
15047 'ErrorInfo': {'additionalProperties': False,
15048 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
15049 'macaroon-path': {'type': 'string'}},
15051 'ErrorResult': {'additionalProperties': False,
15052 'properties': {'error': {'$ref': '#/definitions/Error'}},
15054 'ErrorResults': {'additionalProperties': False,
15055 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
15057 'required': ['results'],
15059 'FindToolsParams': {'additionalProperties': False,
15060 'properties': {'arch': {'type': 'string'},
15061 'major': {'type': 'integer'},
15062 'minor': {'type': 'integer'},
15063 'number': {'$ref': '#/definitions/Number'},
15064 'series': {'type': 'string'}},
15065 'required': ['number',
15071 'FindToolsResult': {'additionalProperties': False,
15072 'properties': {'error': {'$ref': '#/definitions/Error'},
15073 'list': {'items': {'$ref': '#/definitions/Tools'},
15075 'required': ['list'],
15077 'HardwareCharacteristics': {'additionalProperties': False,
15078 'properties': {'arch': {'type': 'string'},
15079 'availability-zone': {'type': 'string'},
15080 'cpu-cores': {'type': 'integer'},
15081 'cpu-power': {'type': 'integer'},
15082 'mem': {'type': 'integer'},
15083 'root-disk': {'type': 'integer'},
15084 'tags': {'items': {'type': 'string'},
15087 'HostPort': {'additionalProperties': False,
15088 'properties': {'Address': {'$ref': '#/definitions/Address'},
15089 'port': {'type': 'integer'}},
15090 'required': ['Address', 'port'],
15092 'InstanceInfo': {'additionalProperties': False,
15093 'properties': {'characteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
15094 'instance-id': {'type': 'string'},
15095 'network-config': {'items': {'$ref': '#/definitions/NetworkConfig'},
15097 'nonce': {'type': 'string'},
15098 'tag': {'type': 'string'},
15099 'volume-attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/VolumeAttachmentInfo'}},
15101 'volumes': {'items': {'$ref': '#/definitions/Volume'},
15103 'required': ['tag',
15108 'volume-attachments',
15111 'InstancesInfo': {'additionalProperties': False,
15112 'properties': {'machines': {'items': {'$ref': '#/definitions/InstanceInfo'},
15114 'required': ['machines'],
15116 'LifeResult': {'additionalProperties': False,
15117 'properties': {'error': {'$ref': '#/definitions/Error'},
15118 'life': {'type': 'string'}},
15119 'required': ['life'],
15121 'LifeResults': {'additionalProperties': False,
15122 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
15124 'required': ['results'],
15126 'Macaroon': {'additionalProperties': False, 'type': 'object'},
15127 'MachineContainers': {'additionalProperties': False,
15128 'properties': {'container-types': {'items': {'type': 'string'},
15130 'machine-tag': {'type': 'string'}},
15131 'required': ['machine-tag',
15132 'container-types'],
15134 'MachineContainersParams': {'additionalProperties': False,
15135 'properties': {'params': {'items': {'$ref': '#/definitions/MachineContainers'},
15137 'required': ['params'],
15139 'MachineNetworkConfigResult': {'additionalProperties': False,
15140 'properties': {'error': {'$ref': '#/definitions/Error'},
15141 'info': {'items': {'$ref': '#/definitions/NetworkConfig'},
15143 'required': ['info'],
15145 'MachineNetworkConfigResults': {'additionalProperties': False,
15146 'properties': {'results': {'items': {'$ref': '#/definitions/MachineNetworkConfigResult'},
15148 'required': ['results'],
15150 'ModelConfigResult': {'additionalProperties': False,
15151 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
15152 'type': 'object'}},
15153 'type': 'object'}},
15154 'required': ['config'],
15156 'NetworkConfig': {'additionalProperties': False,
15157 'properties': {'address': {'type': 'string'},
15158 'cidr': {'type': 'string'},
15159 'config-type': {'type': 'string'},
15160 'device-index': {'type': 'integer'},
15161 'disabled': {'type': 'boolean'},
15162 'dns-search-domains': {'items': {'type': 'string'},
15164 'dns-servers': {'items': {'type': 'string'},
15166 'gateway-address': {'type': 'string'},
15167 'interface-name': {'type': 'string'},
15168 'interface-type': {'type': 'string'},
15169 'mac-address': {'type': 'string'},
15170 'mtu': {'type': 'integer'},
15171 'no-auto-start': {'type': 'boolean'},
15172 'parent-interface-name': {'type': 'string'},
15173 'provider-address-id': {'type': 'string'},
15174 'provider-id': {'type': 'string'},
15175 'provider-space-id': {'type': 'string'},
15176 'provider-subnet-id': {'type': 'string'},
15177 'provider-vlan-id': {'type': 'string'},
15178 'vlan-tag': {'type': 'integer'}},
15179 'required': ['device-index',
15184 'provider-subnet-id',
15185 'provider-space-id',
15186 'provider-address-id',
15187 'provider-vlan-id',
15190 'parent-interface-name',
15194 'NotifyWatchResult': {'additionalProperties': False,
15195 'properties': {'NotifyWatcherId': {'type': 'string'},
15196 'error': {'$ref': '#/definitions/Error'}},
15197 'required': ['NotifyWatcherId'],
15199 'Number': {'additionalProperties': False,
15200 'properties': {'Build': {'type': 'integer'},
15201 'Major': {'type': 'integer'},
15202 'Minor': {'type': 'integer'},
15203 'Patch': {'type': 'integer'},
15204 'Tag': {'type': 'string'}},
15205 'required': ['Major',
15211 'ProvisioningInfo': {'additionalProperties': False,
15212 'properties': {'constraints': {'$ref': '#/definitions/Value'},
15213 'controller-config': {'patternProperties': {'.*': {'additionalProperties': True,
15214 'type': 'object'}},
15216 'endpoint-bindings': {'patternProperties': {'.*': {'type': 'string'}},
15218 'image-metadata': {'items': {'$ref': '#/definitions/CloudImageMetadata'},
15220 'jobs': {'items': {'type': 'string'},
15222 'placement': {'type': 'string'},
15223 'series': {'type': 'string'},
15224 'subnets-to-zones': {'patternProperties': {'.*': {'items': {'type': 'string'},
15227 'tags': {'patternProperties': {'.*': {'type': 'string'}},
15229 'volumes': {'items': {'$ref': '#/definitions/VolumeParams'},
15231 'required': ['constraints',
15236 'ProvisioningInfoResult': {'additionalProperties': False,
15237 'properties': {'error': {'$ref': '#/definitions/Error'},
15238 'result': {'$ref': '#/definitions/ProvisioningInfo'}},
15239 'required': ['result'],
15241 'ProvisioningInfoResults': {'additionalProperties': False,
15242 'properties': {'results': {'items': {'$ref': '#/definitions/ProvisioningInfoResult'},
15244 'required': ['results'],
15246 'SetStatus': {'additionalProperties': False,
15247 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
15249 'required': ['entities'],
15251 'Settings': {'additionalProperties': False,
15252 'properties': {'Ftp': {'type': 'string'},
15253 'Http': {'type': 'string'},
15254 'Https': {'type': 'string'},
15255 'NoProxy': {'type': 'string'}},
15256 'required': ['Http', 'Https', 'Ftp', 'NoProxy'],
15258 'StatusResult': {'additionalProperties': False,
15259 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
15260 'type': 'object'}},
15262 'error': {'$ref': '#/definitions/Error'},
15263 'id': {'type': 'string'},
15264 'info': {'type': 'string'},
15265 'life': {'type': 'string'},
15266 'since': {'format': 'date-time',
15268 'status': {'type': 'string'}},
15276 'StatusResults': {'additionalProperties': False,
15277 'properties': {'results': {'items': {'$ref': '#/definitions/StatusResult'},
15279 'required': ['results'],
15281 'StringResult': {'additionalProperties': False,
15282 'properties': {'error': {'$ref': '#/definitions/Error'},
15283 'result': {'type': 'string'}},
15284 'required': ['result'],
15286 'StringResults': {'additionalProperties': False,
15287 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
15289 'required': ['results'],
15291 'StringsResult': {'additionalProperties': False,
15292 'properties': {'error': {'$ref': '#/definitions/Error'},
15293 'result': {'items': {'type': 'string'},
15296 'StringsWatchResult': {'additionalProperties': False,
15297 'properties': {'changes': {'items': {'type': 'string'},
15299 'error': {'$ref': '#/definitions/Error'},
15300 'watcher-id': {'type': 'string'}},
15301 'required': ['watcher-id'],
15303 'StringsWatchResults': {'additionalProperties': False,
15304 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
15306 'required': ['results'],
15308 'Tools': {'additionalProperties': False,
15309 'properties': {'sha256': {'type': 'string'},
15310 'size': {'type': 'integer'},
15311 'url': {'type': 'string'},
15312 'version': {'$ref': '#/definitions/Binary'}},
15313 'required': ['version', 'url', 'size'],
15315 'ToolsResult': {'additionalProperties': False,
15316 'properties': {'disable-ssl-hostname-verification': {'type': 'boolean'},
15317 'error': {'$ref': '#/definitions/Error'},
15318 'tools': {'items': {'$ref': '#/definitions/Tools'},
15320 'required': ['tools',
15321 'disable-ssl-hostname-verification'],
15323 'ToolsResults': {'additionalProperties': False,
15324 'properties': {'results': {'items': {'$ref': '#/definitions/ToolsResult'},
15326 'required': ['results'],
15328 'UpdateBehavior': {'additionalProperties': False,
15329 'properties': {'enable-os-refresh-update': {'type': 'boolean'},
15330 'enable-os-upgrade': {'type': 'boolean'}},
15331 'required': ['enable-os-refresh-update',
15332 'enable-os-upgrade'],
15334 'Value': {'additionalProperties': False,
15335 'properties': {'arch': {'type': 'string'},
15336 'container': {'type': 'string'},
15337 'cpu-cores': {'type': 'integer'},
15338 'cpu-power': {'type': 'integer'},
15339 'instance-type': {'type': 'string'},
15340 'mem': {'type': 'integer'},
15341 'root-disk': {'type': 'integer'},
15342 'spaces': {'items': {'type': 'string'},
15344 'tags': {'items': {'type': 'string'},
15346 'virt-type': {'type': 'string'}},
15348 'Volume': {'additionalProperties': False,
15349 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'},
15350 'volume-tag': {'type': 'string'}},
15351 'required': ['volume-tag', 'info'],
15353 'VolumeAttachmentInfo': {'additionalProperties': False,
15354 'properties': {'bus-address': {'type': 'string'},
15355 'device-link': {'type': 'string'},
15356 'device-name': {'type': 'string'},
15357 'read-only': {'type': 'boolean'}},
15359 'VolumeAttachmentParams': {'additionalProperties': False,
15360 'properties': {'instance-id': {'type': 'string'},
15361 'machine-tag': {'type': 'string'},
15362 'provider': {'type': 'string'},
15363 'read-only': {'type': 'boolean'},
15364 'volume-id': {'type': 'string'},
15365 'volume-tag': {'type': 'string'}},
15366 'required': ['volume-tag',
15370 'VolumeInfo': {'additionalProperties': False,
15371 'properties': {'hardware-id': {'type': 'string'},
15372 'persistent': {'type': 'boolean'},
15373 'size': {'type': 'integer'},
15374 'volume-id': {'type': 'string'}},
15375 'required': ['volume-id', 'size', 'persistent'],
15377 'VolumeParams': {'additionalProperties': False,
15378 'properties': {'attachment': {'$ref': '#/definitions/VolumeAttachmentParams'},
15379 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
15380 'type': 'object'}},
15382 'provider': {'type': 'string'},
15383 'size': {'type': 'integer'},
15384 'tags': {'patternProperties': {'.*': {'type': 'string'}},
15386 'volume-tag': {'type': 'string'}},
15387 'required': ['volume-tag',
15391 'WatchContainer': {'additionalProperties': False,
15392 'properties': {'container-type': {'type': 'string'},
15393 'machine-tag': {'type': 'string'}},
15394 'required': ['machine-tag',
15397 'WatchContainers': {'additionalProperties': False,
15398 'properties': {'params': {'items': {'$ref': '#/definitions/WatchContainer'},
15400 'required': ['params'],
15401 'type': 'object'}},
15402 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
15404 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
15406 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
15408 'Constraints': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15409 'Result': {'$ref': '#/definitions/ConstraintsResults'}},
15411 'ContainerConfig': {'properties': {'Result': {'$ref': '#/definitions/ContainerConfig'}},
15413 'ContainerManagerConfig': {'properties': {'Params': {'$ref': '#/definitions/ContainerManagerConfigParams'},
15414 'Result': {'$ref': '#/definitions/ContainerManagerConfig'}},
15416 'ControllerConfig': {'properties': {'Result': {'$ref': '#/definitions/ControllerConfigResult'}},
15418 'DistributionGroup': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15419 'Result': {'$ref': '#/definitions/DistributionGroupResults'}},
15421 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15422 'Result': {'$ref': '#/definitions/ErrorResults'}},
15424 'FindTools': {'properties': {'Params': {'$ref': '#/definitions/FindToolsParams'},
15425 'Result': {'$ref': '#/definitions/FindToolsResult'}},
15427 'GetContainerInterfaceInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15428 'Result': {'$ref': '#/definitions/MachineNetworkConfigResults'}},
15430 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15431 'Result': {'$ref': '#/definitions/StringResults'}},
15433 'InstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15434 'Result': {'$ref': '#/definitions/StatusResults'}},
15436 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15437 'Result': {'$ref': '#/definitions/LifeResults'}},
15439 'MachinesWithTransientErrors': {'properties': {'Result': {'$ref': '#/definitions/StatusResults'}},
15441 'MarkMachinesForRemoval': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15442 'Result': {'$ref': '#/definitions/ErrorResults'}},
15444 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
15446 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
15448 'PrepareContainerInterfaceInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15449 'Result': {'$ref': '#/definitions/MachineNetworkConfigResults'}},
15451 'ProvisioningInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15452 'Result': {'$ref': '#/definitions/ProvisioningInfoResults'}},
15454 'ReleaseContainerAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15455 'Result': {'$ref': '#/definitions/ErrorResults'}},
15457 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15458 'Result': {'$ref': '#/definitions/ErrorResults'}},
15460 'Series': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15461 'Result': {'$ref': '#/definitions/StringResults'}},
15463 'SetInstanceInfo': {'properties': {'Params': {'$ref': '#/definitions/InstancesInfo'},
15464 'Result': {'$ref': '#/definitions/ErrorResults'}},
15466 'SetInstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
15467 'Result': {'$ref': '#/definitions/ErrorResults'}},
15469 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
15470 'Result': {'$ref': '#/definitions/ErrorResults'}},
15472 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
15473 'Result': {'$ref': '#/definitions/ErrorResults'}},
15475 'SetSupportedContainers': {'properties': {'Params': {'$ref': '#/definitions/MachineContainersParams'},
15476 'Result': {'$ref': '#/definitions/ErrorResults'}},
15478 'StateAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
15480 'Status': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15481 'Result': {'$ref': '#/definitions/StatusResults'}},
15483 'Tools': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15484 'Result': {'$ref': '#/definitions/ToolsResults'}},
15486 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
15487 'Result': {'$ref': '#/definitions/ErrorResults'}},
15489 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
15491 'WatchAllContainers': {'properties': {'Params': {'$ref': '#/definitions/WatchContainers'},
15492 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
15494 'WatchContainers': {'properties': {'Params': {'$ref': '#/definitions/WatchContainers'},
15495 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
15497 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
15499 'WatchMachineErrorRetry': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
15501 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
15502 'type': 'object'}},
15506 @ReturnMapping(StringsResult
)
15507 async def APIAddresses(self
):
15510 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[str]]
15512 # map input types to rpc msg
15514 msg
= dict(type='Provisioner', request
='APIAddresses', version
=3, params
=params
)
15516 reply
= await self
.rpc(msg
)
15521 @ReturnMapping(APIHostPortsResult
)
15522 async def APIHostPorts(self
):
15525 Returns -> typing.Sequence<+T_co>[~HostPort]<~HostPort>
15527 # map input types to rpc msg
15529 msg
= dict(type='Provisioner', request
='APIHostPorts', version
=3, params
=params
)
15531 reply
= await self
.rpc(msg
)
15536 @ReturnMapping(BytesResult
)
15537 async def CACert(self
):
15540 Returns -> typing.Sequence<+T_co>[int]
15542 # map input types to rpc msg
15544 msg
= dict(type='Provisioner', request
='CACert', version
=3, params
=params
)
15546 reply
= await self
.rpc(msg
)
15551 @ReturnMapping(ConstraintsResults
)
15552 async def Constraints(self
, entities
):
15554 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
15555 Returns -> typing.Sequence<+T_co>[~ConstraintsResult]<~ConstraintsResult>
15557 # map input types to rpc msg
15559 msg
= dict(type='Provisioner', request
='Constraints', version
=3, params
=params
)
15560 params
['entities'] = entities
15561 reply
= await self
.rpc(msg
)
15566 @ReturnMapping(ContainerConfig
)
15567 async def ContainerConfig(self
):
15570 Returns -> typing.Union[_ForwardRef('UpdateBehavior'), str, _ForwardRef('Settings'), _ForwardRef('Settings'), bool]
15572 # map input types to rpc msg
15574 msg
= dict(type='Provisioner', request
='ContainerConfig', version
=3, params
=params
)
15576 reply
= await self
.rpc(msg
)
15581 @ReturnMapping(ContainerManagerConfig
)
15582 async def ContainerManagerConfig(self
, type_
):
15585 Returns -> typing.Mapping<~KT, +VT_co>[str, str]
15587 # map input types to rpc msg
15589 msg
= dict(type='Provisioner', request
='ContainerManagerConfig', version
=3, params
=params
)
15590 params
['type'] = type_
15591 reply
= await self
.rpc(msg
)
15596 @ReturnMapping(ControllerConfigResult
)
15597 async def ControllerConfig(self
):
15600 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
15602 # map input types to rpc msg
15604 msg
= dict(type='Provisioner', request
='ControllerConfig', version
=3, params
=params
)
15606 reply
= await self
.rpc(msg
)
15611 @ReturnMapping(DistributionGroupResults
)
15612 async def DistributionGroup(self
, entities
):
15614 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
15615 Returns -> typing.Sequence<+T_co>[~DistributionGroupResult]<~DistributionGroupResult>
15617 # map input types to rpc msg
15619 msg
= dict(type='Provisioner', request
='DistributionGroup', version
=3, params
=params
)
15620 params
['entities'] = entities
15621 reply
= await self
.rpc(msg
)
15626 @ReturnMapping(ErrorResults
)
15627 async def EnsureDead(self
, entities
):
15629 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
15630 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
15632 # map input types to rpc msg
15634 msg
= dict(type='Provisioner', request
='EnsureDead', version
=3, params
=params
)
15635 params
['entities'] = entities
15636 reply
= await self
.rpc(msg
)
15641 @ReturnMapping(FindToolsResult
)
15642 async def FindTools(self
, arch
, major
, minor
, number
, series
):
15649 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[~Tools]<~Tools>]
15651 # map input types to rpc msg
15653 msg
= dict(type='Provisioner', request
='FindTools', version
=3, params
=params
)
15654 params
['arch'] = arch
15655 params
['major'] = major
15656 params
['minor'] = minor
15657 params
['number'] = number
15658 params
['series'] = series
15659 reply
= await self
.rpc(msg
)
15664 @ReturnMapping(MachineNetworkConfigResults
)
15665 async def GetContainerInterfaceInfo(self
, entities
):
15667 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
15668 Returns -> typing.Sequence<+T_co>[~MachineNetworkConfigResult]<~MachineNetworkConfigResult>
15670 # map input types to rpc msg
15672 msg
= dict(type='Provisioner', request
='GetContainerInterfaceInfo', version
=3, params
=params
)
15673 params
['entities'] = entities
15674 reply
= await self
.rpc(msg
)
15679 @ReturnMapping(StringResults
)
15680 async def InstanceId(self
, entities
):
15682 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
15683 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
15685 # map input types to rpc msg
15687 msg
= dict(type='Provisioner', request
='InstanceId', version
=3, params
=params
)
15688 params
['entities'] = entities
15689 reply
= await self
.rpc(msg
)
15694 @ReturnMapping(StatusResults
)
15695 async def InstanceStatus(self
, entities
):
15697 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
15698 Returns -> typing.Sequence<+T_co>[~StatusResult]<~StatusResult>
15700 # map input types to rpc msg
15702 msg
= dict(type='Provisioner', request
='InstanceStatus', version
=3, params
=params
)
15703 params
['entities'] = entities
15704 reply
= await self
.rpc(msg
)
15709 @ReturnMapping(LifeResults
)
15710 async def Life(self
, entities
):
15712 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
15713 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
15715 # map input types to rpc msg
15717 msg
= dict(type='Provisioner', request
='Life', version
=3, params
=params
)
15718 params
['entities'] = entities
15719 reply
= await self
.rpc(msg
)
15724 @ReturnMapping(StatusResults
)
15725 async def MachinesWithTransientErrors(self
):
15728 Returns -> typing.Sequence<+T_co>[~StatusResult]<~StatusResult>
15730 # map input types to rpc msg
15732 msg
= dict(type='Provisioner', request
='MachinesWithTransientErrors', version
=3, params
=params
)
15734 reply
= await self
.rpc(msg
)
15739 @ReturnMapping(ErrorResults
)
15740 async def MarkMachinesForRemoval(self
, entities
):
15742 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
15743 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
15745 # map input types to rpc msg
15747 msg
= dict(type='Provisioner', request
='MarkMachinesForRemoval', version
=3, params
=params
)
15748 params
['entities'] = entities
15749 reply
= await self
.rpc(msg
)
15754 @ReturnMapping(ModelConfigResult
)
15755 async def ModelConfig(self
):
15758 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
15760 # map input types to rpc msg
15762 msg
= dict(type='Provisioner', request
='ModelConfig', version
=3, params
=params
)
15764 reply
= await self
.rpc(msg
)
15769 @ReturnMapping(StringResult
)
15770 async def ModelUUID(self
):
15773 Returns -> typing.Union[_ForwardRef('Error'), str]
15775 # map input types to rpc msg
15777 msg
= dict(type='Provisioner', request
='ModelUUID', version
=3, params
=params
)
15779 reply
= await self
.rpc(msg
)
15784 @ReturnMapping(MachineNetworkConfigResults
)
15785 async def PrepareContainerInterfaceInfo(self
, entities
):
15787 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
15788 Returns -> typing.Sequence<+T_co>[~MachineNetworkConfigResult]<~MachineNetworkConfigResult>
15790 # map input types to rpc msg
15792 msg
= dict(type='Provisioner', request
='PrepareContainerInterfaceInfo', version
=3, params
=params
)
15793 params
['entities'] = entities
15794 reply
= await self
.rpc(msg
)
15799 @ReturnMapping(ProvisioningInfoResults
)
15800 async def ProvisioningInfo(self
, entities
):
15802 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
15803 Returns -> typing.Sequence<+T_co>[~ProvisioningInfoResult]<~ProvisioningInfoResult>
15805 # map input types to rpc msg
15807 msg
= dict(type='Provisioner', request
='ProvisioningInfo', version
=3, params
=params
)
15808 params
['entities'] = entities
15809 reply
= await self
.rpc(msg
)
15814 @ReturnMapping(ErrorResults
)
15815 async def ReleaseContainerAddresses(self
, entities
):
15817 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
15818 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
15820 # map input types to rpc msg
15822 msg
= dict(type='Provisioner', request
='ReleaseContainerAddresses', version
=3, params
=params
)
15823 params
['entities'] = entities
15824 reply
= await self
.rpc(msg
)
15829 @ReturnMapping(ErrorResults
)
15830 async def Remove(self
, entities
):
15832 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
15833 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
15835 # map input types to rpc msg
15837 msg
= dict(type='Provisioner', request
='Remove', version
=3, params
=params
)
15838 params
['entities'] = entities
15839 reply
= await self
.rpc(msg
)
15844 @ReturnMapping(StringResults
)
15845 async def Series(self
, entities
):
15847 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
15848 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
15850 # map input types to rpc msg
15852 msg
= dict(type='Provisioner', request
='Series', version
=3, params
=params
)
15853 params
['entities'] = entities
15854 reply
= await self
.rpc(msg
)
15859 @ReturnMapping(ErrorResults
)
15860 async def SetInstanceInfo(self
, machines
):
15862 machines : typing.Sequence<+T_co>[~InstanceInfo]<~InstanceInfo>
15863 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
15865 # map input types to rpc msg
15867 msg
= dict(type='Provisioner', request
='SetInstanceInfo', version
=3, params
=params
)
15868 params
['machines'] = machines
15869 reply
= await self
.rpc(msg
)
15874 @ReturnMapping(ErrorResults
)
15875 async def SetInstanceStatus(self
, entities
):
15877 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
15878 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
15880 # map input types to rpc msg
15882 msg
= dict(type='Provisioner', request
='SetInstanceStatus', version
=3, params
=params
)
15883 params
['entities'] = entities
15884 reply
= await self
.rpc(msg
)
15889 @ReturnMapping(ErrorResults
)
15890 async def SetPasswords(self
, changes
):
15892 changes : typing.Sequence<+T_co>[~EntityPassword]<~EntityPassword>
15893 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
15895 # map input types to rpc msg
15897 msg
= dict(type='Provisioner', request
='SetPasswords', version
=3, params
=params
)
15898 params
['changes'] = changes
15899 reply
= await self
.rpc(msg
)
15904 @ReturnMapping(ErrorResults
)
15905 async def SetStatus(self
, entities
):
15907 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
15908 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
15910 # map input types to rpc msg
15912 msg
= dict(type='Provisioner', request
='SetStatus', version
=3, params
=params
)
15913 params
['entities'] = entities
15914 reply
= await self
.rpc(msg
)
15919 @ReturnMapping(ErrorResults
)
15920 async def SetSupportedContainers(self
, params
):
15922 params : typing.Sequence<+T_co>[~MachineContainers]<~MachineContainers>
15923 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
15925 # map input types to rpc msg
15927 msg
= dict(type='Provisioner', request
='SetSupportedContainers', version
=3, params
=params
)
15928 params
['params'] = params
15929 reply
= await self
.rpc(msg
)
15934 @ReturnMapping(StringsResult
)
15935 async def StateAddresses(self
):
15938 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[str]]
15940 # map input types to rpc msg
15942 msg
= dict(type='Provisioner', request
='StateAddresses', version
=3, params
=params
)
15944 reply
= await self
.rpc(msg
)
15949 @ReturnMapping(StatusResults
)
15950 async def Status(self
, entities
):
15952 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
15953 Returns -> typing.Sequence<+T_co>[~StatusResult]<~StatusResult>
15955 # map input types to rpc msg
15957 msg
= dict(type='Provisioner', request
='Status', version
=3, params
=params
)
15958 params
['entities'] = entities
15959 reply
= await self
.rpc(msg
)
15964 @ReturnMapping(ToolsResults
)
15965 async def Tools(self
, entities
):
15967 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
15968 Returns -> typing.Sequence<+T_co>[~ToolsResult]<~ToolsResult>
15970 # map input types to rpc msg
15972 msg
= dict(type='Provisioner', request
='Tools', version
=3, params
=params
)
15973 params
['entities'] = entities
15974 reply
= await self
.rpc(msg
)
15979 @ReturnMapping(ErrorResults
)
15980 async def UpdateStatus(self
, entities
):
15982 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
15983 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
15985 # map input types to rpc msg
15987 msg
= dict(type='Provisioner', request
='UpdateStatus', version
=3, params
=params
)
15988 params
['entities'] = entities
15989 reply
= await self
.rpc(msg
)
15994 @ReturnMapping(NotifyWatchResult
)
15995 async def WatchAPIHostPorts(self
):
15998 Returns -> typing.Union[str, _ForwardRef('Error')]
16000 # map input types to rpc msg
16002 msg
= dict(type='Provisioner', request
='WatchAPIHostPorts', version
=3, params
=params
)
16004 reply
= await self
.rpc(msg
)
16009 @ReturnMapping(StringsWatchResults
)
16010 async def WatchAllContainers(self
, params
):
16012 params : typing.Sequence<+T_co>[~WatchContainer]<~WatchContainer>
16013 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
16015 # map input types to rpc msg
16017 msg
= dict(type='Provisioner', request
='WatchAllContainers', version
=3, params
=params
)
16018 params
['params'] = params
16019 reply
= await self
.rpc(msg
)
16024 @ReturnMapping(StringsWatchResults
)
16025 async def WatchContainers(self
, params
):
16027 params : typing.Sequence<+T_co>[~WatchContainer]<~WatchContainer>
16028 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
16030 # map input types to rpc msg
16032 msg
= dict(type='Provisioner', request
='WatchContainers', version
=3, params
=params
)
16033 params
['params'] = params
16034 reply
= await self
.rpc(msg
)
16039 @ReturnMapping(NotifyWatchResult
)
16040 async def WatchForModelConfigChanges(self
):
16043 Returns -> typing.Union[str, _ForwardRef('Error')]
16045 # map input types to rpc msg
16047 msg
= dict(type='Provisioner', request
='WatchForModelConfigChanges', version
=3, params
=params
)
16049 reply
= await self
.rpc(msg
)
16054 @ReturnMapping(NotifyWatchResult
)
16055 async def WatchMachineErrorRetry(self
):
16058 Returns -> typing.Union[str, _ForwardRef('Error')]
16060 # map input types to rpc msg
16062 msg
= dict(type='Provisioner', request
='WatchMachineErrorRetry', version
=3, params
=params
)
16064 reply
= await self
.rpc(msg
)
16069 @ReturnMapping(StringsWatchResult
)
16070 async def WatchModelMachines(self
):
16073 Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')]
16075 # map input types to rpc msg
16077 msg
= dict(type='Provisioner', request
='WatchModelMachines', version
=3, params
=params
)
16079 reply
= await self
.rpc(msg
)
16083 class ProxyUpdaterFacade(Type
):
16084 name
= 'ProxyUpdater'
16086 schema
= {'definitions': {'Entities': {'additionalProperties': False,
16087 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
16089 'required': ['entities'],
16091 'Entity': {'additionalProperties': False,
16092 'properties': {'tag': {'type': 'string'}},
16093 'required': ['tag'],
16095 'Error': {'additionalProperties': False,
16096 'properties': {'code': {'type': 'string'},
16097 'info': {'$ref': '#/definitions/ErrorInfo'},
16098 'message': {'type': 'string'}},
16099 'required': ['message', 'code'],
16101 'ErrorInfo': {'additionalProperties': False,
16102 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
16103 'macaroon-path': {'type': 'string'}},
16105 'Macaroon': {'additionalProperties': False, 'type': 'object'},
16106 'NotifyWatchResult': {'additionalProperties': False,
16107 'properties': {'NotifyWatcherId': {'type': 'string'},
16108 'error': {'$ref': '#/definitions/Error'}},
16109 'required': ['NotifyWatcherId'],
16111 'NotifyWatchResults': {'additionalProperties': False,
16112 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
16114 'required': ['results'],
16116 'ProxyConfig': {'additionalProperties': False,
16117 'properties': {'ftp': {'type': 'string'},
16118 'http': {'type': 'string'},
16119 'https': {'type': 'string'},
16120 'no-proxy': {'type': 'string'}},
16121 'required': ['http',
16126 'ProxyConfigResult': {'additionalProperties': False,
16127 'properties': {'apt-proxy-settings': {'$ref': '#/definitions/ProxyConfig'},
16128 'error': {'$ref': '#/definitions/Error'},
16129 'proxy-settings': {'$ref': '#/definitions/ProxyConfig'}},
16130 'required': ['proxy-settings',
16131 'apt-proxy-settings'],
16133 'ProxyConfigResults': {'additionalProperties': False,
16134 'properties': {'results': {'items': {'$ref': '#/definitions/ProxyConfigResult'},
16136 'required': ['results'],
16137 'type': 'object'}},
16138 'properties': {'ProxyConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16139 'Result': {'$ref': '#/definitions/ProxyConfigResults'}},
16141 'WatchForProxyConfigAndAPIHostPortChanges': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16142 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
16143 'type': 'object'}},
16147 @ReturnMapping(ProxyConfigResults
)
16148 async def ProxyConfig(self
, entities
):
16150 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16151 Returns -> typing.Sequence<+T_co>[~ProxyConfigResult]<~ProxyConfigResult>
16153 # map input types to rpc msg
16155 msg
= dict(type='ProxyUpdater', request
='ProxyConfig', version
=1, params
=params
)
16156 params
['entities'] = entities
16157 reply
= await self
.rpc(msg
)
16162 @ReturnMapping(NotifyWatchResults
)
16163 async def WatchForProxyConfigAndAPIHostPortChanges(self
, entities
):
16165 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16166 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
16168 # map input types to rpc msg
16170 msg
= dict(type='ProxyUpdater', request
='WatchForProxyConfigAndAPIHostPortChanges', version
=1, params
=params
)
16171 params
['entities'] = entities
16172 reply
= await self
.rpc(msg
)
16176 class RebootFacade(Type
):
16179 schema
= {'definitions': {'Entities': {'additionalProperties': False,
16180 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
16182 'required': ['entities'],
16184 'Entity': {'additionalProperties': False,
16185 'properties': {'tag': {'type': 'string'}},
16186 'required': ['tag'],
16188 'Error': {'additionalProperties': False,
16189 'properties': {'code': {'type': 'string'},
16190 'info': {'$ref': '#/definitions/ErrorInfo'},
16191 'message': {'type': 'string'}},
16192 'required': ['message', 'code'],
16194 'ErrorInfo': {'additionalProperties': False,
16195 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
16196 'macaroon-path': {'type': 'string'}},
16198 'ErrorResult': {'additionalProperties': False,
16199 'properties': {'error': {'$ref': '#/definitions/Error'}},
16201 'ErrorResults': {'additionalProperties': False,
16202 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
16204 'required': ['results'],
16206 'Macaroon': {'additionalProperties': False, 'type': 'object'},
16207 'NotifyWatchResult': {'additionalProperties': False,
16208 'properties': {'NotifyWatcherId': {'type': 'string'},
16209 'error': {'$ref': '#/definitions/Error'}},
16210 'required': ['NotifyWatcherId'],
16212 'RebootActionResult': {'additionalProperties': False,
16213 'properties': {'error': {'$ref': '#/definitions/Error'},
16214 'result': {'type': 'string'}},
16216 'RebootActionResults': {'additionalProperties': False,
16217 'properties': {'results': {'items': {'$ref': '#/definitions/RebootActionResult'},
16219 'type': 'object'}},
16220 'properties': {'ClearReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16221 'Result': {'$ref': '#/definitions/ErrorResults'}},
16223 'GetRebootAction': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16224 'Result': {'$ref': '#/definitions/RebootActionResults'}},
16226 'RequestReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16227 'Result': {'$ref': '#/definitions/ErrorResults'}},
16229 'WatchForRebootEvent': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
16230 'type': 'object'}},
16234 @ReturnMapping(ErrorResults
)
16235 async def ClearReboot(self
, entities
):
16237 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16238 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
16240 # map input types to rpc msg
16242 msg
= dict(type='Reboot', request
='ClearReboot', version
=2, params
=params
)
16243 params
['entities'] = entities
16244 reply
= await self
.rpc(msg
)
16249 @ReturnMapping(RebootActionResults
)
16250 async def GetRebootAction(self
, entities
):
16252 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16253 Returns -> typing.Sequence<+T_co>[~RebootActionResult]<~RebootActionResult>
16255 # map input types to rpc msg
16257 msg
= dict(type='Reboot', request
='GetRebootAction', version
=2, params
=params
)
16258 params
['entities'] = entities
16259 reply
= await self
.rpc(msg
)
16264 @ReturnMapping(ErrorResults
)
16265 async def RequestReboot(self
, entities
):
16267 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16268 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
16270 # map input types to rpc msg
16272 msg
= dict(type='Reboot', request
='RequestReboot', version
=2, params
=params
)
16273 params
['entities'] = entities
16274 reply
= await self
.rpc(msg
)
16279 @ReturnMapping(NotifyWatchResult
)
16280 async def WatchForRebootEvent(self
):
16283 Returns -> typing.Union[str, _ForwardRef('Error')]
16285 # map input types to rpc msg
16287 msg
= dict(type='Reboot', request
='WatchForRebootEvent', version
=2, params
=params
)
16289 reply
= await self
.rpc(msg
)
16293 class RelationUnitsWatcherFacade(Type
):
16294 name
= 'RelationUnitsWatcher'
16296 schema
= {'definitions': {'Error': {'additionalProperties': False,
16297 'properties': {'code': {'type': 'string'},
16298 'info': {'$ref': '#/definitions/ErrorInfo'},
16299 'message': {'type': 'string'}},
16300 'required': ['message', 'code'],
16302 'ErrorInfo': {'additionalProperties': False,
16303 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
16304 'macaroon-path': {'type': 'string'}},
16306 'Macaroon': {'additionalProperties': False, 'type': 'object'},
16307 'RelationUnitsChange': {'additionalProperties': False,
16308 'properties': {'changed': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitSettings'}},
16310 'departed': {'items': {'type': 'string'},
16312 'required': ['changed'],
16314 'RelationUnitsWatchResult': {'additionalProperties': False,
16315 'properties': {'changes': {'$ref': '#/definitions/RelationUnitsChange'},
16316 'error': {'$ref': '#/definitions/Error'},
16317 'watcher-id': {'type': 'string'}},
16318 'required': ['watcher-id',
16321 'UnitSettings': {'additionalProperties': False,
16322 'properties': {'version': {'type': 'integer'}},
16323 'required': ['version'],
16324 'type': 'object'}},
16325 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/RelationUnitsWatchResult'}},
16327 'Stop': {'type': 'object'}},
16331 @ReturnMapping(RelationUnitsWatchResult
)
16332 async def Next(self
):
16335 Returns -> typing.Union[_ForwardRef('RelationUnitsChange'), _ForwardRef('Error'), str]
16337 # map input types to rpc msg
16339 msg
= dict(type='RelationUnitsWatcher', request
='Next', version
=1, params
=params
)
16341 reply
= await self
.rpc(msg
)
16346 @ReturnMapping(None)
16347 async def Stop(self
):
16352 # map input types to rpc msg
16354 msg
= dict(type='RelationUnitsWatcher', request
='Stop', version
=1, params
=params
)
16356 reply
= await self
.rpc(msg
)
16360 class ResumerFacade(Type
):
16363 schema
= {'properties': {'ResumeTransactions': {'type': 'object'}}, 'type': 'object'}
16366 @ReturnMapping(None)
16367 async def ResumeTransactions(self
):
16372 # map input types to rpc msg
16374 msg
= dict(type='Resumer', request
='ResumeTransactions', version
=2, params
=params
)
16376 reply
= await self
.rpc(msg
)
16380 class RetryStrategyFacade(Type
):
16381 name
= 'RetryStrategy'
16383 schema
= {'definitions': {'Entities': {'additionalProperties': False,
16384 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
16386 'required': ['entities'],
16388 'Entity': {'additionalProperties': False,
16389 'properties': {'tag': {'type': 'string'}},
16390 'required': ['tag'],
16392 'Error': {'additionalProperties': False,
16393 'properties': {'code': {'type': 'string'},
16394 'info': {'$ref': '#/definitions/ErrorInfo'},
16395 'message': {'type': 'string'}},
16396 'required': ['message', 'code'],
16398 'ErrorInfo': {'additionalProperties': False,
16399 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
16400 'macaroon-path': {'type': 'string'}},
16402 'Macaroon': {'additionalProperties': False, 'type': 'object'},
16403 'NotifyWatchResult': {'additionalProperties': False,
16404 'properties': {'NotifyWatcherId': {'type': 'string'},
16405 'error': {'$ref': '#/definitions/Error'}},
16406 'required': ['NotifyWatcherId'],
16408 'NotifyWatchResults': {'additionalProperties': False,
16409 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
16411 'required': ['results'],
16413 'RetryStrategy': {'additionalProperties': False,
16414 'properties': {'jitter-retry-time': {'type': 'boolean'},
16415 'max-retry-time': {'type': 'integer'},
16416 'min-retry-time': {'type': 'integer'},
16417 'retry-time-factor': {'type': 'integer'},
16418 'should-retry': {'type': 'boolean'}},
16419 'required': ['should-retry',
16422 'jitter-retry-time',
16423 'retry-time-factor'],
16425 'RetryStrategyResult': {'additionalProperties': False,
16426 'properties': {'error': {'$ref': '#/definitions/Error'},
16427 'result': {'$ref': '#/definitions/RetryStrategy'}},
16429 'RetryStrategyResults': {'additionalProperties': False,
16430 'properties': {'results': {'items': {'$ref': '#/definitions/RetryStrategyResult'},
16432 'required': ['results'],
16433 'type': 'object'}},
16434 'properties': {'RetryStrategy': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16435 'Result': {'$ref': '#/definitions/RetryStrategyResults'}},
16437 'WatchRetryStrategy': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16438 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
16439 'type': 'object'}},
16443 @ReturnMapping(RetryStrategyResults
)
16444 async def RetryStrategy(self
, entities
):
16446 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16447 Returns -> typing.Sequence<+T_co>[~RetryStrategyResult]<~RetryStrategyResult>
16449 # map input types to rpc msg
16451 msg
= dict(type='RetryStrategy', request
='RetryStrategy', version
=1, params
=params
)
16452 params
['entities'] = entities
16453 reply
= await self
.rpc(msg
)
16458 @ReturnMapping(NotifyWatchResults
)
16459 async def WatchRetryStrategy(self
, entities
):
16461 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16462 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
16464 # map input types to rpc msg
16466 msg
= dict(type='RetryStrategy', request
='WatchRetryStrategy', version
=1, params
=params
)
16467 params
['entities'] = entities
16468 reply
= await self
.rpc(msg
)
16472 class SSHClientFacade(Type
):
16475 schema
= {'definitions': {'Entities': {'additionalProperties': False,
16476 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
16478 'required': ['entities'],
16480 'Entity': {'additionalProperties': False,
16481 'properties': {'tag': {'type': 'string'}},
16482 'required': ['tag'],
16484 'Error': {'additionalProperties': False,
16485 'properties': {'code': {'type': 'string'},
16486 'info': {'$ref': '#/definitions/ErrorInfo'},
16487 'message': {'type': 'string'}},
16488 'required': ['message', 'code'],
16490 'ErrorInfo': {'additionalProperties': False,
16491 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
16492 'macaroon-path': {'type': 'string'}},
16494 'Macaroon': {'additionalProperties': False, 'type': 'object'},
16495 'SSHAddressResult': {'additionalProperties': False,
16496 'properties': {'address': {'type': 'string'},
16497 'error': {'$ref': '#/definitions/Error'}},
16499 'SSHAddressResults': {'additionalProperties': False,
16500 'properties': {'results': {'items': {'$ref': '#/definitions/SSHAddressResult'},
16502 'required': ['results'],
16504 'SSHProxyResult': {'additionalProperties': False,
16505 'properties': {'use-proxy': {'type': 'boolean'}},
16506 'required': ['use-proxy'],
16508 'SSHPublicKeysResult': {'additionalProperties': False,
16509 'properties': {'error': {'$ref': '#/definitions/Error'},
16510 'public-keys': {'items': {'type': 'string'},
16513 'SSHPublicKeysResults': {'additionalProperties': False,
16514 'properties': {'results': {'items': {'$ref': '#/definitions/SSHPublicKeysResult'},
16516 'required': ['results'],
16517 'type': 'object'}},
16518 'properties': {'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16519 'Result': {'$ref': '#/definitions/SSHAddressResults'}},
16521 'Proxy': {'properties': {'Result': {'$ref': '#/definitions/SSHProxyResult'}},
16523 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16524 'Result': {'$ref': '#/definitions/SSHAddressResults'}},
16526 'PublicKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16527 'Result': {'$ref': '#/definitions/SSHPublicKeysResults'}},
16528 'type': 'object'}},
16532 @ReturnMapping(SSHAddressResults
)
16533 async def PrivateAddress(self
, entities
):
16535 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16536 Returns -> typing.Sequence<+T_co>[~SSHAddressResult]<~SSHAddressResult>
16538 # map input types to rpc msg
16540 msg
= dict(type='SSHClient', request
='PrivateAddress', version
=1, params
=params
)
16541 params
['entities'] = entities
16542 reply
= await self
.rpc(msg
)
16547 @ReturnMapping(SSHProxyResult
)
16548 async def Proxy(self
):
16553 # map input types to rpc msg
16555 msg
= dict(type='SSHClient', request
='Proxy', version
=1, params
=params
)
16557 reply
= await self
.rpc(msg
)
16562 @ReturnMapping(SSHAddressResults
)
16563 async def PublicAddress(self
, entities
):
16565 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16566 Returns -> typing.Sequence<+T_co>[~SSHAddressResult]<~SSHAddressResult>
16568 # map input types to rpc msg
16570 msg
= dict(type='SSHClient', request
='PublicAddress', version
=1, params
=params
)
16571 params
['entities'] = entities
16572 reply
= await self
.rpc(msg
)
16577 @ReturnMapping(SSHPublicKeysResults
)
16578 async def PublicKeys(self
, entities
):
16580 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16581 Returns -> typing.Sequence<+T_co>[~SSHPublicKeysResult]<~SSHPublicKeysResult>
16583 # map input types to rpc msg
16585 msg
= dict(type='SSHClient', request
='PublicKeys', version
=1, params
=params
)
16586 params
['entities'] = entities
16587 reply
= await self
.rpc(msg
)
16591 class SingularFacade(Type
):
16594 schema
= {'definitions': {'Entities': {'additionalProperties': False,
16595 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
16597 'required': ['entities'],
16599 'Entity': {'additionalProperties': False,
16600 'properties': {'tag': {'type': 'string'}},
16601 'required': ['tag'],
16603 'Error': {'additionalProperties': False,
16604 'properties': {'code': {'type': 'string'},
16605 'info': {'$ref': '#/definitions/ErrorInfo'},
16606 'message': {'type': 'string'}},
16607 'required': ['message', 'code'],
16609 'ErrorInfo': {'additionalProperties': False,
16610 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
16611 'macaroon-path': {'type': 'string'}},
16613 'ErrorResult': {'additionalProperties': False,
16614 'properties': {'error': {'$ref': '#/definitions/Error'}},
16616 'ErrorResults': {'additionalProperties': False,
16617 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
16619 'required': ['results'],
16621 'Macaroon': {'additionalProperties': False, 'type': 'object'},
16622 'SingularClaim': {'additionalProperties': False,
16623 'properties': {'controller-tag': {'type': 'string'},
16624 'duration': {'type': 'integer'},
16625 'model-tag': {'type': 'string'}},
16626 'required': ['model-tag',
16630 'SingularClaims': {'additionalProperties': False,
16631 'properties': {'claims': {'items': {'$ref': '#/definitions/SingularClaim'},
16633 'required': ['claims'],
16634 'type': 'object'}},
16635 'properties': {'Claim': {'properties': {'Params': {'$ref': '#/definitions/SingularClaims'},
16636 'Result': {'$ref': '#/definitions/ErrorResults'}},
16638 'Wait': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16639 'Result': {'$ref': '#/definitions/ErrorResults'}},
16640 'type': 'object'}},
16644 @ReturnMapping(ErrorResults
)
16645 async def Claim(self
, claims
):
16647 claims : typing.Sequence<+T_co>[~SingularClaim]<~SingularClaim>
16648 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
16650 # map input types to rpc msg
16652 msg
= dict(type='Singular', request
='Claim', version
=1, params
=params
)
16653 params
['claims'] = claims
16654 reply
= await self
.rpc(msg
)
16659 @ReturnMapping(ErrorResults
)
16660 async def Wait(self
, entities
):
16662 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
16663 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
16665 # map input types to rpc msg
16667 msg
= dict(type='Singular', request
='Wait', version
=1, params
=params
)
16668 params
['entities'] = entities
16669 reply
= await self
.rpc(msg
)
16673 class SpacesFacade(Type
):
16676 schema
= {'definitions': {'CreateSpaceParams': {'additionalProperties': False,
16677 'properties': {'provider-id': {'type': 'string'},
16678 'public': {'type': 'boolean'},
16679 'space-tag': {'type': 'string'},
16680 'subnet-tags': {'items': {'type': 'string'},
16682 'required': ['subnet-tags',
16686 'CreateSpacesParams': {'additionalProperties': False,
16687 'properties': {'spaces': {'items': {'$ref': '#/definitions/CreateSpaceParams'},
16689 'required': ['spaces'],
16691 'Error': {'additionalProperties': False,
16692 'properties': {'code': {'type': 'string'},
16693 'info': {'$ref': '#/definitions/ErrorInfo'},
16694 'message': {'type': 'string'}},
16695 'required': ['message', 'code'],
16697 'ErrorInfo': {'additionalProperties': False,
16698 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
16699 'macaroon-path': {'type': 'string'}},
16701 'ErrorResult': {'additionalProperties': False,
16702 'properties': {'error': {'$ref': '#/definitions/Error'}},
16704 'ErrorResults': {'additionalProperties': False,
16705 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
16707 'required': ['results'],
16709 'ListSpacesResults': {'additionalProperties': False,
16710 'properties': {'results': {'items': {'$ref': '#/definitions/Space'},
16712 'required': ['results'],
16714 'Macaroon': {'additionalProperties': False, 'type': 'object'},
16715 'Space': {'additionalProperties': False,
16716 'properties': {'error': {'$ref': '#/definitions/Error'},
16717 'name': {'type': 'string'},
16718 'subnets': {'items': {'$ref': '#/definitions/Subnet'},
16720 'required': ['name', 'subnets'],
16722 'Subnet': {'additionalProperties': False,
16723 'properties': {'cidr': {'type': 'string'},
16724 'life': {'type': 'string'},
16725 'provider-id': {'type': 'string'},
16726 'space-tag': {'type': 'string'},
16727 'status': {'type': 'string'},
16728 'vlan-tag': {'type': 'integer'},
16729 'zones': {'items': {'type': 'string'},
16731 'required': ['cidr',
16736 'type': 'object'}},
16737 'properties': {'CreateSpaces': {'properties': {'Params': {'$ref': '#/definitions/CreateSpacesParams'},
16738 'Result': {'$ref': '#/definitions/ErrorResults'}},
16740 'ListSpaces': {'properties': {'Result': {'$ref': '#/definitions/ListSpacesResults'}},
16741 'type': 'object'}},
16745 @ReturnMapping(ErrorResults
)
16746 async def CreateSpaces(self
, spaces
):
16748 spaces : typing.Sequence<+T_co>[~CreateSpaceParams]<~CreateSpaceParams>
16749 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
16751 # map input types to rpc msg
16753 msg
= dict(type='Spaces', request
='CreateSpaces', version
=2, params
=params
)
16754 params
['spaces'] = spaces
16755 reply
= await self
.rpc(msg
)
16760 @ReturnMapping(ListSpacesResults
)
16761 async def ListSpaces(self
):
16764 Returns -> typing.Sequence<+T_co>[~Space]<~Space>
16766 # map input types to rpc msg
16768 msg
= dict(type='Spaces', request
='ListSpaces', version
=2, params
=params
)
16770 reply
= await self
.rpc(msg
)
16774 class StatusHistoryFacade(Type
):
16775 name
= 'StatusHistory'
16777 schema
= {'definitions': {'StatusHistoryPruneArgs': {'additionalProperties': False,
16778 'properties': {'max-history-mb': {'type': 'integer'},
16779 'max-history-time': {'type': 'integer'}},
16780 'required': ['max-history-time',
16782 'type': 'object'}},
16783 'properties': {'Prune': {'properties': {'Params': {'$ref': '#/definitions/StatusHistoryPruneArgs'}},
16784 'type': 'object'}},
16788 @ReturnMapping(None)
16789 async def Prune(self
, max_history_mb
, max_history_time
):
16791 max_history_mb : int
16792 max_history_time : int
16795 # map input types to rpc msg
16797 msg
= dict(type='StatusHistory', request
='Prune', version
=2, params
=params
)
16798 params
['max-history-mb'] = max_history_mb
16799 params
['max-history-time'] = max_history_time
16800 reply
= await self
.rpc(msg
)
16804 class StorageFacade(Type
):
16807 schema
= {'definitions': {'Entities': {'additionalProperties': False,
16808 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
16810 'required': ['entities'],
16812 'Entity': {'additionalProperties': False,
16813 'properties': {'tag': {'type': 'string'}},
16814 'required': ['tag'],
16816 'EntityStatus': {'additionalProperties': False,
16817 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
16818 'type': 'object'}},
16820 'info': {'type': 'string'},
16821 'since': {'format': 'date-time',
16823 'status': {'type': 'string'}},
16824 'required': ['status', 'info', 'since'],
16826 'Error': {'additionalProperties': False,
16827 'properties': {'code': {'type': 'string'},
16828 'info': {'$ref': '#/definitions/ErrorInfo'},
16829 'message': {'type': 'string'}},
16830 'required': ['message', 'code'],
16832 'ErrorInfo': {'additionalProperties': False,
16833 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
16834 'macaroon-path': {'type': 'string'}},
16836 'ErrorResult': {'additionalProperties': False,
16837 'properties': {'error': {'$ref': '#/definitions/Error'}},
16839 'ErrorResults': {'additionalProperties': False,
16840 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
16842 'required': ['results'],
16844 'FilesystemAttachmentInfo': {'additionalProperties': False,
16845 'properties': {'mount-point': {'type': 'string'},
16846 'read-only': {'type': 'boolean'}},
16848 'FilesystemDetails': {'additionalProperties': False,
16849 'properties': {'filesystem-tag': {'type': 'string'},
16850 'info': {'$ref': '#/definitions/FilesystemInfo'},
16851 'machine-attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/FilesystemAttachmentInfo'}},
16853 'status': {'$ref': '#/definitions/EntityStatus'},
16854 'storage': {'$ref': '#/definitions/StorageDetails'},
16855 'volume-tag': {'type': 'string'}},
16856 'required': ['filesystem-tag',
16860 'FilesystemDetailsListResult': {'additionalProperties': False,
16861 'properties': {'error': {'$ref': '#/definitions/Error'},
16862 'result': {'items': {'$ref': '#/definitions/FilesystemDetails'},
16865 'FilesystemDetailsListResults': {'additionalProperties': False,
16866 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemDetailsListResult'},
16869 'FilesystemFilter': {'additionalProperties': False,
16870 'properties': {'machines': {'items': {'type': 'string'},
16873 'FilesystemFilters': {'additionalProperties': False,
16874 'properties': {'filters': {'items': {'$ref': '#/definitions/FilesystemFilter'},
16877 'FilesystemInfo': {'additionalProperties': False,
16878 'properties': {'filesystem-id': {'type': 'string'},
16879 'size': {'type': 'integer'}},
16880 'required': ['filesystem-id', 'size'],
16882 'Macaroon': {'additionalProperties': False, 'type': 'object'},
16883 'StorageAddParams': {'additionalProperties': False,
16884 'properties': {'name': {'type': 'string'},
16885 'storage': {'$ref': '#/definitions/StorageConstraints'},
16886 'unit': {'type': 'string'}},
16887 'required': ['unit', 'name', 'storage'],
16889 'StorageAttachmentDetails': {'additionalProperties': False,
16890 'properties': {'location': {'type': 'string'},
16891 'machine-tag': {'type': 'string'},
16892 'storage-tag': {'type': 'string'},
16893 'unit-tag': {'type': 'string'}},
16894 'required': ['storage-tag',
16898 'StorageConstraints': {'additionalProperties': False,
16899 'properties': {'count': {'type': 'integer'},
16900 'pool': {'type': 'string'},
16901 'size': {'type': 'integer'}},
16903 'StorageDetails': {'additionalProperties': False,
16904 'properties': {'attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/StorageAttachmentDetails'}},
16906 'kind': {'type': 'integer'},
16907 'owner-tag': {'type': 'string'},
16908 'persistent': {'type': 'boolean'},
16909 'status': {'$ref': '#/definitions/EntityStatus'},
16910 'storage-tag': {'type': 'string'}},
16911 'required': ['storage-tag',
16917 'StorageDetailsListResult': {'additionalProperties': False,
16918 'properties': {'error': {'$ref': '#/definitions/Error'},
16919 'result': {'items': {'$ref': '#/definitions/StorageDetails'},
16922 'StorageDetailsListResults': {'additionalProperties': False,
16923 'properties': {'results': {'items': {'$ref': '#/definitions/StorageDetailsListResult'},
16926 'StorageDetailsResult': {'additionalProperties': False,
16927 'properties': {'error': {'$ref': '#/definitions/Error'},
16928 'result': {'$ref': '#/definitions/StorageDetails'}},
16930 'StorageDetailsResults': {'additionalProperties': False,
16931 'properties': {'results': {'items': {'$ref': '#/definitions/StorageDetailsResult'},
16934 'StorageFilter': {'additionalProperties': False,
16936 'StorageFilters': {'additionalProperties': False,
16937 'properties': {'filters': {'items': {'$ref': '#/definitions/StorageFilter'},
16940 'StoragePool': {'additionalProperties': False,
16941 'properties': {'attrs': {'patternProperties': {'.*': {'additionalProperties': True,
16942 'type': 'object'}},
16944 'name': {'type': 'string'},
16945 'provider': {'type': 'string'}},
16946 'required': ['name', 'provider', 'attrs'],
16948 'StoragePoolFilter': {'additionalProperties': False,
16949 'properties': {'names': {'items': {'type': 'string'},
16951 'providers': {'items': {'type': 'string'},
16954 'StoragePoolFilters': {'additionalProperties': False,
16955 'properties': {'filters': {'items': {'$ref': '#/definitions/StoragePoolFilter'},
16958 'StoragePoolsResult': {'additionalProperties': False,
16959 'properties': {'error': {'$ref': '#/definitions/Error'},
16960 'storage-pools': {'items': {'$ref': '#/definitions/StoragePool'},
16963 'StoragePoolsResults': {'additionalProperties': False,
16964 'properties': {'results': {'items': {'$ref': '#/definitions/StoragePoolsResult'},
16967 'StoragesAddParams': {'additionalProperties': False,
16968 'properties': {'storages': {'items': {'$ref': '#/definitions/StorageAddParams'},
16970 'required': ['storages'],
16972 'VolumeAttachmentInfo': {'additionalProperties': False,
16973 'properties': {'bus-address': {'type': 'string'},
16974 'device-link': {'type': 'string'},
16975 'device-name': {'type': 'string'},
16976 'read-only': {'type': 'boolean'}},
16978 'VolumeDetails': {'additionalProperties': False,
16979 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'},
16980 'machine-attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/VolumeAttachmentInfo'}},
16982 'status': {'$ref': '#/definitions/EntityStatus'},
16983 'storage': {'$ref': '#/definitions/StorageDetails'},
16984 'volume-tag': {'type': 'string'}},
16985 'required': ['volume-tag', 'info', 'status'],
16987 'VolumeDetailsListResult': {'additionalProperties': False,
16988 'properties': {'error': {'$ref': '#/definitions/Error'},
16989 'result': {'items': {'$ref': '#/definitions/VolumeDetails'},
16992 'VolumeDetailsListResults': {'additionalProperties': False,
16993 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeDetailsListResult'},
16996 'VolumeFilter': {'additionalProperties': False,
16997 'properties': {'machines': {'items': {'type': 'string'},
17000 'VolumeFilters': {'additionalProperties': False,
17001 'properties': {'filters': {'items': {'$ref': '#/definitions/VolumeFilter'},
17004 'VolumeInfo': {'additionalProperties': False,
17005 'properties': {'hardware-id': {'type': 'string'},
17006 'persistent': {'type': 'boolean'},
17007 'size': {'type': 'integer'},
17008 'volume-id': {'type': 'string'}},
17009 'required': ['volume-id', 'size', 'persistent'],
17010 'type': 'object'}},
17011 'properties': {'AddToUnit': {'properties': {'Params': {'$ref': '#/definitions/StoragesAddParams'},
17012 'Result': {'$ref': '#/definitions/ErrorResults'}},
17014 'CreatePool': {'properties': {'Params': {'$ref': '#/definitions/StoragePool'}},
17016 'ListFilesystems': {'properties': {'Params': {'$ref': '#/definitions/FilesystemFilters'},
17017 'Result': {'$ref': '#/definitions/FilesystemDetailsListResults'}},
17019 'ListPools': {'properties': {'Params': {'$ref': '#/definitions/StoragePoolFilters'},
17020 'Result': {'$ref': '#/definitions/StoragePoolsResults'}},
17022 'ListStorageDetails': {'properties': {'Params': {'$ref': '#/definitions/StorageFilters'},
17023 'Result': {'$ref': '#/definitions/StorageDetailsListResults'}},
17025 'ListVolumes': {'properties': {'Params': {'$ref': '#/definitions/VolumeFilters'},
17026 'Result': {'$ref': '#/definitions/VolumeDetailsListResults'}},
17028 'StorageDetails': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17029 'Result': {'$ref': '#/definitions/StorageDetailsResults'}},
17030 'type': 'object'}},
17034 @ReturnMapping(ErrorResults
)
17035 async def AddToUnit(self
, storages
):
17037 storages : typing.Sequence<+T_co>[~StorageAddParams]<~StorageAddParams>
17038 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
17040 # map input types to rpc msg
17042 msg
= dict(type='Storage', request
='AddToUnit', version
=3, params
=params
)
17043 params
['storages'] = storages
17044 reply
= await self
.rpc(msg
)
17049 @ReturnMapping(None)
17050 async def CreatePool(self
, attrs
, name
, provider
):
17052 attrs : typing.Mapping<~KT, +VT_co>[str, typing.Any]
17057 # map input types to rpc msg
17059 msg
= dict(type='Storage', request
='CreatePool', version
=3, params
=params
)
17060 params
['attrs'] = attrs
17061 params
['name'] = name
17062 params
['provider'] = provider
17063 reply
= await self
.rpc(msg
)
17068 @ReturnMapping(FilesystemDetailsListResults
)
17069 async def ListFilesystems(self
, filters
):
17071 filters : typing.Sequence<+T_co>[~FilesystemFilter]<~FilesystemFilter>
17072 Returns -> typing.Sequence<+T_co>[~FilesystemDetailsListResult]<~FilesystemDetailsListResult>
17074 # map input types to rpc msg
17076 msg
= dict(type='Storage', request
='ListFilesystems', version
=3, params
=params
)
17077 params
['filters'] = filters
17078 reply
= await self
.rpc(msg
)
17083 @ReturnMapping(StoragePoolsResults
)
17084 async def ListPools(self
, filters
):
17086 filters : typing.Sequence<+T_co>[~StoragePoolFilter]<~StoragePoolFilter>
17087 Returns -> typing.Sequence<+T_co>[~StoragePoolsResult]<~StoragePoolsResult>
17089 # map input types to rpc msg
17091 msg
= dict(type='Storage', request
='ListPools', version
=3, params
=params
)
17092 params
['filters'] = filters
17093 reply
= await self
.rpc(msg
)
17098 @ReturnMapping(StorageDetailsListResults
)
17099 async def ListStorageDetails(self
, filters
):
17101 filters : typing.Sequence<+T_co>[~StorageFilter]<~StorageFilter>
17102 Returns -> typing.Sequence<+T_co>[~StorageDetailsListResult]<~StorageDetailsListResult>
17104 # map input types to rpc msg
17106 msg
= dict(type='Storage', request
='ListStorageDetails', version
=3, params
=params
)
17107 params
['filters'] = filters
17108 reply
= await self
.rpc(msg
)
17113 @ReturnMapping(VolumeDetailsListResults
)
17114 async def ListVolumes(self
, filters
):
17116 filters : typing.Sequence<+T_co>[~VolumeFilter]<~VolumeFilter>
17117 Returns -> typing.Sequence<+T_co>[~VolumeDetailsListResult]<~VolumeDetailsListResult>
17119 # map input types to rpc msg
17121 msg
= dict(type='Storage', request
='ListVolumes', version
=3, params
=params
)
17122 params
['filters'] = filters
17123 reply
= await self
.rpc(msg
)
17128 @ReturnMapping(StorageDetailsResults
)
17129 async def StorageDetails(self
, entities
):
17131 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17132 Returns -> typing.Sequence<+T_co>[~StorageDetailsResult]<~StorageDetailsResult>
17134 # map input types to rpc msg
17136 msg
= dict(type='Storage', request
='StorageDetails', version
=3, params
=params
)
17137 params
['entities'] = entities
17138 reply
= await self
.rpc(msg
)
17142 class StorageProvisionerFacade(Type
):
17143 name
= 'StorageProvisioner'
17145 schema
= {'definitions': {'BlockDevice': {'additionalProperties': False,
17146 'properties': {'BusAddress': {'type': 'string'},
17147 'DeviceLinks': {'items': {'type': 'string'},
17149 'DeviceName': {'type': 'string'},
17150 'FilesystemType': {'type': 'string'},
17151 'HardwareId': {'type': 'string'},
17152 'InUse': {'type': 'boolean'},
17153 'Label': {'type': 'string'},
17154 'MountPoint': {'type': 'string'},
17155 'Size': {'type': 'integer'},
17156 'UUID': {'type': 'string'}},
17157 'required': ['DeviceName',
17168 'BlockDeviceResult': {'additionalProperties': False,
17169 'properties': {'error': {'$ref': '#/definitions/Error'},
17170 'result': {'$ref': '#/definitions/BlockDevice'}},
17171 'required': ['result'],
17173 'BlockDeviceResults': {'additionalProperties': False,
17174 'properties': {'results': {'items': {'$ref': '#/definitions/BlockDeviceResult'},
17177 'Entities': {'additionalProperties': False,
17178 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
17180 'required': ['entities'],
17182 'Entity': {'additionalProperties': False,
17183 'properties': {'tag': {'type': 'string'}},
17184 'required': ['tag'],
17186 'EntityStatusArgs': {'additionalProperties': False,
17187 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
17188 'type': 'object'}},
17190 'info': {'type': 'string'},
17191 'status': {'type': 'string'},
17192 'tag': {'type': 'string'}},
17193 'required': ['tag',
17198 'Error': {'additionalProperties': False,
17199 'properties': {'code': {'type': 'string'},
17200 'info': {'$ref': '#/definitions/ErrorInfo'},
17201 'message': {'type': 'string'}},
17202 'required': ['message', 'code'],
17204 'ErrorInfo': {'additionalProperties': False,
17205 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
17206 'macaroon-path': {'type': 'string'}},
17208 'ErrorResult': {'additionalProperties': False,
17209 'properties': {'error': {'$ref': '#/definitions/Error'}},
17211 'ErrorResults': {'additionalProperties': False,
17212 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
17214 'required': ['results'],
17216 'Filesystem': {'additionalProperties': False,
17217 'properties': {'filesystem-tag': {'type': 'string'},
17218 'info': {'$ref': '#/definitions/FilesystemInfo'},
17219 'volume-tag': {'type': 'string'}},
17220 'required': ['filesystem-tag', 'info'],
17222 'FilesystemAttachment': {'additionalProperties': False,
17223 'properties': {'filesystem-tag': {'type': 'string'},
17224 'info': {'$ref': '#/definitions/FilesystemAttachmentInfo'},
17225 'machine-tag': {'type': 'string'}},
17226 'required': ['filesystem-tag',
17230 'FilesystemAttachmentInfo': {'additionalProperties': False,
17231 'properties': {'mount-point': {'type': 'string'},
17232 'read-only': {'type': 'boolean'}},
17234 'FilesystemAttachmentParams': {'additionalProperties': False,
17235 'properties': {'filesystem-id': {'type': 'string'},
17236 'filesystem-tag': {'type': 'string'},
17237 'instance-id': {'type': 'string'},
17238 'machine-tag': {'type': 'string'},
17239 'mount-point': {'type': 'string'},
17240 'provider': {'type': 'string'},
17241 'read-only': {'type': 'boolean'}},
17242 'required': ['filesystem-tag',
17246 'FilesystemAttachmentParamsResult': {'additionalProperties': False,
17247 'properties': {'error': {'$ref': '#/definitions/Error'},
17248 'result': {'$ref': '#/definitions/FilesystemAttachmentParams'}},
17249 'required': ['result'],
17251 'FilesystemAttachmentParamsResults': {'additionalProperties': False,
17252 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemAttachmentParamsResult'},
17255 'FilesystemAttachmentResult': {'additionalProperties': False,
17256 'properties': {'error': {'$ref': '#/definitions/Error'},
17257 'result': {'$ref': '#/definitions/FilesystemAttachment'}},
17258 'required': ['result'],
17260 'FilesystemAttachmentResults': {'additionalProperties': False,
17261 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemAttachmentResult'},
17264 'FilesystemAttachments': {'additionalProperties': False,
17265 'properties': {'filesystem-attachments': {'items': {'$ref': '#/definitions/FilesystemAttachment'},
17267 'required': ['filesystem-attachments'],
17269 'FilesystemInfo': {'additionalProperties': False,
17270 'properties': {'filesystem-id': {'type': 'string'},
17271 'size': {'type': 'integer'}},
17272 'required': ['filesystem-id', 'size'],
17274 'FilesystemParams': {'additionalProperties': False,
17275 'properties': {'attachment': {'$ref': '#/definitions/FilesystemAttachmentParams'},
17276 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
17277 'type': 'object'}},
17279 'filesystem-tag': {'type': 'string'},
17280 'provider': {'type': 'string'},
17281 'size': {'type': 'integer'},
17282 'tags': {'patternProperties': {'.*': {'type': 'string'}},
17284 'volume-tag': {'type': 'string'}},
17285 'required': ['filesystem-tag',
17289 'FilesystemParamsResult': {'additionalProperties': False,
17290 'properties': {'error': {'$ref': '#/definitions/Error'},
17291 'result': {'$ref': '#/definitions/FilesystemParams'}},
17292 'required': ['result'],
17294 'FilesystemParamsResults': {'additionalProperties': False,
17295 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemParamsResult'},
17298 'FilesystemResult': {'additionalProperties': False,
17299 'properties': {'error': {'$ref': '#/definitions/Error'},
17300 'result': {'$ref': '#/definitions/Filesystem'}},
17301 'required': ['result'],
17303 'FilesystemResults': {'additionalProperties': False,
17304 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemResult'},
17307 'Filesystems': {'additionalProperties': False,
17308 'properties': {'filesystems': {'items': {'$ref': '#/definitions/Filesystem'},
17310 'required': ['filesystems'],
17312 'LifeResult': {'additionalProperties': False,
17313 'properties': {'error': {'$ref': '#/definitions/Error'},
17314 'life': {'type': 'string'}},
17315 'required': ['life'],
17317 'LifeResults': {'additionalProperties': False,
17318 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
17320 'required': ['results'],
17322 'Macaroon': {'additionalProperties': False, 'type': 'object'},
17323 'MachineStorageId': {'additionalProperties': False,
17324 'properties': {'attachment-tag': {'type': 'string'},
17325 'machine-tag': {'type': 'string'}},
17326 'required': ['machine-tag',
17329 'MachineStorageIds': {'additionalProperties': False,
17330 'properties': {'ids': {'items': {'$ref': '#/definitions/MachineStorageId'},
17332 'required': ['ids'],
17334 'MachineStorageIdsWatchResult': {'additionalProperties': False,
17335 'properties': {'changes': {'items': {'$ref': '#/definitions/MachineStorageId'},
17337 'error': {'$ref': '#/definitions/Error'},
17338 'watcher-id': {'type': 'string'}},
17339 'required': ['watcher-id',
17342 'MachineStorageIdsWatchResults': {'additionalProperties': False,
17343 'properties': {'results': {'items': {'$ref': '#/definitions/MachineStorageIdsWatchResult'},
17345 'required': ['results'],
17347 'NotifyWatchResult': {'additionalProperties': False,
17348 'properties': {'NotifyWatcherId': {'type': 'string'},
17349 'error': {'$ref': '#/definitions/Error'}},
17350 'required': ['NotifyWatcherId'],
17352 'NotifyWatchResults': {'additionalProperties': False,
17353 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
17355 'required': ['results'],
17357 'SetStatus': {'additionalProperties': False,
17358 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
17360 'required': ['entities'],
17362 'StringResult': {'additionalProperties': False,
17363 'properties': {'error': {'$ref': '#/definitions/Error'},
17364 'result': {'type': 'string'}},
17365 'required': ['result'],
17367 'StringResults': {'additionalProperties': False,
17368 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
17370 'required': ['results'],
17372 'StringsWatchResult': {'additionalProperties': False,
17373 'properties': {'changes': {'items': {'type': 'string'},
17375 'error': {'$ref': '#/definitions/Error'},
17376 'watcher-id': {'type': 'string'}},
17377 'required': ['watcher-id'],
17379 'StringsWatchResults': {'additionalProperties': False,
17380 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
17382 'required': ['results'],
17384 'Volume': {'additionalProperties': False,
17385 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'},
17386 'volume-tag': {'type': 'string'}},
17387 'required': ['volume-tag', 'info'],
17389 'VolumeAttachment': {'additionalProperties': False,
17390 'properties': {'info': {'$ref': '#/definitions/VolumeAttachmentInfo'},
17391 'machine-tag': {'type': 'string'},
17392 'volume-tag': {'type': 'string'}},
17393 'required': ['volume-tag',
17397 'VolumeAttachmentInfo': {'additionalProperties': False,
17398 'properties': {'bus-address': {'type': 'string'},
17399 'device-link': {'type': 'string'},
17400 'device-name': {'type': 'string'},
17401 'read-only': {'type': 'boolean'}},
17403 'VolumeAttachmentParams': {'additionalProperties': False,
17404 'properties': {'instance-id': {'type': 'string'},
17405 'machine-tag': {'type': 'string'},
17406 'provider': {'type': 'string'},
17407 'read-only': {'type': 'boolean'},
17408 'volume-id': {'type': 'string'},
17409 'volume-tag': {'type': 'string'}},
17410 'required': ['volume-tag',
17414 'VolumeAttachmentParamsResult': {'additionalProperties': False,
17415 'properties': {'error': {'$ref': '#/definitions/Error'},
17416 'result': {'$ref': '#/definitions/VolumeAttachmentParams'}},
17417 'required': ['result'],
17419 'VolumeAttachmentParamsResults': {'additionalProperties': False,
17420 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeAttachmentParamsResult'},
17423 'VolumeAttachmentResult': {'additionalProperties': False,
17424 'properties': {'error': {'$ref': '#/definitions/Error'},
17425 'result': {'$ref': '#/definitions/VolumeAttachment'}},
17426 'required': ['result'],
17428 'VolumeAttachmentResults': {'additionalProperties': False,
17429 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeAttachmentResult'},
17432 'VolumeAttachments': {'additionalProperties': False,
17433 'properties': {'volume-attachments': {'items': {'$ref': '#/definitions/VolumeAttachment'},
17435 'required': ['volume-attachments'],
17437 'VolumeInfo': {'additionalProperties': False,
17438 'properties': {'hardware-id': {'type': 'string'},
17439 'persistent': {'type': 'boolean'},
17440 'size': {'type': 'integer'},
17441 'volume-id': {'type': 'string'}},
17442 'required': ['volume-id', 'size', 'persistent'],
17444 'VolumeParams': {'additionalProperties': False,
17445 'properties': {'attachment': {'$ref': '#/definitions/VolumeAttachmentParams'},
17446 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
17447 'type': 'object'}},
17449 'provider': {'type': 'string'},
17450 'size': {'type': 'integer'},
17451 'tags': {'patternProperties': {'.*': {'type': 'string'}},
17453 'volume-tag': {'type': 'string'}},
17454 'required': ['volume-tag',
17458 'VolumeParamsResult': {'additionalProperties': False,
17459 'properties': {'error': {'$ref': '#/definitions/Error'},
17460 'result': {'$ref': '#/definitions/VolumeParams'}},
17461 'required': ['result'],
17463 'VolumeParamsResults': {'additionalProperties': False,
17464 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeParamsResult'},
17467 'VolumeResult': {'additionalProperties': False,
17468 'properties': {'error': {'$ref': '#/definitions/Error'},
17469 'result': {'$ref': '#/definitions/Volume'}},
17470 'required': ['result'],
17472 'VolumeResults': {'additionalProperties': False,
17473 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeResult'},
17476 'Volumes': {'additionalProperties': False,
17477 'properties': {'volumes': {'items': {'$ref': '#/definitions/Volume'},
17479 'required': ['volumes'],
17480 'type': 'object'}},
17481 'properties': {'AttachmentLife': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
17482 'Result': {'$ref': '#/definitions/LifeResults'}},
17484 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17485 'Result': {'$ref': '#/definitions/ErrorResults'}},
17487 'FilesystemAttachmentParams': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
17488 'Result': {'$ref': '#/definitions/FilesystemAttachmentParamsResults'}},
17490 'FilesystemAttachments': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
17491 'Result': {'$ref': '#/definitions/FilesystemAttachmentResults'}},
17493 'FilesystemParams': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17494 'Result': {'$ref': '#/definitions/FilesystemParamsResults'}},
17496 'Filesystems': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17497 'Result': {'$ref': '#/definitions/FilesystemResults'}},
17499 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17500 'Result': {'$ref': '#/definitions/StringResults'}},
17502 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17503 'Result': {'$ref': '#/definitions/LifeResults'}},
17505 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17506 'Result': {'$ref': '#/definitions/ErrorResults'}},
17508 'RemoveAttachment': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
17509 'Result': {'$ref': '#/definitions/ErrorResults'}},
17511 'SetFilesystemAttachmentInfo': {'properties': {'Params': {'$ref': '#/definitions/FilesystemAttachments'},
17512 'Result': {'$ref': '#/definitions/ErrorResults'}},
17514 'SetFilesystemInfo': {'properties': {'Params': {'$ref': '#/definitions/Filesystems'},
17515 'Result': {'$ref': '#/definitions/ErrorResults'}},
17517 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
17518 'Result': {'$ref': '#/definitions/ErrorResults'}},
17520 'SetVolumeAttachmentInfo': {'properties': {'Params': {'$ref': '#/definitions/VolumeAttachments'},
17521 'Result': {'$ref': '#/definitions/ErrorResults'}},
17523 'SetVolumeInfo': {'properties': {'Params': {'$ref': '#/definitions/Volumes'},
17524 'Result': {'$ref': '#/definitions/ErrorResults'}},
17526 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
17527 'Result': {'$ref': '#/definitions/ErrorResults'}},
17529 'VolumeAttachmentParams': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
17530 'Result': {'$ref': '#/definitions/VolumeAttachmentParamsResults'}},
17532 'VolumeAttachments': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
17533 'Result': {'$ref': '#/definitions/VolumeAttachmentResults'}},
17535 'VolumeBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
17536 'Result': {'$ref': '#/definitions/BlockDeviceResults'}},
17538 'VolumeParams': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17539 'Result': {'$ref': '#/definitions/VolumeParamsResults'}},
17541 'Volumes': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17542 'Result': {'$ref': '#/definitions/VolumeResults'}},
17544 'WatchBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17545 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
17547 'WatchFilesystemAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17548 'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResults'}},
17550 'WatchFilesystems': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17551 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
17553 'WatchMachines': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17554 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
17556 'WatchVolumeAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17557 'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResults'}},
17559 'WatchVolumes': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17560 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
17561 'type': 'object'}},
17565 @ReturnMapping(LifeResults
)
17566 async def AttachmentLife(self
, ids
):
17568 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
17569 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
17571 # map input types to rpc msg
17573 msg
= dict(type='StorageProvisioner', request
='AttachmentLife', version
=3, params
=params
)
17574 params
['ids'] = ids
17575 reply
= await self
.rpc(msg
)
17580 @ReturnMapping(ErrorResults
)
17581 async def EnsureDead(self
, entities
):
17583 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17584 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
17586 # map input types to rpc msg
17588 msg
= dict(type='StorageProvisioner', request
='EnsureDead', version
=3, params
=params
)
17589 params
['entities'] = entities
17590 reply
= await self
.rpc(msg
)
17595 @ReturnMapping(FilesystemAttachmentParamsResults
)
17596 async def FilesystemAttachmentParams(self
, ids
):
17598 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
17599 Returns -> typing.Sequence<+T_co>[~FilesystemAttachmentParamsResult]<~FilesystemAttachmentParamsResult>
17601 # map input types to rpc msg
17603 msg
= dict(type='StorageProvisioner', request
='FilesystemAttachmentParams', version
=3, params
=params
)
17604 params
['ids'] = ids
17605 reply
= await self
.rpc(msg
)
17610 @ReturnMapping(FilesystemAttachmentResults
)
17611 async def FilesystemAttachments(self
, ids
):
17613 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
17614 Returns -> typing.Sequence<+T_co>[~FilesystemAttachmentResult]<~FilesystemAttachmentResult>
17616 # map input types to rpc msg
17618 msg
= dict(type='StorageProvisioner', request
='FilesystemAttachments', version
=3, params
=params
)
17619 params
['ids'] = ids
17620 reply
= await self
.rpc(msg
)
17625 @ReturnMapping(FilesystemParamsResults
)
17626 async def FilesystemParams(self
, entities
):
17628 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17629 Returns -> typing.Sequence<+T_co>[~FilesystemParamsResult]<~FilesystemParamsResult>
17631 # map input types to rpc msg
17633 msg
= dict(type='StorageProvisioner', request
='FilesystemParams', version
=3, params
=params
)
17634 params
['entities'] = entities
17635 reply
= await self
.rpc(msg
)
17640 @ReturnMapping(FilesystemResults
)
17641 async def Filesystems(self
, entities
):
17643 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17644 Returns -> typing.Sequence<+T_co>[~FilesystemResult]<~FilesystemResult>
17646 # map input types to rpc msg
17648 msg
= dict(type='StorageProvisioner', request
='Filesystems', version
=3, params
=params
)
17649 params
['entities'] = entities
17650 reply
= await self
.rpc(msg
)
17655 @ReturnMapping(StringResults
)
17656 async def InstanceId(self
, entities
):
17658 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17659 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
17661 # map input types to rpc msg
17663 msg
= dict(type='StorageProvisioner', request
='InstanceId', version
=3, params
=params
)
17664 params
['entities'] = entities
17665 reply
= await self
.rpc(msg
)
17670 @ReturnMapping(LifeResults
)
17671 async def Life(self
, entities
):
17673 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17674 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
17676 # map input types to rpc msg
17678 msg
= dict(type='StorageProvisioner', request
='Life', version
=3, params
=params
)
17679 params
['entities'] = entities
17680 reply
= await self
.rpc(msg
)
17685 @ReturnMapping(ErrorResults
)
17686 async def Remove(self
, entities
):
17688 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17689 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
17691 # map input types to rpc msg
17693 msg
= dict(type='StorageProvisioner', request
='Remove', version
=3, params
=params
)
17694 params
['entities'] = entities
17695 reply
= await self
.rpc(msg
)
17700 @ReturnMapping(ErrorResults
)
17701 async def RemoveAttachment(self
, ids
):
17703 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
17704 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
17706 # map input types to rpc msg
17708 msg
= dict(type='StorageProvisioner', request
='RemoveAttachment', version
=3, params
=params
)
17709 params
['ids'] = ids
17710 reply
= await self
.rpc(msg
)
17715 @ReturnMapping(ErrorResults
)
17716 async def SetFilesystemAttachmentInfo(self
, filesystem_attachments
):
17718 filesystem_attachments : typing.Sequence<+T_co>[~FilesystemAttachment]<~FilesystemAttachment>
17719 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
17721 # map input types to rpc msg
17723 msg
= dict(type='StorageProvisioner', request
='SetFilesystemAttachmentInfo', version
=3, params
=params
)
17724 params
['filesystem-attachments'] = filesystem_attachments
17725 reply
= await self
.rpc(msg
)
17730 @ReturnMapping(ErrorResults
)
17731 async def SetFilesystemInfo(self
, filesystems
):
17733 filesystems : typing.Sequence<+T_co>[~Filesystem]<~Filesystem>
17734 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
17736 # map input types to rpc msg
17738 msg
= dict(type='StorageProvisioner', request
='SetFilesystemInfo', version
=3, params
=params
)
17739 params
['filesystems'] = filesystems
17740 reply
= await self
.rpc(msg
)
17745 @ReturnMapping(ErrorResults
)
17746 async def SetStatus(self
, entities
):
17748 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
17749 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
17751 # map input types to rpc msg
17753 msg
= dict(type='StorageProvisioner', request
='SetStatus', version
=3, params
=params
)
17754 params
['entities'] = entities
17755 reply
= await self
.rpc(msg
)
17760 @ReturnMapping(ErrorResults
)
17761 async def SetVolumeAttachmentInfo(self
, volume_attachments
):
17763 volume_attachments : typing.Sequence<+T_co>[~VolumeAttachment]<~VolumeAttachment>
17764 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
17766 # map input types to rpc msg
17768 msg
= dict(type='StorageProvisioner', request
='SetVolumeAttachmentInfo', version
=3, params
=params
)
17769 params
['volume-attachments'] = volume_attachments
17770 reply
= await self
.rpc(msg
)
17775 @ReturnMapping(ErrorResults
)
17776 async def SetVolumeInfo(self
, volumes
):
17778 volumes : typing.Sequence<+T_co>[~Volume]<~Volume>
17779 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
17781 # map input types to rpc msg
17783 msg
= dict(type='StorageProvisioner', request
='SetVolumeInfo', version
=3, params
=params
)
17784 params
['volumes'] = volumes
17785 reply
= await self
.rpc(msg
)
17790 @ReturnMapping(ErrorResults
)
17791 async def UpdateStatus(self
, entities
):
17793 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
17794 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
17796 # map input types to rpc msg
17798 msg
= dict(type='StorageProvisioner', request
='UpdateStatus', version
=3, params
=params
)
17799 params
['entities'] = entities
17800 reply
= await self
.rpc(msg
)
17805 @ReturnMapping(VolumeAttachmentParamsResults
)
17806 async def VolumeAttachmentParams(self
, ids
):
17808 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
17809 Returns -> typing.Sequence<+T_co>[~VolumeAttachmentParamsResult]<~VolumeAttachmentParamsResult>
17811 # map input types to rpc msg
17813 msg
= dict(type='StorageProvisioner', request
='VolumeAttachmentParams', version
=3, params
=params
)
17814 params
['ids'] = ids
17815 reply
= await self
.rpc(msg
)
17820 @ReturnMapping(VolumeAttachmentResults
)
17821 async def VolumeAttachments(self
, ids
):
17823 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
17824 Returns -> typing.Sequence<+T_co>[~VolumeAttachmentResult]<~VolumeAttachmentResult>
17826 # map input types to rpc msg
17828 msg
= dict(type='StorageProvisioner', request
='VolumeAttachments', version
=3, params
=params
)
17829 params
['ids'] = ids
17830 reply
= await self
.rpc(msg
)
17835 @ReturnMapping(BlockDeviceResults
)
17836 async def VolumeBlockDevices(self
, ids
):
17838 ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>
17839 Returns -> typing.Sequence<+T_co>[~BlockDeviceResult]<~BlockDeviceResult>
17841 # map input types to rpc msg
17843 msg
= dict(type='StorageProvisioner', request
='VolumeBlockDevices', version
=3, params
=params
)
17844 params
['ids'] = ids
17845 reply
= await self
.rpc(msg
)
17850 @ReturnMapping(VolumeParamsResults
)
17851 async def VolumeParams(self
, entities
):
17853 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17854 Returns -> typing.Sequence<+T_co>[~VolumeParamsResult]<~VolumeParamsResult>
17856 # map input types to rpc msg
17858 msg
= dict(type='StorageProvisioner', request
='VolumeParams', version
=3, params
=params
)
17859 params
['entities'] = entities
17860 reply
= await self
.rpc(msg
)
17865 @ReturnMapping(VolumeResults
)
17866 async def Volumes(self
, entities
):
17868 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17869 Returns -> typing.Sequence<+T_co>[~VolumeResult]<~VolumeResult>
17871 # map input types to rpc msg
17873 msg
= dict(type='StorageProvisioner', request
='Volumes', version
=3, params
=params
)
17874 params
['entities'] = entities
17875 reply
= await self
.rpc(msg
)
17880 @ReturnMapping(NotifyWatchResults
)
17881 async def WatchBlockDevices(self
, entities
):
17883 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17884 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
17886 # map input types to rpc msg
17888 msg
= dict(type='StorageProvisioner', request
='WatchBlockDevices', version
=3, params
=params
)
17889 params
['entities'] = entities
17890 reply
= await self
.rpc(msg
)
17895 @ReturnMapping(MachineStorageIdsWatchResults
)
17896 async def WatchFilesystemAttachments(self
, entities
):
17898 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17899 Returns -> typing.Sequence<+T_co>[~MachineStorageIdsWatchResult]<~MachineStorageIdsWatchResult>
17901 # map input types to rpc msg
17903 msg
= dict(type='StorageProvisioner', request
='WatchFilesystemAttachments', version
=3, params
=params
)
17904 params
['entities'] = entities
17905 reply
= await self
.rpc(msg
)
17910 @ReturnMapping(StringsWatchResults
)
17911 async def WatchFilesystems(self
, entities
):
17913 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17914 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
17916 # map input types to rpc msg
17918 msg
= dict(type='StorageProvisioner', request
='WatchFilesystems', version
=3, params
=params
)
17919 params
['entities'] = entities
17920 reply
= await self
.rpc(msg
)
17925 @ReturnMapping(NotifyWatchResults
)
17926 async def WatchMachines(self
, entities
):
17928 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17929 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
17931 # map input types to rpc msg
17933 msg
= dict(type='StorageProvisioner', request
='WatchMachines', version
=3, params
=params
)
17934 params
['entities'] = entities
17935 reply
= await self
.rpc(msg
)
17940 @ReturnMapping(MachineStorageIdsWatchResults
)
17941 async def WatchVolumeAttachments(self
, entities
):
17943 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17944 Returns -> typing.Sequence<+T_co>[~MachineStorageIdsWatchResult]<~MachineStorageIdsWatchResult>
17946 # map input types to rpc msg
17948 msg
= dict(type='StorageProvisioner', request
='WatchVolumeAttachments', version
=3, params
=params
)
17949 params
['entities'] = entities
17950 reply
= await self
.rpc(msg
)
17955 @ReturnMapping(StringsWatchResults
)
17956 async def WatchVolumes(self
, entities
):
17958 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
17959 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
17961 # map input types to rpc msg
17963 msg
= dict(type='StorageProvisioner', request
='WatchVolumes', version
=3, params
=params
)
17964 params
['entities'] = entities
17965 reply
= await self
.rpc(msg
)
17969 class StringsWatcherFacade(Type
):
17970 name
= 'StringsWatcher'
17972 schema
= {'definitions': {'Error': {'additionalProperties': False,
17973 'properties': {'code': {'type': 'string'},
17974 'info': {'$ref': '#/definitions/ErrorInfo'},
17975 'message': {'type': 'string'}},
17976 'required': ['message', 'code'],
17978 'ErrorInfo': {'additionalProperties': False,
17979 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
17980 'macaroon-path': {'type': 'string'}},
17982 'Macaroon': {'additionalProperties': False, 'type': 'object'},
17983 'StringsWatchResult': {'additionalProperties': False,
17984 'properties': {'changes': {'items': {'type': 'string'},
17986 'error': {'$ref': '#/definitions/Error'},
17987 'watcher-id': {'type': 'string'}},
17988 'required': ['watcher-id'],
17989 'type': 'object'}},
17990 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
17992 'Stop': {'type': 'object'}},
17996 @ReturnMapping(StringsWatchResult
)
17997 async def Next(self
):
18000 Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')]
18002 # map input types to rpc msg
18004 msg
= dict(type='StringsWatcher', request
='Next', version
=1, params
=params
)
18006 reply
= await self
.rpc(msg
)
18011 @ReturnMapping(None)
18012 async def Stop(self
):
18017 # map input types to rpc msg
18019 msg
= dict(type='StringsWatcher', request
='Stop', version
=1, params
=params
)
18021 reply
= await self
.rpc(msg
)
18025 class SubnetsFacade(Type
):
18028 schema
= {'definitions': {'AddSubnetParams': {'additionalProperties': False,
18029 'properties': {'space-tag': {'type': 'string'},
18030 'subnet-provider-id': {'type': 'string'},
18031 'subnet-tag': {'type': 'string'},
18032 'zones': {'items': {'type': 'string'},
18034 'required': ['space-tag'],
18036 'AddSubnetsParams': {'additionalProperties': False,
18037 'properties': {'subnets': {'items': {'$ref': '#/definitions/AddSubnetParams'},
18039 'required': ['subnets'],
18041 'Error': {'additionalProperties': False,
18042 'properties': {'code': {'type': 'string'},
18043 'info': {'$ref': '#/definitions/ErrorInfo'},
18044 'message': {'type': 'string'}},
18045 'required': ['message', 'code'],
18047 'ErrorInfo': {'additionalProperties': False,
18048 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
18049 'macaroon-path': {'type': 'string'}},
18051 'ErrorResult': {'additionalProperties': False,
18052 'properties': {'error': {'$ref': '#/definitions/Error'}},
18054 'ErrorResults': {'additionalProperties': False,
18055 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
18057 'required': ['results'],
18059 'ListSubnetsResults': {'additionalProperties': False,
18060 'properties': {'results': {'items': {'$ref': '#/definitions/Subnet'},
18062 'required': ['results'],
18064 'Macaroon': {'additionalProperties': False, 'type': 'object'},
18065 'SpaceResult': {'additionalProperties': False,
18066 'properties': {'error': {'$ref': '#/definitions/Error'},
18067 'tag': {'type': 'string'}},
18068 'required': ['tag'],
18070 'SpaceResults': {'additionalProperties': False,
18071 'properties': {'results': {'items': {'$ref': '#/definitions/SpaceResult'},
18073 'required': ['results'],
18075 'Subnet': {'additionalProperties': False,
18076 'properties': {'cidr': {'type': 'string'},
18077 'life': {'type': 'string'},
18078 'provider-id': {'type': 'string'},
18079 'space-tag': {'type': 'string'},
18080 'status': {'type': 'string'},
18081 'vlan-tag': {'type': 'integer'},
18082 'zones': {'items': {'type': 'string'},
18084 'required': ['cidr',
18090 'SubnetsFilters': {'additionalProperties': False,
18091 'properties': {'space-tag': {'type': 'string'},
18092 'zone': {'type': 'string'}},
18094 'ZoneResult': {'additionalProperties': False,
18095 'properties': {'available': {'type': 'boolean'},
18096 'error': {'$ref': '#/definitions/Error'},
18097 'name': {'type': 'string'}},
18098 'required': ['name', 'available'],
18100 'ZoneResults': {'additionalProperties': False,
18101 'properties': {'results': {'items': {'$ref': '#/definitions/ZoneResult'},
18103 'required': ['results'],
18104 'type': 'object'}},
18105 'properties': {'AddSubnets': {'properties': {'Params': {'$ref': '#/definitions/AddSubnetsParams'},
18106 'Result': {'$ref': '#/definitions/ErrorResults'}},
18108 'AllSpaces': {'properties': {'Result': {'$ref': '#/definitions/SpaceResults'}},
18110 'AllZones': {'properties': {'Result': {'$ref': '#/definitions/ZoneResults'}},
18112 'ListSubnets': {'properties': {'Params': {'$ref': '#/definitions/SubnetsFilters'},
18113 'Result': {'$ref': '#/definitions/ListSubnetsResults'}},
18114 'type': 'object'}},
18118 @ReturnMapping(ErrorResults
)
18119 async def AddSubnets(self
, subnets
):
18121 subnets : typing.Sequence<+T_co>[~AddSubnetParams]<~AddSubnetParams>
18122 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
18124 # map input types to rpc msg
18126 msg
= dict(type='Subnets', request
='AddSubnets', version
=2, params
=params
)
18127 params
['subnets'] = subnets
18128 reply
= await self
.rpc(msg
)
18133 @ReturnMapping(SpaceResults
)
18134 async def AllSpaces(self
):
18137 Returns -> typing.Sequence<+T_co>[~SpaceResult]<~SpaceResult>
18139 # map input types to rpc msg
18141 msg
= dict(type='Subnets', request
='AllSpaces', version
=2, params
=params
)
18143 reply
= await self
.rpc(msg
)
18148 @ReturnMapping(ZoneResults
)
18149 async def AllZones(self
):
18152 Returns -> typing.Sequence<+T_co>[~ZoneResult]<~ZoneResult>
18154 # map input types to rpc msg
18156 msg
= dict(type='Subnets', request
='AllZones', version
=2, params
=params
)
18158 reply
= await self
.rpc(msg
)
18163 @ReturnMapping(ListSubnetsResults
)
18164 async def ListSubnets(self
, space_tag
, zone
):
18168 Returns -> typing.Sequence<+T_co>[~Subnet]<~Subnet>
18170 # map input types to rpc msg
18172 msg
= dict(type='Subnets', request
='ListSubnets', version
=2, params
=params
)
18173 params
['space-tag'] = space_tag
18174 params
['zone'] = zone
18175 reply
= await self
.rpc(msg
)
18179 class UndertakerFacade(Type
):
18180 name
= 'Undertaker'
18182 schema
= {'definitions': {'EntityStatusArgs': {'additionalProperties': False,
18183 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
18184 'type': 'object'}},
18186 'info': {'type': 'string'},
18187 'status': {'type': 'string'},
18188 'tag': {'type': 'string'}},
18189 'required': ['tag',
18194 'Error': {'additionalProperties': False,
18195 'properties': {'code': {'type': 'string'},
18196 'info': {'$ref': '#/definitions/ErrorInfo'},
18197 'message': {'type': 'string'}},
18198 'required': ['message', 'code'],
18200 'ErrorInfo': {'additionalProperties': False,
18201 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
18202 'macaroon-path': {'type': 'string'}},
18204 'ErrorResult': {'additionalProperties': False,
18205 'properties': {'error': {'$ref': '#/definitions/Error'}},
18207 'ErrorResults': {'additionalProperties': False,
18208 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
18210 'required': ['results'],
18212 'Macaroon': {'additionalProperties': False, 'type': 'object'},
18213 'ModelConfigResult': {'additionalProperties': False,
18214 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
18215 'type': 'object'}},
18216 'type': 'object'}},
18217 'required': ['config'],
18219 'NotifyWatchResult': {'additionalProperties': False,
18220 'properties': {'NotifyWatcherId': {'type': 'string'},
18221 'error': {'$ref': '#/definitions/Error'}},
18222 'required': ['NotifyWatcherId'],
18224 'NotifyWatchResults': {'additionalProperties': False,
18225 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
18227 'required': ['results'],
18229 'SetStatus': {'additionalProperties': False,
18230 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
18232 'required': ['entities'],
18234 'UndertakerModelInfo': {'additionalProperties': False,
18235 'properties': {'global-name': {'type': 'string'},
18236 'is-system': {'type': 'boolean'},
18237 'life': {'type': 'string'},
18238 'name': {'type': 'string'},
18239 'uuid': {'type': 'string'}},
18240 'required': ['uuid',
18246 'UndertakerModelInfoResult': {'additionalProperties': False,
18247 'properties': {'error': {'$ref': '#/definitions/Error'},
18248 'result': {'$ref': '#/definitions/UndertakerModelInfo'}},
18249 'required': ['result'],
18250 'type': 'object'}},
18251 'properties': {'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
18253 'ModelInfo': {'properties': {'Result': {'$ref': '#/definitions/UndertakerModelInfoResult'}},
18255 'ProcessDyingModel': {'type': 'object'},
18256 'RemoveModel': {'type': 'object'},
18257 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
18258 'Result': {'$ref': '#/definitions/ErrorResults'}},
18260 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
18261 'Result': {'$ref': '#/definitions/ErrorResults'}},
18263 'WatchModelResources': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
18264 'type': 'object'}},
18268 @ReturnMapping(ModelConfigResult
)
18269 async def ModelConfig(self
):
18272 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
18274 # map input types to rpc msg
18276 msg
= dict(type='Undertaker', request
='ModelConfig', version
=1, params
=params
)
18278 reply
= await self
.rpc(msg
)
18283 @ReturnMapping(UndertakerModelInfoResult
)
18284 async def ModelInfo(self
):
18287 Returns -> typing.Union[_ForwardRef('Error'), _ForwardRef('UndertakerModelInfo')]
18289 # map input types to rpc msg
18291 msg
= dict(type='Undertaker', request
='ModelInfo', version
=1, params
=params
)
18293 reply
= await self
.rpc(msg
)
18298 @ReturnMapping(None)
18299 async def ProcessDyingModel(self
):
18304 # map input types to rpc msg
18306 msg
= dict(type='Undertaker', request
='ProcessDyingModel', version
=1, params
=params
)
18308 reply
= await self
.rpc(msg
)
18313 @ReturnMapping(None)
18314 async def RemoveModel(self
):
18319 # map input types to rpc msg
18321 msg
= dict(type='Undertaker', request
='RemoveModel', version
=1, params
=params
)
18323 reply
= await self
.rpc(msg
)
18328 @ReturnMapping(ErrorResults
)
18329 async def SetStatus(self
, entities
):
18331 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
18332 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
18334 # map input types to rpc msg
18336 msg
= dict(type='Undertaker', request
='SetStatus', version
=1, params
=params
)
18337 params
['entities'] = entities
18338 reply
= await self
.rpc(msg
)
18343 @ReturnMapping(ErrorResults
)
18344 async def UpdateStatus(self
, entities
):
18346 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
18347 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
18349 # map input types to rpc msg
18351 msg
= dict(type='Undertaker', request
='UpdateStatus', version
=1, params
=params
)
18352 params
['entities'] = entities
18353 reply
= await self
.rpc(msg
)
18358 @ReturnMapping(NotifyWatchResults
)
18359 async def WatchModelResources(self
):
18362 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
18364 # map input types to rpc msg
18366 msg
= dict(type='Undertaker', request
='WatchModelResources', version
=1, params
=params
)
18368 reply
= await self
.rpc(msg
)
18372 class UnitAssignerFacade(Type
):
18373 name
= 'UnitAssigner'
18375 schema
= {'definitions': {'Entities': {'additionalProperties': False,
18376 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
18378 'required': ['entities'],
18380 'Entity': {'additionalProperties': False,
18381 'properties': {'tag': {'type': 'string'}},
18382 'required': ['tag'],
18384 'EntityStatusArgs': {'additionalProperties': False,
18385 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
18386 'type': 'object'}},
18388 'info': {'type': 'string'},
18389 'status': {'type': 'string'},
18390 'tag': {'type': 'string'}},
18391 'required': ['tag',
18396 'Error': {'additionalProperties': False,
18397 'properties': {'code': {'type': 'string'},
18398 'info': {'$ref': '#/definitions/ErrorInfo'},
18399 'message': {'type': 'string'}},
18400 'required': ['message', 'code'],
18402 'ErrorInfo': {'additionalProperties': False,
18403 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
18404 'macaroon-path': {'type': 'string'}},
18406 'ErrorResult': {'additionalProperties': False,
18407 'properties': {'error': {'$ref': '#/definitions/Error'}},
18409 'ErrorResults': {'additionalProperties': False,
18410 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
18412 'required': ['results'],
18414 'Macaroon': {'additionalProperties': False, 'type': 'object'},
18415 'SetStatus': {'additionalProperties': False,
18416 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
18418 'required': ['entities'],
18420 'StringsWatchResult': {'additionalProperties': False,
18421 'properties': {'changes': {'items': {'type': 'string'},
18423 'error': {'$ref': '#/definitions/Error'},
18424 'watcher-id': {'type': 'string'}},
18425 'required': ['watcher-id'],
18426 'type': 'object'}},
18427 'properties': {'AssignUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18428 'Result': {'$ref': '#/definitions/ErrorResults'}},
18430 'SetAgentStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
18431 'Result': {'$ref': '#/definitions/ErrorResults'}},
18433 'WatchUnitAssignments': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
18434 'type': 'object'}},
18438 @ReturnMapping(ErrorResults
)
18439 async def AssignUnits(self
, entities
):
18441 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
18442 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
18444 # map input types to rpc msg
18446 msg
= dict(type='UnitAssigner', request
='AssignUnits', version
=1, params
=params
)
18447 params
['entities'] = entities
18448 reply
= await self
.rpc(msg
)
18453 @ReturnMapping(ErrorResults
)
18454 async def SetAgentStatus(self
, entities
):
18456 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
18457 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
18459 # map input types to rpc msg
18461 msg
= dict(type='UnitAssigner', request
='SetAgentStatus', version
=1, params
=params
)
18462 params
['entities'] = entities
18463 reply
= await self
.rpc(msg
)
18468 @ReturnMapping(StringsWatchResult
)
18469 async def WatchUnitAssignments(self
):
18472 Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')]
18474 # map input types to rpc msg
18476 msg
= dict(type='UnitAssigner', request
='WatchUnitAssignments', version
=1, params
=params
)
18478 reply
= await self
.rpc(msg
)
18482 class UniterFacade(Type
):
18485 schema
= {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
18486 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
18489 'required': ['servers'],
18491 'Action': {'additionalProperties': False,
18492 'properties': {'name': {'type': 'string'},
18493 'parameters': {'patternProperties': {'.*': {'additionalProperties': True,
18494 'type': 'object'}},
18496 'receiver': {'type': 'string'},
18497 'tag': {'type': 'string'}},
18498 'required': ['tag', 'receiver', 'name'],
18500 'ActionExecutionResult': {'additionalProperties': False,
18501 'properties': {'action-tag': {'type': 'string'},
18502 'message': {'type': 'string'},
18503 'results': {'patternProperties': {'.*': {'additionalProperties': True,
18504 'type': 'object'}},
18506 'status': {'type': 'string'}},
18507 'required': ['action-tag', 'status'],
18509 'ActionExecutionResults': {'additionalProperties': False,
18510 'properties': {'results': {'items': {'$ref': '#/definitions/ActionExecutionResult'},
18513 'ActionResult': {'additionalProperties': False,
18514 'properties': {'action': {'$ref': '#/definitions/Action'},
18515 'completed': {'format': 'date-time',
18517 'enqueued': {'format': 'date-time',
18519 'error': {'$ref': '#/definitions/Error'},
18520 'message': {'type': 'string'},
18521 'output': {'patternProperties': {'.*': {'additionalProperties': True,
18522 'type': 'object'}},
18524 'started': {'format': 'date-time',
18526 'status': {'type': 'string'}},
18528 'ActionResults': {'additionalProperties': False,
18529 'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'},
18532 'Address': {'additionalProperties': False,
18533 'properties': {'scope': {'type': 'string'},
18534 'space-name': {'type': 'string'},
18535 'type': {'type': 'string'},
18536 'value': {'type': 'string'}},
18537 'required': ['value', 'type', 'scope'],
18539 'ApplicationStatusResult': {'additionalProperties': False,
18540 'properties': {'application': {'$ref': '#/definitions/StatusResult'},
18541 'error': {'$ref': '#/definitions/Error'},
18542 'units': {'patternProperties': {'.*': {'$ref': '#/definitions/StatusResult'}},
18543 'type': 'object'}},
18544 'required': ['application',
18547 'ApplicationStatusResults': {'additionalProperties': False,
18548 'properties': {'results': {'items': {'$ref': '#/definitions/ApplicationStatusResult'},
18550 'required': ['results'],
18552 'BoolResult': {'additionalProperties': False,
18553 'properties': {'error': {'$ref': '#/definitions/Error'},
18554 'result': {'type': 'boolean'}},
18555 'required': ['result'],
18557 'BoolResults': {'additionalProperties': False,
18558 'properties': {'results': {'items': {'$ref': '#/definitions/BoolResult'},
18560 'required': ['results'],
18562 'BytesResult': {'additionalProperties': False,
18563 'properties': {'result': {'items': {'type': 'integer'},
18565 'required': ['result'],
18567 'CharmRelation': {'additionalProperties': False,
18568 'properties': {'interface': {'type': 'string'},
18569 'limit': {'type': 'integer'},
18570 'name': {'type': 'string'},
18571 'optional': {'type': 'boolean'},
18572 'role': {'type': 'string'},
18573 'scope': {'type': 'string'}},
18574 'required': ['name',
18581 'CharmURL': {'additionalProperties': False,
18582 'properties': {'url': {'type': 'string'}},
18583 'required': ['url'],
18585 'CharmURLs': {'additionalProperties': False,
18586 'properties': {'urls': {'items': {'$ref': '#/definitions/CharmURL'},
18588 'required': ['urls'],
18590 'ConfigSettingsResult': {'additionalProperties': False,
18591 'properties': {'error': {'$ref': '#/definitions/Error'},
18592 'settings': {'patternProperties': {'.*': {'additionalProperties': True,
18593 'type': 'object'}},
18594 'type': 'object'}},
18595 'required': ['settings'],
18597 'ConfigSettingsResults': {'additionalProperties': False,
18598 'properties': {'results': {'items': {'$ref': '#/definitions/ConfigSettingsResult'},
18600 'required': ['results'],
18602 'Endpoint': {'additionalProperties': False,
18603 'properties': {'application-name': {'type': 'string'},
18604 'relation': {'$ref': '#/definitions/CharmRelation'}},
18605 'required': ['application-name', 'relation'],
18607 'Entities': {'additionalProperties': False,
18608 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
18610 'required': ['entities'],
18612 'EntitiesCharmURL': {'additionalProperties': False,
18613 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityCharmURL'},
18615 'required': ['entities'],
18617 'EntitiesPortRanges': {'additionalProperties': False,
18618 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityPortRange'},
18620 'required': ['entities'],
18622 'Entity': {'additionalProperties': False,
18623 'properties': {'tag': {'type': 'string'}},
18624 'required': ['tag'],
18626 'EntityCharmURL': {'additionalProperties': False,
18627 'properties': {'charm-url': {'type': 'string'},
18628 'tag': {'type': 'string'}},
18629 'required': ['tag', 'charm-url'],
18631 'EntityPortRange': {'additionalProperties': False,
18632 'properties': {'from-port': {'type': 'integer'},
18633 'protocol': {'type': 'string'},
18634 'tag': {'type': 'string'},
18635 'to-port': {'type': 'integer'}},
18636 'required': ['tag',
18641 'EntityStatusArgs': {'additionalProperties': False,
18642 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
18643 'type': 'object'}},
18645 'info': {'type': 'string'},
18646 'status': {'type': 'string'},
18647 'tag': {'type': 'string'}},
18648 'required': ['tag',
18653 'EntityWorkloadVersion': {'additionalProperties': False,
18654 'properties': {'tag': {'type': 'string'},
18655 'workload-version': {'type': 'string'}},
18656 'required': ['tag',
18657 'workload-version'],
18659 'EntityWorkloadVersions': {'additionalProperties': False,
18660 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityWorkloadVersion'},
18662 'required': ['entities'],
18664 'Error': {'additionalProperties': False,
18665 'properties': {'code': {'type': 'string'},
18666 'info': {'$ref': '#/definitions/ErrorInfo'},
18667 'message': {'type': 'string'}},
18668 'required': ['message', 'code'],
18670 'ErrorInfo': {'additionalProperties': False,
18671 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
18672 'macaroon-path': {'type': 'string'}},
18674 'ErrorResult': {'additionalProperties': False,
18675 'properties': {'error': {'$ref': '#/definitions/Error'}},
18677 'ErrorResults': {'additionalProperties': False,
18678 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
18680 'required': ['results'],
18682 'GetLeadershipSettingsBulkResults': {'additionalProperties': False,
18683 'properties': {'results': {'items': {'$ref': '#/definitions/GetLeadershipSettingsResult'},
18685 'required': ['results'],
18687 'GetLeadershipSettingsResult': {'additionalProperties': False,
18688 'properties': {'error': {'$ref': '#/definitions/Error'},
18689 'settings': {'patternProperties': {'.*': {'type': 'string'}},
18690 'type': 'object'}},
18691 'required': ['settings'],
18693 'HostPort': {'additionalProperties': False,
18694 'properties': {'Address': {'$ref': '#/definitions/Address'},
18695 'port': {'type': 'integer'}},
18696 'required': ['Address', 'port'],
18698 'IntResult': {'additionalProperties': False,
18699 'properties': {'error': {'$ref': '#/definitions/Error'},
18700 'result': {'type': 'integer'}},
18701 'required': ['result'],
18703 'IntResults': {'additionalProperties': False,
18704 'properties': {'results': {'items': {'$ref': '#/definitions/IntResult'},
18706 'required': ['results'],
18708 'LifeResult': {'additionalProperties': False,
18709 'properties': {'error': {'$ref': '#/definitions/Error'},
18710 'life': {'type': 'string'}},
18711 'required': ['life'],
18713 'LifeResults': {'additionalProperties': False,
18714 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
18716 'required': ['results'],
18718 'Macaroon': {'additionalProperties': False, 'type': 'object'},
18719 'MachinePortRange': {'additionalProperties': False,
18720 'properties': {'port-range': {'$ref': '#/definitions/PortRange'},
18721 'relation-tag': {'type': 'string'},
18722 'unit-tag': {'type': 'string'}},
18723 'required': ['unit-tag',
18727 'MachinePortsResult': {'additionalProperties': False,
18728 'properties': {'error': {'$ref': '#/definitions/Error'},
18729 'ports': {'items': {'$ref': '#/definitions/MachinePortRange'},
18731 'required': ['ports'],
18733 'MachinePortsResults': {'additionalProperties': False,
18734 'properties': {'results': {'items': {'$ref': '#/definitions/MachinePortsResult'},
18736 'required': ['results'],
18738 'MergeLeadershipSettingsBulkParams': {'additionalProperties': False,
18739 'properties': {'params': {'items': {'$ref': '#/definitions/MergeLeadershipSettingsParam'},
18741 'required': ['params'],
18743 'MergeLeadershipSettingsParam': {'additionalProperties': False,
18744 'properties': {'application-tag': {'type': 'string'},
18745 'settings': {'patternProperties': {'.*': {'type': 'string'}},
18746 'type': 'object'}},
18747 'required': ['application-tag',
18750 'MeterStatusResult': {'additionalProperties': False,
18751 'properties': {'code': {'type': 'string'},
18752 'error': {'$ref': '#/definitions/Error'},
18753 'info': {'type': 'string'}},
18754 'required': ['code', 'info'],
18756 'MeterStatusResults': {'additionalProperties': False,
18757 'properties': {'results': {'items': {'$ref': '#/definitions/MeterStatusResult'},
18759 'required': ['results'],
18761 'Metric': {'additionalProperties': False,
18762 'properties': {'key': {'type': 'string'},
18763 'time': {'format': 'date-time',
18765 'value': {'type': 'string'}},
18766 'required': ['key', 'value', 'time'],
18768 'MetricBatch': {'additionalProperties': False,
18769 'properties': {'charm-url': {'type': 'string'},
18770 'created': {'format': 'date-time',
18772 'metrics': {'items': {'$ref': '#/definitions/Metric'},
18774 'uuid': {'type': 'string'}},
18775 'required': ['uuid',
18780 'MetricBatchParam': {'additionalProperties': False,
18781 'properties': {'batch': {'$ref': '#/definitions/MetricBatch'},
18782 'tag': {'type': 'string'}},
18783 'required': ['tag', 'batch'],
18785 'MetricBatchParams': {'additionalProperties': False,
18786 'properties': {'batches': {'items': {'$ref': '#/definitions/MetricBatchParam'},
18788 'required': ['batches'],
18790 'ModelConfigResult': {'additionalProperties': False,
18791 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
18792 'type': 'object'}},
18793 'type': 'object'}},
18794 'required': ['config'],
18796 'ModelResult': {'additionalProperties': False,
18797 'properties': {'error': {'$ref': '#/definitions/Error'},
18798 'name': {'type': 'string'},
18799 'uuid': {'type': 'string'}},
18800 'required': ['name', 'uuid'],
18802 'NetworkConfig': {'additionalProperties': False,
18803 'properties': {'address': {'type': 'string'},
18804 'cidr': {'type': 'string'},
18805 'config-type': {'type': 'string'},
18806 'device-index': {'type': 'integer'},
18807 'disabled': {'type': 'boolean'},
18808 'dns-search-domains': {'items': {'type': 'string'},
18810 'dns-servers': {'items': {'type': 'string'},
18812 'gateway-address': {'type': 'string'},
18813 'interface-name': {'type': 'string'},
18814 'interface-type': {'type': 'string'},
18815 'mac-address': {'type': 'string'},
18816 'mtu': {'type': 'integer'},
18817 'no-auto-start': {'type': 'boolean'},
18818 'parent-interface-name': {'type': 'string'},
18819 'provider-address-id': {'type': 'string'},
18820 'provider-id': {'type': 'string'},
18821 'provider-space-id': {'type': 'string'},
18822 'provider-subnet-id': {'type': 'string'},
18823 'provider-vlan-id': {'type': 'string'},
18824 'vlan-tag': {'type': 'integer'}},
18825 'required': ['device-index',
18830 'provider-subnet-id',
18831 'provider-space-id',
18832 'provider-address-id',
18833 'provider-vlan-id',
18836 'parent-interface-name',
18840 'NotifyWatchResult': {'additionalProperties': False,
18841 'properties': {'NotifyWatcherId': {'type': 'string'},
18842 'error': {'$ref': '#/definitions/Error'}},
18843 'required': ['NotifyWatcherId'],
18845 'NotifyWatchResults': {'additionalProperties': False,
18846 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
18848 'required': ['results'],
18850 'PortRange': {'additionalProperties': False,
18851 'properties': {'from-port': {'type': 'integer'},
18852 'protocol': {'type': 'string'},
18853 'to-port': {'type': 'integer'}},
18854 'required': ['from-port', 'to-port', 'protocol'],
18856 'RelationIds': {'additionalProperties': False,
18857 'properties': {'relation-ids': {'items': {'type': 'integer'},
18859 'required': ['relation-ids'],
18861 'RelationResult': {'additionalProperties': False,
18862 'properties': {'endpoint': {'$ref': '#/definitions/Endpoint'},
18863 'error': {'$ref': '#/definitions/Error'},
18864 'id': {'type': 'integer'},
18865 'key': {'type': 'string'},
18866 'life': {'type': 'string'}},
18867 'required': ['life',
18872 'RelationResults': {'additionalProperties': False,
18873 'properties': {'results': {'items': {'$ref': '#/definitions/RelationResult'},
18875 'required': ['results'],
18877 'RelationUnit': {'additionalProperties': False,
18878 'properties': {'relation': {'type': 'string'},
18879 'unit': {'type': 'string'}},
18880 'required': ['relation', 'unit'],
18882 'RelationUnitPair': {'additionalProperties': False,
18883 'properties': {'local-unit': {'type': 'string'},
18884 'relation': {'type': 'string'},
18885 'remote-unit': {'type': 'string'}},
18886 'required': ['relation',
18890 'RelationUnitPairs': {'additionalProperties': False,
18891 'properties': {'relation-unit-pairs': {'items': {'$ref': '#/definitions/RelationUnitPair'},
18893 'required': ['relation-unit-pairs'],
18895 'RelationUnitSettings': {'additionalProperties': False,
18896 'properties': {'relation': {'type': 'string'},
18897 'settings': {'patternProperties': {'.*': {'type': 'string'}},
18899 'unit': {'type': 'string'}},
18900 'required': ['relation',
18904 'RelationUnits': {'additionalProperties': False,
18905 'properties': {'relation-units': {'items': {'$ref': '#/definitions/RelationUnit'},
18907 'required': ['relation-units'],
18909 'RelationUnitsChange': {'additionalProperties': False,
18910 'properties': {'changed': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitSettings'}},
18912 'departed': {'items': {'type': 'string'},
18914 'required': ['changed'],
18916 'RelationUnitsSettings': {'additionalProperties': False,
18917 'properties': {'relation-units': {'items': {'$ref': '#/definitions/RelationUnitSettings'},
18919 'required': ['relation-units'],
18921 'RelationUnitsWatchResult': {'additionalProperties': False,
18922 'properties': {'changes': {'$ref': '#/definitions/RelationUnitsChange'},
18923 'error': {'$ref': '#/definitions/Error'},
18924 'watcher-id': {'type': 'string'}},
18925 'required': ['watcher-id',
18928 'RelationUnitsWatchResults': {'additionalProperties': False,
18929 'properties': {'results': {'items': {'$ref': '#/definitions/RelationUnitsWatchResult'},
18931 'required': ['results'],
18933 'ResolvedModeResult': {'additionalProperties': False,
18934 'properties': {'error': {'$ref': '#/definitions/Error'},
18935 'mode': {'type': 'string'}},
18936 'required': ['mode'],
18938 'ResolvedModeResults': {'additionalProperties': False,
18939 'properties': {'results': {'items': {'$ref': '#/definitions/ResolvedModeResult'},
18941 'required': ['results'],
18943 'SetStatus': {'additionalProperties': False,
18944 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
18946 'required': ['entities'],
18948 'SettingsResult': {'additionalProperties': False,
18949 'properties': {'error': {'$ref': '#/definitions/Error'},
18950 'settings': {'patternProperties': {'.*': {'type': 'string'}},
18951 'type': 'object'}},
18952 'required': ['settings'],
18954 'SettingsResults': {'additionalProperties': False,
18955 'properties': {'results': {'items': {'$ref': '#/definitions/SettingsResult'},
18957 'required': ['results'],
18959 'StatusResult': {'additionalProperties': False,
18960 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
18961 'type': 'object'}},
18963 'error': {'$ref': '#/definitions/Error'},
18964 'id': {'type': 'string'},
18965 'info': {'type': 'string'},
18966 'life': {'type': 'string'},
18967 'since': {'format': 'date-time',
18969 'status': {'type': 'string'}},
18977 'StatusResults': {'additionalProperties': False,
18978 'properties': {'results': {'items': {'$ref': '#/definitions/StatusResult'},
18980 'required': ['results'],
18982 'StorageAddParams': {'additionalProperties': False,
18983 'properties': {'name': {'type': 'string'},
18984 'storage': {'$ref': '#/definitions/StorageConstraints'},
18985 'unit': {'type': 'string'}},
18986 'required': ['unit', 'name', 'storage'],
18988 'StorageAttachment': {'additionalProperties': False,
18989 'properties': {'kind': {'type': 'integer'},
18990 'life': {'type': 'string'},
18991 'location': {'type': 'string'},
18992 'owner-tag': {'type': 'string'},
18993 'storage-tag': {'type': 'string'},
18994 'unit-tag': {'type': 'string'}},
18995 'required': ['storage-tag',
19002 'StorageAttachmentId': {'additionalProperties': False,
19003 'properties': {'storage-tag': {'type': 'string'},
19004 'unit-tag': {'type': 'string'}},
19005 'required': ['storage-tag',
19008 'StorageAttachmentIds': {'additionalProperties': False,
19009 'properties': {'ids': {'items': {'$ref': '#/definitions/StorageAttachmentId'},
19011 'required': ['ids'],
19013 'StorageAttachmentIdsResult': {'additionalProperties': False,
19014 'properties': {'error': {'$ref': '#/definitions/Error'},
19015 'result': {'$ref': '#/definitions/StorageAttachmentIds'}},
19016 'required': ['result'],
19018 'StorageAttachmentIdsResults': {'additionalProperties': False,
19019 'properties': {'results': {'items': {'$ref': '#/definitions/StorageAttachmentIdsResult'},
19022 'StorageAttachmentResult': {'additionalProperties': False,
19023 'properties': {'error': {'$ref': '#/definitions/Error'},
19024 'result': {'$ref': '#/definitions/StorageAttachment'}},
19025 'required': ['result'],
19027 'StorageAttachmentResults': {'additionalProperties': False,
19028 'properties': {'results': {'items': {'$ref': '#/definitions/StorageAttachmentResult'},
19031 'StorageConstraints': {'additionalProperties': False,
19032 'properties': {'count': {'type': 'integer'},
19033 'pool': {'type': 'string'},
19034 'size': {'type': 'integer'}},
19036 'StoragesAddParams': {'additionalProperties': False,
19037 'properties': {'storages': {'items': {'$ref': '#/definitions/StorageAddParams'},
19039 'required': ['storages'],
19041 'StringBoolResult': {'additionalProperties': False,
19042 'properties': {'error': {'$ref': '#/definitions/Error'},
19043 'ok': {'type': 'boolean'},
19044 'result': {'type': 'string'}},
19045 'required': ['result', 'ok'],
19047 'StringBoolResults': {'additionalProperties': False,
19048 'properties': {'results': {'items': {'$ref': '#/definitions/StringBoolResult'},
19050 'required': ['results'],
19052 'StringResult': {'additionalProperties': False,
19053 'properties': {'error': {'$ref': '#/definitions/Error'},
19054 'result': {'type': 'string'}},
19055 'required': ['result'],
19057 'StringResults': {'additionalProperties': False,
19058 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
19060 'required': ['results'],
19062 'StringsResult': {'additionalProperties': False,
19063 'properties': {'error': {'$ref': '#/definitions/Error'},
19064 'result': {'items': {'type': 'string'},
19067 'StringsResults': {'additionalProperties': False,
19068 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
19070 'required': ['results'],
19072 'StringsWatchResult': {'additionalProperties': False,
19073 'properties': {'changes': {'items': {'type': 'string'},
19075 'error': {'$ref': '#/definitions/Error'},
19076 'watcher-id': {'type': 'string'}},
19077 'required': ['watcher-id'],
19079 'StringsWatchResults': {'additionalProperties': False,
19080 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
19082 'required': ['results'],
19084 'UnitNetworkConfig': {'additionalProperties': False,
19085 'properties': {'binding-name': {'type': 'string'},
19086 'unit-tag': {'type': 'string'}},
19087 'required': ['unit-tag', 'binding-name'],
19089 'UnitNetworkConfigResult': {'additionalProperties': False,
19090 'properties': {'error': {'$ref': '#/definitions/Error'},
19091 'info': {'items': {'$ref': '#/definitions/NetworkConfig'},
19093 'required': ['info'],
19095 'UnitNetworkConfigResults': {'additionalProperties': False,
19096 'properties': {'results': {'items': {'$ref': '#/definitions/UnitNetworkConfigResult'},
19098 'required': ['results'],
19100 'UnitSettings': {'additionalProperties': False,
19101 'properties': {'version': {'type': 'integer'}},
19102 'required': ['version'],
19104 'UnitsNetworkConfig': {'additionalProperties': False,
19105 'properties': {'args': {'items': {'$ref': '#/definitions/UnitNetworkConfig'},
19107 'required': ['args'],
19108 'type': 'object'}},
19109 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
19111 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
19113 'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19114 'Result': {'$ref': '#/definitions/ActionResults'}},
19116 'AddMetricBatches': {'properties': {'Params': {'$ref': '#/definitions/MetricBatchParams'},
19117 'Result': {'$ref': '#/definitions/ErrorResults'}},
19119 'AddUnitStorage': {'properties': {'Params': {'$ref': '#/definitions/StoragesAddParams'},
19120 'Result': {'$ref': '#/definitions/ErrorResults'}},
19122 'AllMachinePorts': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19123 'Result': {'$ref': '#/definitions/MachinePortsResults'}},
19125 'ApplicationStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19126 'Result': {'$ref': '#/definitions/ApplicationStatusResults'}},
19128 'AssignedMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19129 'Result': {'$ref': '#/definitions/StringResults'}},
19131 'AvailabilityZone': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19132 'Result': {'$ref': '#/definitions/StringResults'}},
19134 'BeginActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19135 'Result': {'$ref': '#/definitions/ErrorResults'}},
19137 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
19139 'CharmArchiveSha256': {'properties': {'Params': {'$ref': '#/definitions/CharmURLs'},
19140 'Result': {'$ref': '#/definitions/StringResults'}},
19142 'CharmModifiedVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19143 'Result': {'$ref': '#/definitions/IntResults'}},
19145 'CharmURL': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19146 'Result': {'$ref': '#/definitions/StringBoolResults'}},
19148 'ClearResolved': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19149 'Result': {'$ref': '#/definitions/ErrorResults'}},
19151 'ClosePorts': {'properties': {'Params': {'$ref': '#/definitions/EntitiesPortRanges'},
19152 'Result': {'$ref': '#/definitions/ErrorResults'}},
19154 'ConfigSettings': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19155 'Result': {'$ref': '#/definitions/ConfigSettingsResults'}},
19157 'CurrentModel': {'properties': {'Result': {'$ref': '#/definitions/ModelResult'}},
19159 'Destroy': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19160 'Result': {'$ref': '#/definitions/ErrorResults'}},
19162 'DestroyAllSubordinates': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19163 'Result': {'$ref': '#/definitions/ErrorResults'}},
19165 'DestroyUnitStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19166 'Result': {'$ref': '#/definitions/ErrorResults'}},
19168 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19169 'Result': {'$ref': '#/definitions/ErrorResults'}},
19171 'EnterScope': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
19172 'Result': {'$ref': '#/definitions/ErrorResults'}},
19174 'FinishActions': {'properties': {'Params': {'$ref': '#/definitions/ActionExecutionResults'},
19175 'Result': {'$ref': '#/definitions/ErrorResults'}},
19177 'GetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19178 'Result': {'$ref': '#/definitions/MeterStatusResults'}},
19180 'GetPrincipal': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19181 'Result': {'$ref': '#/definitions/StringBoolResults'}},
19183 'HasSubordinates': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19184 'Result': {'$ref': '#/definitions/BoolResults'}},
19186 'JoinedRelations': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19187 'Result': {'$ref': '#/definitions/StringsResults'}},
19189 'LeaveScope': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
19190 'Result': {'$ref': '#/definitions/ErrorResults'}},
19192 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19193 'Result': {'$ref': '#/definitions/LifeResults'}},
19195 'Merge': {'properties': {'Params': {'$ref': '#/definitions/MergeLeadershipSettingsBulkParams'},
19196 'Result': {'$ref': '#/definitions/ErrorResults'}},
19198 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
19200 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
19202 'NetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/UnitsNetworkConfig'},
19203 'Result': {'$ref': '#/definitions/UnitNetworkConfigResults'}},
19205 'OpenPorts': {'properties': {'Params': {'$ref': '#/definitions/EntitiesPortRanges'},
19206 'Result': {'$ref': '#/definitions/ErrorResults'}},
19208 'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19209 'Result': {'$ref': '#/definitions/StringResults'}},
19211 'ProviderType': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
19213 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19214 'Result': {'$ref': '#/definitions/StringResults'}},
19216 'Read': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19217 'Result': {'$ref': '#/definitions/GetLeadershipSettingsBulkResults'}},
19219 'ReadRemoteSettings': {'properties': {'Params': {'$ref': '#/definitions/RelationUnitPairs'},
19220 'Result': {'$ref': '#/definitions/SettingsResults'}},
19222 'ReadSettings': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
19223 'Result': {'$ref': '#/definitions/SettingsResults'}},
19225 'Relation': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
19226 'Result': {'$ref': '#/definitions/RelationResults'}},
19228 'RelationById': {'properties': {'Params': {'$ref': '#/definitions/RelationIds'},
19229 'Result': {'$ref': '#/definitions/RelationResults'}},
19231 'RemoveStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
19232 'Result': {'$ref': '#/definitions/ErrorResults'}},
19234 'RequestReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19235 'Result': {'$ref': '#/definitions/ErrorResults'}},
19237 'Resolved': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19238 'Result': {'$ref': '#/definitions/ResolvedModeResults'}},
19240 'SetAgentStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
19241 'Result': {'$ref': '#/definitions/ErrorResults'}},
19243 'SetApplicationStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
19244 'Result': {'$ref': '#/definitions/ErrorResults'}},
19246 'SetCharmURL': {'properties': {'Params': {'$ref': '#/definitions/EntitiesCharmURL'},
19247 'Result': {'$ref': '#/definitions/ErrorResults'}},
19249 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
19250 'Result': {'$ref': '#/definitions/ErrorResults'}},
19252 'SetUnitStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
19253 'Result': {'$ref': '#/definitions/ErrorResults'}},
19255 'SetWorkloadVersion': {'properties': {'Params': {'$ref': '#/definitions/EntityWorkloadVersions'},
19256 'Result': {'$ref': '#/definitions/ErrorResults'}},
19258 'StorageAttachmentLife': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
19259 'Result': {'$ref': '#/definitions/LifeResults'}},
19261 'StorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
19262 'Result': {'$ref': '#/definitions/StorageAttachmentResults'}},
19264 'UnitStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19265 'Result': {'$ref': '#/definitions/StatusResults'}},
19267 'UnitStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19268 'Result': {'$ref': '#/definitions/StorageAttachmentIdsResults'}},
19270 'UpdateSettings': {'properties': {'Params': {'$ref': '#/definitions/RelationUnitsSettings'},
19271 'Result': {'$ref': '#/definitions/ErrorResults'}},
19273 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19274 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
19276 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
19278 'WatchActionNotifications': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19279 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
19281 'WatchApplicationRelations': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19282 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
19284 'WatchConfigSettings': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19285 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
19287 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
19289 'WatchLeadershipSettings': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19290 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
19292 'WatchMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19293 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
19295 'WatchRelationUnits': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
19296 'Result': {'$ref': '#/definitions/RelationUnitsWatchResults'}},
19298 'WatchStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
19299 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
19301 'WatchUnitAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19302 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
19304 'WatchUnitStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19305 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
19307 'WorkloadVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19308 'Result': {'$ref': '#/definitions/StringResults'}},
19309 'type': 'object'}},
19313 @ReturnMapping(StringsResult
)
19314 async def APIAddresses(self
):
19317 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[str]]
19319 # map input types to rpc msg
19321 msg
= dict(type='Uniter', request
='APIAddresses', version
=4, params
=params
)
19323 reply
= await self
.rpc(msg
)
19328 @ReturnMapping(APIHostPortsResult
)
19329 async def APIHostPorts(self
):
19332 Returns -> typing.Sequence<+T_co>[~HostPort]<~HostPort>
19334 # map input types to rpc msg
19336 msg
= dict(type='Uniter', request
='APIHostPorts', version
=4, params
=params
)
19338 reply
= await self
.rpc(msg
)
19343 @ReturnMapping(ActionResults
)
19344 async def Actions(self
, entities
):
19346 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19347 Returns -> typing.Sequence<+T_co>[~ActionResult]<~ActionResult>
19349 # map input types to rpc msg
19351 msg
= dict(type='Uniter', request
='Actions', version
=4, params
=params
)
19352 params
['entities'] = entities
19353 reply
= await self
.rpc(msg
)
19358 @ReturnMapping(ErrorResults
)
19359 async def AddMetricBatches(self
, batches
):
19361 batches : typing.Sequence<+T_co>[~MetricBatchParam]<~MetricBatchParam>
19362 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
19364 # map input types to rpc msg
19366 msg
= dict(type='Uniter', request
='AddMetricBatches', version
=4, params
=params
)
19367 params
['batches'] = batches
19368 reply
= await self
.rpc(msg
)
19373 @ReturnMapping(ErrorResults
)
19374 async def AddUnitStorage(self
, storages
):
19376 storages : typing.Sequence<+T_co>[~StorageAddParams]<~StorageAddParams>
19377 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
19379 # map input types to rpc msg
19381 msg
= dict(type='Uniter', request
='AddUnitStorage', version
=4, params
=params
)
19382 params
['storages'] = storages
19383 reply
= await self
.rpc(msg
)
19388 @ReturnMapping(MachinePortsResults
)
19389 async def AllMachinePorts(self
, entities
):
19391 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19392 Returns -> typing.Sequence<+T_co>[~MachinePortsResult]<~MachinePortsResult>
19394 # map input types to rpc msg
19396 msg
= dict(type='Uniter', request
='AllMachinePorts', version
=4, params
=params
)
19397 params
['entities'] = entities
19398 reply
= await self
.rpc(msg
)
19403 @ReturnMapping(ApplicationStatusResults
)
19404 async def ApplicationStatus(self
, entities
):
19406 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19407 Returns -> typing.Sequence<+T_co>[~ApplicationStatusResult]<~ApplicationStatusResult>
19409 # map input types to rpc msg
19411 msg
= dict(type='Uniter', request
='ApplicationStatus', version
=4, params
=params
)
19412 params
['entities'] = entities
19413 reply
= await self
.rpc(msg
)
19418 @ReturnMapping(StringResults
)
19419 async def AssignedMachine(self
, entities
):
19421 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19422 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
19424 # map input types to rpc msg
19426 msg
= dict(type='Uniter', request
='AssignedMachine', version
=4, params
=params
)
19427 params
['entities'] = entities
19428 reply
= await self
.rpc(msg
)
19433 @ReturnMapping(StringResults
)
19434 async def AvailabilityZone(self
, entities
):
19436 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19437 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
19439 # map input types to rpc msg
19441 msg
= dict(type='Uniter', request
='AvailabilityZone', version
=4, params
=params
)
19442 params
['entities'] = entities
19443 reply
= await self
.rpc(msg
)
19448 @ReturnMapping(ErrorResults
)
19449 async def BeginActions(self
, entities
):
19451 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19452 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
19454 # map input types to rpc msg
19456 msg
= dict(type='Uniter', request
='BeginActions', version
=4, params
=params
)
19457 params
['entities'] = entities
19458 reply
= await self
.rpc(msg
)
19463 @ReturnMapping(BytesResult
)
19464 async def CACert(self
):
19467 Returns -> typing.Sequence<+T_co>[int]
19469 # map input types to rpc msg
19471 msg
= dict(type='Uniter', request
='CACert', version
=4, params
=params
)
19473 reply
= await self
.rpc(msg
)
19478 @ReturnMapping(StringResults
)
19479 async def CharmArchiveSha256(self
, urls
):
19481 urls : typing.Sequence<+T_co>[~CharmURL]<~CharmURL>
19482 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
19484 # map input types to rpc msg
19486 msg
= dict(type='Uniter', request
='CharmArchiveSha256', version
=4, params
=params
)
19487 params
['urls'] = urls
19488 reply
= await self
.rpc(msg
)
19493 @ReturnMapping(IntResults
)
19494 async def CharmModifiedVersion(self
, entities
):
19496 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19497 Returns -> typing.Sequence<+T_co>[~IntResult]<~IntResult>
19499 # map input types to rpc msg
19501 msg
= dict(type='Uniter', request
='CharmModifiedVersion', version
=4, params
=params
)
19502 params
['entities'] = entities
19503 reply
= await self
.rpc(msg
)
19508 @ReturnMapping(StringBoolResults
)
19509 async def CharmURL(self
, entities
):
19511 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19512 Returns -> typing.Sequence<+T_co>[~StringBoolResult]<~StringBoolResult>
19514 # map input types to rpc msg
19516 msg
= dict(type='Uniter', request
='CharmURL', version
=4, params
=params
)
19517 params
['entities'] = entities
19518 reply
= await self
.rpc(msg
)
19523 @ReturnMapping(ErrorResults
)
19524 async def ClearResolved(self
, entities
):
19526 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19527 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
19529 # map input types to rpc msg
19531 msg
= dict(type='Uniter', request
='ClearResolved', version
=4, params
=params
)
19532 params
['entities'] = entities
19533 reply
= await self
.rpc(msg
)
19538 @ReturnMapping(ErrorResults
)
19539 async def ClosePorts(self
, entities
):
19541 entities : typing.Sequence<+T_co>[~EntityPortRange]<~EntityPortRange>
19542 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
19544 # map input types to rpc msg
19546 msg
= dict(type='Uniter', request
='ClosePorts', version
=4, params
=params
)
19547 params
['entities'] = entities
19548 reply
= await self
.rpc(msg
)
19553 @ReturnMapping(ConfigSettingsResults
)
19554 async def ConfigSettings(self
, entities
):
19556 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19557 Returns -> typing.Sequence<+T_co>[~ConfigSettingsResult]<~ConfigSettingsResult>
19559 # map input types to rpc msg
19561 msg
= dict(type='Uniter', request
='ConfigSettings', version
=4, params
=params
)
19562 params
['entities'] = entities
19563 reply
= await self
.rpc(msg
)
19568 @ReturnMapping(ModelResult
)
19569 async def CurrentModel(self
):
19572 Returns -> typing.Union[_ForwardRef('Error'), str]
19574 # map input types to rpc msg
19576 msg
= dict(type='Uniter', request
='CurrentModel', version
=4, params
=params
)
19578 reply
= await self
.rpc(msg
)
19583 @ReturnMapping(ErrorResults
)
19584 async def Destroy(self
, entities
):
19586 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19587 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
19589 # map input types to rpc msg
19591 msg
= dict(type='Uniter', request
='Destroy', version
=4, params
=params
)
19592 params
['entities'] = entities
19593 reply
= await self
.rpc(msg
)
19598 @ReturnMapping(ErrorResults
)
19599 async def DestroyAllSubordinates(self
, entities
):
19601 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19602 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
19604 # map input types to rpc msg
19606 msg
= dict(type='Uniter', request
='DestroyAllSubordinates', version
=4, params
=params
)
19607 params
['entities'] = entities
19608 reply
= await self
.rpc(msg
)
19613 @ReturnMapping(ErrorResults
)
19614 async def DestroyUnitStorageAttachments(self
, entities
):
19616 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19617 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
19619 # map input types to rpc msg
19621 msg
= dict(type='Uniter', request
='DestroyUnitStorageAttachments', version
=4, params
=params
)
19622 params
['entities'] = entities
19623 reply
= await self
.rpc(msg
)
19628 @ReturnMapping(ErrorResults
)
19629 async def EnsureDead(self
, entities
):
19631 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19632 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
19634 # map input types to rpc msg
19636 msg
= dict(type='Uniter', request
='EnsureDead', version
=4, params
=params
)
19637 params
['entities'] = entities
19638 reply
= await self
.rpc(msg
)
19643 @ReturnMapping(ErrorResults
)
19644 async def EnterScope(self
, relation_units
):
19646 relation_units : typing.Sequence<+T_co>[~RelationUnit]<~RelationUnit>
19647 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
19649 # map input types to rpc msg
19651 msg
= dict(type='Uniter', request
='EnterScope', version
=4, params
=params
)
19652 params
['relation-units'] = relation_units
19653 reply
= await self
.rpc(msg
)
19658 @ReturnMapping(ErrorResults
)
19659 async def FinishActions(self
, results
):
19661 results : typing.Sequence<+T_co>[~ActionExecutionResult]<~ActionExecutionResult>
19662 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
19664 # map input types to rpc msg
19666 msg
= dict(type='Uniter', request
='FinishActions', version
=4, params
=params
)
19667 params
['results'] = results
19668 reply
= await self
.rpc(msg
)
19673 @ReturnMapping(MeterStatusResults
)
19674 async def GetMeterStatus(self
, entities
):
19676 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19677 Returns -> typing.Sequence<+T_co>[~MeterStatusResult]<~MeterStatusResult>
19679 # map input types to rpc msg
19681 msg
= dict(type='Uniter', request
='GetMeterStatus', version
=4, params
=params
)
19682 params
['entities'] = entities
19683 reply
= await self
.rpc(msg
)
19688 @ReturnMapping(StringBoolResults
)
19689 async def GetPrincipal(self
, entities
):
19691 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19692 Returns -> typing.Sequence<+T_co>[~StringBoolResult]<~StringBoolResult>
19694 # map input types to rpc msg
19696 msg
= dict(type='Uniter', request
='GetPrincipal', version
=4, params
=params
)
19697 params
['entities'] = entities
19698 reply
= await self
.rpc(msg
)
19703 @ReturnMapping(BoolResults
)
19704 async def HasSubordinates(self
, entities
):
19706 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19707 Returns -> typing.Sequence<+T_co>[~BoolResult]<~BoolResult>
19709 # map input types to rpc msg
19711 msg
= dict(type='Uniter', request
='HasSubordinates', version
=4, params
=params
)
19712 params
['entities'] = entities
19713 reply
= await self
.rpc(msg
)
19718 @ReturnMapping(StringsResults
)
19719 async def JoinedRelations(self
, entities
):
19721 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19722 Returns -> typing.Sequence<+T_co>[~StringsResult]<~StringsResult>
19724 # map input types to rpc msg
19726 msg
= dict(type='Uniter', request
='JoinedRelations', version
=4, params
=params
)
19727 params
['entities'] = entities
19728 reply
= await self
.rpc(msg
)
19733 @ReturnMapping(ErrorResults
)
19734 async def LeaveScope(self
, relation_units
):
19736 relation_units : typing.Sequence<+T_co>[~RelationUnit]<~RelationUnit>
19737 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
19739 # map input types to rpc msg
19741 msg
= dict(type='Uniter', request
='LeaveScope', version
=4, params
=params
)
19742 params
['relation-units'] = relation_units
19743 reply
= await self
.rpc(msg
)
19748 @ReturnMapping(LifeResults
)
19749 async def Life(self
, entities
):
19751 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19752 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
19754 # map input types to rpc msg
19756 msg
= dict(type='Uniter', request
='Life', version
=4, params
=params
)
19757 params
['entities'] = entities
19758 reply
= await self
.rpc(msg
)
19763 @ReturnMapping(ErrorResults
)
19764 async def Merge(self
, params
):
19766 params : typing.Sequence<+T_co>[~MergeLeadershipSettingsParam]<~MergeLeadershipSettingsParam>
19767 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
19769 # map input types to rpc msg
19771 msg
= dict(type='Uniter', request
='Merge', version
=4, params
=params
)
19772 params
['params'] = params
19773 reply
= await self
.rpc(msg
)
19778 @ReturnMapping(ModelConfigResult
)
19779 async def ModelConfig(self
):
19782 Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
19784 # map input types to rpc msg
19786 msg
= dict(type='Uniter', request
='ModelConfig', version
=4, params
=params
)
19788 reply
= await self
.rpc(msg
)
19793 @ReturnMapping(StringResult
)
19794 async def ModelUUID(self
):
19797 Returns -> typing.Union[_ForwardRef('Error'), str]
19799 # map input types to rpc msg
19801 msg
= dict(type='Uniter', request
='ModelUUID', version
=4, params
=params
)
19803 reply
= await self
.rpc(msg
)
19808 @ReturnMapping(UnitNetworkConfigResults
)
19809 async def NetworkConfig(self
, args
):
19811 args : typing.Sequence<+T_co>[~UnitNetworkConfig]<~UnitNetworkConfig>
19812 Returns -> typing.Sequence<+T_co>[~UnitNetworkConfigResult]<~UnitNetworkConfigResult>
19814 # map input types to rpc msg
19816 msg
= dict(type='Uniter', request
='NetworkConfig', version
=4, params
=params
)
19817 params
['args'] = args
19818 reply
= await self
.rpc(msg
)
19823 @ReturnMapping(ErrorResults
)
19824 async def OpenPorts(self
, entities
):
19826 entities : typing.Sequence<+T_co>[~EntityPortRange]<~EntityPortRange>
19827 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
19829 # map input types to rpc msg
19831 msg
= dict(type='Uniter', request
='OpenPorts', version
=4, params
=params
)
19832 params
['entities'] = entities
19833 reply
= await self
.rpc(msg
)
19838 @ReturnMapping(StringResults
)
19839 async def PrivateAddress(self
, entities
):
19841 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19842 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
19844 # map input types to rpc msg
19846 msg
= dict(type='Uniter', request
='PrivateAddress', version
=4, params
=params
)
19847 params
['entities'] = entities
19848 reply
= await self
.rpc(msg
)
19853 @ReturnMapping(StringResult
)
19854 async def ProviderType(self
):
19857 Returns -> typing.Union[_ForwardRef('Error'), str]
19859 # map input types to rpc msg
19861 msg
= dict(type='Uniter', request
='ProviderType', version
=4, params
=params
)
19863 reply
= await self
.rpc(msg
)
19868 @ReturnMapping(StringResults
)
19869 async def PublicAddress(self
, entities
):
19871 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19872 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
19874 # map input types to rpc msg
19876 msg
= dict(type='Uniter', request
='PublicAddress', version
=4, params
=params
)
19877 params
['entities'] = entities
19878 reply
= await self
.rpc(msg
)
19883 @ReturnMapping(GetLeadershipSettingsBulkResults
)
19884 async def Read(self
, entities
):
19886 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19887 Returns -> typing.Sequence<+T_co>[~GetLeadershipSettingsResult]<~GetLeadershipSettingsResult>
19889 # map input types to rpc msg
19891 msg
= dict(type='Uniter', request
='Read', version
=4, params
=params
)
19892 params
['entities'] = entities
19893 reply
= await self
.rpc(msg
)
19898 @ReturnMapping(SettingsResults
)
19899 async def ReadRemoteSettings(self
, relation_unit_pairs
):
19901 relation_unit_pairs : typing.Sequence<+T_co>[~RelationUnitPair]<~RelationUnitPair>
19902 Returns -> typing.Sequence<+T_co>[~SettingsResult]<~SettingsResult>
19904 # map input types to rpc msg
19906 msg
= dict(type='Uniter', request
='ReadRemoteSettings', version
=4, params
=params
)
19907 params
['relation-unit-pairs'] = relation_unit_pairs
19908 reply
= await self
.rpc(msg
)
19913 @ReturnMapping(SettingsResults
)
19914 async def ReadSettings(self
, relation_units
):
19916 relation_units : typing.Sequence<+T_co>[~RelationUnit]<~RelationUnit>
19917 Returns -> typing.Sequence<+T_co>[~SettingsResult]<~SettingsResult>
19919 # map input types to rpc msg
19921 msg
= dict(type='Uniter', request
='ReadSettings', version
=4, params
=params
)
19922 params
['relation-units'] = relation_units
19923 reply
= await self
.rpc(msg
)
19928 @ReturnMapping(RelationResults
)
19929 async def Relation(self
, relation_units
):
19931 relation_units : typing.Sequence<+T_co>[~RelationUnit]<~RelationUnit>
19932 Returns -> typing.Sequence<+T_co>[~RelationResult]<~RelationResult>
19934 # map input types to rpc msg
19936 msg
= dict(type='Uniter', request
='Relation', version
=4, params
=params
)
19937 params
['relation-units'] = relation_units
19938 reply
= await self
.rpc(msg
)
19943 @ReturnMapping(RelationResults
)
19944 async def RelationById(self
, relation_ids
):
19946 relation_ids : typing.Sequence<+T_co>[int]
19947 Returns -> typing.Sequence<+T_co>[~RelationResult]<~RelationResult>
19949 # map input types to rpc msg
19951 msg
= dict(type='Uniter', request
='RelationById', version
=4, params
=params
)
19952 params
['relation-ids'] = relation_ids
19953 reply
= await self
.rpc(msg
)
19958 @ReturnMapping(ErrorResults
)
19959 async def RemoveStorageAttachments(self
, ids
):
19961 ids : typing.Sequence<+T_co>[~StorageAttachmentId]<~StorageAttachmentId>
19962 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
19964 # map input types to rpc msg
19966 msg
= dict(type='Uniter', request
='RemoveStorageAttachments', version
=4, params
=params
)
19967 params
['ids'] = ids
19968 reply
= await self
.rpc(msg
)
19973 @ReturnMapping(ErrorResults
)
19974 async def RequestReboot(self
, entities
):
19976 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19977 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
19979 # map input types to rpc msg
19981 msg
= dict(type='Uniter', request
='RequestReboot', version
=4, params
=params
)
19982 params
['entities'] = entities
19983 reply
= await self
.rpc(msg
)
19988 @ReturnMapping(ResolvedModeResults
)
19989 async def Resolved(self
, entities
):
19991 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
19992 Returns -> typing.Sequence<+T_co>[~ResolvedModeResult]<~ResolvedModeResult>
19994 # map input types to rpc msg
19996 msg
= dict(type='Uniter', request
='Resolved', version
=4, params
=params
)
19997 params
['entities'] = entities
19998 reply
= await self
.rpc(msg
)
20003 @ReturnMapping(ErrorResults
)
20004 async def SetAgentStatus(self
, entities
):
20006 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
20007 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20009 # map input types to rpc msg
20011 msg
= dict(type='Uniter', request
='SetAgentStatus', version
=4, params
=params
)
20012 params
['entities'] = entities
20013 reply
= await self
.rpc(msg
)
20018 @ReturnMapping(ErrorResults
)
20019 async def SetApplicationStatus(self
, entities
):
20021 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
20022 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20024 # map input types to rpc msg
20026 msg
= dict(type='Uniter', request
='SetApplicationStatus', version
=4, params
=params
)
20027 params
['entities'] = entities
20028 reply
= await self
.rpc(msg
)
20033 @ReturnMapping(ErrorResults
)
20034 async def SetCharmURL(self
, entities
):
20036 entities : typing.Sequence<+T_co>[~EntityCharmURL]<~EntityCharmURL>
20037 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20039 # map input types to rpc msg
20041 msg
= dict(type='Uniter', request
='SetCharmURL', version
=4, params
=params
)
20042 params
['entities'] = entities
20043 reply
= await self
.rpc(msg
)
20048 @ReturnMapping(ErrorResults
)
20049 async def SetStatus(self
, entities
):
20051 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
20052 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20054 # map input types to rpc msg
20056 msg
= dict(type='Uniter', request
='SetStatus', version
=4, params
=params
)
20057 params
['entities'] = entities
20058 reply
= await self
.rpc(msg
)
20063 @ReturnMapping(ErrorResults
)
20064 async def SetUnitStatus(self
, entities
):
20066 entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
20067 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20069 # map input types to rpc msg
20071 msg
= dict(type='Uniter', request
='SetUnitStatus', version
=4, params
=params
)
20072 params
['entities'] = entities
20073 reply
= await self
.rpc(msg
)
20078 @ReturnMapping(ErrorResults
)
20079 async def SetWorkloadVersion(self
, entities
):
20081 entities : typing.Sequence<+T_co>[~EntityWorkloadVersion]<~EntityWorkloadVersion>
20082 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20084 # map input types to rpc msg
20086 msg
= dict(type='Uniter', request
='SetWorkloadVersion', version
=4, params
=params
)
20087 params
['entities'] = entities
20088 reply
= await self
.rpc(msg
)
20093 @ReturnMapping(LifeResults
)
20094 async def StorageAttachmentLife(self
, ids
):
20096 ids : typing.Sequence<+T_co>[~StorageAttachmentId]<~StorageAttachmentId>
20097 Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
20099 # map input types to rpc msg
20101 msg
= dict(type='Uniter', request
='StorageAttachmentLife', version
=4, params
=params
)
20102 params
['ids'] = ids
20103 reply
= await self
.rpc(msg
)
20108 @ReturnMapping(StorageAttachmentResults
)
20109 async def StorageAttachments(self
, ids
):
20111 ids : typing.Sequence<+T_co>[~StorageAttachmentId]<~StorageAttachmentId>
20112 Returns -> typing.Sequence<+T_co>[~StorageAttachmentResult]<~StorageAttachmentResult>
20114 # map input types to rpc msg
20116 msg
= dict(type='Uniter', request
='StorageAttachments', version
=4, params
=params
)
20117 params
['ids'] = ids
20118 reply
= await self
.rpc(msg
)
20123 @ReturnMapping(StatusResults
)
20124 async def UnitStatus(self
, entities
):
20126 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20127 Returns -> typing.Sequence<+T_co>[~StatusResult]<~StatusResult>
20129 # map input types to rpc msg
20131 msg
= dict(type='Uniter', request
='UnitStatus', version
=4, params
=params
)
20132 params
['entities'] = entities
20133 reply
= await self
.rpc(msg
)
20138 @ReturnMapping(StorageAttachmentIdsResults
)
20139 async def UnitStorageAttachments(self
, entities
):
20141 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20142 Returns -> typing.Sequence<+T_co>[~StorageAttachmentIdsResult]<~StorageAttachmentIdsResult>
20144 # map input types to rpc msg
20146 msg
= dict(type='Uniter', request
='UnitStorageAttachments', version
=4, params
=params
)
20147 params
['entities'] = entities
20148 reply
= await self
.rpc(msg
)
20153 @ReturnMapping(ErrorResults
)
20154 async def UpdateSettings(self
, relation_units
):
20156 relation_units : typing.Sequence<+T_co>[~RelationUnitSettings]<~RelationUnitSettings>
20157 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20159 # map input types to rpc msg
20161 msg
= dict(type='Uniter', request
='UpdateSettings', version
=4, params
=params
)
20162 params
['relation-units'] = relation_units
20163 reply
= await self
.rpc(msg
)
20168 @ReturnMapping(NotifyWatchResults
)
20169 async def Watch(self
, entities
):
20171 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20172 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
20174 # map input types to rpc msg
20176 msg
= dict(type='Uniter', request
='Watch', version
=4, params
=params
)
20177 params
['entities'] = entities
20178 reply
= await self
.rpc(msg
)
20183 @ReturnMapping(NotifyWatchResult
)
20184 async def WatchAPIHostPorts(self
):
20187 Returns -> typing.Union[str, _ForwardRef('Error')]
20189 # map input types to rpc msg
20191 msg
= dict(type='Uniter', request
='WatchAPIHostPorts', version
=4, params
=params
)
20193 reply
= await self
.rpc(msg
)
20198 @ReturnMapping(StringsWatchResults
)
20199 async def WatchActionNotifications(self
, entities
):
20201 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20202 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
20204 # map input types to rpc msg
20206 msg
= dict(type='Uniter', request
='WatchActionNotifications', version
=4, params
=params
)
20207 params
['entities'] = entities
20208 reply
= await self
.rpc(msg
)
20213 @ReturnMapping(StringsWatchResults
)
20214 async def WatchApplicationRelations(self
, entities
):
20216 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20217 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
20219 # map input types to rpc msg
20221 msg
= dict(type='Uniter', request
='WatchApplicationRelations', version
=4, params
=params
)
20222 params
['entities'] = entities
20223 reply
= await self
.rpc(msg
)
20228 @ReturnMapping(NotifyWatchResults
)
20229 async def WatchConfigSettings(self
, entities
):
20231 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20232 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
20234 # map input types to rpc msg
20236 msg
= dict(type='Uniter', request
='WatchConfigSettings', version
=4, params
=params
)
20237 params
['entities'] = entities
20238 reply
= await self
.rpc(msg
)
20243 @ReturnMapping(NotifyWatchResult
)
20244 async def WatchForModelConfigChanges(self
):
20247 Returns -> typing.Union[str, _ForwardRef('Error')]
20249 # map input types to rpc msg
20251 msg
= dict(type='Uniter', request
='WatchForModelConfigChanges', version
=4, params
=params
)
20253 reply
= await self
.rpc(msg
)
20258 @ReturnMapping(NotifyWatchResults
)
20259 async def WatchLeadershipSettings(self
, entities
):
20261 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20262 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
20264 # map input types to rpc msg
20266 msg
= dict(type='Uniter', request
='WatchLeadershipSettings', version
=4, params
=params
)
20267 params
['entities'] = entities
20268 reply
= await self
.rpc(msg
)
20273 @ReturnMapping(NotifyWatchResults
)
20274 async def WatchMeterStatus(self
, entities
):
20276 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20277 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
20279 # map input types to rpc msg
20281 msg
= dict(type='Uniter', request
='WatchMeterStatus', version
=4, params
=params
)
20282 params
['entities'] = entities
20283 reply
= await self
.rpc(msg
)
20288 @ReturnMapping(RelationUnitsWatchResults
)
20289 async def WatchRelationUnits(self
, relation_units
):
20291 relation_units : typing.Sequence<+T_co>[~RelationUnit]<~RelationUnit>
20292 Returns -> typing.Sequence<+T_co>[~RelationUnitsWatchResult]<~RelationUnitsWatchResult>
20294 # map input types to rpc msg
20296 msg
= dict(type='Uniter', request
='WatchRelationUnits', version
=4, params
=params
)
20297 params
['relation-units'] = relation_units
20298 reply
= await self
.rpc(msg
)
20303 @ReturnMapping(NotifyWatchResults
)
20304 async def WatchStorageAttachments(self
, ids
):
20306 ids : typing.Sequence<+T_co>[~StorageAttachmentId]<~StorageAttachmentId>
20307 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
20309 # map input types to rpc msg
20311 msg
= dict(type='Uniter', request
='WatchStorageAttachments', version
=4, params
=params
)
20312 params
['ids'] = ids
20313 reply
= await self
.rpc(msg
)
20318 @ReturnMapping(NotifyWatchResults
)
20319 async def WatchUnitAddresses(self
, entities
):
20321 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20322 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
20324 # map input types to rpc msg
20326 msg
= dict(type='Uniter', request
='WatchUnitAddresses', version
=4, params
=params
)
20327 params
['entities'] = entities
20328 reply
= await self
.rpc(msg
)
20333 @ReturnMapping(StringsWatchResults
)
20334 async def WatchUnitStorageAttachments(self
, entities
):
20336 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20337 Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
20339 # map input types to rpc msg
20341 msg
= dict(type='Uniter', request
='WatchUnitStorageAttachments', version
=4, params
=params
)
20342 params
['entities'] = entities
20343 reply
= await self
.rpc(msg
)
20348 @ReturnMapping(StringResults
)
20349 async def WorkloadVersion(self
, entities
):
20351 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20352 Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
20354 # map input types to rpc msg
20356 msg
= dict(type='Uniter', request
='WorkloadVersion', version
=4, params
=params
)
20357 params
['entities'] = entities
20358 reply
= await self
.rpc(msg
)
20362 class UpgraderFacade(Type
):
20365 schema
= {'definitions': {'Binary': {'additionalProperties': False,
20366 'properties': {'Arch': {'type': 'string'},
20367 'Number': {'$ref': '#/definitions/Number'},
20368 'Series': {'type': 'string'}},
20369 'required': ['Number', 'Series', 'Arch'],
20371 'Entities': {'additionalProperties': False,
20372 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
20374 'required': ['entities'],
20376 'EntitiesVersion': {'additionalProperties': False,
20377 'properties': {'agent-tools': {'items': {'$ref': '#/definitions/EntityVersion'},
20379 'required': ['agent-tools'],
20381 'Entity': {'additionalProperties': False,
20382 'properties': {'tag': {'type': 'string'}},
20383 'required': ['tag'],
20385 'EntityVersion': {'additionalProperties': False,
20386 'properties': {'tag': {'type': 'string'},
20387 'tools': {'$ref': '#/definitions/Version'}},
20388 'required': ['tag', 'tools'],
20390 'Error': {'additionalProperties': False,
20391 'properties': {'code': {'type': 'string'},
20392 'info': {'$ref': '#/definitions/ErrorInfo'},
20393 'message': {'type': 'string'}},
20394 'required': ['message', 'code'],
20396 'ErrorInfo': {'additionalProperties': False,
20397 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
20398 'macaroon-path': {'type': 'string'}},
20400 'ErrorResult': {'additionalProperties': False,
20401 'properties': {'error': {'$ref': '#/definitions/Error'}},
20403 'ErrorResults': {'additionalProperties': False,
20404 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
20406 'required': ['results'],
20408 'Macaroon': {'additionalProperties': False, 'type': 'object'},
20409 'NotifyWatchResult': {'additionalProperties': False,
20410 'properties': {'NotifyWatcherId': {'type': 'string'},
20411 'error': {'$ref': '#/definitions/Error'}},
20412 'required': ['NotifyWatcherId'],
20414 'NotifyWatchResults': {'additionalProperties': False,
20415 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
20417 'required': ['results'],
20419 'Number': {'additionalProperties': False,
20420 'properties': {'Build': {'type': 'integer'},
20421 'Major': {'type': 'integer'},
20422 'Minor': {'type': 'integer'},
20423 'Patch': {'type': 'integer'},
20424 'Tag': {'type': 'string'}},
20425 'required': ['Major',
20431 'Tools': {'additionalProperties': False,
20432 'properties': {'sha256': {'type': 'string'},
20433 'size': {'type': 'integer'},
20434 'url': {'type': 'string'},
20435 'version': {'$ref': '#/definitions/Binary'}},
20436 'required': ['version', 'url', 'size'],
20438 'ToolsResult': {'additionalProperties': False,
20439 'properties': {'disable-ssl-hostname-verification': {'type': 'boolean'},
20440 'error': {'$ref': '#/definitions/Error'},
20441 'tools': {'items': {'$ref': '#/definitions/Tools'},
20443 'required': ['tools',
20444 'disable-ssl-hostname-verification'],
20446 'ToolsResults': {'additionalProperties': False,
20447 'properties': {'results': {'items': {'$ref': '#/definitions/ToolsResult'},
20449 'required': ['results'],
20451 'Version': {'additionalProperties': False,
20452 'properties': {'version': {'$ref': '#/definitions/Binary'}},
20453 'required': ['version'],
20455 'VersionResult': {'additionalProperties': False,
20456 'properties': {'error': {'$ref': '#/definitions/Error'},
20457 'version': {'$ref': '#/definitions/Number'}},
20459 'VersionResults': {'additionalProperties': False,
20460 'properties': {'results': {'items': {'$ref': '#/definitions/VersionResult'},
20462 'required': ['results'],
20463 'type': 'object'}},
20464 'properties': {'DesiredVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
20465 'Result': {'$ref': '#/definitions/VersionResults'}},
20467 'SetTools': {'properties': {'Params': {'$ref': '#/definitions/EntitiesVersion'},
20468 'Result': {'$ref': '#/definitions/ErrorResults'}},
20470 'Tools': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
20471 'Result': {'$ref': '#/definitions/ToolsResults'}},
20473 'WatchAPIVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
20474 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
20475 'type': 'object'}},
20479 @ReturnMapping(VersionResults
)
20480 async def DesiredVersion(self
, entities
):
20482 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20483 Returns -> typing.Sequence<+T_co>[~VersionResult]<~VersionResult>
20485 # map input types to rpc msg
20487 msg
= dict(type='Upgrader', request
='DesiredVersion', version
=1, params
=params
)
20488 params
['entities'] = entities
20489 reply
= await self
.rpc(msg
)
20494 @ReturnMapping(ErrorResults
)
20495 async def SetTools(self
, agent_tools
):
20497 agent_tools : typing.Sequence<+T_co>[~EntityVersion]<~EntityVersion>
20498 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20500 # map input types to rpc msg
20502 msg
= dict(type='Upgrader', request
='SetTools', version
=1, params
=params
)
20503 params
['agent-tools'] = agent_tools
20504 reply
= await self
.rpc(msg
)
20509 @ReturnMapping(ToolsResults
)
20510 async def Tools(self
, entities
):
20512 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20513 Returns -> typing.Sequence<+T_co>[~ToolsResult]<~ToolsResult>
20515 # map input types to rpc msg
20517 msg
= dict(type='Upgrader', request
='Tools', version
=1, params
=params
)
20518 params
['entities'] = entities
20519 reply
= await self
.rpc(msg
)
20524 @ReturnMapping(NotifyWatchResults
)
20525 async def WatchAPIVersion(self
, entities
):
20527 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20528 Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
20530 # map input types to rpc msg
20532 msg
= dict(type='Upgrader', request
='WatchAPIVersion', version
=1, params
=params
)
20533 params
['entities'] = entities
20534 reply
= await self
.rpc(msg
)
20538 class UserManagerFacade(Type
):
20539 name
= 'UserManager'
20541 schema
= {'definitions': {'AddUser': {'additionalProperties': False,
20542 'properties': {'display-name': {'type': 'string'},
20543 'password': {'type': 'string'},
20544 'username': {'type': 'string'}},
20545 'required': ['username', 'display-name'],
20547 'AddUserResult': {'additionalProperties': False,
20548 'properties': {'error': {'$ref': '#/definitions/Error'},
20549 'secret-key': {'items': {'type': 'integer'},
20551 'tag': {'type': 'string'}},
20553 'AddUserResults': {'additionalProperties': False,
20554 'properties': {'results': {'items': {'$ref': '#/definitions/AddUserResult'},
20556 'required': ['results'],
20558 'AddUsers': {'additionalProperties': False,
20559 'properties': {'users': {'items': {'$ref': '#/definitions/AddUser'},
20561 'required': ['users'],
20563 'Entities': {'additionalProperties': False,
20564 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
20566 'required': ['entities'],
20568 'Entity': {'additionalProperties': False,
20569 'properties': {'tag': {'type': 'string'}},
20570 'required': ['tag'],
20572 'EntityPassword': {'additionalProperties': False,
20573 'properties': {'password': {'type': 'string'},
20574 'tag': {'type': 'string'}},
20575 'required': ['tag', 'password'],
20577 'EntityPasswords': {'additionalProperties': False,
20578 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'},
20580 'required': ['changes'],
20582 'Error': {'additionalProperties': False,
20583 'properties': {'code': {'type': 'string'},
20584 'info': {'$ref': '#/definitions/ErrorInfo'},
20585 'message': {'type': 'string'}},
20586 'required': ['message', 'code'],
20588 'ErrorInfo': {'additionalProperties': False,
20589 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
20590 'macaroon-path': {'type': 'string'}},
20592 'ErrorResult': {'additionalProperties': False,
20593 'properties': {'error': {'$ref': '#/definitions/Error'}},
20595 'ErrorResults': {'additionalProperties': False,
20596 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
20598 'required': ['results'],
20600 'Macaroon': {'additionalProperties': False, 'type': 'object'},
20601 'MacaroonResult': {'additionalProperties': False,
20602 'properties': {'error': {'$ref': '#/definitions/Error'},
20603 'result': {'$ref': '#/definitions/Macaroon'}},
20605 'MacaroonResults': {'additionalProperties': False,
20606 'properties': {'results': {'items': {'$ref': '#/definitions/MacaroonResult'},
20608 'required': ['results'],
20610 'UserInfo': {'additionalProperties': False,
20611 'properties': {'access': {'type': 'string'},
20612 'created-by': {'type': 'string'},
20613 'date-created': {'format': 'date-time',
20615 'disabled': {'type': 'boolean'},
20616 'display-name': {'type': 'string'},
20617 'last-connection': {'format': 'date-time',
20619 'username': {'type': 'string'}},
20620 'required': ['username',
20627 'UserInfoRequest': {'additionalProperties': False,
20628 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
20630 'include-disabled': {'type': 'boolean'}},
20631 'required': ['entities',
20632 'include-disabled'],
20634 'UserInfoResult': {'additionalProperties': False,
20635 'properties': {'error': {'$ref': '#/definitions/Error'},
20636 'result': {'$ref': '#/definitions/UserInfo'}},
20638 'UserInfoResults': {'additionalProperties': False,
20639 'properties': {'results': {'items': {'$ref': '#/definitions/UserInfoResult'},
20641 'required': ['results'],
20642 'type': 'object'}},
20643 'properties': {'AddUser': {'properties': {'Params': {'$ref': '#/definitions/AddUsers'},
20644 'Result': {'$ref': '#/definitions/AddUserResults'}},
20646 'CreateLocalLoginMacaroon': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
20647 'Result': {'$ref': '#/definitions/MacaroonResults'}},
20649 'DisableUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
20650 'Result': {'$ref': '#/definitions/ErrorResults'}},
20652 'EnableUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
20653 'Result': {'$ref': '#/definitions/ErrorResults'}},
20655 'RemoveUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
20656 'Result': {'$ref': '#/definitions/ErrorResults'}},
20658 'SetPassword': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
20659 'Result': {'$ref': '#/definitions/ErrorResults'}},
20661 'UserInfo': {'properties': {'Params': {'$ref': '#/definitions/UserInfoRequest'},
20662 'Result': {'$ref': '#/definitions/UserInfoResults'}},
20663 'type': 'object'}},
20667 @ReturnMapping(AddUserResults
)
20668 async def AddUser(self
, users
):
20670 users : typing.Sequence<+T_co>[~AddUser]<~AddUser>
20671 Returns -> typing.Sequence<+T_co>[~AddUserResult]<~AddUserResult>
20673 # map input types to rpc msg
20675 msg
= dict(type='UserManager', request
='AddUser', version
=1, params
=params
)
20676 params
['users'] = users
20677 reply
= await self
.rpc(msg
)
20682 @ReturnMapping(MacaroonResults
)
20683 async def CreateLocalLoginMacaroon(self
, entities
):
20685 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20686 Returns -> typing.Sequence<+T_co>[~MacaroonResult]<~MacaroonResult>
20688 # map input types to rpc msg
20690 msg
= dict(type='UserManager', request
='CreateLocalLoginMacaroon', version
=1, params
=params
)
20691 params
['entities'] = entities
20692 reply
= await self
.rpc(msg
)
20697 @ReturnMapping(ErrorResults
)
20698 async def DisableUser(self
, entities
):
20700 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20701 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20703 # map input types to rpc msg
20705 msg
= dict(type='UserManager', request
='DisableUser', version
=1, params
=params
)
20706 params
['entities'] = entities
20707 reply
= await self
.rpc(msg
)
20712 @ReturnMapping(ErrorResults
)
20713 async def EnableUser(self
, entities
):
20715 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20716 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20718 # map input types to rpc msg
20720 msg
= dict(type='UserManager', request
='EnableUser', version
=1, params
=params
)
20721 params
['entities'] = entities
20722 reply
= await self
.rpc(msg
)
20727 @ReturnMapping(ErrorResults
)
20728 async def RemoveUser(self
, entities
):
20730 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20731 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20733 # map input types to rpc msg
20735 msg
= dict(type='UserManager', request
='RemoveUser', version
=1, params
=params
)
20736 params
['entities'] = entities
20737 reply
= await self
.rpc(msg
)
20742 @ReturnMapping(ErrorResults
)
20743 async def SetPassword(self
, changes
):
20745 changes : typing.Sequence<+T_co>[~EntityPassword]<~EntityPassword>
20746 Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
20748 # map input types to rpc msg
20750 msg
= dict(type='UserManager', request
='SetPassword', version
=1, params
=params
)
20751 params
['changes'] = changes
20752 reply
= await self
.rpc(msg
)
20757 @ReturnMapping(UserInfoResults
)
20758 async def UserInfo(self
, entities
, include_disabled
):
20760 entities : typing.Sequence<+T_co>[~Entity]<~Entity>
20761 include_disabled : bool
20762 Returns -> typing.Sequence<+T_co>[~UserInfoResult]<~UserInfoResult>
20764 # map input types to rpc msg
20766 msg
= dict(type='UserManager', request
='UserInfo', version
=1, params
=params
)
20767 params
['entities'] = entities
20768 params
['include-disabled'] = include_disabled
20769 reply
= await self
.rpc(msg
)
20773 class VolumeAttachmentsWatcherFacade(Type
):
20774 name
= 'VolumeAttachmentsWatcher'
20776 schema
= {'definitions': {'Error': {'additionalProperties': False,
20777 'properties': {'code': {'type': 'string'},
20778 'info': {'$ref': '#/definitions/ErrorInfo'},
20779 'message': {'type': 'string'}},
20780 'required': ['message', 'code'],
20782 'ErrorInfo': {'additionalProperties': False,
20783 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
20784 'macaroon-path': {'type': 'string'}},
20786 'Macaroon': {'additionalProperties': False, 'type': 'object'},
20787 'MachineStorageId': {'additionalProperties': False,
20788 'properties': {'attachment-tag': {'type': 'string'},
20789 'machine-tag': {'type': 'string'}},
20790 'required': ['machine-tag',
20793 'MachineStorageIdsWatchResult': {'additionalProperties': False,
20794 'properties': {'changes': {'items': {'$ref': '#/definitions/MachineStorageId'},
20796 'error': {'$ref': '#/definitions/Error'},
20797 'watcher-id': {'type': 'string'}},
20798 'required': ['watcher-id',
20800 'type': 'object'}},
20801 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResult'}},
20803 'Stop': {'type': 'object'}},
20807 @ReturnMapping(MachineStorageIdsWatchResult
)
20808 async def Next(self
):
20811 Returns -> typing.Union[typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>, _ForwardRef('Error')]
20813 # map input types to rpc msg
20815 msg
= dict(type='VolumeAttachmentsWatcher', request
='Next', version
=2, params
=params
)
20817 reply
= await self
.rpc(msg
)
20822 @ReturnMapping(None)
20823 async def Stop(self
):
20828 # map input types to rpc msg
20830 msg
= dict(type='VolumeAttachmentsWatcher', request
='Stop', version
=2, params
=params
)
20832 reply
= await self
.rpc(msg
)