X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=juju%2Fclient%2F_client.py;h=b2f1682ce604c936265a2f986af44fcdcff759f7;hb=1bd3bd858aaf21ecccc64134c536d105c10b0d7e;hp=68dd8bf76a2dc84822ce6cc0bbc457813900d130;hpb=7d8aa55bcfc13519a9b37b49e4d7a542f0adcd43;p=osm%2FN2VC.git diff --git a/juju/client/_client.py b/juju/client/_client.py index 68dd8bf..b2f1682 100644 --- a/juju/client/_client.py +++ b/juju/client/_client.py @@ -5,12 +5,12 @@ from juju.client.facade import Type, ReturnMapping class Action(Type): - _toSchema = {'receiver': 'receiver', 'tag': 'tag', 'parameters': 'parameters', 'name': 'name'} - _toPy = {'receiver': 'receiver', 'tag': 'tag', 'parameters': 'parameters', 'name': 'name'} + _toSchema = {'name': 'name', 'receiver': 'receiver', 'tag': 'tag', 'parameters': 'parameters'} + _toPy = {'name': 'name', 'receiver': 'receiver', 'tag': 'tag', 'parameters': 'parameters'} def __init__(self, name=None, parameters=None, receiver=None, tag=None): ''' name : str - parameters : typing.Mapping[str, typing.Any] + parameters : typing.Mapping<~KT, +VT_co>[str, typing.Any] receiver : str tag : str ''' @@ -21,8 +21,8 @@ class Action(Type): class ActionResult(Type): - _toSchema = {'action': 'action', 'completed': 'completed', 'output': 'output', 'status': 'status', 'started': 'started', 'message': 'message', 'enqueued': 'enqueued', 'error': 'error'} - _toPy = {'action': 'action', 'completed': 'completed', 'output': 'output', 'status': 'status', 'started': 'started', 'message': 'message', 'enqueued': 'enqueued', 'error': 'error'} + _toSchema = {'started': 'started', 'error': 'error', 'message': 'message', 'status': 'status', 'enqueued': 'enqueued', 'action': 'action', 'completed': 'completed', 'output': 'output'} + _toPy = {'started': 'started', 'error': 'error', 'message': 'message', 'status': 'status', 'enqueued': 'enqueued', 'action': 'action', 'completed': 'completed', 'output': 'output'} def __init__(self, action=None, completed=None, enqueued=None, error=None, message=None, output=None, started=None, status=None): ''' action : Action @@ -30,7 +30,7 @@ class ActionResult(Type): enqueued : str error : Error message : str - output : typing.Mapping[str, typing.Any] + output : typing.Mapping<~KT, +VT_co>[str, typing.Any] started : str status : str ''' @@ -49,27 +49,39 @@ class ActionResults(Type): _toPy = {'results': 'results'} def __init__(self, results=None): ''' - results : typing.Sequence[~ActionResult] + results : typing.Sequence<+T_co>[~ActionResult]<~ActionResult> ''' self.results = [ActionResult.from_json(o) for o in results or []] +class ActionSpec(Type): + _toSchema = {'description': 'description', 'params': 'params'} + _toPy = {'description': 'description', 'params': 'params'} + def __init__(self, description=None, params=None): + ''' + description : str + params : typing.Mapping<~KT, +VT_co>[str, typing.Any] + ''' + self.description = description + self.params = params + + class Actions(Type): _toSchema = {'actions': 'actions'} _toPy = {'actions': 'actions'} def __init__(self, actions=None): ''' - actions : typing.Sequence[~Action] + actions : typing.Sequence<+T_co>[~Action]<~Action> ''' self.actions = [Action.from_json(o) for o in actions or []] class ActionsByName(Type): - _toSchema = {'actions': 'actions', 'error': 'error', 'name': 'name'} - _toPy = {'actions': 'actions', 'error': 'error', 'name': 'name'} + _toSchema = {'name': 'name', 'actions': 'actions', 'error': 'error'} + _toPy = {'name': 'name', 'actions': 'actions', 'error': 'error'} def __init__(self, actions=None, error=None, name=None): ''' - actions : typing.Sequence[~ActionResult] + actions : typing.Sequence<+T_co>[~ActionResult]<~ActionResult> error : Error name : str ''' @@ -83,17 +95,17 @@ class ActionsByNames(Type): _toPy = {'actions': 'actions'} def __init__(self, actions=None): ''' - actions : typing.Sequence[~ActionsByName] + actions : typing.Sequence<+T_co>[~ActionsByName]<~ActionsByName> ''' self.actions = [ActionsByName.from_json(o) for o in actions or []] class ActionsByReceiver(Type): - _toSchema = {'actions': 'actions', 'receiver': 'receiver', 'error': 'error'} - _toPy = {'actions': 'actions', 'receiver': 'receiver', 'error': 'error'} + _toSchema = {'receiver': 'receiver', 'actions': 'actions', 'error': 'error'} + _toPy = {'receiver': 'receiver', 'actions': 'actions', 'error': 'error'} def __init__(self, actions=None, error=None, receiver=None): ''' - actions : typing.Sequence[~ActionResult] + actions : typing.Sequence<+T_co>[~ActionResult]<~ActionResult> error : Error receiver : str ''' @@ -107,24 +119,48 @@ class ActionsByReceivers(Type): _toPy = {'actions': 'actions'} def __init__(self, actions=None): ''' - actions : typing.Sequence[~ActionsByReceiver] + actions : typing.Sequence<+T_co>[~ActionsByReceiver]<~ActionsByReceiver> ''' self.actions = [ActionsByReceiver.from_json(o) for o in actions or []] +class ApplicationCharmActionsResult(Type): + _toSchema = {'error': 'error', 'actions': 'actions', 'application_tag': 'application-tag'} + _toPy = {'application-tag': 'application_tag', 'actions': 'actions', 'error': 'error'} + def __init__(self, actions=None, application_tag=None, error=None): + ''' + actions : typing.Mapping<~KT, +VT_co>[str, ~ActionSpec]<~ActionSpec> + application_tag : str + error : Error + ''' + self.actions = actions + self.application_tag = application_tag + self.error = Error.from_json(error) if error else None + + +class ApplicationsCharmActionsResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence<+T_co>[~ApplicationCharmActionsResult]<~ApplicationCharmActionsResult> + ''' + self.results = [ApplicationCharmActionsResult.from_json(o) for o in results or []] + + class Entities(Type): - _toSchema = {'entities': 'Entities'} - _toPy = {'Entities': 'entities'} + _toSchema = {'entities': 'entities'} + _toPy = {'entities': 'entities'} def __init__(self, entities=None): ''' - entities : typing.Sequence[~Entity] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> ''' self.entities = [Entity.from_json(o) for o in entities or []] class Entity(Type): - _toSchema = {'tag': 'Tag'} - _toPy = {'Tag': 'tag'} + _toSchema = {'tag': 'tag'} + _toPy = {'tag': 'tag'} def __init__(self, tag=None): ''' tag : str @@ -133,8 +169,8 @@ class Entity(Type): class Error(Type): - _toSchema = {'info': 'Info', 'message': 'Message', 'code': 'Code'} - _toPy = {'Info': 'info', 'Code': 'code', 'Message': 'message'} + _toSchema = {'info': 'info', 'code': 'code', 'message': 'message'} + _toPy = {'info': 'info', 'code': 'code', 'message': 'message'} def __init__(self, code=None, info=None, message=None): ''' code : str @@ -147,15 +183,15 @@ class Error(Type): class ErrorInfo(Type): - _toSchema = {'macaroonpath': 'MacaroonPath', 'macaroon': 'Macaroon'} - _toPy = {'MacaroonPath': 'macaroonpath', 'Macaroon': 'macaroon'} - def __init__(self, macaroon=None, macaroonpath=None): + _toSchema = {'macaroon': 'macaroon', 'macaroon_path': 'macaroon-path'} + _toPy = {'macaroon-path': 'macaroon_path', 'macaroon': 'macaroon'} + def __init__(self, macaroon=None, macaroon_path=None): ''' macaroon : Macaroon - macaroonpath : str + macaroon_path : str ''' self.macaroon = Macaroon.from_json(macaroon) if macaroon else None - self.macaroonpath = macaroonpath + self.macaroon_path = macaroon_path class FindActionsByNames(Type): @@ -163,7 +199,7 @@ class FindActionsByNames(Type): _toPy = {'names': 'names'} def __init__(self, names=None): ''' - names : typing.Sequence[str] + names : typing.Sequence<+T_co>[str] ''' self.names = names @@ -173,7 +209,7 @@ class FindTags(Type): _toPy = {'prefixes': 'prefixes'} def __init__(self, prefixes=None): ''' - prefixes : typing.Sequence[str] + prefixes : typing.Sequence<+T_co>[str] ''' self.prefixes = prefixes @@ -183,168 +219,136 @@ class FindTagsResults(Type): _toPy = {'matches': 'matches'} def __init__(self, matches=None): ''' - matches : typing.Sequence[~Entity] + matches : typing.Sequence<+T_co>[~Entity]<~Entity> ''' self.matches = [Entity.from_json(o) for o in matches or []] class Macaroon(Type): - _toSchema = {'location': 'location', 'caveats': 'caveats', 'sig': 'sig', 'id_': 'id', 'data': 'data'} - _toPy = {'location': 'location', 'caveats': 'caveats', 'sig': 'sig', 'id': 'id_', 'data': 'data'} - def __init__(self, caveats=None, data=None, id_=None, location=None, sig=None): + _toSchema = {} + _toPy = {} + def __init__(self): ''' - caveats : typing.Sequence[~caveat] - data : typing.Sequence[int] - id_ : packet - location : packet - sig : typing.Sequence[int] + ''' - self.caveats = [caveat.from_json(o) for o in caveats or []] - self.data = data - self.id_ = packet.from_json(id_) if id_ else None - self.location = packet.from_json(location) if location else None - self.sig = sig + pass class RunParams(Type): - _toSchema = {'timeout': 'Timeout', 'machines': 'Machines', 'units': 'Units', 'services': 'Services', 'commands': 'Commands'} - _toPy = {'Services': 'services', 'Units': 'units', 'Machines': 'machines', 'Commands': 'commands', 'Timeout': 'timeout'} - def __init__(self, commands=None, machines=None, services=None, timeout=None, units=None): + _toSchema = {'commands': 'commands', 'machines': 'machines', 'units': 'units', 'applications': 'applications', 'timeout': 'timeout'} + _toPy = {'commands': 'commands', 'machines': 'machines', 'units': 'units', 'applications': 'applications', 'timeout': 'timeout'} + def __init__(self, applications=None, commands=None, machines=None, timeout=None, units=None): ''' + applications : typing.Sequence<+T_co>[str] commands : str - machines : typing.Sequence[str] - services : typing.Sequence[str] + machines : typing.Sequence<+T_co>[str] timeout : int - units : typing.Sequence[str] + units : typing.Sequence<+T_co>[str] ''' + self.applications = applications self.commands = commands self.machines = machines - self.services = services self.timeout = timeout self.units = units -class ServiceCharmActionsResult(Type): - _toSchema = {'actions': 'actions', 'error': 'error', 'servicetag': 'servicetag'} - _toPy = {'actions': 'actions', 'error': 'error', 'servicetag': 'servicetag'} - def __init__(self, actions=None, error=None, servicetag=None): +class AgentGetEntitiesResult(Type): + _toSchema = {'life': 'life', 'error': 'error', 'jobs': 'jobs', 'container_type': 'container-type'} + _toPy = {'life': 'life', 'container-type': 'container_type', 'jobs': 'jobs', 'error': 'error'} + def __init__(self, container_type=None, error=None, jobs=None, life=None): ''' - actions : Actions + container_type : str error : Error - servicetag : str + jobs : typing.Sequence<+T_co>[str] + life : str ''' - self.actions = Actions.from_json(actions) if actions else None + self.container_type = container_type self.error = Error.from_json(error) if error else None - self.servicetag = servicetag + self.jobs = jobs + self.life = life -class ServicesCharmActionsResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None): +class AgentGetEntitiesResults(Type): + _toSchema = {'entities': 'entities'} + _toPy = {'entities': 'entities'} + def __init__(self, entities=None): ''' - results : typing.Sequence[~ServiceCharmActionsResult] + entities : typing.Sequence<+T_co>[~AgentGetEntitiesResult]<~AgentGetEntitiesResult> ''' - self.results = [ServiceCharmActionsResult.from_json(o) for o in results or []] + self.entities = [AgentGetEntitiesResult.from_json(o) for o in entities or []] -class caveat(Type): - _toSchema = {'location': 'location', 'caveatid': 'caveatId', 'verificationid': 'verificationId'} - _toPy = {'location': 'location', 'caveatId': 'caveatid', 'verificationId': 'verificationid'} - def __init__(self, caveatid=None, location=None, verificationid=None): +class CloudCredential(Type): + _toSchema = {'auth_type': 'auth-type', 'attrs': 'attrs', 'redacted': 'redacted'} + _toPy = {'auth-type': 'auth_type', 'attrs': 'attrs', 'redacted': 'redacted'} + def __init__(self, attrs=None, auth_type=None, redacted=None): ''' - caveatid : packet - location : packet - verificationid : packet + attrs : typing.Mapping<~KT, +VT_co>[str, str] + auth_type : str + redacted : typing.Sequence<+T_co>[str] ''' - self.caveatid = packet.from_json(caveatid) if caveatid else None - self.location = packet.from_json(location) if location else None - self.verificationid = packet.from_json(verificationid) if verificationid else None + self.attrs = attrs + self.auth_type = auth_type + self.redacted = redacted -class packet(Type): - _toSchema = {'headerlen': 'headerLen', 'start': 'start', 'totallen': 'totalLen'} - _toPy = {'totalLen': 'totallen', 'headerLen': 'headerlen', 'start': 'start'} - def __init__(self, headerlen=None, start=None, totallen=None): +class CloudSpec(Type): + _toSchema = {'type_': 'type', 'identity_endpoint': 'identity-endpoint', 'storage_endpoint': 'storage-endpoint', 'region': 'region', 'name': 'name', 'endpoint': 'endpoint', 'credential': 'credential'} + _toPy = {'region': 'region', 'name': 'name', 'type': 'type_', 'identity-endpoint': 'identity_endpoint', 'endpoint': 'endpoint', 'credential': 'credential', 'storage-endpoint': 'storage_endpoint'} + def __init__(self, credential=None, endpoint=None, identity_endpoint=None, name=None, region=None, storage_endpoint=None, type_=None): ''' - headerlen : int - start : int - totallen : int + credential : CloudCredential + endpoint : str + identity_endpoint : str + name : str + region : str + storage_endpoint : str + type_ : str ''' - self.headerlen = headerlen - self.start = start - self.totallen = totallen + self.credential = CloudCredential.from_json(credential) if credential else None + self.endpoint = endpoint + self.identity_endpoint = identity_endpoint + self.name = name + self.region = region + self.storage_endpoint = storage_endpoint + self.type_ = type_ -class BoolResult(Type): - _toSchema = {'error': 'Error', 'result': 'Result'} - _toPy = {'Error': 'error', 'Result': 'result'} +class CloudSpecResult(Type): + _toSchema = {'result': 'result', 'error': 'error'} + _toPy = {'result': 'result', 'error': 'error'} def __init__(self, error=None, result=None): ''' error : Error - result : bool - ''' - self.error = Error.from_json(error) if error else None - self.result = result - - -class EntitiesWatchResult(Type): - _toSchema = {'changes': 'Changes', 'error': 'Error', 'entitywatcherid': 'EntityWatcherId'} - _toPy = {'Changes': 'changes', 'Error': 'error', 'EntityWatcherId': 'entitywatcherid'} - def __init__(self, changes=None, entitywatcherid=None, error=None): - ''' - changes : typing.Sequence[str] - entitywatcherid : str - error : Error + result : CloudSpec ''' - self.changes = changes - self.entitywatcherid = entitywatcherid self.error = Error.from_json(error) if error else None + self.result = CloudSpec.from_json(result) if result else None -class ErrorResult(Type): - _toSchema = {'info': 'Info', 'message': 'Message', 'code': 'Code'} - _toPy = {'Info': 'info', 'Code': 'code', 'Message': 'message'} - def __init__(self, code=None, info=None, message=None): - ''' - code : str - info : ErrorInfo - message : str - ''' - self.code = code - self.info = ErrorInfo.from_json(info) if info else None - self.message = message - - -class AgentGetEntitiesResult(Type): - _toSchema = {'containertype': 'ContainerType', 'error': 'Error', 'life': 'Life', 'jobs': 'Jobs'} - _toPy = {'Error': 'error', 'Jobs': 'jobs', 'ContainerType': 'containertype', 'Life': 'life'} - def __init__(self, containertype=None, error=None, jobs=None, life=None): +class CloudSpecResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): ''' - containertype : str - error : Error - jobs : typing.Sequence[str] - life : str + results : typing.Sequence<+T_co>[~CloudSpecResult]<~CloudSpecResult> ''' - self.containertype = containertype - self.error = Error.from_json(error) if error else None - self.jobs = jobs - self.life = life + self.results = [CloudSpecResult.from_json(o) for o in results or []] -class AgentGetEntitiesResults(Type): - _toSchema = {'entities': 'Entities'} - _toPy = {'Entities': 'entities'} - def __init__(self, entities=None): +class ControllerConfigResult(Type): + _toSchema = {'config': 'config'} + _toPy = {'config': 'config'} + def __init__(self, config=None): ''' - entities : typing.Sequence[~AgentGetEntitiesResult] + config : typing.Mapping<~KT, +VT_co>[str, typing.Any] ''' - self.entities = [AgentGetEntitiesResult.from_json(o) for o in entities or []] + self.config = config class EntityPassword(Type): - _toSchema = {'password': 'Password', 'tag': 'Tag'} - _toPy = {'Password': 'password', 'Tag': 'tag'} + _toSchema = {'tag': 'tag', 'password': 'password'} + _toPy = {'tag': 'tag', 'password': 'password'} def __init__(self, password=None, tag=None): ''' password : str @@ -355,28 +359,42 @@ class EntityPassword(Type): class EntityPasswords(Type): - _toSchema = {'changes': 'Changes'} - _toPy = {'Changes': 'changes'} + _toSchema = {'changes': 'changes'} + _toPy = {'changes': 'changes'} def __init__(self, changes=None): ''' - changes : typing.Sequence[~EntityPassword] + changes : typing.Sequence<+T_co>[~EntityPassword]<~EntityPassword> ''' self.changes = [EntityPassword.from_json(o) for o in changes or []] +class ErrorResult(Type): + _toSchema = {'info': 'info', 'code': 'code', 'message': 'message'} + _toPy = {'info': 'info', 'code': 'code', 'message': 'message'} + def __init__(self, code=None, info=None, message=None): + ''' + code : str + info : ErrorInfo + message : str + ''' + self.code = code + self.info = ErrorInfo.from_json(info) if info else None + self.message = message + + class ErrorResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} def __init__(self, results=None): ''' - results : typing.Sequence[~ErrorResult] + results : typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' self.results = [ErrorResult.from_json(o) for o in results or []] class IsMasterResult(Type): - _toSchema = {'master': 'Master'} - _toPy = {'Master': 'master'} + _toSchema = {'master': 'master'} + _toPy = {'master': 'master'} def __init__(self, master=None): ''' master : bool @@ -385,65 +403,65 @@ class IsMasterResult(Type): class ModelConfigResult(Type): - _toSchema = {'config': 'Config'} - _toPy = {'Config': 'config'} + _toSchema = {'config': 'config'} + _toPy = {'config': 'config'} def __init__(self, config=None): ''' - config : typing.Mapping[str, typing.Any] + config : typing.Mapping<~KT, +VT_co>[str, typing.Any] ''' self.config = config class NotifyWatchResult(Type): - _toSchema = {'error': 'Error', 'notifywatcherid': 'NotifyWatcherId'} - _toPy = {'Error': 'error', 'NotifyWatcherId': 'notifywatcherid'} - def __init__(self, error=None, notifywatcherid=None): + _toSchema = {'notifywatcherid': 'NotifyWatcherId', 'error': 'error'} + _toPy = {'NotifyWatcherId': 'notifywatcherid', 'error': 'error'} + def __init__(self, notifywatcherid=None, error=None): ''' - error : Error notifywatcherid : str + error : Error ''' - self.error = Error.from_json(error) if error else None self.notifywatcherid = notifywatcherid + self.error = Error.from_json(error) if error else None class StateServingInfo(Type): - _toSchema = {'sharedsecret': 'SharedSecret', 'caprivatekey': 'CAPrivateKey', 'stateport': 'StatePort', 'cert': 'Cert', 'apiport': 'APIPort', 'privatekey': 'PrivateKey', 'systemidentity': 'SystemIdentity'} - _toPy = {'StatePort': 'stateport', 'APIPort': 'apiport', 'CAPrivateKey': 'caprivatekey', 'PrivateKey': 'privatekey', 'SystemIdentity': 'systemidentity', 'Cert': 'cert', 'SharedSecret': 'sharedsecret'} - def __init__(self, apiport=None, caprivatekey=None, cert=None, privatekey=None, sharedsecret=None, stateport=None, systemidentity=None): + _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'} + _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'} + def __init__(self, api_port=None, ca_private_key=None, cert=None, private_key=None, shared_secret=None, state_port=None, system_identity=None): ''' - apiport : int - caprivatekey : str + api_port : int + ca_private_key : str cert : str - privatekey : str - sharedsecret : str - stateport : int - systemidentity : str + private_key : str + shared_secret : str + state_port : int + system_identity : str ''' - self.apiport = apiport - self.caprivatekey = caprivatekey + self.api_port = api_port + self.ca_private_key = ca_private_key self.cert = cert - self.privatekey = privatekey - self.sharedsecret = sharedsecret - self.stateport = stateport - self.systemidentity = systemidentity + self.private_key = private_key + self.shared_secret = shared_secret + self.state_port = state_port + self.system_identity = system_identity class AllWatcherNextResults(Type): - _toSchema = {'deltas': 'Deltas'} - _toPy = {'Deltas': 'deltas'} + _toSchema = {'deltas': 'deltas'} + _toPy = {'deltas': 'deltas'} def __init__(self, deltas=None): ''' - deltas : typing.Sequence[~Delta] + deltas : typing.Sequence<+T_co>[~Delta]<~Delta> ''' self.deltas = [Delta.from_json(o) for o in deltas or []] class Delta(Type): - _toSchema = {'removed': 'Removed', 'entity': 'Entity'} - _toPy = {'Removed': 'removed', 'Entity': 'entity'} + _toSchema = {'entity': 'entity', 'removed': 'removed'} + _toPy = {'entity': 'entity', 'removed': 'removed'} def __init__(self, entity=None, removed=None): ''' - entity : typing.Mapping[str, typing.Any] + entity : typing.Mapping<~KT, +VT_co>[str, typing.Any] removed : bool ''' self.entity = entity @@ -451,430 +469,328 @@ class Delta(Type): class AnnotationsGetResult(Type): - _toSchema = {'error': 'Error', 'entitytag': 'EntityTag', 'annotations': 'Annotations'} - _toPy = {'EntityTag': 'entitytag', 'Annotations': 'annotations', 'Error': 'error'} - def __init__(self, annotations=None, entitytag=None, error=None): + _toSchema = {'entity': 'entity', 'annotations': 'annotations', 'error': 'error'} + _toPy = {'entity': 'entity', 'annotations': 'annotations', 'error': 'error'} + def __init__(self, annotations=None, entity=None, error=None): ''' - annotations : typing.Mapping[str, str] - entitytag : str + annotations : typing.Mapping<~KT, +VT_co>[str, str] + entity : str error : ErrorResult ''' self.annotations = annotations - self.entitytag = entitytag + self.entity = entity self.error = ErrorResult.from_json(error) if error else None class AnnotationsGetResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} def __init__(self, results=None): ''' - results : typing.Sequence[~AnnotationsGetResult] + results : typing.Sequence<+T_co>[~AnnotationsGetResult]<~AnnotationsGetResult> ''' self.results = [AnnotationsGetResult.from_json(o) for o in results or []] class AnnotationsSet(Type): - _toSchema = {'annotations': 'Annotations'} - _toPy = {'Annotations': 'annotations'} + _toSchema = {'annotations': 'annotations'} + _toPy = {'annotations': 'annotations'} def __init__(self, annotations=None): ''' - annotations : typing.Sequence[~EntityAnnotations] + annotations : typing.Sequence<+T_co>[~EntityAnnotations]<~EntityAnnotations> ''' self.annotations = [EntityAnnotations.from_json(o) for o in annotations or []] class EntityAnnotations(Type): - _toSchema = {'entitytag': 'EntityTag', 'annotations': 'Annotations'} - _toPy = {'EntityTag': 'entitytag', 'Annotations': 'annotations'} - def __init__(self, annotations=None, entitytag=None): + _toSchema = {'entity': 'entity', 'annotations': 'annotations'} + _toPy = {'entity': 'entity', 'annotations': 'annotations'} + def __init__(self, annotations=None, entity=None): ''' - annotations : typing.Mapping[str, str] - entitytag : str + annotations : typing.Mapping<~KT, +VT_co>[str, str] + entity : str ''' self.annotations = annotations - self.entitytag = entitytag + self.entity = entity -class BackupsCreateArgs(Type): - _toSchema = {'notes': 'Notes'} - _toPy = {'Notes': 'notes'} - def __init__(self, notes=None): +class AddApplicationUnits(Type): + _toSchema = {'application': 'application', 'placement': 'placement', 'num_units': 'num-units'} + _toPy = {'application': 'application', 'placement': 'placement', 'num-units': 'num_units'} + def __init__(self, application=None, num_units=None, placement=None): ''' - notes : str + application : str + num_units : int + placement : typing.Sequence<+T_co>[~Placement]<~Placement> ''' - self.notes = notes + self.application = application + self.num_units = num_units + self.placement = [Placement.from_json(o) for o in placement or []] -class BackupsInfoArgs(Type): - _toSchema = {'id_': 'ID'} - _toPy = {'ID': 'id_'} - def __init__(self, id_=None): +class AddApplicationUnitsResults(Type): + _toSchema = {'units': 'units'} + _toPy = {'units': 'units'} + def __init__(self, units=None): ''' - id_ : str + units : typing.Sequence<+T_co>[str] ''' - self.id_ = id_ + self.units = units -class BackupsListArgs(Type): - _toSchema = {} - _toPy = {} - def __init__(self): +class AddRelation(Type): + _toSchema = {'endpoints': 'endpoints'} + _toPy = {'endpoints': 'endpoints'} + def __init__(self, endpoints=None): ''' - + endpoints : typing.Sequence<+T_co>[str] ''' - pass + self.endpoints = endpoints -class BackupsListResult(Type): - _toSchema = {'list_': 'List'} - _toPy = {'List': 'list_'} - def __init__(self, list_=None): +class AddRelationResults(Type): + _toSchema = {'endpoints': 'endpoints'} + _toPy = {'endpoints': 'endpoints'} + def __init__(self, endpoints=None): ''' - list_ : typing.Sequence[~BackupsMetadataResult] + endpoints : typing.Mapping<~KT, +VT_co>[str, ~CharmRelation]<~CharmRelation> ''' - self.list_ = [BackupsMetadataResult.from_json(o) for o in list_ or []] + self.endpoints = endpoints -class BackupsMetadataResult(Type): - _toSchema = {'caprivatekey': 'CAPrivateKey', 'started': 'Started', 'finished': 'Finished', 'size': 'Size', 'stored': 'Stored', 'checksum': 'Checksum', 'model': 'Model', 'version': 'Version', 'cacert': 'CACert', 'machine': 'Machine', 'hostname': 'Hostname', 'notes': 'Notes', 'checksumformat': 'ChecksumFormat', 'id_': 'ID'} - _toPy = {'Hostname': 'hostname', 'Stored': 'stored', 'CACert': 'cacert', 'Checksum': 'checksum', 'Started': 'started', 'Model': 'model', 'ChecksumFormat': 'checksumformat', 'Machine': 'machine', 'Version': 'version', 'CAPrivateKey': 'caprivatekey', 'Size': 'size', 'ID': 'id_', 'Finished': 'finished', 'Notes': 'notes'} - def __init__(self, cacert=None, caprivatekey=None, checksum=None, checksumformat=None, finished=None, hostname=None, id_=None, machine=None, model=None, notes=None, size=None, started=None, stored=None, version=None): +class ApplicationCharmRelations(Type): + _toSchema = {'application': 'application'} + _toPy = {'application': 'application'} + def __init__(self, application=None): ''' - cacert : str - caprivatekey : str - checksum : str - checksumformat : str - finished : str - hostname : str - id_ : str - machine : str - model : str - notes : str - size : int - started : str - stored : str - version : Number + application : str ''' - self.cacert = cacert - self.caprivatekey = caprivatekey - self.checksum = checksum - self.checksumformat = checksumformat - self.finished = finished - self.hostname = hostname - self.id_ = id_ - self.machine = machine - self.model = model - self.notes = notes - self.size = size - self.started = started - self.stored = stored - self.version = Number.from_json(version) if version else None + self.application = application -class BackupsRemoveArgs(Type): - _toSchema = {'id_': 'ID'} - _toPy = {'ID': 'id_'} - def __init__(self, id_=None): +class ApplicationCharmRelationsResults(Type): + _toSchema = {'charm_relations': 'charm-relations'} + _toPy = {'charm-relations': 'charm_relations'} + def __init__(self, charm_relations=None): ''' - id_ : str + charm_relations : typing.Sequence<+T_co>[str] ''' - self.id_ = id_ + self.charm_relations = charm_relations -class Number(Type): - _toSchema = {'minor': 'Minor', 'major': 'Major', 'tag': 'Tag', 'patch': 'Patch', 'build': 'Build'} - _toPy = {'Tag': 'tag', 'Build': 'build', 'Major': 'major', 'Minor': 'minor', 'Patch': 'patch'} - def __init__(self, build=None, major=None, minor=None, patch=None, tag=None): +class ApplicationDeploy(Type): + _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'} + _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'} + 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): ''' - build : int - major : int - minor : int - patch : int - tag : str + application : str + channel : str + charm_url : str + config : typing.Mapping<~KT, +VT_co>[str, str] + config_yaml : str + constraints : Value + endpoint_bindings : typing.Mapping<~KT, +VT_co>[str, str] + num_units : int + placement : typing.Sequence<+T_co>[~Placement]<~Placement> + resources : typing.Mapping<~KT, +VT_co>[str, str] + series : str + storage : typing.Mapping<~KT, +VT_co>[str, ~Constraints]<~Constraints> ''' - self.build = build - self.major = major - self.minor = minor - self.patch = patch - self.tag = tag + self.application = application + self.channel = channel + self.charm_url = charm_url + self.config = config + self.config_yaml = config_yaml + self.constraints = Value.from_json(constraints) if constraints else None + self.endpoint_bindings = endpoint_bindings + self.num_units = num_units + self.placement = [Placement.from_json(o) for o in placement or []] + self.resources = resources + self.series = series + self.storage = storage -class RestoreArgs(Type): - _toSchema = {'backupid': 'BackupId'} - _toPy = {'BackupId': 'backupid'} - def __init__(self, backupid=None): +class ApplicationDestroy(Type): + _toSchema = {'application': 'application'} + _toPy = {'application': 'application'} + def __init__(self, application=None): ''' - backupid : str + application : str ''' - self.backupid = backupid + self.application = application -class Block(Type): - _toSchema = {'message': 'message', 'type_': 'type', 'id_': 'id', 'tag': 'tag'} - _toPy = {'message': 'message', 'id': 'id_', 'tag': 'tag', 'type': 'type_'} - def __init__(self, id_=None, message=None, tag=None, type_=None): +class ApplicationExpose(Type): + _toSchema = {'application': 'application'} + _toPy = {'application': 'application'} + def __init__(self, application=None): ''' - id_ : str - message : str - tag : str - type_ : str + application : str ''' - self.id_ = id_ - self.message = message - self.tag = tag - self.type_ = type_ + self.application = application -class BlockResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None): +class ApplicationGet(Type): + _toSchema = {'application': 'application'} + _toPy = {'application': 'application'} + def __init__(self, application=None): ''' - error : Error - result : Block + application : str ''' - self.error = Error.from_json(error) if error else None - self.result = Block.from_json(result) if result else None + self.application = application -class BlockResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None): +class ApplicationGetResults(Type): + _toSchema = {'application': 'application', 'config': 'config', 'charm': 'charm', 'constraints': 'constraints', 'series': 'series'} + _toPy = {'application': 'application', 'config': 'config', 'charm': 'charm', 'constraints': 'constraints', 'series': 'series'} + def __init__(self, application=None, charm=None, config=None, constraints=None, series=None): ''' - results : typing.Sequence[~BlockResult] + application : str + charm : str + config : typing.Mapping<~KT, +VT_co>[str, typing.Any] + constraints : Value + series : str ''' - self.results = [BlockResult.from_json(o) for o in results or []] + self.application = application + self.charm = charm + self.config = config + self.constraints = Value.from_json(constraints) if constraints else None + self.series = series -class BlockSwitchParams(Type): - _toSchema = {'message': 'message', 'type_': 'type'} - _toPy = {'message': 'message', 'type': 'type_'} - def __init__(self, message=None, type_=None): +class ApplicationMetricCredential(Type): + _toSchema = {'application': 'application', 'metrics_credentials': 'metrics-credentials'} + _toPy = {'application': 'application', 'metrics-credentials': 'metrics_credentials'} + def __init__(self, application=None, metrics_credentials=None): ''' - message : str - type_ : str + application : str + metrics_credentials : typing.Sequence<+T_co>[int] ''' - self.message = message - self.type_ = type_ + self.application = application + self.metrics_credentials = metrics_credentials -class CharmInfo(Type): - _toSchema = {'charmurl': 'CharmURL'} - _toPy = {'CharmURL': 'charmurl'} - def __init__(self, charmurl=None): +class ApplicationMetricCredentials(Type): + _toSchema = {'creds': 'creds'} + _toPy = {'creds': 'creds'} + def __init__(self, creds=None): ''' - charmurl : str + creds : typing.Sequence<+T_co>[~ApplicationMetricCredential]<~ApplicationMetricCredential> ''' - self.charmurl = charmurl + self.creds = [ApplicationMetricCredential.from_json(o) for o in creds or []] -class CharmsList(Type): - _toSchema = {'names': 'Names'} - _toPy = {'Names': 'names'} - def __init__(self, names=None): +class ApplicationSet(Type): + _toSchema = {'application': 'application', 'options': 'options'} + _toPy = {'application': 'application', 'options': 'options'} + def __init__(self, application=None, options=None): ''' - names : typing.Sequence[str] + application : str + options : typing.Mapping<~KT, +VT_co>[str, str] ''' - self.names = names + self.application = application + self.options = options -class CharmsListResult(Type): - _toSchema = {'charmurls': 'CharmURLs'} - _toPy = {'CharmURLs': 'charmurls'} - def __init__(self, charmurls=None): +class ApplicationSetCharm(Type): + _toSchema = {'application': 'application', 'charm_url': 'charm-url', 'channel': 'channel', 'force_units': 'force-units', 'force_series': 'force-series', 'resource_ids': 'resource-ids'} + _toPy = {'application': 'application', 'force-units': 'force_units', 'channel': 'channel', 'charm-url': 'charm_url', 'force-series': 'force_series', 'resource-ids': 'resource_ids'} + def __init__(self, application=None, channel=None, charm_url=None, force_series=None, force_units=None, resource_ids=None): ''' - charmurls : typing.Sequence[str] + application : str + channel : str + charm_url : str + force_series : bool + force_units : bool + resource_ids : typing.Mapping<~KT, +VT_co>[str, str] ''' - self.charmurls = charmurls + self.application = application + self.channel = channel + self.charm_url = charm_url + self.force_series = force_series + self.force_units = force_units + self.resource_ids = resource_ids -class IsMeteredResult(Type): - _toSchema = {'metered': 'Metered'} - _toPy = {'Metered': 'metered'} - def __init__(self, metered=None): +class ApplicationUnexpose(Type): + _toSchema = {'application': 'application'} + _toPy = {'application': 'application'} + def __init__(self, application=None): ''' - metered : bool + application : str ''' - self.metered = metered + self.application = application -class APIHostPortsResult(Type): - _toSchema = {'servers': 'Servers'} - _toPy = {'Servers': 'servers'} - def __init__(self, servers=None): +class ApplicationUnset(Type): + _toSchema = {'application': 'application', 'options': 'options'} + _toPy = {'application': 'application', 'options': 'options'} + def __init__(self, application=None, options=None): ''' - servers : typing.Sequence[~HostPort] + application : str + options : typing.Sequence<+T_co>[str] ''' - self.servers = [HostPort.from_json(o) for o in servers or []] + self.application = application + self.options = options -class AddCharm(Type): - _toSchema = {'channel': 'Channel', 'url': 'URL'} - _toPy = {'Channel': 'channel', 'URL': 'url'} - def __init__(self, channel=None, url=None): - ''' - channel : str - url : str +class ApplicationUpdate(Type): + _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'} + _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'} + 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): ''' - self.channel = channel - self.url = url + application : str + charm_url : str + constraints : Value + force_charm_url : bool + force_series : bool + min_units : int + settings : typing.Mapping<~KT, +VT_co>[str, str] + settings_yaml : str + ''' + self.application = application + self.charm_url = charm_url + self.constraints = Value.from_json(constraints) if constraints else None + self.force_charm_url = force_charm_url + self.force_series = force_series + self.min_units = min_units + self.settings = settings + self.settings_yaml = settings_yaml -class AddCharmWithAuthorization(Type): - _toSchema = {'channel': 'Channel', 'charmstoremacaroon': 'CharmStoreMacaroon', 'url': 'URL'} - _toPy = {'Channel': 'channel', 'CharmStoreMacaroon': 'charmstoremacaroon', 'URL': 'url'} - def __init__(self, channel=None, charmstoremacaroon=None, url=None): +class ApplicationsDeploy(Type): + _toSchema = {'applications': 'applications'} + _toPy = {'applications': 'applications'} + def __init__(self, applications=None): ''' - channel : str - charmstoremacaroon : Macaroon - url : str + applications : typing.Sequence<+T_co>[~ApplicationDeploy]<~ApplicationDeploy> ''' - self.channel = channel - self.charmstoremacaroon = Macaroon.from_json(charmstoremacaroon) if charmstoremacaroon else None - self.url = url + self.applications = [ApplicationDeploy.from_json(o) for o in applications or []] -class AddMachineParams(Type): - _toSchema = {'parentid': 'ParentId', 'containertype': 'ContainerType', 'instanceid': 'InstanceId', 'disks': 'Disks', 'jobs': 'Jobs', 'placement': 'Placement', 'addrs': 'Addrs', 'nonce': 'Nonce', 'constraints': 'Constraints', 'series': 'Series', 'hardwarecharacteristics': 'HardwareCharacteristics'} - _toPy = {'HardwareCharacteristics': 'hardwarecharacteristics', 'Constraints': 'constraints', 'InstanceId': 'instanceid', 'ContainerType': 'containertype', 'ParentId': 'parentid', 'Addrs': 'addrs', 'Placement': 'placement', 'Disks': 'disks', 'Nonce': 'nonce', 'Jobs': 'jobs', 'Series': 'series'} - def __init__(self, addrs=None, constraints=None, containertype=None, disks=None, hardwarecharacteristics=None, instanceid=None, jobs=None, nonce=None, parentid=None, placement=None, series=None): +class CharmRelation(Type): + _toSchema = {'limit': 'limit', 'role': 'role', 'scope': 'scope', 'optional': 'optional', 'name': 'name', 'interface': 'interface'} + _toPy = {'limit': 'limit', 'role': 'role', 'scope': 'scope', 'optional': 'optional', 'name': 'name', 'interface': 'interface'} + def __init__(self, interface=None, limit=None, name=None, optional=None, role=None, scope=None): ''' - addrs : typing.Sequence[~Address] - constraints : Value - containertype : str - disks : typing.Sequence[~Constraints] - hardwarecharacteristics : HardwareCharacteristics - instanceid : str - jobs : typing.Sequence[str] - nonce : str - parentid : str - placement : Placement - series : str - ''' - self.addrs = [Address.from_json(o) for o in addrs or []] - self.constraints = Value.from_json(constraints) if constraints else None - self.containertype = containertype - self.disks = [Constraints.from_json(o) for o in disks or []] - self.hardwarecharacteristics = HardwareCharacteristics.from_json(hardwarecharacteristics) if hardwarecharacteristics else None - self.instanceid = instanceid - self.jobs = jobs - self.nonce = nonce - self.parentid = parentid - self.placement = Placement.from_json(placement) if placement else None - self.series = series - - -class AddMachines(Type): - _toSchema = {'machineparams': 'MachineParams'} - _toPy = {'MachineParams': 'machineparams'} - def __init__(self, machineparams=None): - ''' - machineparams : typing.Sequence[~AddMachineParams] - ''' - self.machineparams = [AddMachineParams.from_json(o) for o in machineparams or []] - - -class AddMachinesResult(Type): - _toSchema = {'error': 'Error', 'machine': 'Machine'} - _toPy = {'Error': 'error', 'Machine': 'machine'} - def __init__(self, error=None, machine=None): - ''' - error : Error - machine : str - ''' - self.error = Error.from_json(error) if error else None - self.machine = machine - - -class AddMachinesResults(Type): - _toSchema = {'machines': 'Machines'} - _toPy = {'Machines': 'machines'} - def __init__(self, machines=None): - ''' - machines : typing.Sequence[~AddMachinesResult] - ''' - self.machines = [AddMachinesResult.from_json(o) for o in machines or []] - - -class Address(Type): - _toSchema = {'spacename': 'SpaceName', 'value': 'Value', 'scope': 'Scope', 'type_': 'Type'} - _toPy = {'SpaceName': 'spacename', 'Type': 'type_', 'Scope': 'scope', 'Value': 'value'} - def __init__(self, scope=None, spacename=None, type_=None, value=None): - ''' - scope : str - spacename : str - type_ : str - value : str + interface : str + limit : int + name : str + optional : bool + role : str + scope : str ''' + self.interface = interface + self.limit = limit + self.name = name + self.optional = optional + self.role = role self.scope = scope - self.spacename = spacename - self.type_ = type_ - self.value = value - - -class AgentVersionResult(Type): - _toSchema = {'minor': 'Minor', 'major': 'Major', 'tag': 'Tag', 'patch': 'Patch', 'build': 'Build'} - _toPy = {'Tag': 'tag', 'Build': 'build', 'Major': 'major', 'Minor': 'minor', 'Patch': 'patch'} - def __init__(self, build=None, major=None, minor=None, patch=None, tag=None): - ''' - build : int - major : int - minor : int - patch : int - tag : str - ''' - self.build = build - self.major = major - self.minor = minor - self.patch = patch - self.tag = tag - - -class AllWatcherId(Type): - _toSchema = {'allwatcherid': 'AllWatcherId'} - _toPy = {'AllWatcherId': 'allwatcherid'} - def __init__(self, allwatcherid=None): - ''' - allwatcherid : str - ''' - self.allwatcherid = allwatcherid - - -class Binary(Type): - _toSchema = {'series': 'Series', 'arch': 'Arch', 'number': 'Number'} - _toPy = {'Arch': 'arch', 'Number': 'number', 'Series': 'series'} - def __init__(self, arch=None, number=None, series=None): - ''' - arch : str - number : Number - series : str - ''' - self.arch = arch - self.number = Number.from_json(number) if number else None - self.series = series - - -class BundleChangesChange(Type): - _toSchema = {'requires': 'requires', 'args': 'args', 'id_': 'id', 'method': 'method'} - _toPy = {'args': 'args', 'id': 'id_', 'method': 'method', 'requires': 'requires'} - def __init__(self, args=None, id_=None, method=None, requires=None): - ''' - args : typing.Sequence[typing.Any] - id_ : str - method : str - requires : typing.Sequence[str] - ''' - self.args = args - self.id_ = id_ - self.method = method - self.requires = requires class Constraints(Type): - _toSchema = {'pool': 'Pool', 'count': 'Count', 'size': 'Size'} - _toPy = {'Pool': 'pool', 'Count': 'count', 'Size': 'size'} + _toSchema = {'size': 'Size', 'pool': 'Pool', 'count': 'Count'} + _toPy = {'Size': 'size', 'Count': 'count', 'Pool': 'pool'} def __init__(self, count=None, pool=None, size=None): ''' count : int @@ -886,147 +802,103 @@ class Constraints(Type): self.size = size -class DestroyMachines(Type): - _toSchema = {'force': 'Force', 'machinenames': 'MachineNames'} - _toPy = {'MachineNames': 'machinenames', 'Force': 'force'} - def __init__(self, force=None, machinenames=None): - ''' - force : bool - machinenames : typing.Sequence[str] - ''' - self.force = force - self.machinenames = machinenames - - -class DetailedStatus(Type): - _toSchema = {'info': 'Info', 'status': 'Status', 'version': 'Version', 'data': 'Data', 'kind': 'Kind', 'since': 'Since', 'err': 'Err', 'life': 'Life'} - _toPy = {'Status': 'status', 'Since': 'since', 'Version': 'version', 'Err': 'err', 'Info': 'info', 'Data': 'data', 'Life': 'life', 'Kind': 'kind'} - def __init__(self, data=None, err=None, info=None, kind=None, life=None, since=None, status=None, version=None): +class DestroyApplicationUnits(Type): + _toSchema = {'unit_names': 'unit-names'} + _toPy = {'unit-names': 'unit_names'} + def __init__(self, unit_names=None): ''' - data : typing.Mapping[str, typing.Any] - err : typing.Mapping[str, typing.Any] - info : str - kind : str - life : str - since : str - status : str - version : str + unit_names : typing.Sequence<+T_co>[str] ''' - self.data = data - self.err = err - self.info = info - self.kind = kind - self.life = life - self.since = since - self.status = status - self.version = version + self.unit_names = unit_names -class EndpointStatus(Type): - _toSchema = {'role': 'Role', 'subordinate': 'Subordinate', 'servicename': 'ServiceName', 'name': 'Name'} - _toPy = {'ServiceName': 'servicename', 'Subordinate': 'subordinate', 'Role': 'role', 'Name': 'name'} - def __init__(self, name=None, role=None, servicename=None, subordinate=None): +class DestroyRelation(Type): + _toSchema = {'endpoints': 'endpoints'} + _toPy = {'endpoints': 'endpoints'} + def __init__(self, endpoints=None): ''' - name : str - role : str - servicename : str - subordinate : bool + endpoints : typing.Sequence<+T_co>[str] ''' - self.name = name - self.role = role - self.servicename = servicename - self.subordinate = subordinate + self.endpoints = endpoints -class EntityStatus(Type): - _toSchema = {'info': 'Info', 'status': 'Status', 'since': 'Since', 'data': 'Data'} - _toPy = {'Info': 'info', 'Since': 'since', 'Status': 'status', 'Data': 'data'} - def __init__(self, data=None, info=None, since=None, status=None): +class GetApplicationConstraints(Type): + _toSchema = {'application': 'application'} + _toPy = {'application': 'application'} + def __init__(self, application=None): ''' - data : typing.Mapping[str, typing.Any] - info : str - since : str - status : str + application : str ''' - self.data = data - self.info = info - self.since = since - self.status = status + self.application = application -class FindToolsParams(Type): - _toSchema = {'minorversion': 'MinorVersion', 'arch': 'Arch', 'number': 'Number', 'majorversion': 'MajorVersion', 'series': 'Series'} - _toPy = {'Arch': 'arch', 'MinorVersion': 'minorversion', 'MajorVersion': 'majorversion', 'Number': 'number', 'Series': 'series'} - def __init__(self, arch=None, majorversion=None, minorversion=None, number=None, series=None): +class GetConstraintsResults(Type): + _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'} + _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'} + 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): ''' arch : str - majorversion : int - minorversion : int - number : Number - series : str + container : str + cpu_cores : int + cpu_power : int + instance_type : str + mem : int + root_disk : int + spaces : typing.Sequence<+T_co>[str] + tags : typing.Sequence<+T_co>[str] + virt_type : str ''' self.arch = arch - self.majorversion = majorversion - self.minorversion = minorversion - self.number = Number.from_json(number) if number else None - self.series = series + self.container = container + self.cpu_cores = cpu_cores + self.cpu_power = cpu_power + self.instance_type = instance_type + self.mem = mem + self.root_disk = root_disk + self.spaces = spaces + self.tags = tags + self.virt_type = virt_type -class FindToolsResult(Type): - _toSchema = {'error': 'Error', 'list_': 'List'} - _toPy = {'Error': 'error', 'List': 'list_'} - def __init__(self, error=None, list_=None): +class Placement(Type): + _toSchema = {'directive': 'directive', 'scope': 'scope'} + _toPy = {'directive': 'directive', 'scope': 'scope'} + def __init__(self, directive=None, scope=None): ''' - error : Error - list_ : typing.Sequence[~Tools] + directive : str + scope : str ''' - self.error = Error.from_json(error) if error else None - self.list_ = [Tools.from_json(o) for o in list_ or []] - - -class FullStatus(Type): - _toSchema = {'machines': 'Machines', 'modelname': 'ModelName', 'availableversion': 'AvailableVersion', 'relations': 'Relations', 'services': 'Services'} - _toPy = {'Services': 'services', 'Relations': 'relations', 'AvailableVersion': 'availableversion', 'ModelName': 'modelname', 'Machines': 'machines'} - def __init__(self, availableversion=None, machines=None, modelname=None, relations=None, services=None): - ''' - availableversion : str - machines : typing.Mapping[str, ~MachineStatus] - modelname : str - relations : typing.Sequence[~RelationStatus] - services : typing.Mapping[str, ~ServiceStatus] - ''' - self.availableversion = availableversion - self.machines = {k: MachineStatus.from_json(v) for k, v in (machines or dict()).items()} - self.modelname = modelname - self.relations = [RelationStatus.from_json(o) for o in relations or []] - self.services = {k: ServiceStatus.from_json(v) for k, v in (services or dict()).items()} + self.directive = directive + self.scope = scope -class GetBundleChangesParams(Type): - _toSchema = {'yaml': 'yaml'} - _toPy = {'yaml': 'yaml'} - def __init__(self, yaml=None): +class SetConstraints(Type): + _toSchema = {'application': 'application', 'constraints': 'constraints'} + _toPy = {'application': 'application', 'constraints': 'constraints'} + def __init__(self, application=None, constraints=None): ''' - yaml : str + application : str + constraints : Value ''' - self.yaml = yaml + self.application = application + self.constraints = Value.from_json(constraints) if constraints else None -class GetBundleChangesResults(Type): - _toSchema = {'errors': 'errors', 'changes': 'changes'} - _toPy = {'errors': 'errors', 'changes': 'changes'} - def __init__(self, changes=None, errors=None): +class StringResult(Type): + _toSchema = {'result': 'result', 'error': 'error'} + _toPy = {'result': 'result', 'error': 'error'} + def __init__(self, error=None, result=None): ''' - changes : typing.Sequence[~BundleChangesChange] - errors : typing.Sequence[str] + error : Error + result : str ''' - self.changes = [BundleChangesChange.from_json(o) for o in changes or []] - self.errors = errors + self.error = Error.from_json(error) if error else None + self.result = result -class GetConstraintsResults(Type): - _toSchema = {'virt_type': 'virt-type', 'mem': 'mem', 'container': 'container', 'instance_type': 'instance-type', 'root_disk': 'root-disk', 'tags': 'tags', 'arch': 'arch', 'cpu_power': 'cpu-power', 'cpu_cores': 'cpu-cores', 'spaces': 'spaces'} - _toPy = {'instance-type': 'instance_type', 'root-disk': 'root_disk', 'cpu-power': 'cpu_power', 'mem': 'mem', 'tags': 'tags', 'arch': 'arch', 'spaces': 'spaces', 'virt-type': 'virt_type', 'container': 'container', 'cpu-cores': 'cpu_cores'} +class Value(Type): + _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'} + _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'} 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): ''' arch : str @@ -1036,8 +908,8 @@ class GetConstraintsResults(Type): instance_type : str mem : int root_disk : int - spaces : typing.Sequence[str] - tags : typing.Sequence[str] + spaces : typing.Sequence<+T_co>[str] + tags : typing.Sequence<+T_co>[str] virt_type : str ''' self.arch = arch @@ -1052,14720 +924,15714 @@ class GetConstraintsResults(Type): self.virt_type = virt_type -class HardwareCharacteristics(Type): - _toSchema = {'tags': 'Tags', 'rootdisk': 'RootDisk', 'arch': 'Arch', 'cpupower': 'CpuPower', 'availabilityzone': 'AvailabilityZone', 'cpucores': 'CpuCores', 'mem': 'Mem'} - _toPy = {'RootDisk': 'rootdisk', 'Arch': 'arch', 'CpuCores': 'cpucores', 'Tags': 'tags', 'AvailabilityZone': 'availabilityzone', 'CpuPower': 'cpupower', 'Mem': 'mem'} - def __init__(self, arch=None, availabilityzone=None, cpucores=None, cpupower=None, mem=None, rootdisk=None, tags=None): +class StringsWatchResult(Type): + _toSchema = {'changes': 'changes', 'watcher_id': 'watcher-id', 'error': 'error'} + _toPy = {'watcher-id': 'watcher_id', 'changes': 'changes', 'error': 'error'} + def __init__(self, changes=None, error=None, watcher_id=None): ''' - arch : str - availabilityzone : str - cpucores : int - cpupower : int - mem : int - rootdisk : int - tags : typing.Sequence[str] + changes : typing.Sequence<+T_co>[str] + error : Error + watcher_id : str ''' - self.arch = arch - self.availabilityzone = availabilityzone - self.cpucores = cpucores - self.cpupower = cpupower - self.mem = mem - self.rootdisk = rootdisk - self.tags = tags + self.changes = changes + self.error = Error.from_json(error) if error else None + self.watcher_id = watcher_id -class HostPort(Type): - _toSchema = {'address': 'Address', 'port': 'Port'} - _toPy = {'Port': 'port', 'Address': 'address'} - def __init__(self, address=None, port=None): +class BackupsCreateArgs(Type): + _toSchema = {'notes': 'notes'} + _toPy = {'notes': 'notes'} + def __init__(self, notes=None): ''' - address : Address - port : int + notes : str ''' - self.address = Address.from_json(address) if address else None - self.port = port + self.notes = notes -class MachineStatus(Type): - _toSchema = {'series': 'Series', 'jobs': 'Jobs', 'instanceid': 'InstanceId', 'instancestatus': 'InstanceStatus', 'hasvote': 'HasVote', 'wantsvote': 'WantsVote', 'containers': 'Containers', 'agentstatus': 'AgentStatus', 'dnsname': 'DNSName', 'hardware': 'Hardware', 'id_': 'Id'} - _toPy = {'AgentStatus': 'agentstatus', 'InstanceId': 'instanceid', 'HasVote': 'hasvote', 'Series': 'series', 'Hardware': 'hardware', 'DNSName': 'dnsname', 'WantsVote': 'wantsvote', 'Id': 'id_', 'Jobs': 'jobs', 'InstanceStatus': 'instancestatus', 'Containers': 'containers'} - def __init__(self, agentstatus=None, containers=None, dnsname=None, hardware=None, hasvote=None, id_=None, instanceid=None, instancestatus=None, jobs=None, series=None, wantsvote=None): +class BackupsInfoArgs(Type): + _toSchema = {'id_': 'id'} + _toPy = {'id': 'id_'} + def __init__(self, id_=None): ''' - agentstatus : DetailedStatus - containers : typing.Mapping[str, ~MachineStatus] - dnsname : str - hardware : str - hasvote : bool id_ : str - instanceid : str - instancestatus : DetailedStatus - jobs : typing.Sequence[str] - series : str - wantsvote : bool ''' - self.agentstatus = DetailedStatus.from_json(agentstatus) if agentstatus else None - self.containers = {k: MachineStatus.from_json(v) for k, v in (containers or dict()).items()} - self.dnsname = dnsname - self.hardware = hardware - self.hasvote = hasvote self.id_ = id_ - self.instanceid = instanceid - self.instancestatus = DetailedStatus.from_json(instancestatus) if instancestatus else None - self.jobs = jobs - self.series = series - self.wantsvote = wantsvote -class MeterStatus(Type): - _toSchema = {'message': 'Message', 'color': 'Color'} - _toPy = {'Message': 'message', 'Color': 'color'} - def __init__(self, color=None, message=None): - ''' - color : str - message : str +class BackupsListArgs(Type): + _toSchema = {} + _toPy = {} + def __init__(self): ''' - self.color = color - self.message = message - -class ModelConfigResults(Type): - _toSchema = {'config': 'Config'} - _toPy = {'Config': 'config'} - def __init__(self, config=None): - ''' - config : typing.Mapping[str, typing.Any] ''' - self.config = config + pass -class ModelInfo(Type): - _toSchema = {'users': 'Users', 'status': 'Status', 'serveruuid': 'ServerUUID', 'uuid': 'UUID', 'name': 'Name', 'providertype': 'ProviderType', 'defaultseries': 'DefaultSeries', 'ownertag': 'OwnerTag', 'life': 'Life'} - _toPy = {'Status': 'status', 'UUID': 'uuid', 'OwnerTag': 'ownertag', 'Name': 'name', 'ServerUUID': 'serveruuid', 'DefaultSeries': 'defaultseries', 'Life': 'life', 'Users': 'users', 'ProviderType': 'providertype'} - def __init__(self, defaultseries=None, life=None, name=None, ownertag=None, providertype=None, serveruuid=None, status=None, uuid=None, users=None): +class BackupsListResult(Type): + _toSchema = {'list_': 'list'} + _toPy = {'list': 'list_'} + def __init__(self, list_=None): ''' - defaultseries : str - life : str - name : str - ownertag : str - providertype : str - serveruuid : str - status : EntityStatus - uuid : str - users : typing.Sequence[~ModelUserInfo] + list_ : typing.Sequence<+T_co>[~BackupsMetadataResult]<~BackupsMetadataResult> ''' - self.defaultseries = defaultseries - self.life = life - self.name = name - self.ownertag = ownertag - self.providertype = providertype - self.serveruuid = serveruuid - self.status = EntityStatus.from_json(status) if status else None - self.uuid = uuid - self.users = [ModelUserInfo.from_json(o) for o in users or []] + self.list_ = [BackupsMetadataResult.from_json(o) for o in list_ or []] -class ModelSet(Type): - _toSchema = {'config': 'Config'} - _toPy = {'Config': 'config'} - def __init__(self, config=None): - ''' - config : typing.Mapping[str, typing.Any] +class BackupsMetadataResult(Type): + _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'} + _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'} + 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): ''' - self.config = config - - -class ModelUnset(Type): - _toSchema = {'keys': 'Keys'} - _toPy = {'Keys': 'keys'} - def __init__(self, keys=None): - ''' - keys : typing.Sequence[str] + ca_cert : str + ca_private_key : str + checksum : str + checksum_format : str + finished : str + hostname : str + id_ : str + machine : str + model : str + notes : str + series : str + size : int + started : str + stored : str + version : Number ''' - self.keys = keys + self.ca_cert = ca_cert + self.ca_private_key = ca_private_key + self.checksum = checksum + self.checksum_format = checksum_format + self.finished = finished + self.hostname = hostname + self.id_ = id_ + self.machine = machine + self.model = model + self.notes = notes + self.series = series + self.size = size + self.started = started + self.stored = stored + self.version = Number.from_json(version) if version else None -class ModelUserInfo(Type): - _toSchema = {'displayname': 'displayname', 'access': 'access', 'user': 'user', 'lastconnection': 'lastconnection'} - _toPy = {'displayname': 'displayname', 'access': 'access', 'user': 'user', 'lastconnection': 'lastconnection'} - def __init__(self, access=None, displayname=None, lastconnection=None, user=None): +class BackupsRemoveArgs(Type): + _toSchema = {'id_': 'id'} + _toPy = {'id': 'id_'} + def __init__(self, id_=None): ''' - access : str - displayname : str - lastconnection : str - user : str + id_ : str ''' - self.access = access - self.displayname = displayname - self.lastconnection = lastconnection - self.user = user + self.id_ = id_ -class ModelUserInfoResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None): +class Number(Type): + _toSchema = {'build': 'Build', 'patch': 'Patch', 'tag': 'Tag', 'minor': 'Minor', 'major': 'Major'} + _toPy = {'Tag': 'tag', 'Major': 'major', 'Patch': 'patch', 'Minor': 'minor', 'Build': 'build'} + def __init__(self, build=None, major=None, minor=None, patch=None, tag=None): ''' - error : Error - result : ModelUserInfo + build : int + major : int + minor : int + patch : int + tag : str ''' - self.error = Error.from_json(error) if error else None - self.result = ModelUserInfo.from_json(result) if result else None + self.build = build + self.major = major + self.minor = minor + self.patch = patch + self.tag = tag -class ModelUserInfoResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None): +class RestoreArgs(Type): + _toSchema = {'backup_id': 'backup-id'} + _toPy = {'backup-id': 'backup_id'} + def __init__(self, backup_id=None): ''' - results : typing.Sequence[~ModelUserInfoResult] + backup_id : str ''' - self.results = [ModelUserInfoResult.from_json(o) for o in results or []] + self.backup_id = backup_id -class Placement(Type): - _toSchema = {'scope': 'Scope', 'directive': 'Directive'} - _toPy = {'Directive': 'directive', 'Scope': 'scope'} - def __init__(self, directive=None, scope=None): +class Block(Type): + _toSchema = {'tag': 'tag', 'type_': 'type', 'id_': 'id', 'message': 'message'} + _toPy = {'type': 'type_', 'id': 'id_', 'tag': 'tag', 'message': 'message'} + def __init__(self, id_=None, message=None, tag=None, type_=None): ''' - directive : str - scope : str + id_ : str + message : str + tag : str + type_ : str ''' - self.directive = directive - self.scope = scope + self.id_ = id_ + self.message = message + self.tag = tag + self.type_ = type_ -class PrivateAddress(Type): - _toSchema = {'target': 'Target'} - _toPy = {'Target': 'target'} - def __init__(self, target=None): +class BlockResult(Type): + _toSchema = {'result': 'result', 'error': 'error'} + _toPy = {'result': 'result', 'error': 'error'} + def __init__(self, error=None, result=None): ''' - target : str + error : Error + result : Block ''' - self.target = target + self.error = Error.from_json(error) if error else None + self.result = Block.from_json(result) if result else None -class PrivateAddressResults(Type): - _toSchema = {'privateaddress': 'PrivateAddress'} - _toPy = {'PrivateAddress': 'privateaddress'} - def __init__(self, privateaddress=None): +class BlockResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): ''' - privateaddress : str + results : typing.Sequence<+T_co>[~BlockResult]<~BlockResult> ''' - self.privateaddress = privateaddress + self.results = [BlockResult.from_json(o) for o in results or []] -class ProvisioningScriptParams(Type): - _toSchema = {'machineid': 'MachineId', 'disablepackagecommands': 'DisablePackageCommands', 'nonce': 'Nonce', 'datadir': 'DataDir'} - _toPy = {'Nonce': 'nonce', 'DisablePackageCommands': 'disablepackagecommands', 'MachineId': 'machineid', 'DataDir': 'datadir'} - def __init__(self, datadir=None, disablepackagecommands=None, machineid=None, nonce=None): +class BlockSwitchParams(Type): + _toSchema = {'type_': 'type', 'message': 'message'} + _toPy = {'type': 'type_', 'message': 'message'} + def __init__(self, message=None, type_=None): ''' - datadir : str - disablepackagecommands : bool - machineid : str - nonce : str + message : str + type_ : str ''' - self.datadir = datadir - self.disablepackagecommands = disablepackagecommands - self.machineid = machineid - self.nonce = nonce + self.message = message + self.type_ = type_ -class ProvisioningScriptResult(Type): - _toSchema = {'script': 'Script'} - _toPy = {'Script': 'script'} - def __init__(self, script=None): +class CharmActionSpec(Type): + _toSchema = {'description': 'description', 'params': 'params'} + _toPy = {'description': 'description', 'params': 'params'} + def __init__(self, description=None, params=None): ''' - script : str + description : str + params : typing.Mapping<~KT, +VT_co>[str, typing.Any] ''' - self.script = script + self.description = description + self.params = params -class PublicAddress(Type): - _toSchema = {'target': 'Target'} - _toPy = {'Target': 'target'} - def __init__(self, target=None): +class CharmActions(Type): + _toSchema = {'specs': 'specs'} + _toPy = {'specs': 'specs'} + def __init__(self, specs=None): ''' - target : str + specs : typing.Mapping<~KT, +VT_co>[str, ~CharmActionSpec]<~CharmActionSpec> ''' - self.target = target + self.specs = specs -class PublicAddressResults(Type): - _toSchema = {'publicaddress': 'PublicAddress'} - _toPy = {'PublicAddress': 'publicaddress'} - def __init__(self, publicaddress=None): +class CharmInfo(Type): + _toSchema = {'config': 'config', 'actions': 'actions', 'revision': 'revision', 'metrics': 'metrics', 'url': 'url', 'meta': 'meta'} + _toPy = {'config': 'config', 'actions': 'actions', 'revision': 'revision', 'metrics': 'metrics', 'url': 'url', 'meta': 'meta'} + def __init__(self, actions=None, config=None, meta=None, metrics=None, revision=None, url=None): + ''' + actions : CharmActions + config : typing.Mapping<~KT, +VT_co>[str, ~CharmOption]<~CharmOption> + meta : CharmMeta + metrics : CharmMetrics + revision : int + url : str ''' - publicaddress : str + self.actions = CharmActions.from_json(actions) if actions else None + self.config = config + self.meta = CharmMeta.from_json(meta) if meta else None + self.metrics = CharmMetrics.from_json(metrics) if metrics else None + self.revision = revision + self.url = url + + +class CharmMeta(Type): + _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'} + _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'} + 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): ''' - self.publicaddress = publicaddress + categories : typing.Sequence<+T_co>[str] + description : str + extra_bindings : typing.Mapping<~KT, +VT_co>[str, str] + min_juju_version : str + name : str + payload_classes : typing.Mapping<~KT, +VT_co>[str, ~CharmPayloadClass]<~CharmPayloadClass> + peers : typing.Mapping<~KT, +VT_co>[str, ~CharmRelation]<~CharmRelation> + provides : typing.Mapping<~KT, +VT_co>[str, ~CharmRelation]<~CharmRelation> + requires : typing.Mapping<~KT, +VT_co>[str, ~CharmRelation]<~CharmRelation> + resources : typing.Mapping<~KT, +VT_co>[str, ~CharmResourceMeta]<~CharmResourceMeta> + series : typing.Sequence<+T_co>[str] + storage : typing.Mapping<~KT, +VT_co>[str, ~CharmStorage]<~CharmStorage> + subordinate : bool + summary : str + tags : typing.Sequence<+T_co>[str] + terms : typing.Sequence<+T_co>[str] + ''' + self.categories = categories + self.description = description + self.extra_bindings = extra_bindings + self.min_juju_version = min_juju_version + self.name = name + self.payload_classes = payload_classes + self.peers = peers + self.provides = provides + self.requires = requires + self.resources = resources + self.series = series + self.storage = storage + self.subordinate = subordinate + self.summary = summary + self.tags = tags + self.terms = terms -class RelationStatus(Type): - _toSchema = {'key': 'Key', 'interface': 'Interface', 'scope': 'Scope', 'endpoints': 'Endpoints', 'id_': 'Id'} - _toPy = {'Key': 'key', 'Id': 'id_', 'Scope': 'scope', 'Interface': 'interface', 'Endpoints': 'endpoints'} - def __init__(self, endpoints=None, id_=None, interface=None, key=None, scope=None): +class CharmMetric(Type): + _toSchema = {'description': 'description', 'type_': 'type'} + _toPy = {'type': 'type_', 'description': 'description'} + def __init__(self, description=None, type_=None): ''' - endpoints : typing.Sequence[~EndpointStatus] - id_ : int - interface : str - key : str - scope : str + description : str + type_ : str ''' - self.endpoints = [EndpointStatus.from_json(o) for o in endpoints or []] - self.id_ = id_ - self.interface = interface - self.key = key - self.scope = scope + self.description = description + self.type_ = type_ -class ResolveCharmResult(Type): - _toSchema = {'error': 'Error', 'url': 'URL'} - _toPy = {'Error': 'error', 'URL': 'url'} - def __init__(self, error=None, url=None): +class CharmMetrics(Type): + _toSchema = {'metrics': 'metrics'} + _toPy = {'metrics': 'metrics'} + def __init__(self, metrics=None): ''' - error : str - url : URL + metrics : typing.Mapping<~KT, +VT_co>[str, ~CharmMetric]<~CharmMetric> ''' - self.error = error - self.url = URL.from_json(url) if url else None + self.metrics = metrics -class ResolveCharmResults(Type): - _toSchema = {'urls': 'URLs'} - _toPy = {'URLs': 'urls'} - def __init__(self, urls=None): +class CharmOption(Type): + _toSchema = {'description': 'description', 'default': 'default', 'type_': 'type'} + _toPy = {'type': 'type_', 'description': 'description', 'default': 'default'} + def __init__(self, default=None, description=None, type_=None): ''' - urls : typing.Sequence[~ResolveCharmResult] + default : typing.Mapping<~KT, +VT_co>[str, typing.Any] + description : str + type_ : str ''' - self.urls = [ResolveCharmResult.from_json(o) for o in urls or []] + self.default = default + self.description = description + self.type_ = type_ -class ResolveCharms(Type): - _toSchema = {'references': 'References'} - _toPy = {'References': 'references'} - def __init__(self, references=None): +class CharmPayloadClass(Type): + _toSchema = {'name': 'name', 'type_': 'type'} + _toPy = {'type': 'type_', 'name': 'name'} + def __init__(self, name=None, type_=None): ''' - references : typing.Sequence[~URL] + name : str + type_ : str ''' - self.references = [URL.from_json(o) for o in references or []] + self.name = name + self.type_ = type_ -class Resolved(Type): - _toSchema = {'retry': 'Retry', 'unitname': 'UnitName'} - _toPy = {'UnitName': 'unitname', 'Retry': 'retry'} - def __init__(self, retry=None, unitname=None): +class CharmResourceMeta(Type): + _toSchema = {'description': 'description', 'type_': 'type', 'path': 'path', 'name': 'name'} + _toPy = {'type': 'type_', 'description': 'description', 'path': 'path', 'name': 'name'} + def __init__(self, description=None, name=None, path=None, type_=None): ''' - retry : bool - unitname : str + description : str + name : str + path : str + type_ : str ''' - self.retry = retry - self.unitname = unitname + self.description = description + self.name = name + self.path = path + self.type_ = type_ -class ServiceStatus(Type): - _toSchema = {'units': 'Units', 'charm': 'Charm', 'relations': 'Relations', 'status': 'Status', 'exposed': 'Exposed', 'canupgradeto': 'CanUpgradeTo', 'meterstatuses': 'MeterStatuses', 'subordinateto': 'SubordinateTo', 'life': 'Life', 'err': 'Err'} - _toPy = {'Status': 'status', 'Relations': 'relations', 'Exposed': 'exposed', 'Err': 'err', 'SubordinateTo': 'subordinateto', 'Charm': 'charm', 'CanUpgradeTo': 'canupgradeto', 'Units': 'units', 'Life': 'life', 'MeterStatuses': 'meterstatuses'} - def __init__(self, canupgradeto=None, charm=None, err=None, exposed=None, life=None, meterstatuses=None, relations=None, status=None, subordinateto=None, units=None): +class CharmStorage(Type): + _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'} + _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'} + 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): ''' - canupgradeto : str - charm : str - err : typing.Mapping[str, typing.Any] - exposed : bool - life : str - meterstatuses : typing.Mapping[str, ~MeterStatus] - relations : typing.Sequence[str] - status : DetailedStatus - subordinateto : typing.Sequence[str] - units : typing.Mapping[str, ~UnitStatus] + count_max : int + count_min : int + description : str + location : str + minimum_size : int + name : str + properties : typing.Sequence<+T_co>[str] + read_only : bool + shared : bool + type_ : str ''' - self.canupgradeto = canupgradeto - self.charm = charm - self.err = err - self.exposed = exposed - self.life = life - self.meterstatuses = {k: MeterStatus.from_json(v) for k, v in (meterstatuses or dict()).items()} - self.relations = relations - self.status = DetailedStatus.from_json(status) if status else None - self.subordinateto = subordinateto - self.units = {k: UnitStatus.from_json(v) for k, v in (units or dict()).items()} + self.count_max = count_max + self.count_min = count_min + self.description = description + self.location = location + self.minimum_size = minimum_size + self.name = name + self.properties = properties + self.read_only = read_only + self.shared = shared + self.type_ = type_ -class SetConstraints(Type): - _toSchema = {'constraints': 'Constraints', 'servicename': 'ServiceName'} - _toPy = {'ServiceName': 'servicename', 'Constraints': 'constraints'} - def __init__(self, constraints=None, servicename=None): +class CharmURL(Type): + _toSchema = {'url': 'url'} + _toPy = {'url': 'url'} + def __init__(self, url=None): ''' - constraints : Value - servicename : str + url : str ''' - self.constraints = Value.from_json(constraints) if constraints else None - self.servicename = servicename + self.url = url -class SetModelAgentVersion(Type): - _toSchema = {'minor': 'Minor', 'major': 'Major', 'tag': 'Tag', 'patch': 'Patch', 'build': 'Build'} - _toPy = {'Tag': 'tag', 'Build': 'build', 'Major': 'major', 'Minor': 'minor', 'Patch': 'patch'} - def __init__(self, build=None, major=None, minor=None, patch=None, tag=None): +class CharmsList(Type): + _toSchema = {'names': 'names'} + _toPy = {'names': 'names'} + def __init__(self, names=None): ''' - build : int - major : int - minor : int - patch : int - tag : str + names : typing.Sequence<+T_co>[str] ''' - self.build = build - self.major = major - self.minor = minor - self.patch = patch - self.tag = tag + self.names = names -class StatusHistoryArgs(Type): - _toSchema = {'kind': 'Kind', 'size': 'Size', 'name': 'Name'} - _toPy = {'Size': 'size', 'Kind': 'kind', 'Name': 'name'} - def __init__(self, kind=None, name=None, size=None): +class CharmsListResult(Type): + _toSchema = {'charm_urls': 'charm-urls'} + _toPy = {'charm-urls': 'charm_urls'} + def __init__(self, charm_urls=None): ''' - kind : str - name : str - size : int + charm_urls : typing.Sequence<+T_co>[str] ''' - self.kind = kind - self.name = name - self.size = size + self.charm_urls = charm_urls -class StatusHistoryResults(Type): - _toSchema = {'statuses': 'Statuses'} - _toPy = {'Statuses': 'statuses'} - def __init__(self, statuses=None): +class IsMeteredResult(Type): + _toSchema = {'metered': 'metered'} + _toPy = {'metered': 'metered'} + def __init__(self, metered=None): ''' - statuses : typing.Sequence[~DetailedStatus] + metered : bool ''' - self.statuses = [DetailedStatus.from_json(o) for o in statuses or []] + self.metered = metered -class StatusParams(Type): - _toSchema = {'patterns': 'Patterns'} - _toPy = {'Patterns': 'patterns'} - def __init__(self, patterns=None): +class APIHostPortsResult(Type): + _toSchema = {'servers': 'servers'} + _toPy = {'servers': 'servers'} + def __init__(self, servers=None): ''' - patterns : typing.Sequence[str] + servers : typing.Sequence<+T_co>[~HostPort]<~HostPort> ''' - self.patterns = patterns + self.servers = [HostPort.from_json(o) for o in servers or []] -class Tools(Type): - _toSchema = {'url': 'url', 'version': 'version', 'size': 'size', 'sha256': 'sha256'} - _toPy = {'url': 'url', 'version': 'version', 'size': 'size', 'sha256': 'sha256'} - def __init__(self, sha256=None, size=None, url=None, version=None): +class AddCharm(Type): + _toSchema = {'channel': 'channel', 'url': 'url'} + _toPy = {'channel': 'channel', 'url': 'url'} + def __init__(self, channel=None, url=None): ''' - sha256 : str - size : int + channel : str url : str - version : Binary ''' - self.sha256 = sha256 - self.size = size + self.channel = channel self.url = url - self.version = Binary.from_json(version) if version else None -class URL(Type): - _toSchema = {'series': 'Series', 'channel': 'Channel', 'schema': 'Schema', 'revision': 'Revision', 'name': 'Name', 'user': 'User'} - _toPy = {'Schema': 'schema', 'Name': 'name', 'Channel': 'channel', 'User': 'user', 'Revision': 'revision', 'Series': 'series'} - def __init__(self, channel=None, name=None, revision=None, schema=None, series=None, user=None): +class AddCharmWithAuthorization(Type): + _toSchema = {'macaroon': 'macaroon', 'channel': 'channel', 'url': 'url'} + _toPy = {'macaroon': 'macaroon', 'channel': 'channel', 'url': 'url'} + def __init__(self, channel=None, macaroon=None, url=None): ''' channel : str - name : str - revision : int - schema : str - series : str - user : str + macaroon : Macaroon + url : str ''' self.channel = channel - self.name = name - self.revision = revision - self.schema = schema - self.series = series - self.user = user + self.macaroon = Macaroon.from_json(macaroon) if macaroon else None + self.url = url -class UnitStatus(Type): - _toSchema = {'charm': 'Charm', 'subordinates': 'Subordinates', 'workloadstatus': 'WorkloadStatus', 'machine': 'Machine', 'openedports': 'OpenedPorts', 'agentstatus': 'AgentStatus', 'publicaddress': 'PublicAddress'} - _toPy = {'AgentStatus': 'agentstatus', 'Machine': 'machine', 'Charm': 'charm', 'Subordinates': 'subordinates', 'PublicAddress': 'publicaddress', 'WorkloadStatus': 'workloadstatus', 'OpenedPorts': 'openedports'} - def __init__(self, agentstatus=None, charm=None, machine=None, openedports=None, publicaddress=None, subordinates=None, workloadstatus=None): - ''' - agentstatus : DetailedStatus - charm : str - machine : str - openedports : typing.Sequence[str] - publicaddress : str - subordinates : typing.Mapping[str, ~UnitStatus] - workloadstatus : DetailedStatus +class AddMachineParams(Type): + _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'} + _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'} + 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): ''' - self.agentstatus = DetailedStatus.from_json(agentstatus) if agentstatus else None - self.charm = charm - self.machine = machine - self.openedports = openedports - self.publicaddress = publicaddress - self.subordinates = {k: UnitStatus.from_json(v) for k, v in (subordinates or dict()).items()} - self.workloadstatus = DetailedStatus.from_json(workloadstatus) if workloadstatus else None - - -class Value(Type): - _toSchema = {'virt_type': 'virt-type', 'mem': 'mem', 'container': 'container', 'instance_type': 'instance-type', 'root_disk': 'root-disk', 'tags': 'tags', 'arch': 'arch', 'cpu_power': 'cpu-power', 'cpu_cores': 'cpu-cores', 'spaces': 'spaces'} - _toPy = {'instance-type': 'instance_type', 'root-disk': 'root_disk', 'cpu-power': 'cpu_power', 'mem': 'mem', 'tags': 'tags', 'arch': 'arch', 'spaces': 'spaces', 'virt-type': 'virt_type', 'container': 'container', 'cpu-cores': 'cpu_cores'} - 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): - ''' - arch : str - container : str - cpu_cores : int - cpu_power : int - instance_type : str - mem : int - root_disk : int - spaces : typing.Sequence[str] - tags : typing.Sequence[str] - virt_type : str - ''' - self.arch = arch - self.container = container - self.cpu_cores = cpu_cores - self.cpu_power = cpu_power - self.instance_type = instance_type - self.mem = mem - self.root_disk = root_disk - self.spaces = spaces - self.tags = tags - self.virt_type = virt_type - - -class DestroyControllerArgs(Type): - _toSchema = {'destroy_models': 'destroy-models'} - _toPy = {'destroy-models': 'destroy_models'} - def __init__(self, destroy_models=None): - ''' - destroy_models : bool + addresses : typing.Sequence<+T_co>[~Address]<~Address> + constraints : Value + container_type : str + disks : typing.Sequence<+T_co>[~Constraints]<~Constraints> + hardware_characteristics : HardwareCharacteristics + instance_id : str + jobs : typing.Sequence<+T_co>[str] + nonce : str + parent_id : str + placement : Placement + series : str ''' - self.destroy_models = destroy_models + self.addresses = [Address.from_json(o) for o in addresses or []] + self.constraints = Value.from_json(constraints) if constraints else None + self.container_type = container_type + self.disks = [Constraints.from_json(o) for o in disks or []] + self.hardware_characteristics = HardwareCharacteristics.from_json(hardware_characteristics) if hardware_characteristics else None + self.instance_id = instance_id + self.jobs = jobs + self.nonce = nonce + self.parent_id = parent_id + self.placement = Placement.from_json(placement) if placement else None + self.series = series -class InitiateModelMigrationArgs(Type): - _toSchema = {'specs': 'specs'} - _toPy = {'specs': 'specs'} - def __init__(self, specs=None): +class AddMachines(Type): + _toSchema = {'params': 'params'} + _toPy = {'params': 'params'} + def __init__(self, params=None): ''' - specs : typing.Sequence[~ModelMigrationSpec] + params : typing.Sequence<+T_co>[~AddMachineParams]<~AddMachineParams> ''' - self.specs = [ModelMigrationSpec.from_json(o) for o in specs or []] + self.params = [AddMachineParams.from_json(o) for o in params or []] -class InitiateModelMigrationResult(Type): - _toSchema = {'error': 'error', 'id_': 'id', 'model_tag': 'model-tag'} - _toPy = {'model-tag': 'model_tag', 'error': 'error', 'id': 'id_'} - def __init__(self, error=None, id_=None, model_tag=None): +class AddMachinesResult(Type): + _toSchema = {'machine': 'machine', 'error': 'error'} + _toPy = {'machine': 'machine', 'error': 'error'} + def __init__(self, error=None, machine=None): ''' error : Error - id_ : str - model_tag : str + machine : str ''' self.error = Error.from_json(error) if error else None - self.id_ = id_ - self.model_tag = model_tag + self.machine = machine -class InitiateModelMigrationResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None): +class AddMachinesResults(Type): + _toSchema = {'machines': 'machines'} + _toPy = {'machines': 'machines'} + def __init__(self, machines=None): ''' - results : typing.Sequence[~InitiateModelMigrationResult] + machines : typing.Sequence<+T_co>[~AddMachinesResult]<~AddMachinesResult> ''' - self.results = [InitiateModelMigrationResult.from_json(o) for o in results or []] + self.machines = [AddMachinesResult.from_json(o) for o in machines or []] -class Model(Type): - _toSchema = {'ownertag': 'OwnerTag', 'uuid': 'UUID', 'name': 'Name'} - _toPy = {'UUID': 'uuid', 'OwnerTag': 'ownertag', 'Name': 'name'} - def __init__(self, name=None, ownertag=None, uuid=None): +class Address(Type): + _toSchema = {'space_name': 'space-name', 'type_': 'type', 'scope': 'scope', 'value': 'value'} + _toPy = {'type': 'type_', 'value': 'value', 'scope': 'scope', 'space-name': 'space_name'} + def __init__(self, scope=None, space_name=None, type_=None, value=None): ''' - name : str - ownertag : str - uuid : str + scope : str + space_name : str + type_ : str + value : str ''' - self.name = name - self.ownertag = ownertag - self.uuid = uuid + self.scope = scope + self.space_name = space_name + self.type_ = type_ + self.value = value -class ModelBlockInfo(Type): - _toSchema = {'model_uuid': 'model-uuid', 'owner_tag': 'owner-tag', 'blocks': 'blocks', 'name': 'name'} - _toPy = {'model-uuid': 'model_uuid', 'blocks': 'blocks', 'owner-tag': 'owner_tag', 'name': 'name'} - def __init__(self, blocks=None, model_uuid=None, name=None, owner_tag=None): +class AgentVersionResult(Type): + _toSchema = {'build': 'Build', 'patch': 'Patch', 'tag': 'Tag', 'minor': 'Minor', 'major': 'Major'} + _toPy = {'Tag': 'tag', 'Major': 'major', 'Patch': 'patch', 'Minor': 'minor', 'Build': 'build'} + def __init__(self, build=None, major=None, minor=None, patch=None, tag=None): ''' - blocks : typing.Sequence[str] - model_uuid : str - name : str - owner_tag : str + build : int + major : int + minor : int + patch : int + tag : str ''' - self.blocks = blocks - self.model_uuid = model_uuid - self.name = name - self.owner_tag = owner_tag + self.build = build + self.major = major + self.minor = minor + self.patch = patch + self.tag = tag -class ModelBlockInfoList(Type): - _toSchema = {'models': 'models'} - _toPy = {'models': 'models'} - def __init__(self, models=None): +class AllWatcherId(Type): + _toSchema = {'watcher_id': 'watcher-id'} + _toPy = {'watcher-id': 'watcher_id'} + def __init__(self, watcher_id=None): ''' - models : typing.Sequence[~ModelBlockInfo] + watcher_id : str ''' - self.models = [ModelBlockInfo.from_json(o) for o in models or []] + self.watcher_id = watcher_id -class ModelMigrationSpec(Type): - _toSchema = {'model_tag': 'model-tag', 'target_info': 'target-info'} - _toPy = {'model-tag': 'model_tag', 'target-info': 'target_info'} - def __init__(self, model_tag=None, target_info=None): +class ApplicationStatus(Type): + _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'} + _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'} + 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): ''' - model_tag : str - target_info : ModelMigrationTargetInfo + can_upgrade_to : str + charm : str + err : typing.Mapping<~KT, +VT_co>[str, typing.Any] + exposed : bool + life : str + meter_statuses : typing.Mapping<~KT, +VT_co>[str, ~MeterStatus]<~MeterStatus> + relations : typing.Sequence<+T_co>[str] + series : str + status : DetailedStatus + subordinate_to : typing.Sequence<+T_co>[str] + units : typing.Mapping<~KT, +VT_co>[str, ~UnitStatus]<~UnitStatus> + workload_version : str ''' - self.model_tag = model_tag - self.target_info = ModelMigrationTargetInfo.from_json(target_info) if target_info else None + self.can_upgrade_to = can_upgrade_to + self.charm = charm + self.err = err + self.exposed = exposed + self.life = life + self.meter_statuses = meter_statuses + self.relations = relations + self.series = series + self.status = DetailedStatus.from_json(status) if status else None + self.subordinate_to = subordinate_to + self.units = units + self.workload_version = workload_version -class ModelMigrationTargetInfo(Type): - _toSchema = {'auth_tag': 'auth-tag', 'password': 'password', 'controller_tag': 'controller-tag', 'ca_cert': 'ca-cert', 'addrs': 'addrs'} - _toPy = {'password': 'password', 'auth-tag': 'auth_tag', 'ca-cert': 'ca_cert', 'controller-tag': 'controller_tag', 'addrs': 'addrs'} - def __init__(self, addrs=None, auth_tag=None, ca_cert=None, controller_tag=None, password=None): +class Binary(Type): + _toSchema = {'number': 'Number', 'series': 'Series', 'arch': 'Arch'} + _toPy = {'Series': 'series', 'Arch': 'arch', 'Number': 'number'} + def __init__(self, arch=None, number=None, series=None): ''' - addrs : typing.Sequence[str] - auth_tag : str - ca_cert : str - controller_tag : str - password : str + arch : str + number : Number + series : str ''' - self.addrs = addrs - self.auth_tag = auth_tag - self.ca_cert = ca_cert - self.controller_tag = controller_tag - self.password = password + self.arch = arch + self.number = Number.from_json(number) if number else None + self.series = series -class ModelStatus(Type): - _toSchema = {'hosted_machine_count': 'hosted-machine-count', 'service_count': 'service-count', 'life': 'life', 'model_tag': 'model-tag', 'owner_tag': 'owner-tag'} - _toPy = {'model-tag': 'model_tag', 'service-count': 'service_count', 'life': 'life', 'hosted-machine-count': 'hosted_machine_count', 'owner-tag': 'owner_tag'} - def __init__(self, hosted_machine_count=None, life=None, model_tag=None, owner_tag=None, service_count=None): +class BundleChangesChange(Type): + _toSchema = {'args': 'args', 'requires': 'requires', 'id_': 'id', 'method': 'method'} + _toPy = {'args': 'args', 'id': 'id_', 'requires': 'requires', 'method': 'method'} + def __init__(self, args=None, id_=None, method=None, requires=None): ''' - hosted_machine_count : int - life : str - model_tag : str - owner_tag : str - service_count : int + args : typing.Sequence<+T_co>[typing.Any] + id_ : str + method : str + requires : typing.Sequence<+T_co>[str] ''' - self.hosted_machine_count = hosted_machine_count - self.life = life - self.model_tag = model_tag - self.owner_tag = owner_tag - self.service_count = service_count + self.args = args + self.id_ = id_ + self.method = method + self.requires = requires -class ModelStatusResults(Type): - _toSchema = {'models': 'models'} - _toPy = {'models': 'models'} - def __init__(self, models=None): +class ConfigValue(Type): + _toSchema = {'source': 'source', 'value': 'value'} + _toPy = {'source': 'source', 'value': 'value'} + def __init__(self, source=None, value=None): ''' - models : typing.Sequence[~ModelStatus] + source : str + value : typing.Mapping<~KT, +VT_co>[str, typing.Any] ''' - self.models = [ModelStatus.from_json(o) for o in models or []] + self.source = source + self.value = value -class RemoveBlocksArgs(Type): - _toSchema = {'all_': 'all'} - _toPy = {'all': 'all_'} - def __init__(self, all_=None): +class DestroyMachines(Type): + _toSchema = {'machine_names': 'machine-names', 'force': 'force'} + _toPy = {'force': 'force', 'machine-names': 'machine_names'} + def __init__(self, force=None, machine_names=None): ''' - all_ : bool + force : bool + machine_names : typing.Sequence<+T_co>[str] ''' - self.all_ = all_ + self.force = force + self.machine_names = machine_names -class UserModel(Type): - _toSchema = {'model': 'Model', 'lastconnection': 'LastConnection'} - _toPy = {'LastConnection': 'lastconnection', 'Model': 'model'} - def __init__(self, lastconnection=None, model=None): +class DetailedStatus(Type): + _toSchema = {'info': 'info', 'data': 'data', 'kind': 'kind', 'since': 'since', 'err': 'err', 'life': 'life', 'status': 'status', 'version': 'version'} + _toPy = {'info': 'info', 'data': 'data', 'kind': 'kind', 'since': 'since', 'err': 'err', 'life': 'life', 'status': 'status', 'version': 'version'} + def __init__(self, data=None, err=None, info=None, kind=None, life=None, since=None, status=None, version=None): ''' - lastconnection : str - model : Model + data : typing.Mapping<~KT, +VT_co>[str, typing.Any] + err : typing.Mapping<~KT, +VT_co>[str, typing.Any] + info : str + kind : str + life : str + since : str + status : str + version : str ''' - self.lastconnection = lastconnection - self.model = Model.from_json(model) if model else None + self.data = data + self.err = err + self.info = info + self.kind = kind + self.life = life + self.since = since + self.status = status + self.version = version -class UserModelList(Type): - _toSchema = {'usermodels': 'UserModels'} - _toPy = {'UserModels': 'usermodels'} - def __init__(self, usermodels=None): +class EndpointStatus(Type): + _toSchema = {'application': 'application', 'name': 'name', 'role': 'role', 'subordinate': 'subordinate'} + _toPy = {'application': 'application', 'name': 'name', 'role': 'role', 'subordinate': 'subordinate'} + def __init__(self, application=None, name=None, role=None, subordinate=None): ''' - usermodels : typing.Sequence[~UserModel] + application : str + name : str + role : str + subordinate : bool ''' - self.usermodels = [UserModel.from_json(o) for o in usermodels or []] + self.application = application + self.name = name + self.role = role + self.subordinate = subordinate -class BytesResult(Type): - _toSchema = {'result': 'Result'} - _toPy = {'Result': 'result'} - def __init__(self, result=None): +class EntityStatus(Type): + _toSchema = {'info': 'info', 'data': 'data', 'status': 'status', 'since': 'since'} + _toPy = {'info': 'info', 'data': 'data', 'status': 'status', 'since': 'since'} + def __init__(self, data=None, info=None, since=None, status=None): ''' - result : typing.Sequence[int] + data : typing.Mapping<~KT, +VT_co>[str, typing.Any] + info : str + since : str + status : str ''' - self.result = result + self.data = data + self.info = info + self.since = since + self.status = status -class DeployerConnectionValues(Type): - _toSchema = {'apiaddresses': 'APIAddresses', 'stateaddresses': 'StateAddresses'} - _toPy = {'StateAddresses': 'stateaddresses', 'APIAddresses': 'apiaddresses'} - def __init__(self, apiaddresses=None, stateaddresses=None): +class FindToolsParams(Type): + _toSchema = {'series': 'series', 'number': 'number', 'minor': 'minor', 'major': 'major', 'arch': 'arch'} + _toPy = {'series': 'series', 'number': 'number', 'minor': 'minor', 'major': 'major', 'arch': 'arch'} + def __init__(self, arch=None, major=None, minor=None, number=None, series=None): ''' - apiaddresses : typing.Sequence[str] - stateaddresses : typing.Sequence[str] + arch : str + major : int + minor : int + number : Number + series : str ''' - self.apiaddresses = apiaddresses - self.stateaddresses = stateaddresses + self.arch = arch + self.major = major + self.minor = minor + self.number = Number.from_json(number) if number else None + self.series = series -class LifeResult(Type): - _toSchema = {'error': 'Error', 'life': 'Life'} - _toPy = {'Error': 'error', 'Life': 'life'} - def __init__(self, error=None, life=None): +class FindToolsResult(Type): + _toSchema = {'list_': 'list', 'error': 'error'} + _toPy = {'list': 'list_', 'error': 'error'} + def __init__(self, error=None, list_=None): ''' error : Error - life : str + list_ : typing.Sequence<+T_co>[~Tools]<~Tools> ''' self.error = Error.from_json(error) if error else None - self.life = life + self.list_ = [Tools.from_json(o) for o in list_ or []] -class LifeResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): +class FullStatus(Type): + _toSchema = {'relations': 'relations', 'machines': 'machines', 'applications': 'applications', 'model': 'model'} + _toPy = {'relations': 'relations', 'machines': 'machines', 'applications': 'applications', 'model': 'model'} + def __init__(self, applications=None, machines=None, model=None, relations=None): ''' - results : typing.Sequence[~LifeResult] + applications : typing.Mapping<~KT, +VT_co>[str, ~ApplicationStatus]<~ApplicationStatus> + machines : typing.Mapping<~KT, +VT_co>[str, ~MachineStatus]<~MachineStatus> + model : ModelStatusInfo + relations : typing.Sequence<+T_co>[~RelationStatus]<~RelationStatus> ''' - self.results = [LifeResult.from_json(o) for o in results or []] + self.applications = applications + self.machines = machines + self.model = ModelStatusInfo.from_json(model) if model else None + self.relations = [RelationStatus.from_json(o) for o in relations or []] -class StringResult(Type): - _toSchema = {'error': 'Error', 'result': 'Result'} - _toPy = {'Error': 'error', 'Result': 'result'} - def __init__(self, error=None, result=None): +class GetBundleChangesParams(Type): + _toSchema = {'yaml': 'yaml'} + _toPy = {'yaml': 'yaml'} + def __init__(self, yaml=None): ''' - error : Error - result : str + yaml : str ''' - self.error = Error.from_json(error) if error else None - self.result = result + self.yaml = yaml -class StringsResult(Type): - _toSchema = {'error': 'Error', 'result': 'Result'} - _toPy = {'Error': 'error', 'Result': 'result'} - def __init__(self, error=None, result=None): - ''' - error : Error - result : typing.Sequence[str] - ''' - self.error = Error.from_json(error) if error else None - self.result = result +class GetBundleChangesResults(Type): + _toSchema = {'errors': 'errors', 'changes': 'changes'} + _toPy = {'errors': 'errors', 'changes': 'changes'} + def __init__(self, changes=None, errors=None): + ''' + changes : typing.Sequence<+T_co>[~BundleChangesChange]<~BundleChangesChange> + errors : typing.Sequence<+T_co>[str] + ''' + self.changes = [BundleChangesChange.from_json(o) for o in changes or []] + self.errors = errors -class StringsWatchResult(Type): - _toSchema = {'changes': 'Changes', 'stringswatcherid': 'StringsWatcherId', 'error': 'Error'} - _toPy = {'Changes': 'changes', 'Error': 'error', 'StringsWatcherId': 'stringswatcherid'} - def __init__(self, changes=None, error=None, stringswatcherid=None): +class HardwareCharacteristics(Type): + _toSchema = {'cpu_power': 'cpu-power', 'tags': 'tags', 'availability_zone': 'availability-zone', 'mem': 'mem', 'root_disk': 'root-disk', 'arch': 'arch', 'cpu_cores': 'cpu-cores'} + _toPy = {'cpu-power': 'cpu_power', 'tags': 'tags', 'arch': 'arch', 'mem': 'mem', 'availability-zone': 'availability_zone', 'cpu-cores': 'cpu_cores', 'root-disk': 'root_disk'} + def __init__(self, arch=None, availability_zone=None, cpu_cores=None, cpu_power=None, mem=None, root_disk=None, tags=None): ''' - changes : typing.Sequence[str] - error : Error - stringswatcherid : str + arch : str + availability_zone : str + cpu_cores : int + cpu_power : int + mem : int + root_disk : int + tags : typing.Sequence<+T_co>[str] ''' - self.changes = changes - self.error = Error.from_json(error) if error else None - self.stringswatcherid = stringswatcherid + self.arch = arch + self.availability_zone = availability_zone + self.cpu_cores = cpu_cores + self.cpu_power = cpu_power + self.mem = mem + self.root_disk = root_disk + self.tags = tags -class StringsWatchResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): +class History(Type): + _toSchema = {'statuses': 'statuses', 'error': 'error'} + _toPy = {'statuses': 'statuses', 'error': 'error'} + def __init__(self, error=None, statuses=None): ''' - results : typing.Sequence[~StringsWatchResult] + error : Error + statuses : typing.Sequence<+T_co>[~DetailedStatus]<~DetailedStatus> ''' - self.results = [StringsWatchResult.from_json(o) for o in results or []] + self.error = Error.from_json(error) if error else None + self.statuses = [DetailedStatus.from_json(o) for o in statuses or []] -class AddSubnetParams(Type): - _toSchema = {'subnettag': 'SubnetTag', 'zones': 'Zones', 'subnetproviderid': 'SubnetProviderId', 'spacetag': 'SpaceTag'} - _toPy = {'SpaceTag': 'spacetag', 'SubnetProviderId': 'subnetproviderid', 'SubnetTag': 'subnettag', 'Zones': 'zones'} - def __init__(self, spacetag=None, subnetproviderid=None, subnettag=None, zones=None): - ''' - spacetag : str - subnetproviderid : str - subnettag : str - zones : typing.Sequence[str] - ''' - self.spacetag = spacetag - self.subnetproviderid = subnetproviderid - self.subnettag = subnettag - self.zones = zones +class HostPort(Type): + _toSchema = {'port': 'port', 'address': 'Address'} + _toPy = {'Address': 'address', 'port': 'port'} + def __init__(self, address=None, port=None): + ''' + address : Address + port : int + ''' + self.address = Address.from_json(address) if address else None + self.port = port -class AddSubnetsParams(Type): - _toSchema = {'subnets': 'Subnets'} - _toPy = {'Subnets': 'subnets'} - def __init__(self, subnets=None): +class MachineStatus(Type): + _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'} + _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'} + 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): ''' - subnets : typing.Sequence[~AddSubnetParams] + agent_status : DetailedStatus + containers : typing.Mapping<~KT, +VT_co>[str, ~MachineStatus]<~MachineStatus> + dns_name : str + hardware : str + has_vote : bool + id_ : str + instance_id : str + instance_status : DetailedStatus + jobs : typing.Sequence<+T_co>[str] + series : str + wants_vote : bool ''' - self.subnets = [AddSubnetParams.from_json(o) for o in subnets or []] + self.agent_status = DetailedStatus.from_json(agent_status) if agent_status else None + self.containers = containers + self.dns_name = dns_name + self.hardware = hardware + self.has_vote = has_vote + self.id_ = id_ + self.instance_id = instance_id + self.instance_status = DetailedStatus.from_json(instance_status) if instance_status else None + self.jobs = jobs + self.series = series + self.wants_vote = wants_vote -class CreateSpaceParams(Type): - _toSchema = {'public': 'Public', 'subnettags': 'SubnetTags', 'providerid': 'ProviderId', 'spacetag': 'SpaceTag'} - _toPy = {'ProviderId': 'providerid', 'Public': 'public', 'SpaceTag': 'spacetag', 'SubnetTags': 'subnettags'} - def __init__(self, providerid=None, public=None, spacetag=None, subnettags=None): +class MeterStatus(Type): + _toSchema = {'color': 'color', 'message': 'message'} + _toPy = {'color': 'color', 'message': 'message'} + def __init__(self, color=None, message=None): ''' - providerid : str - public : bool - spacetag : str - subnettags : typing.Sequence[str] + color : str + message : str ''' - self.providerid = providerid - self.public = public - self.spacetag = spacetag - self.subnettags = subnettags + self.color = color + self.message = message -class CreateSpacesParams(Type): - _toSchema = {'spaces': 'Spaces'} - _toPy = {'Spaces': 'spaces'} - def __init__(self, spaces=None): +class ModelConfigResults(Type): + _toSchema = {'config': 'config'} + _toPy = {'config': 'config'} + def __init__(self, config=None): ''' - spaces : typing.Sequence[~CreateSpaceParams] + config : typing.Mapping<~KT, +VT_co>[str, ~ConfigValue]<~ConfigValue> ''' - self.spaces = [CreateSpaceParams.from_json(o) for o in spaces or []] + self.config = config -class DiscoverSpacesResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): +class ModelDefaultValues(Type): + _toSchema = {'config': 'config', 'cloud_tag': 'cloud-tag', 'cloud_region': 'cloud-region'} + _toPy = {'config': 'config', 'cloud-tag': 'cloud_tag', 'cloud-region': 'cloud_region'} + def __init__(self, cloud_region=None, cloud_tag=None, config=None): ''' - results : typing.Sequence[~ProviderSpace] + cloud_region : str + cloud_tag : str + config : typing.Mapping<~KT, +VT_co>[str, typing.Any] ''' - self.results = [ProviderSpace.from_json(o) for o in results or []] + self.cloud_region = cloud_region + self.cloud_tag = cloud_tag + self.config = config -class ListSubnetsResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): +class ModelDefaults(Type): + _toSchema = {'controller': 'controller', 'default': 'default', 'regions': 'regions'} + _toPy = {'controller': 'controller', 'default': 'default', 'regions': 'regions'} + def __init__(self, controller=None, default=None, regions=None): ''' - results : typing.Sequence[~Subnet] + controller : typing.Mapping<~KT, +VT_co>[str, typing.Any] + default : typing.Mapping<~KT, +VT_co>[str, typing.Any] + regions : typing.Sequence<+T_co>[~RegionDefaults]<~RegionDefaults> ''' - self.results = [Subnet.from_json(o) for o in results or []] + self.controller = controller + self.default = default + self.regions = [RegionDefaults.from_json(o) for o in regions or []] -class ProviderSpace(Type): - _toSchema = {'subnets': 'Subnets', 'error': 'Error', 'providerid': 'ProviderId', 'name': 'Name'} - _toPy = {'ProviderId': 'providerid', 'Error': 'error', 'Subnets': 'subnets', 'Name': 'name'} - def __init__(self, error=None, name=None, providerid=None, subnets=None): +class ModelDefaultsResult(Type): + _toSchema = {'config': 'config'} + _toPy = {'config': 'config'} + def __init__(self, config=None): ''' - error : Error - name : str - providerid : str - subnets : typing.Sequence[~Subnet] + config : typing.Mapping<~KT, +VT_co>[str, ~ModelDefaults]<~ModelDefaults> ''' - self.error = Error.from_json(error) if error else None - self.name = name - self.providerid = providerid - self.subnets = [Subnet.from_json(o) for o in subnets or []] + self.config = config -class Subnet(Type): - _toSchema = {'zones': 'Zones', 'vlantag': 'VLANTag', 'staticrangelowip': 'StaticRangeLowIP', 'providerid': 'ProviderId', 'spacetag': 'SpaceTag', 'status': 'Status', 'staticrangehighip': 'StaticRangeHighIP', 'life': 'Life', 'cidr': 'CIDR'} - _toPy = {'ProviderId': 'providerid', 'SpaceTag': 'spacetag', 'StaticRangeLowIP': 'staticrangelowip', 'StaticRangeHighIP': 'staticrangehighip', 'Status': 'status', 'CIDR': 'cidr', 'Life': 'life', 'VLANTag': 'vlantag', 'Zones': 'zones'} - def __init__(self, cidr=None, life=None, providerid=None, spacetag=None, staticrangehighip=None, staticrangelowip=None, status=None, vlantag=None, zones=None): - ''' - cidr : str +class ModelInfo(Type): + _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'} + _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'} + 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): + ''' + cloud : str + cloud_credential_tag : str + cloud_region : str + controller_uuid : str + default_series : str life : str - providerid : str - spacetag : str - staticrangehighip : typing.Sequence[int] - staticrangelowip : typing.Sequence[int] - status : str - vlantag : int - zones : typing.Sequence[str] + name : str + owner_tag : str + provider_type : str + status : EntityStatus + users : typing.Sequence<+T_co>[~ModelUserInfo]<~ModelUserInfo> + uuid : str ''' - self.cidr = cidr + self.cloud = cloud + self.cloud_credential_tag = cloud_credential_tag + self.cloud_region = cloud_region + self.controller_uuid = controller_uuid + self.default_series = default_series self.life = life - self.providerid = providerid - self.spacetag = spacetag - self.staticrangehighip = staticrangehighip - self.staticrangelowip = staticrangelowip - self.status = status - self.vlantag = vlantag - self.zones = zones + self.name = name + self.owner_tag = owner_tag + self.provider_type = provider_type + self.status = EntityStatus.from_json(status) if status else None + self.users = [ModelUserInfo.from_json(o) for o in users or []] + self.uuid = uuid -class SubnetsFilters(Type): - _toSchema = {'zone': 'Zone', 'spacetag': 'SpaceTag'} - _toPy = {'SpaceTag': 'spacetag', 'Zone': 'zone'} - def __init__(self, spacetag=None, zone=None): +class ModelSet(Type): + _toSchema = {'config': 'config'} + _toPy = {'config': 'config'} + def __init__(self, config=None): ''' - spacetag : str - zone : str + config : typing.Mapping<~KT, +VT_co>[str, typing.Any] ''' - self.spacetag = spacetag - self.zone = zone + self.config = config -class BlockDevice(Type): - _toSchema = {'devicename': 'DeviceName', 'hardwareid': 'HardwareId', 'inuse': 'InUse', 'uuid': 'UUID', 'mountpoint': 'MountPoint', 'filesystemtype': 'FilesystemType', 'label': 'Label', 'devicelinks': 'DeviceLinks', 'size': 'Size', 'busaddress': 'BusAddress'} - _toPy = {'DeviceLinks': 'devicelinks', 'BusAddress': 'busaddress', 'Size': 'size', 'Label': 'label', 'InUse': 'inuse', 'HardwareId': 'hardwareid', 'UUID': 'uuid', 'DeviceName': 'devicename', 'FilesystemType': 'filesystemtype', 'MountPoint': 'mountpoint'} - def __init__(self, busaddress=None, devicelinks=None, devicename=None, filesystemtype=None, hardwareid=None, inuse=None, label=None, mountpoint=None, size=None, uuid=None): +class ModelStatusInfo(Type): + _toSchema = {'cloud': 'cloud', 'name': 'name', 'migration': 'migration', 'region': 'region', 'available_version': 'available-version', 'version': 'version'} + _toPy = {'available-version': 'available_version', 'cloud': 'cloud', 'name': 'name', 'migration': 'migration', 'region': 'region', 'version': 'version'} + def __init__(self, available_version=None, cloud=None, migration=None, name=None, region=None, version=None): ''' - busaddress : str - devicelinks : typing.Sequence[str] - devicename : str - filesystemtype : str - hardwareid : str - inuse : bool - label : str - mountpoint : str - size : int - uuid : str + available_version : str + cloud : str + migration : str + name : str + region : str + version : str ''' - self.busaddress = busaddress - self.devicelinks = devicelinks - self.devicename = devicename - self.filesystemtype = filesystemtype - self.hardwareid = hardwareid - self.inuse = inuse - self.label = label - self.mountpoint = mountpoint - self.size = size - self.uuid = uuid + self.available_version = available_version + self.cloud = cloud + self.migration = migration + self.name = name + self.region = region + self.version = version -class MachineBlockDevices(Type): - _toSchema = {'machine': 'machine', 'blockdevices': 'blockdevices'} - _toPy = {'machine': 'machine', 'blockdevices': 'blockdevices'} - def __init__(self, blockdevices=None, machine=None): +class ModelUnset(Type): + _toSchema = {'keys': 'keys'} + _toPy = {'keys': 'keys'} + def __init__(self, keys=None): ''' - blockdevices : typing.Sequence[~BlockDevice] - machine : str + keys : typing.Sequence<+T_co>[str] ''' - self.blockdevices = [BlockDevice.from_json(o) for o in blockdevices or []] - self.machine = machine + self.keys = keys -class SetMachineBlockDevices(Type): - _toSchema = {'machineblockdevices': 'machineblockdevices'} - _toPy = {'machineblockdevices': 'machineblockdevices'} - def __init__(self, machineblockdevices=None): +class ModelUnsetKeys(Type): + _toSchema = {'cloud_tag': 'cloud-tag', 'keys': 'keys', 'cloud_region': 'cloud-region'} + _toPy = {'cloud-tag': 'cloud_tag', 'cloud-region': 'cloud_region', 'keys': 'keys'} + def __init__(self, cloud_region=None, cloud_tag=None, keys=None): ''' - machineblockdevices : typing.Sequence[~MachineBlockDevices] + cloud_region : str + cloud_tag : str + keys : typing.Sequence<+T_co>[str] ''' - self.machineblockdevices = [MachineBlockDevices.from_json(o) for o in machineblockdevices or []] + self.cloud_region = cloud_region + self.cloud_tag = cloud_tag + self.keys = keys -class MachineStorageId(Type): - _toSchema = {'machinetag': 'machinetag', 'attachmenttag': 'attachmenttag'} - _toPy = {'machinetag': 'machinetag', 'attachmenttag': 'attachmenttag'} - def __init__(self, attachmenttag=None, machinetag=None): +class ModelUserInfo(Type): + _toSchema = {'display_name': 'display-name', 'access': 'access', 'user': 'user', 'last_connection': 'last-connection'} + _toPy = {'last-connection': 'last_connection', 'access': 'access', 'user': 'user', 'display-name': 'display_name'} + def __init__(self, access=None, display_name=None, last_connection=None, user=None): ''' - attachmenttag : str - machinetag : str + access : str + display_name : str + last_connection : str + user : str ''' - self.attachmenttag = attachmenttag - self.machinetag = machinetag + self.access = access + self.display_name = display_name + self.last_connection = last_connection + self.user = user -class MachineStorageIdsWatchResult(Type): - _toSchema = {'machinestorageidswatcherid': 'MachineStorageIdsWatcherId', 'changes': 'Changes', 'error': 'Error'} - _toPy = {'Changes': 'changes', 'Error': 'error', 'MachineStorageIdsWatcherId': 'machinestorageidswatcherid'} - def __init__(self, changes=None, error=None, machinestorageidswatcherid=None): +class ModelUserInfoResult(Type): + _toSchema = {'result': 'result', 'error': 'error'} + _toPy = {'result': 'result', 'error': 'error'} + def __init__(self, error=None, result=None): ''' - changes : typing.Sequence[~MachineStorageId] error : Error - machinestorageidswatcherid : str + result : ModelUserInfo ''' - self.changes = [MachineStorageId.from_json(o) for o in changes or []] self.error = Error.from_json(error) if error else None - self.machinestorageidswatcherid = machinestorageidswatcherid + self.result = ModelUserInfo.from_json(result) if result else None -class BoolResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} +class ModelUserInfoResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} def __init__(self, results=None): ''' - results : typing.Sequence[~BoolResult] + results : typing.Sequence<+T_co>[~ModelUserInfoResult]<~ModelUserInfoResult> ''' - self.results = [BoolResult.from_json(o) for o in results or []] + self.results = [ModelUserInfoResult.from_json(o) for o in results or []] -class MachinePortRange(Type): - _toSchema = {'unittag': 'UnitTag', 'relationtag': 'RelationTag', 'portrange': 'PortRange'} - _toPy = {'RelationTag': 'relationtag', 'UnitTag': 'unittag', 'PortRange': 'portrange'} - def __init__(self, portrange=None, relationtag=None, unittag=None): +class PrivateAddress(Type): + _toSchema = {'target': 'target'} + _toPy = {'target': 'target'} + def __init__(self, target=None): ''' - portrange : PortRange - relationtag : str - unittag : str + target : str ''' - self.portrange = PortRange.from_json(portrange) if portrange else None - self.relationtag = relationtag - self.unittag = unittag + self.target = target -class MachinePorts(Type): - _toSchema = {'machinetag': 'MachineTag', 'subnettag': 'SubnetTag'} - _toPy = {'MachineTag': 'machinetag', 'SubnetTag': 'subnettag'} - def __init__(self, machinetag=None, subnettag=None): +class PrivateAddressResults(Type): + _toSchema = {'private_address': 'private-address'} + _toPy = {'private-address': 'private_address'} + def __init__(self, private_address=None): ''' - machinetag : str - subnettag : str + private_address : str ''' - self.machinetag = machinetag - self.subnettag = subnettag + self.private_address = private_address -class MachinePortsParams(Type): - _toSchema = {'params': 'Params'} - _toPy = {'Params': 'params'} - def __init__(self, params=None): +class ProvisioningScriptParams(Type): + _toSchema = {'data_dir': 'data-dir', 'nonce': 'nonce', 'disable_package_commands': 'disable-package-commands', 'machine_id': 'machine-id'} + _toPy = {'machine-id': 'machine_id', 'data-dir': 'data_dir', 'nonce': 'nonce', 'disable-package-commands': 'disable_package_commands'} + def __init__(self, data_dir=None, disable_package_commands=None, machine_id=None, nonce=None): ''' - params : typing.Sequence[~MachinePorts] + data_dir : str + disable_package_commands : bool + machine_id : str + nonce : str ''' - self.params = [MachinePorts.from_json(o) for o in params or []] + self.data_dir = data_dir + self.disable_package_commands = disable_package_commands + self.machine_id = machine_id + self.nonce = nonce -class MachinePortsResult(Type): - _toSchema = {'error': 'Error', 'ports': 'Ports'} - _toPy = {'Error': 'error', 'Ports': 'ports'} - def __init__(self, error=None, ports=None): +class ProvisioningScriptResult(Type): + _toSchema = {'script': 'script'} + _toPy = {'script': 'script'} + def __init__(self, script=None): ''' - error : Error - ports : typing.Sequence[~MachinePortRange] + script : str ''' - self.error = Error.from_json(error) if error else None - self.ports = [MachinePortRange.from_json(o) for o in ports or []] + self.script = script -class MachinePortsResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): +class PublicAddress(Type): + _toSchema = {'target': 'target'} + _toPy = {'target': 'target'} + def __init__(self, target=None): ''' - results : typing.Sequence[~MachinePortsResult] + target : str ''' - self.results = [MachinePortsResult.from_json(o) for o in results or []] + self.target = target -class NotifyWatchResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): +class PublicAddressResults(Type): + _toSchema = {'public_address': 'public-address'} + _toPy = {'public-address': 'public_address'} + def __init__(self, public_address=None): ''' - results : typing.Sequence[~NotifyWatchResult] + public_address : str ''' - self.results = [NotifyWatchResult.from_json(o) for o in results or []] + self.public_address = public_address -class PortRange(Type): - _toSchema = {'protocol': 'Protocol', 'fromport': 'FromPort', 'toport': 'ToPort'} - _toPy = {'ToPort': 'toport', 'Protocol': 'protocol', 'FromPort': 'fromport'} - def __init__(self, fromport=None, protocol=None, toport=None): +class RegionDefaults(Type): + _toSchema = {'value': 'value', 'region_name': 'region-name'} + _toPy = {'region-name': 'region_name', 'value': 'value'} + def __init__(self, region_name=None, value=None): ''' - fromport : int - protocol : str - toport : int + region_name : str + value : typing.Mapping<~KT, +VT_co>[str, typing.Any] ''' - self.fromport = fromport - self.protocol = protocol - self.toport = toport + self.region_name = region_name + self.value = value -class StringResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): +class RelationStatus(Type): + _toSchema = {'interface': 'interface', 'endpoints': 'endpoints', 'id_': 'id', 'key': 'key', 'scope': 'scope'} + _toPy = {'id': 'id_', 'interface': 'interface', 'endpoints': 'endpoints', 'scope': 'scope', 'key': 'key'} + def __init__(self, endpoints=None, id_=None, interface=None, key=None, scope=None): ''' - results : typing.Sequence[~StringResult] + endpoints : typing.Sequence<+T_co>[~EndpointStatus]<~EndpointStatus> + id_ : int + interface : str + key : str + scope : str ''' - self.results = [StringResult.from_json(o) for o in results or []] + self.endpoints = [EndpointStatus.from_json(o) for o in endpoints or []] + self.id_ = id_ + self.interface = interface + self.key = key + self.scope = scope -class StringsResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): +class ResolveCharmResult(Type): + _toSchema = {'url': 'url', 'error': 'error'} + _toPy = {'url': 'url', 'error': 'error'} + def __init__(self, error=None, url=None): ''' - results : typing.Sequence[~StringsResult] + error : str + url : str ''' - self.results = [StringsResult.from_json(o) for o in results or []] + self.error = error + self.url = url -class ControllersChangeResult(Type): - _toSchema = {'error': 'Error', 'result': 'Result'} - _toPy = {'Error': 'error', 'Result': 'result'} - def __init__(self, error=None, result=None): +class ResolveCharmResults(Type): + _toSchema = {'urls': 'urls'} + _toPy = {'urls': 'urls'} + def __init__(self, urls=None): ''' - error : Error - result : ControllersChanges + urls : typing.Sequence<+T_co>[~ResolveCharmResult]<~ResolveCharmResult> ''' - self.error = Error.from_json(error) if error else None - self.result = ControllersChanges.from_json(result) if result else None + self.urls = [ResolveCharmResult.from_json(o) for o in urls or []] -class ControllersChangeResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): +class ResolveCharms(Type): + _toSchema = {'references': 'references'} + _toPy = {'references': 'references'} + def __init__(self, references=None): ''' - results : typing.Sequence[~ControllersChangeResult] + references : typing.Sequence<+T_co>[str] ''' - self.results = [ControllersChangeResult.from_json(o) for o in results or []] + self.references = references -class ControllersChanges(Type): - _toSchema = {'added': 'added', 'maintained': 'maintained', 'promoted': 'promoted', 'removed': 'removed', 'demoted': 'demoted', 'converted': 'converted'} - _toPy = {'added': 'added', 'maintained': 'maintained', 'promoted': 'promoted', 'removed': 'removed', 'demoted': 'demoted', 'converted': 'converted'} - def __init__(self, added=None, converted=None, demoted=None, maintained=None, promoted=None, removed=None): +class Resolved(Type): + _toSchema = {'unit_name': 'unit-name', 'retry': 'retry'} + _toPy = {'unit-name': 'unit_name', 'retry': 'retry'} + def __init__(self, retry=None, unit_name=None): ''' - added : typing.Sequence[str] - converted : typing.Sequence[str] - demoted : typing.Sequence[str] - maintained : typing.Sequence[str] - promoted : typing.Sequence[str] - removed : typing.Sequence[str] + retry : bool + unit_name : str ''' - self.added = added - self.converted = converted - self.demoted = demoted - self.maintained = maintained - self.promoted = promoted - self.removed = removed + self.retry = retry + self.unit_name = unit_name -class ControllersSpec(Type): - _toSchema = {'modeltag': 'ModelTag', 'num_controllers': 'num-controllers', 'constraints': 'constraints', 'placement': 'placement', 'series': 'series'} - _toPy = {'num-controllers': 'num_controllers', 'ModelTag': 'modeltag', 'constraints': 'constraints', 'placement': 'placement', 'series': 'series'} - def __init__(self, modeltag=None, constraints=None, num_controllers=None, placement=None, series=None): - ''' - modeltag : str - constraints : Value - num_controllers : int - placement : typing.Sequence[str] - series : str +class SetModelAgentVersion(Type): + _toSchema = {'build': 'Build', 'patch': 'Patch', 'tag': 'Tag', 'minor': 'Minor', 'major': 'Major'} + _toPy = {'Tag': 'tag', 'Major': 'major', 'Patch': 'patch', 'Minor': 'minor', 'Build': 'build'} + def __init__(self, build=None, major=None, minor=None, patch=None, tag=None): ''' - self.modeltag = modeltag - self.constraints = Value.from_json(constraints) if constraints else None - self.num_controllers = num_controllers - self.placement = placement - self.series = series + build : int + major : int + minor : int + patch : int + tag : str + ''' + self.build = build + self.major = major + self.minor = minor + self.patch = patch + self.tag = tag -class ControllersSpecs(Type): - _toSchema = {'specs': 'Specs'} - _toPy = {'Specs': 'specs'} - def __init__(self, specs=None): +class SetModelDefaults(Type): + _toSchema = {'config': 'config'} + _toPy = {'config': 'config'} + def __init__(self, config=None): ''' - specs : typing.Sequence[~ControllersSpec] + config : typing.Sequence<+T_co>[~ModelDefaultValues]<~ModelDefaultValues> ''' - self.specs = [ControllersSpec.from_json(o) for o in specs or []] + self.config = [ModelDefaultValues.from_json(o) for o in config or []] -class HAMember(Type): - _toSchema = {'series': 'Series', 'publicaddress': 'PublicAddress', 'tag': 'Tag'} - _toPy = {'Tag': 'tag', 'PublicAddress': 'publicaddress', 'Series': 'series'} - def __init__(self, publicaddress=None, series=None, tag=None): +class StatusHistoryFilter(Type): + _toSchema = {'size': 'size', 'date': 'date', 'delta': 'delta'} + _toPy = {'size': 'size', 'date': 'date', 'delta': 'delta'} + def __init__(self, date=None, delta=None, size=None): ''' - publicaddress : Address - series : str - tag : str + date : str + delta : int + size : int ''' - self.publicaddress = Address.from_json(publicaddress) if publicaddress else None - self.series = series - self.tag = tag + self.date = date + self.delta = delta + self.size = size -class Member(Type): - _toSchema = {'hidden': 'Hidden', 'tags': 'Tags', 'buildindexes': 'BuildIndexes', 'address': 'Address', 'slavedelay': 'SlaveDelay', 'votes': 'Votes', 'id_': 'Id', 'arbiter': 'Arbiter', 'priority': 'Priority'} - _toPy = {'Tags': 'tags', 'SlaveDelay': 'slavedelay', 'Votes': 'votes', 'Arbiter': 'arbiter', 'Address': 'address', 'Hidden': 'hidden', 'Priority': 'priority', 'BuildIndexes': 'buildindexes', 'Id': 'id_'} - def __init__(self, address=None, arbiter=None, buildindexes=None, hidden=None, id_=None, priority=None, slavedelay=None, tags=None, votes=None): +class StatusHistoryRequest(Type): + _toSchema = {'historykind': 'historyKind', 'tag': 'tag', 'size': 'size', 'filter_': 'filter'} + _toPy = {'filter': 'filter_', 'historyKind': 'historykind', 'tag': 'tag', 'size': 'size'} + def __init__(self, filter_=None, historykind=None, size=None, tag=None): ''' - address : str - arbiter : bool - buildindexes : bool - hidden : bool - id_ : int - priority : float - slavedelay : int - tags : typing.Mapping[str, str] - votes : int + filter_ : StatusHistoryFilter + historykind : str + size : int + tag : str ''' - self.address = address - self.arbiter = arbiter - self.buildindexes = buildindexes - self.hidden = hidden - self.id_ = id_ - self.priority = priority - self.slavedelay = slavedelay - self.tags = tags - self.votes = votes + self.filter_ = StatusHistoryFilter.from_json(filter_) if filter_ else None + self.historykind = historykind + self.size = size + self.tag = tag -class MongoUpgradeResults(Type): - _toSchema = {'members': 'Members', 'master': 'Master', 'rsmembers': 'RsMembers'} - _toPy = {'Master': 'master', 'Members': 'members', 'RsMembers': 'rsmembers'} - def __init__(self, master=None, members=None, rsmembers=None): +class StatusHistoryRequests(Type): + _toSchema = {'requests': 'requests'} + _toPy = {'requests': 'requests'} + def __init__(self, requests=None): ''' - master : HAMember - members : typing.Sequence[~HAMember] - rsmembers : typing.Sequence[~Member] + requests : typing.Sequence<+T_co>[~StatusHistoryRequest]<~StatusHistoryRequest> ''' - self.master = HAMember.from_json(master) if master else None - self.members = [HAMember.from_json(o) for o in members or []] - self.rsmembers = [Member.from_json(o) for o in rsmembers or []] + self.requests = [StatusHistoryRequest.from_json(o) for o in requests or []] -class ResumeReplicationParams(Type): - _toSchema = {'members': 'Members'} - _toPy = {'Members': 'members'} - def __init__(self, members=None): +class StatusHistoryResult(Type): + _toSchema = {'history': 'history', 'error': 'error'} + _toPy = {'history': 'history', 'error': 'error'} + def __init__(self, error=None, history=None): ''' - members : typing.Sequence[~Member] + error : Error + history : History ''' - self.members = [Member.from_json(o) for o in members or []] + self.error = Error.from_json(error) if error else None + self.history = History.from_json(history) if history else None -class UpgradeMongoParams(Type): - _toSchema = {'minor': 'Minor', 'major': 'Major', 'storageengine': 'StorageEngine', 'patch': 'Patch'} - _toPy = {'StorageEngine': 'storageengine', 'Major': 'major', 'Minor': 'minor', 'Patch': 'patch'} - def __init__(self, major=None, minor=None, patch=None, storageengine=None): +class StatusHistoryResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): ''' - major : int - minor : int - patch : str - storageengine : str + results : typing.Sequence<+T_co>[~StatusHistoryResult]<~StatusHistoryResult> ''' - self.major = major - self.minor = minor - self.patch = patch - self.storageengine = storageengine + self.results = [StatusHistoryResult.from_json(o) for o in results or []] -class Version(Type): - _toSchema = {'minor': 'Minor', 'major': 'Major', 'storageengine': 'StorageEngine', 'patch': 'Patch'} - _toPy = {'StorageEngine': 'storageengine', 'Major': 'major', 'Minor': 'minor', 'Patch': 'patch'} - def __init__(self, major=None, minor=None, patch=None, storageengine=None): +class StatusParams(Type): + _toSchema = {'patterns': 'patterns'} + _toPy = {'patterns': 'patterns'} + def __init__(self, patterns=None): ''' - major : int - minor : int - patch : str - storageengine : str + patterns : typing.Sequence<+T_co>[str] ''' - self.major = major - self.minor = minor - self.patch = patch - self.storageengine = storageengine + self.patterns = patterns -class SSHHostKeySet(Type): - _toSchema = {'entity_keys': 'entity-keys'} - _toPy = {'entity-keys': 'entity_keys'} - def __init__(self, entity_keys=None): +class Tools(Type): + _toSchema = {'version': 'version', 'sha256': 'sha256', 'size': 'size', 'url': 'url'} + _toPy = {'version': 'version', 'sha256': 'sha256', 'size': 'size', 'url': 'url'} + def __init__(self, sha256=None, size=None, url=None, version=None): ''' - entity_keys : typing.Sequence[~SSHHostKeys] + sha256 : str + size : int + url : str + version : Binary ''' - self.entity_keys = [SSHHostKeys.from_json(o) for o in entity_keys or []] + self.sha256 = sha256 + self.size = size + self.url = url + self.version = Binary.from_json(version) if version else None -class SSHHostKeys(Type): - _toSchema = {'tag': 'tag', 'public_keys': 'public-keys'} - _toPy = {'public-keys': 'public_keys', 'tag': 'tag'} - def __init__(self, public_keys=None, tag=None): +class UnitStatus(Type): + _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'} + _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'} + def __init__(self, agent_status=None, charm=None, machine=None, opened_ports=None, public_address=None, subordinates=None, workload_status=None, workload_version=None): ''' - public_keys : typing.Sequence[str] - tag : str + agent_status : DetailedStatus + charm : str + machine : str + opened_ports : typing.Sequence<+T_co>[str] + public_address : str + subordinates : typing.Mapping<~KT, +VT_co>[str, ~UnitStatus]<~UnitStatus> + workload_status : DetailedStatus + workload_version : str ''' - self.public_keys = public_keys - self.tag = tag + self.agent_status = DetailedStatus.from_json(agent_status) if agent_status else None + self.charm = charm + self.machine = machine + self.opened_ports = opened_ports + self.public_address = public_address + self.subordinates = subordinates + self.workload_status = DetailedStatus.from_json(workload_status) if workload_status else None + self.workload_version = workload_version -class ImageFilterParams(Type): - _toSchema = {'images': 'images'} - _toPy = {'images': 'images'} - def __init__(self, images=None): +class UnsetModelDefaults(Type): + _toSchema = {'keys': 'keys'} + _toPy = {'keys': 'keys'} + def __init__(self, keys=None): ''' - images : typing.Sequence[~ImageSpec] + keys : typing.Sequence<+T_co>[~ModelUnsetKeys]<~ModelUnsetKeys> ''' - self.images = [ImageSpec.from_json(o) for o in images or []] + self.keys = [ModelUnsetKeys.from_json(o) for o in keys or []] -class ImageMetadata(Type): - _toSchema = {'series': 'series', 'arch': 'arch', 'kind': 'kind', 'created': 'created', 'url': 'url'} - _toPy = {'series': 'series', 'arch': 'arch', 'kind': 'kind', 'created': 'created', 'url': 'url'} - def __init__(self, arch=None, created=None, kind=None, series=None, url=None): +class Cloud(Type): + _toSchema = {'type_': 'type', 'identity_endpoint': 'identity-endpoint', 'storage_endpoint': 'storage-endpoint', 'regions': 'regions', 'auth_types': 'auth-types', 'endpoint': 'endpoint'} + _toPy = {'auth-types': 'auth_types', 'regions': 'regions', 'type': 'type_', 'identity-endpoint': 'identity_endpoint', 'endpoint': 'endpoint', 'storage-endpoint': 'storage_endpoint'} + def __init__(self, auth_types=None, endpoint=None, identity_endpoint=None, regions=None, storage_endpoint=None, type_=None): ''' - arch : str - created : str - kind : str - series : str - url : str + auth_types : typing.Sequence<+T_co>[str] + endpoint : str + identity_endpoint : str + regions : typing.Sequence<+T_co>[~CloudRegion]<~CloudRegion> + storage_endpoint : str + type_ : str ''' - self.arch = arch - self.created = created - self.kind = kind - self.series = series - self.url = url + self.auth_types = auth_types + self.endpoint = endpoint + self.identity_endpoint = identity_endpoint + self.regions = [CloudRegion.from_json(o) for o in regions or []] + self.storage_endpoint = storage_endpoint + self.type_ = type_ -class ImageSpec(Type): - _toSchema = {'series': 'series', 'arch': 'arch', 'kind': 'kind'} - _toPy = {'series': 'series', 'arch': 'arch', 'kind': 'kind'} - def __init__(self, arch=None, kind=None, series=None): +class CloudCredentialResult(Type): + _toSchema = {'result': 'result', 'error': 'error'} + _toPy = {'result': 'result', 'error': 'error'} + def __init__(self, error=None, result=None): ''' - arch : str - kind : str - series : str + error : Error + result : CloudCredential ''' - self.arch = arch - self.kind = kind - self.series = series + self.error = Error.from_json(error) if error else None + self.result = CloudCredential.from_json(result) if result else None -class ListImageResult(Type): - _toSchema = {'result': 'result'} - _toPy = {'result': 'result'} - def __init__(self, result=None): +class CloudCredentialResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): ''' - result : typing.Sequence[~ImageMetadata] + results : typing.Sequence<+T_co>[~CloudCredentialResult]<~CloudCredentialResult> ''' - self.result = [ImageMetadata.from_json(o) for o in result or []] + self.results = [CloudCredentialResult.from_json(o) for o in results or []] -class CloudImageMetadata(Type): - _toSchema = {'root_storage_type': 'root_storage_type', 'virt_type': 'virt_type', 'version': 'version', 'image_id': 'image_id', 'series': 'series', 'source': 'source', 'root_storage_size': 'root_storage_size', 'arch': 'arch', 'stream': 'stream', 'region': 'region', 'priority': 'priority'} - _toPy = {'root_storage_type': 'root_storage_type', 'virt_type': 'virt_type', 'version': 'version', 'image_id': 'image_id', 'series': 'series', 'source': 'source', 'root_storage_size': 'root_storage_size', 'arch': 'arch', 'stream': 'stream', 'region': 'region', 'priority': 'priority'} - 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): +class CloudRegion(Type): + _toSchema = {'name': 'name', 'endpoint': 'endpoint', 'storage_endpoint': 'storage-endpoint', 'identity_endpoint': 'identity-endpoint'} + _toPy = {'identity-endpoint': 'identity_endpoint', 'endpoint': 'endpoint', 'storage-endpoint': 'storage_endpoint', 'name': 'name'} + def __init__(self, endpoint=None, identity_endpoint=None, name=None, storage_endpoint=None): ''' - arch : str - image_id : str - priority : int - region : str - root_storage_size : int - root_storage_type : str - series : str - source : str - stream : str - version : str - virt_type : str + endpoint : str + identity_endpoint : str + name : str + storage_endpoint : str ''' - self.arch = arch - self.image_id = image_id - self.priority = priority - self.region = region - self.root_storage_size = root_storage_size - self.root_storage_type = root_storage_type - self.series = series - self.source = source - self.stream = stream - self.version = version - self.virt_type = virt_type + self.endpoint = endpoint + self.identity_endpoint = identity_endpoint + self.name = name + self.storage_endpoint = storage_endpoint -class CloudImageMetadataList(Type): - _toSchema = {'metadata': 'metadata'} - _toPy = {'metadata': 'metadata'} - def __init__(self, metadata=None): +class CloudResult(Type): + _toSchema = {'cloud': 'cloud', 'error': 'error'} + _toPy = {'cloud': 'cloud', 'error': 'error'} + def __init__(self, cloud=None, error=None): ''' - metadata : typing.Sequence[~CloudImageMetadata] + cloud : Cloud + error : Error ''' - self.metadata = [CloudImageMetadata.from_json(o) for o in metadata or []] + self.cloud = Cloud.from_json(cloud) if cloud else None + self.error = Error.from_json(error) if error else None -class ImageMetadataFilter(Type): - _toSchema = {'series': 'series', 'virt_type': 'virt_type', 'stream': 'stream', 'arches': 'arches', 'root_storage_type': 'root-storage-type', 'region': 'region'} - _toPy = {'arches': 'arches', 'virt_type': 'virt_type', 'stream': 'stream', 'series': 'series', 'root-storage-type': 'root_storage_type', 'region': 'region'} - def __init__(self, arches=None, region=None, root_storage_type=None, series=None, stream=None, virt_type=None): +class CloudResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): ''' - arches : typing.Sequence[str] - region : str - root_storage_type : str - series : typing.Sequence[str] - stream : str - virt_type : str + results : typing.Sequence<+T_co>[~CloudResult]<~CloudResult> ''' - self.arches = arches - self.region = region - self.root_storage_type = root_storage_type - self.series = series - self.stream = stream - self.virt_type = virt_type + self.results = [CloudResult.from_json(o) for o in results or []] -class ListCloudImageMetadataResult(Type): - _toSchema = {'result': 'result'} - _toPy = {'result': 'result'} - def __init__(self, result=None): +class CloudsResult(Type): + _toSchema = {'clouds': 'clouds'} + _toPy = {'clouds': 'clouds'} + def __init__(self, clouds=None): ''' - result : typing.Sequence[~CloudImageMetadata] + clouds : typing.Mapping<~KT, +VT_co>[str, ~Cloud]<~Cloud> ''' - self.result = [CloudImageMetadata.from_json(o) for o in result or []] + self.clouds = clouds -class MetadataImageIds(Type): - _toSchema = {'image_ids': 'image_ids'} - _toPy = {'image_ids': 'image_ids'} - def __init__(self, image_ids=None): +class StringsResult(Type): + _toSchema = {'result': 'result', 'error': 'error'} + _toPy = {'result': 'result', 'error': 'error'} + def __init__(self, error=None, result=None): ''' - image_ids : typing.Sequence[str] + error : Error + result : typing.Sequence<+T_co>[str] ''' - self.image_ids = image_ids + self.error = Error.from_json(error) if error else None + self.result = result -class MetadataSaveParams(Type): - _toSchema = {'metadata': 'metadata'} - _toPy = {'metadata': 'metadata'} - def __init__(self, metadata=None): +class StringsResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): ''' - metadata : typing.Sequence[~CloudImageMetadataList] + results : typing.Sequence<+T_co>[~StringsResult]<~StringsResult> ''' - self.metadata = [CloudImageMetadataList.from_json(o) for o in metadata or []] + self.results = [StringsResult.from_json(o) for o in results or []] -class EntityStatusArgs(Type): - _toSchema = {'info': 'Info', 'status': 'Status', 'tag': 'Tag', 'data': 'Data'} - _toPy = {'Info': 'info', 'Status': 'status', 'Tag': 'tag', 'Data': 'data'} - def __init__(self, data=None, info=None, status=None, tag=None): +class UpdateCloudCredential(Type): + _toSchema = {'tag': 'tag', 'credential': 'credential'} + _toPy = {'tag': 'tag', 'credential': 'credential'} + def __init__(self, credential=None, tag=None): ''' - data : typing.Mapping[str, typing.Any] - info : str - status : str + credential : CloudCredential tag : str ''' - self.data = data - self.info = info - self.status = status + self.credential = CloudCredential.from_json(credential) if credential else None self.tag = tag -class MachineAddresses(Type): - _toSchema = {'addresses': 'Addresses', 'tag': 'Tag'} - _toPy = {'Tag': 'tag', 'Addresses': 'addresses'} - def __init__(self, addresses=None, tag=None): +class UpdateCloudCredentials(Type): + _toSchema = {'credentials': 'credentials'} + _toPy = {'credentials': 'credentials'} + def __init__(self, credentials=None): ''' - addresses : typing.Sequence[~Address] - tag : str + credentials : typing.Sequence<+T_co>[~UpdateCloudCredential]<~UpdateCloudCredential> ''' - self.addresses = [Address.from_json(o) for o in addresses or []] - self.tag = tag + self.credentials = [UpdateCloudCredential.from_json(o) for o in credentials or []] -class MachineAddressesResult(Type): - _toSchema = {'addresses': 'Addresses', 'error': 'Error'} - _toPy = {'Error': 'error', 'Addresses': 'addresses'} - def __init__(self, addresses=None, error=None): +class UserCloud(Type): + _toSchema = {'cloud_tag': 'cloud-tag', 'user_tag': 'user-tag'} + _toPy = {'cloud-tag': 'cloud_tag', 'user-tag': 'user_tag'} + def __init__(self, cloud_tag=None, user_tag=None): ''' - addresses : typing.Sequence[~Address] - error : Error + cloud_tag : str + user_tag : str ''' - self.addresses = [Address.from_json(o) for o in addresses or []] - self.error = Error.from_json(error) if error else None + self.cloud_tag = cloud_tag + self.user_tag = user_tag -class MachineAddressesResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): +class UserClouds(Type): + _toSchema = {'user_clouds': 'user-clouds'} + _toPy = {'user-clouds': 'user_clouds'} + def __init__(self, user_clouds=None): ''' - results : typing.Sequence[~MachineAddressesResult] + user_clouds : typing.Sequence<+T_co>[~UserCloud]<~UserCloud> ''' - self.results = [MachineAddressesResult.from_json(o) for o in results or []] + self.user_clouds = [UserCloud.from_json(o) for o in user_clouds or []] -class SetMachinesAddresses(Type): - _toSchema = {'machineaddresses': 'MachineAddresses'} - _toPy = {'MachineAddresses': 'machineaddresses'} - def __init__(self, machineaddresses=None): +class DestroyControllerArgs(Type): + _toSchema = {'destroy_models': 'destroy-models'} + _toPy = {'destroy-models': 'destroy_models'} + def __init__(self, destroy_models=None): ''' - machineaddresses : typing.Sequence[~MachineAddresses] + destroy_models : bool ''' - self.machineaddresses = [MachineAddresses.from_json(o) for o in machineaddresses or []] + self.destroy_models = destroy_models -class SetStatus(Type): - _toSchema = {'entities': 'Entities'} - _toPy = {'Entities': 'entities'} - def __init__(self, entities=None): +class InitiateMigrationArgs(Type): + _toSchema = {'specs': 'specs'} + _toPy = {'specs': 'specs'} + def __init__(self, specs=None): ''' - entities : typing.Sequence[~EntityStatusArgs] + specs : typing.Sequence<+T_co>[~MigrationSpec]<~MigrationSpec> ''' - self.entities = [EntityStatusArgs.from_json(o) for o in entities or []] + self.specs = [MigrationSpec.from_json(o) for o in specs or []] -class StatusResult(Type): - _toSchema = {'info': 'Info', 'status': 'Status', 'data': 'Data', 'error': 'Error', 'since': 'Since', 'id_': 'Id', 'life': 'Life'} - _toPy = {'Status': 'status', 'Since': 'since', 'Life': 'life', 'Info': 'info', 'Error': 'error', 'Data': 'data', 'Id': 'id_'} - def __init__(self, data=None, error=None, id_=None, info=None, life=None, since=None, status=None): +class InitiateMigrationResult(Type): + _toSchema = {'model_tag': 'model-tag', 'migration_id': 'migration-id', 'error': 'error'} + _toPy = {'model-tag': 'model_tag', 'migration-id': 'migration_id', 'error': 'error'} + def __init__(self, error=None, migration_id=None, model_tag=None): ''' - data : typing.Mapping[str, typing.Any] error : Error - id_ : str - info : str - life : str - since : str - status : str + migration_id : str + model_tag : str ''' - self.data = data self.error = Error.from_json(error) if error else None - self.id_ = id_ - self.info = info - self.life = life - self.since = since - self.status = status + self.migration_id = migration_id + self.model_tag = model_tag -class StatusResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} +class InitiateMigrationResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} def __init__(self, results=None): ''' - results : typing.Sequence[~StatusResult] + results : typing.Sequence<+T_co>[~InitiateMigrationResult]<~InitiateMigrationResult> ''' - self.results = [StatusResult.from_json(o) for o in results or []] - - -class ListSSHKeys(Type): - _toSchema = {'mode': 'Mode', 'entities': 'Entities'} - _toPy = {'Mode': 'mode', 'Entities': 'entities'} - def __init__(self, entities=None, mode=None): - ''' - entities : Entities - mode : bool - ''' - self.entities = Entities.from_json(entities) if entities else None - self.mode = mode + self.results = [InitiateMigrationResult.from_json(o) for o in results or []] -class ModifyUserSSHKeys(Type): - _toSchema = {'keys': 'Keys', 'user': 'User'} - _toPy = {'Keys': 'keys', 'User': 'user'} - def __init__(self, keys=None, user=None): +class MigrationSpec(Type): + _toSchema = {'model_tag': 'model-tag', 'target_info': 'target-info'} + _toPy = {'model-tag': 'model_tag', 'target-info': 'target_info'} + def __init__(self, model_tag=None, target_info=None): ''' - keys : typing.Sequence[str] - user : str + model_tag : str + target_info : MigrationTargetInfo ''' - self.keys = keys - self.user = user + self.model_tag = model_tag + self.target_info = MigrationTargetInfo.from_json(target_info) if target_info else None -class ClaimLeadershipBulkParams(Type): - _toSchema = {'params': 'Params'} - _toPy = {'Params': 'params'} - def __init__(self, params=None): +class MigrationTargetInfo(Type): + _toSchema = {'password': 'password', 'controller_tag': 'controller-tag', 'addrs': 'addrs', 'ca_cert': 'ca-cert', 'macaroon': 'macaroon', 'auth_tag': 'auth-tag'} + _toPy = {'auth-tag': 'auth_tag', 'password': 'password', 'ca-cert': 'ca_cert', 'addrs': 'addrs', 'macaroon': 'macaroon', 'controller-tag': 'controller_tag'} + def __init__(self, addrs=None, auth_tag=None, ca_cert=None, controller_tag=None, macaroon=None, password=None): ''' - params : typing.Sequence[~ClaimLeadershipParams] + addrs : typing.Sequence<+T_co>[str] + auth_tag : str + ca_cert : str + controller_tag : str + macaroon : str + password : str ''' - self.params = [ClaimLeadershipParams.from_json(o) for o in params or []] + self.addrs = addrs + self.auth_tag = auth_tag + self.ca_cert = ca_cert + self.controller_tag = controller_tag + self.macaroon = macaroon + self.password = password -class ClaimLeadershipBulkResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): +class Model(Type): + _toSchema = {'name': 'name', 'uuid': 'uuid', 'owner_tag': 'owner-tag'} + _toPy = {'name': 'name', 'owner-tag': 'owner_tag', 'uuid': 'uuid'} + def __init__(self, name=None, owner_tag=None, uuid=None): ''' - results : typing.Sequence[~ErrorResult] + name : str + owner_tag : str + uuid : str ''' - self.results = [ErrorResult.from_json(o) for o in results or []] + self.name = name + self.owner_tag = owner_tag + self.uuid = uuid -class ClaimLeadershipParams(Type): - _toSchema = {'unittag': 'UnitTag', 'durationseconds': 'DurationSeconds', 'servicetag': 'ServiceTag'} - _toPy = {'UnitTag': 'unittag', 'DurationSeconds': 'durationseconds', 'ServiceTag': 'servicetag'} - def __init__(self, durationseconds=None, servicetag=None, unittag=None): +class ModelBlockInfo(Type): + _toSchema = {'name': 'name', 'model_uuid': 'model-uuid', 'owner_tag': 'owner-tag', 'blocks': 'blocks'} + _toPy = {'name': 'name', 'owner-tag': 'owner_tag', 'model-uuid': 'model_uuid', 'blocks': 'blocks'} + def __init__(self, blocks=None, model_uuid=None, name=None, owner_tag=None): ''' - durationseconds : float - servicetag : str - unittag : str + blocks : typing.Sequence<+T_co>[str] + model_uuid : str + name : str + owner_tag : str ''' - self.durationseconds = durationseconds - self.servicetag = servicetag - self.unittag = unittag + self.blocks = blocks + self.model_uuid = model_uuid + self.name = name + self.owner_tag = owner_tag -class ServiceTag(Type): - _toSchema = {'name': 'Name'} - _toPy = {'Name': 'name'} - def __init__(self, name=None): +class ModelBlockInfoList(Type): + _toSchema = {'models': 'models'} + _toPy = {'models': 'models'} + def __init__(self, models=None): ''' - name : str + models : typing.Sequence<+T_co>[~ModelBlockInfo]<~ModelBlockInfo> ''' - self.name = name + self.models = [ModelBlockInfo.from_json(o) for o in models or []] -class ActionExecutionResult(Type): - _toSchema = {'message': 'message', 'results': 'results', 'status': 'status', 'actiontag': 'actiontag'} - _toPy = {'message': 'message', 'results': 'results', 'status': 'status', 'actiontag': 'actiontag'} - def __init__(self, actiontag=None, message=None, results=None, status=None): +class ModelStatus(Type): + _toSchema = {'life': 'life', 'application_count': 'application-count', 'owner_tag': 'owner-tag', 'model_tag': 'model-tag', 'hosted_machine_count': 'hosted-machine-count'} + _toPy = {'life': 'life', 'model-tag': 'model_tag', 'owner-tag': 'owner_tag', 'hosted-machine-count': 'hosted_machine_count', 'application-count': 'application_count'} + def __init__(self, application_count=None, hosted_machine_count=None, life=None, model_tag=None, owner_tag=None): ''' - actiontag : str - message : str - results : typing.Mapping[str, typing.Any] - status : str + application_count : int + hosted_machine_count : int + life : str + model_tag : str + owner_tag : str ''' - self.actiontag = actiontag - self.message = message - self.results = results - self.status = status + self.application_count = application_count + self.hosted_machine_count = hosted_machine_count + self.life = life + self.model_tag = model_tag + self.owner_tag = owner_tag -class ActionExecutionResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None): +class ModelStatusResults(Type): + _toSchema = {'models': 'models'} + _toPy = {'models': 'models'} + def __init__(self, models=None): ''' - results : typing.Sequence[~ActionExecutionResult] + models : typing.Sequence<+T_co>[~ModelStatus]<~ModelStatus> ''' - self.results = [ActionExecutionResult.from_json(o) for o in results or []] + self.models = [ModelStatus.from_json(o) for o in models or []] -class JobsResult(Type): - _toSchema = {'jobs': 'Jobs', 'error': 'Error'} - _toPy = {'Error': 'error', 'Jobs': 'jobs'} - def __init__(self, error=None, jobs=None): +class ModifyControllerAccess(Type): + _toSchema = {'access': 'access', 'action': 'action', 'user_tag': 'user-tag'} + _toPy = {'access': 'access', 'action': 'action', 'user-tag': 'user_tag'} + def __init__(self, access=None, action=None, user_tag=None): ''' - error : Error - jobs : typing.Sequence[str] + access : str + action : str + user_tag : str ''' - self.error = Error.from_json(error) if error else None - self.jobs = jobs + self.access = access + self.action = action + self.user_tag = user_tag -class JobsResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): +class ModifyControllerAccessRequest(Type): + _toSchema = {'changes': 'changes'} + _toPy = {'changes': 'changes'} + def __init__(self, changes=None): ''' - results : typing.Sequence[~JobsResult] + changes : typing.Sequence<+T_co>[~ModifyControllerAccess]<~ModifyControllerAccess> ''' - self.results = [JobsResult.from_json(o) for o in results or []] + self.changes = [ModifyControllerAccess.from_json(o) for o in changes or []] -class NetworkConfig(Type): - _toSchema = {'dnssearchdomains': 'DNSSearchDomains', 'gatewayaddress': 'GatewayAddress', 'providerspaceid': 'ProviderSpaceId', 'providersubnetid': 'ProviderSubnetId', 'noautostart': 'NoAutoStart', 'mtu': 'MTU', 'providervlanid': 'ProviderVLANId', 'provideraddressid': 'ProviderAddressId', 'dnsservers': 'DNSServers', 'interfacename': 'InterfaceName', 'providerid': 'ProviderId', 'vlantag': 'VLANTag', 'cidr': 'CIDR', 'address': 'Address', 'parentinterfacename': 'ParentInterfaceName', 'interfacetype': 'InterfaceType', 'disabled': 'Disabled', 'deviceindex': 'DeviceIndex', 'configtype': 'ConfigType', 'macaddress': 'MACAddress'} - _toPy = {'DeviceIndex': 'deviceindex', 'MTU': 'mtu', 'Disabled': 'disabled', 'ProviderId': 'providerid', 'CIDR': 'cidr', 'MACAddress': 'macaddress', 'InterfaceType': 'interfacetype', 'GatewayAddress': 'gatewayaddress', 'InterfaceName': 'interfacename', 'NoAutoStart': 'noautostart', 'DNSServers': 'dnsservers', 'ParentInterfaceName': 'parentinterfacename', 'VLANTag': 'vlantag', 'ProviderVLANId': 'providervlanid', 'ProviderSubnetId': 'providersubnetid', 'ProviderSpaceId': 'providerspaceid', 'Address': 'address', 'ConfigType': 'configtype', 'ProviderAddressId': 'provideraddressid', 'DNSSearchDomains': 'dnssearchdomains'} - def __init__(self, address=None, cidr=None, configtype=None, dnssearchdomains=None, dnsservers=None, deviceindex=None, disabled=None, gatewayaddress=None, interfacename=None, interfacetype=None, macaddress=None, mtu=None, noautostart=None, parentinterfacename=None, provideraddressid=None, providerid=None, providerspaceid=None, providersubnetid=None, providervlanid=None, vlantag=None): +class RemoveBlocksArgs(Type): + _toSchema = {'all_': 'all'} + _toPy = {'all': 'all_'} + def __init__(self, all_=None): ''' - address : str - cidr : str - configtype : str - dnssearchdomains : typing.Sequence[str] - dnsservers : typing.Sequence[str] - deviceindex : int - disabled : bool - gatewayaddress : str - interfacename : str - interfacetype : str - macaddress : str - mtu : int - noautostart : bool - parentinterfacename : str - provideraddressid : str - providerid : str - providerspaceid : str - providersubnetid : str - providervlanid : str - vlantag : int + all_ : bool ''' - self.address = address - self.cidr = cidr - self.configtype = configtype - self.dnssearchdomains = dnssearchdomains - self.dnsservers = dnsservers - self.deviceindex = deviceindex - self.disabled = disabled - self.gatewayaddress = gatewayaddress - self.interfacename = interfacename - self.interfacetype = interfacetype - self.macaddress = macaddress - self.mtu = mtu - self.noautostart = noautostart - self.parentinterfacename = parentinterfacename - self.provideraddressid = provideraddressid - self.providerid = providerid - self.providerspaceid = providerspaceid - self.providersubnetid = providersubnetid - self.providervlanid = providervlanid - self.vlantag = vlantag + self.all_ = all_ -class SetMachineNetworkConfig(Type): - _toSchema = {'config': 'Config', 'tag': 'Tag'} - _toPy = {'Tag': 'tag', 'Config': 'config'} - def __init__(self, config=None, tag=None): +class UserAccess(Type): + _toSchema = {'access': 'access', 'user_tag': 'user-tag'} + _toPy = {'access': 'access', 'user-tag': 'user_tag'} + def __init__(self, access=None, user_tag=None): ''' - config : typing.Sequence[~NetworkConfig] - tag : str + access : str + user_tag : str ''' - self.config = [NetworkConfig.from_json(o) for o in config or []] - self.tag = tag + self.access = access + self.user_tag = user_tag -class MeterStatusResult(Type): - _toSchema = {'info': 'Info', 'error': 'Error', 'code': 'Code'} - _toPy = {'Info': 'info', 'Error': 'error', 'Code': 'code'} - def __init__(self, code=None, error=None, info=None): +class UserAccessResult(Type): + _toSchema = {'result': 'result', 'error': 'error'} + _toPy = {'result': 'result', 'error': 'error'} + def __init__(self, error=None, result=None): ''' - code : str error : Error - info : str + result : UserAccess ''' - self.code = code self.error = Error.from_json(error) if error else None - self.info = info + self.result = UserAccess.from_json(result) if result else None -class MeterStatusResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} +class UserAccessResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} def __init__(self, results=None): ''' - results : typing.Sequence[~MeterStatusResult] + results : typing.Sequence<+T_co>[~UserAccessResult]<~UserAccessResult> ''' - self.results = [MeterStatusResult.from_json(o) for o in results or []] + self.results = [UserAccessResult.from_json(o) for o in results or []] -class Metric(Type): - _toSchema = {'key': 'Key', 'time': 'Time', 'value': 'Value'} - _toPy = {'Time': 'time', 'Value': 'value', 'Key': 'key'} - def __init__(self, key=None, time=None, value=None): +class UserModel(Type): + _toSchema = {'last_connection': 'last-connection', 'model': 'model'} + _toPy = {'last-connection': 'last_connection', 'model': 'model'} + def __init__(self, last_connection=None, model=None): ''' - key : str - time : str - value : str + last_connection : str + model : Model ''' - self.key = key - self.time = time - self.value = value + self.last_connection = last_connection + self.model = Model.from_json(model) if model else None -class MetricBatch(Type): - _toSchema = {'charmurl': 'CharmURL', 'metrics': 'Metrics', 'created': 'Created', 'uuid': 'UUID'} - _toPy = {'Metrics': 'metrics', 'CharmURL': 'charmurl', 'Created': 'created', 'UUID': 'uuid'} - def __init__(self, charmurl=None, created=None, metrics=None, uuid=None): +class UserModelList(Type): + _toSchema = {'user_models': 'user-models'} + _toPy = {'user-models': 'user_models'} + def __init__(self, user_models=None): ''' - charmurl : str - created : str - metrics : typing.Sequence[~Metric] - uuid : str + user_models : typing.Sequence<+T_co>[~UserModel]<~UserModel> ''' - self.charmurl = charmurl - self.created = created - self.metrics = [Metric.from_json(o) for o in metrics or []] - self.uuid = uuid + self.user_models = [UserModel.from_json(o) for o in user_models or []] -class MetricBatchParam(Type): - _toSchema = {'batch': 'Batch', 'tag': 'Tag'} - _toPy = {'Tag': 'tag', 'Batch': 'batch'} - def __init__(self, batch=None, tag=None): +class BytesResult(Type): + _toSchema = {'result': 'result'} + _toPy = {'result': 'result'} + def __init__(self, result=None): ''' - batch : MetricBatch - tag : str + result : typing.Sequence<+T_co>[int] ''' - self.batch = MetricBatch.from_json(batch) if batch else None - self.tag = tag + self.result = result -class MetricBatchParams(Type): - _toSchema = {'batches': 'Batches'} - _toPy = {'Batches': 'batches'} - def __init__(self, batches=None): +class DeployerConnectionValues(Type): + _toSchema = {'api_addresses': 'api-addresses', 'state_addresses': 'state-addresses'} + _toPy = {'state-addresses': 'state_addresses', 'api-addresses': 'api_addresses'} + def __init__(self, api_addresses=None, state_addresses=None): ''' - batches : typing.Sequence[~MetricBatchParam] + api_addresses : typing.Sequence<+T_co>[str] + state_addresses : typing.Sequence<+T_co>[str] ''' - self.batches = [MetricBatchParam.from_json(o) for o in batches or []] + self.api_addresses = api_addresses + self.state_addresses = state_addresses -class EntityMetrics(Type): - _toSchema = {'error': 'error', 'metrics': 'metrics'} - _toPy = {'error': 'error', 'metrics': 'metrics'} - def __init__(self, error=None, metrics=None): +class LifeResult(Type): + _toSchema = {'life': 'life', 'error': 'error'} + _toPy = {'life': 'life', 'error': 'error'} + def __init__(self, error=None, life=None): ''' error : Error - metrics : typing.Sequence[~MetricResult] + life : str ''' self.error = Error.from_json(error) if error else None - self.metrics = [MetricResult.from_json(o) for o in metrics or []] + self.life = life -class MeterStatusParam(Type): - _toSchema = {'info': 'info', 'tag': 'tag', 'code': 'code'} - _toPy = {'info': 'info', 'tag': 'tag', 'code': 'code'} - def __init__(self, code=None, info=None, tag=None): +class LifeResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): ''' - code : str - info : str - tag : str + results : typing.Sequence<+T_co>[~LifeResult]<~LifeResult> ''' - self.code = code - self.info = info - self.tag = tag + self.results = [LifeResult.from_json(o) for o in results or []] -class MeterStatusParams(Type): - _toSchema = {'statues': 'statues'} - _toPy = {'statues': 'statues'} - def __init__(self, statues=None): +class StringsWatchResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): ''' - statues : typing.Sequence[~MeterStatusParam] + results : typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult> ''' - self.statues = [MeterStatusParam.from_json(o) for o in statues or []] + self.results = [StringsWatchResult.from_json(o) for o in results or []] -class MetricResult(Type): - _toSchema = {'key': 'key', 'time': 'time', 'value': 'value'} - _toPy = {'key': 'key', 'time': 'time', 'value': 'value'} - def __init__(self, key=None, time=None, value=None): - ''' - key : str - time : str - value : str - ''' - self.key = key - self.time = time - self.value = value +class AddSubnetParams(Type): + _toSchema = {'subnet_tag': 'subnet-tag', 'subnet_provider_id': 'subnet-provider-id', 'space_tag': 'space-tag', 'zones': 'zones'} + _toPy = {'subnet-tag': 'subnet_tag', 'subnet-provider-id': 'subnet_provider_id', 'zones': 'zones', 'space-tag': 'space_tag'} + def __init__(self, space_tag=None, subnet_provider_id=None, subnet_tag=None, zones=None): + ''' + space_tag : str + subnet_provider_id : str + subnet_tag : str + zones : typing.Sequence<+T_co>[str] + ''' + self.space_tag = space_tag + self.subnet_provider_id = subnet_provider_id + self.subnet_tag = subnet_tag + self.zones = zones -class MetricResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None): +class AddSubnetsParams(Type): + _toSchema = {'subnets': 'subnets'} + _toPy = {'subnets': 'subnets'} + def __init__(self, subnets=None): ''' - results : typing.Sequence[~EntityMetrics] + subnets : typing.Sequence<+T_co>[~AddSubnetParams]<~AddSubnetParams> ''' - self.results = [EntityMetrics.from_json(o) for o in results or []] + self.subnets = [AddSubnetParams.from_json(o) for o in subnets or []] -class PhaseResult(Type): - _toSchema = {'error': 'Error', 'phase': 'phase'} - _toPy = {'Error': 'error', 'phase': 'phase'} - def __init__(self, error=None, phase=None): +class CreateSpaceParams(Type): + _toSchema = {'provider_id': 'provider-id', 'space_tag': 'space-tag', 'subnet_tags': 'subnet-tags', 'public': 'public'} + _toPy = {'subnet-tags': 'subnet_tags', 'space-tag': 'space_tag', 'public': 'public', 'provider-id': 'provider_id'} + def __init__(self, provider_id=None, public=None, space_tag=None, subnet_tags=None): ''' - error : Error - phase : str + provider_id : str + public : bool + space_tag : str + subnet_tags : typing.Sequence<+T_co>[str] ''' - self.error = Error.from_json(error) if error else None - self.phase = phase + self.provider_id = provider_id + self.public = public + self.space_tag = space_tag + self.subnet_tags = subnet_tags -class PhaseResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): +class CreateSpacesParams(Type): + _toSchema = {'spaces': 'spaces'} + _toPy = {'spaces': 'spaces'} + def __init__(self, spaces=None): ''' - results : typing.Sequence[~PhaseResult] + spaces : typing.Sequence<+T_co>[~CreateSpaceParams]<~CreateSpaceParams> ''' - self.results = [PhaseResult.from_json(o) for o in results or []] + self.spaces = [CreateSpaceParams.from_json(o) for o in spaces or []] -class FullMigrationStatus(Type): - _toSchema = {'attempt': 'attempt', 'phase': 'phase', 'spec': 'spec'} - _toPy = {'attempt': 'attempt', 'phase': 'phase', 'spec': 'spec'} - def __init__(self, attempt=None, phase=None, spec=None): +class DiscoverSpacesResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): ''' - attempt : int - phase : str - spec : ModelMigrationSpec + results : typing.Sequence<+T_co>[~ProviderSpace]<~ProviderSpace> ''' - self.attempt = attempt - self.phase = phase - self.spec = ModelMigrationSpec.from_json(spec) if spec else None + self.results = [ProviderSpace.from_json(o) for o in results or []] -class SerializedModel(Type): - _toSchema = {'bytes_': 'bytes'} - _toPy = {'bytes': 'bytes_'} - def __init__(self, bytes_=None): +class ListSubnetsResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): ''' - bytes_ : typing.Sequence[int] + results : typing.Sequence<+T_co>[~Subnet]<~Subnet> ''' - self.bytes_ = bytes_ + self.results = [Subnet.from_json(o) for o in results or []] -class SetMigrationPhaseArgs(Type): - _toSchema = {'phase': 'phase'} - _toPy = {'phase': 'phase'} - def __init__(self, phase=None): +class ProviderSpace(Type): + _toSchema = {'name': 'name', 'provider_id': 'provider-id', 'subnets': 'subnets', 'error': 'error'} + _toPy = {'name': 'name', 'subnets': 'subnets', 'provider-id': 'provider_id', 'error': 'error'} + def __init__(self, error=None, name=None, provider_id=None, subnets=None): ''' - phase : str + error : Error + name : str + provider_id : str + subnets : typing.Sequence<+T_co>[~Subnet]<~Subnet> ''' - self.phase = phase + self.error = Error.from_json(error) if error else None + self.name = name + self.provider_id = provider_id + self.subnets = [Subnet.from_json(o) for o in subnets or []] -class MigrationStatus(Type): - _toSchema = {'source_api_addrs': 'source-api-addrs', 'attempt': 'attempt', 'target_api_addrs': 'target-api-addrs', 'source_ca_cert': 'source-ca-cert', 'phase': 'phase', 'target_ca_cert': 'target-ca-cert'} - _toPy = {'attempt': 'attempt', 'target-api-addrs': 'target_api_addrs', 'target-ca-cert': 'target_ca_cert', 'phase': 'phase', 'source-ca-cert': 'source_ca_cert', 'source-api-addrs': 'source_api_addrs'} - def __init__(self, attempt=None, phase=None, source_api_addrs=None, source_ca_cert=None, target_api_addrs=None, target_ca_cert=None): +class Subnet(Type): + _toSchema = {'status': 'status', 'provider_id': 'provider-id', 'space_tag': 'space-tag', 'vlan_tag': 'vlan-tag', 'zones': 'zones', 'life': 'life', 'cidr': 'cidr'} + _toPy = {'status': 'status', 'zones': 'zones', 'vlan-tag': 'vlan_tag', 'life': 'life', 'cidr': 'cidr', 'space-tag': 'space_tag', 'provider-id': 'provider_id'} + def __init__(self, cidr=None, life=None, provider_id=None, space_tag=None, status=None, vlan_tag=None, zones=None): ''' - attempt : int - phase : str - source_api_addrs : typing.Sequence[str] - source_ca_cert : str - target_api_addrs : typing.Sequence[str] - target_ca_cert : str + cidr : str + life : str + provider_id : str + space_tag : str + status : str + vlan_tag : int + zones : typing.Sequence<+T_co>[str] ''' - self.attempt = attempt - self.phase = phase - self.source_api_addrs = source_api_addrs - self.source_ca_cert = source_ca_cert - self.target_api_addrs = target_api_addrs - self.target_ca_cert = target_ca_cert + self.cidr = cidr + self.life = life + self.provider_id = provider_id + self.space_tag = space_tag + self.status = status + self.vlan_tag = vlan_tag + self.zones = zones -class ModelArgs(Type): - _toSchema = {'model_tag': 'model-tag'} - _toPy = {'model-tag': 'model_tag'} - def __init__(self, model_tag=None): +class SubnetsFilters(Type): + _toSchema = {'space_tag': 'space-tag', 'zone': 'zone'} + _toPy = {'space-tag': 'space_tag', 'zone': 'zone'} + def __init__(self, space_tag=None, zone=None): ''' - model_tag : str + space_tag : str + zone : str ''' - self.model_tag = model_tag + self.space_tag = space_tag + self.zone = zone -class ModelCreateArgs(Type): - _toSchema = {'config': 'Config', 'account': 'Account', 'ownertag': 'OwnerTag'} - _toPy = {'Account': 'account', 'Config': 'config', 'OwnerTag': 'ownertag'} - def __init__(self, account=None, config=None, ownertag=None): +class BlockDevice(Type): + _toSchema = {'uuid': 'UUID', 'busaddress': 'BusAddress', 'size': 'Size', 'hardwareid': 'HardwareId', 'filesystemtype': 'FilesystemType', 'label': 'Label', 'devicelinks': 'DeviceLinks', 'inuse': 'InUse', 'mountpoint': 'MountPoint', 'devicename': 'DeviceName'} + _toPy = {'InUse': 'inuse', 'Size': 'size', 'Label': 'label', 'DeviceName': 'devicename', 'BusAddress': 'busaddress', 'FilesystemType': 'filesystemtype', 'MountPoint': 'mountpoint', 'UUID': 'uuid', 'HardwareId': 'hardwareid', 'DeviceLinks': 'devicelinks'} + def __init__(self, busaddress=None, devicelinks=None, devicename=None, filesystemtype=None, hardwareid=None, inuse=None, label=None, mountpoint=None, size=None, uuid=None): ''' - account : typing.Mapping[str, typing.Any] - config : typing.Mapping[str, typing.Any] - ownertag : str + busaddress : str + devicelinks : typing.Sequence<+T_co>[str] + devicename : str + filesystemtype : str + hardwareid : str + inuse : bool + label : str + mountpoint : str + size : int + uuid : str ''' - self.account = account - self.config = config - self.ownertag = ownertag + self.busaddress = busaddress + self.devicelinks = devicelinks + self.devicename = devicename + self.filesystemtype = filesystemtype + self.hardwareid = hardwareid + self.inuse = inuse + self.label = label + self.mountpoint = mountpoint + self.size = size + self.uuid = uuid -class ModelInfoResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None): +class MachineBlockDevices(Type): + _toSchema = {'block_devices': 'block-devices', 'machine': 'machine'} + _toPy = {'block-devices': 'block_devices', 'machine': 'machine'} + def __init__(self, block_devices=None, machine=None): ''' - error : Error - result : ModelInfo + block_devices : typing.Sequence<+T_co>[~BlockDevice]<~BlockDevice> + machine : str ''' - self.error = Error.from_json(error) if error else None - self.result = ModelInfo.from_json(result) if result else None + self.block_devices = [BlockDevice.from_json(o) for o in block_devices or []] + self.machine = machine -class ModelInfoResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None): +class SetMachineBlockDevices(Type): + _toSchema = {'machine_block_devices': 'machine-block-devices'} + _toPy = {'machine-block-devices': 'machine_block_devices'} + def __init__(self, machine_block_devices=None): ''' - results : typing.Sequence[~ModelInfoResult] + machine_block_devices : typing.Sequence<+T_co>[~MachineBlockDevices]<~MachineBlockDevices> ''' - self.results = [ModelInfoResult.from_json(o) for o in results or []] + self.machine_block_devices = [MachineBlockDevices.from_json(o) for o in machine_block_devices or []] -class ModelSkeletonConfigArgs(Type): - _toSchema = {'provider': 'Provider', 'region': 'Region'} - _toPy = {'Region': 'region', 'Provider': 'provider'} - def __init__(self, provider=None, region=None): +class EntitiesWatchResult(Type): + _toSchema = {'changes': 'changes', 'watcher_id': 'watcher-id', 'error': 'error'} + _toPy = {'watcher-id': 'watcher_id', 'changes': 'changes', 'error': 'error'} + def __init__(self, changes=None, error=None, watcher_id=None): ''' - provider : str - region : str + changes : typing.Sequence<+T_co>[str] + error : Error + watcher_id : str ''' - self.provider = provider - self.region = region + self.changes = changes + self.error = Error.from_json(error) if error else None + self.watcher_id = watcher_id -class ModifyModelAccess(Type): - _toSchema = {'user_tag': 'user-tag', 'access': 'access', 'action': 'action', 'model_tag': 'model-tag'} - _toPy = {'model-tag': 'model_tag', 'access': 'access', 'action': 'action', 'user-tag': 'user_tag'} - def __init__(self, access=None, action=None, model_tag=None, user_tag=None): +class MachineStorageId(Type): + _toSchema = {'machine_tag': 'machine-tag', 'attachment_tag': 'attachment-tag'} + _toPy = {'attachment-tag': 'attachment_tag', 'machine-tag': 'machine_tag'} + def __init__(self, attachment_tag=None, machine_tag=None): ''' - access : str - action : str - model_tag : str - user_tag : str + attachment_tag : str + machine_tag : str ''' - self.access = access - self.action = action - self.model_tag = model_tag - self.user_tag = user_tag + self.attachment_tag = attachment_tag + self.machine_tag = machine_tag -class ModifyModelAccessRequest(Type): - _toSchema = {'changes': 'changes'} - _toPy = {'changes': 'changes'} - def __init__(self, changes=None): +class MachineStorageIdsWatchResult(Type): + _toSchema = {'changes': 'changes', 'watcher_id': 'watcher-id', 'error': 'error'} + _toPy = {'watcher-id': 'watcher_id', 'changes': 'changes', 'error': 'error'} + def __init__(self, changes=None, error=None, watcher_id=None): ''' - changes : typing.Sequence[~ModifyModelAccess] + changes : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId> + error : Error + watcher_id : str ''' - self.changes = [ModifyModelAccess.from_json(o) for o in changes or []] + self.changes = [MachineStorageId.from_json(o) for o in changes or []] + self.error = Error.from_json(error) if error else None + self.watcher_id = watcher_id -class ConstraintsResult(Type): - _toSchema = {'error': 'Error', 'constraints': 'Constraints'} - _toPy = {'Constraints': 'constraints', 'Error': 'error'} - def __init__(self, constraints=None, error=None): +class BoolResult(Type): + _toSchema = {'result': 'result', 'error': 'error'} + _toPy = {'result': 'result', 'error': 'error'} + def __init__(self, error=None, result=None): ''' - constraints : Value error : Error + result : bool ''' - self.constraints = Value.from_json(constraints) if constraints else None self.error = Error.from_json(error) if error else None + self.result = result -class ConstraintsResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} +class BoolResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} def __init__(self, results=None): ''' - results : typing.Sequence[~ConstraintsResult] + results : typing.Sequence<+T_co>[~BoolResult]<~BoolResult> ''' - self.results = [ConstraintsResult.from_json(o) for o in results or []] + self.results = [BoolResult.from_json(o) for o in results or []] -class ContainerConfig(Type): - _toSchema = {'sslhostnameverification': 'SSLHostnameVerification', 'authorizedkeys': 'AuthorizedKeys', 'aptproxy': 'AptProxy', 'updatebehavior': 'UpdateBehavior', 'providertype': 'ProviderType', 'allowlxcloopmounts': 'AllowLXCLoopMounts', 'proxy': 'Proxy', 'aptmirror': 'AptMirror', 'preferipv6': 'PreferIPv6'} - _toPy = {'AuthorizedKeys': 'authorizedkeys', 'AptMirror': 'aptmirror', 'AptProxy': 'aptproxy', 'SSLHostnameVerification': 'sslhostnameverification', 'PreferIPv6': 'preferipv6', 'AllowLXCLoopMounts': 'allowlxcloopmounts', 'UpdateBehavior': 'updatebehavior', 'Proxy': 'proxy', 'ProviderType': 'providertype'} - def __init__(self, allowlxcloopmounts=None, aptmirror=None, aptproxy=None, authorizedkeys=None, preferipv6=None, providertype=None, proxy=None, sslhostnameverification=None, updatebehavior=None): - ''' - allowlxcloopmounts : bool - aptmirror : str - aptproxy : Settings - authorizedkeys : str - preferipv6 : bool - providertype : str - proxy : Settings - sslhostnameverification : bool - updatebehavior : UpdateBehavior +class MachinePortRange(Type): + _toSchema = {'relation_tag': 'relation-tag', 'port_range': 'port-range', 'unit_tag': 'unit-tag'} + _toPy = {'relation-tag': 'relation_tag', 'port-range': 'port_range', 'unit-tag': 'unit_tag'} + def __init__(self, port_range=None, relation_tag=None, unit_tag=None): ''' - self.allowlxcloopmounts = allowlxcloopmounts - self.aptmirror = aptmirror - self.aptproxy = Settings.from_json(aptproxy) if aptproxy else None - self.authorizedkeys = authorizedkeys - self.preferipv6 = preferipv6 - self.providertype = providertype - self.proxy = Settings.from_json(proxy) if proxy else None - self.sslhostnameverification = sslhostnameverification - self.updatebehavior = UpdateBehavior.from_json(updatebehavior) if updatebehavior else None + port_range : PortRange + relation_tag : str + unit_tag : str + ''' + self.port_range = PortRange.from_json(port_range) if port_range else None + self.relation_tag = relation_tag + self.unit_tag = unit_tag -class ContainerManagerConfig(Type): - _toSchema = {'managerconfig': 'ManagerConfig'} - _toPy = {'ManagerConfig': 'managerconfig'} - def __init__(self, managerconfig=None): +class MachinePorts(Type): + _toSchema = {'subnet_tag': 'subnet-tag', 'machine_tag': 'machine-tag'} + _toPy = {'subnet-tag': 'subnet_tag', 'machine-tag': 'machine_tag'} + def __init__(self, machine_tag=None, subnet_tag=None): ''' - managerconfig : typing.Mapping[str, str] + machine_tag : str + subnet_tag : str ''' - self.managerconfig = managerconfig + self.machine_tag = machine_tag + self.subnet_tag = subnet_tag -class ContainerManagerConfigParams(Type): - _toSchema = {'type_': 'Type'} - _toPy = {'Type': 'type_'} - def __init__(self, type_=None): +class MachinePortsParams(Type): + _toSchema = {'params': 'params'} + _toPy = {'params': 'params'} + def __init__(self, params=None): ''' - type_ : str + params : typing.Sequence<+T_co>[~MachinePorts]<~MachinePorts> ''' - self.type_ = type_ + self.params = [MachinePorts.from_json(o) for o in params or []] -class DistributionGroupResult(Type): - _toSchema = {'error': 'Error', 'result': 'Result'} - _toPy = {'Error': 'error', 'Result': 'result'} - def __init__(self, error=None, result=None): +class MachinePortsResult(Type): + _toSchema = {'ports': 'ports', 'error': 'error'} + _toPy = {'ports': 'ports', 'error': 'error'} + def __init__(self, error=None, ports=None): ''' error : Error - result : typing.Sequence[str] + ports : typing.Sequence<+T_co>[~MachinePortRange]<~MachinePortRange> ''' self.error = Error.from_json(error) if error else None - self.result = result + self.ports = [MachinePortRange.from_json(o) for o in ports or []] -class DistributionGroupResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} +class MachinePortsResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} def __init__(self, results=None): ''' - results : typing.Sequence[~DistributionGroupResult] + results : typing.Sequence<+T_co>[~MachinePortsResult]<~MachinePortsResult> ''' - self.results = [DistributionGroupResult.from_json(o) for o in results or []] + self.results = [MachinePortsResult.from_json(o) for o in results or []] -class InstanceInfo(Type): - _toSchema = {'nonce': 'Nonce', 'networkconfig': 'NetworkConfig', 'tag': 'Tag', 'characteristics': 'Characteristics', 'volumeattachments': 'VolumeAttachments', 'volumes': 'Volumes', 'instanceid': 'InstanceId'} - _toPy = {'Tag': 'tag', 'InstanceId': 'instanceid', 'Volumes': 'volumes', 'Characteristics': 'characteristics', 'Nonce': 'nonce', 'NetworkConfig': 'networkconfig', 'VolumeAttachments': 'volumeattachments'} - def __init__(self, characteristics=None, instanceid=None, networkconfig=None, nonce=None, tag=None, volumeattachments=None, volumes=None): +class NotifyWatchResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): ''' - characteristics : HardwareCharacteristics - instanceid : str - networkconfig : typing.Sequence[~NetworkConfig] - nonce : str - tag : str - volumeattachments : typing.Mapping[str, ~VolumeAttachmentInfo] - volumes : typing.Sequence[~Volume] + results : typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult> ''' - self.characteristics = HardwareCharacteristics.from_json(characteristics) if characteristics else None - self.instanceid = instanceid - self.networkconfig = [NetworkConfig.from_json(o) for o in networkconfig or []] - self.nonce = nonce - self.tag = tag - self.volumeattachments = {k: VolumeAttachmentInfo.from_json(v) for k, v in (volumeattachments or dict()).items()} - self.volumes = [Volume.from_json(o) for o in volumes or []] + self.results = [NotifyWatchResult.from_json(o) for o in results or []] -class InstancesInfo(Type): - _toSchema = {'machines': 'Machines'} - _toPy = {'Machines': 'machines'} - def __init__(self, machines=None): +class PortRange(Type): + _toSchema = {'from_port': 'from-port', 'to_port': 'to-port', 'protocol': 'protocol'} + _toPy = {'from-port': 'from_port', 'protocol': 'protocol', 'to-port': 'to_port'} + def __init__(self, from_port=None, protocol=None, to_port=None): ''' - machines : typing.Sequence[~InstanceInfo] + from_port : int + protocol : str + to_port : int ''' - self.machines = [InstanceInfo.from_json(o) for o in machines or []] + self.from_port = from_port + self.protocol = protocol + self.to_port = to_port -class MachineContainers(Type): - _toSchema = {'machinetag': 'MachineTag', 'containertypes': 'ContainerTypes'} - _toPy = {'ContainerTypes': 'containertypes', 'MachineTag': 'machinetag'} - def __init__(self, containertypes=None, machinetag=None): +class StringResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): ''' - containertypes : typing.Sequence[str] - machinetag : str + results : typing.Sequence<+T_co>[~StringResult]<~StringResult> ''' - self.containertypes = containertypes - self.machinetag = machinetag + self.results = [StringResult.from_json(o) for o in results or []] -class MachineContainersParams(Type): - _toSchema = {'params': 'Params'} - _toPy = {'Params': 'params'} - def __init__(self, params=None): +class ControllersChangeResult(Type): + _toSchema = {'result': 'result', 'error': 'error'} + _toPy = {'result': 'result', 'error': 'error'} + def __init__(self, error=None, result=None): ''' - params : typing.Sequence[~MachineContainers] + error : Error + result : ControllersChanges ''' - self.params = [MachineContainers.from_json(o) for o in params or []] + self.error = Error.from_json(error) if error else None + self.result = ControllersChanges.from_json(result) if result else None -class MachineNetworkConfigResult(Type): - _toSchema = {'info': 'Info', 'error': 'Error'} - _toPy = {'Info': 'info', 'Error': 'error'} - def __init__(self, error=None, info=None): +class ControllersChangeResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): ''' - error : Error - info : typing.Sequence[~NetworkConfig] + results : typing.Sequence<+T_co>[~ControllersChangeResult]<~ControllersChangeResult> ''' - self.error = Error.from_json(error) if error else None - self.info = [NetworkConfig.from_json(o) for o in info or []] + self.results = [ControllersChangeResult.from_json(o) for o in results or []] -class MachineNetworkConfigResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): +class ControllersChanges(Type): + _toSchema = {'removed': 'removed', 'demoted': 'demoted', 'added': 'added', 'maintained': 'maintained', 'converted': 'converted', 'promoted': 'promoted'} + _toPy = {'removed': 'removed', 'demoted': 'demoted', 'added': 'added', 'maintained': 'maintained', 'converted': 'converted', 'promoted': 'promoted'} + def __init__(self, added=None, converted=None, demoted=None, maintained=None, promoted=None, removed=None): ''' - results : typing.Sequence[~MachineNetworkConfigResult] + added : typing.Sequence<+T_co>[str] + converted : typing.Sequence<+T_co>[str] + demoted : typing.Sequence<+T_co>[str] + maintained : typing.Sequence<+T_co>[str] + promoted : typing.Sequence<+T_co>[str] + removed : typing.Sequence<+T_co>[str] ''' - self.results = [MachineNetworkConfigResult.from_json(o) for o in results or []] + self.added = added + self.converted = converted + self.demoted = demoted + self.maintained = maintained + self.promoted = promoted + self.removed = removed -class ProvisioningInfo(Type): - _toSchema = {'jobs': 'Jobs', 'volumes': 'Volumes', 'tags': 'Tags', 'endpointbindings': 'EndpointBindings', 'placement': 'Placement', 'series': 'Series', 'constraints': 'Constraints', 'subnetstozones': 'SubnetsToZones', 'imagemetadata': 'ImageMetadata'} - _toPy = {'Constraints': 'constraints', 'EndpointBindings': 'endpointbindings', 'Volumes': 'volumes', 'Placement': 'placement', 'SubnetsToZones': 'subnetstozones', 'Tags': 'tags', 'Jobs': 'jobs', 'ImageMetadata': 'imagemetadata', 'Series': 'series'} - def __init__(self, constraints=None, endpointbindings=None, imagemetadata=None, jobs=None, placement=None, series=None, subnetstozones=None, tags=None, volumes=None): +class ControllersSpec(Type): + _toSchema = {'model_tag': 'model-tag', 'num_controllers': 'num-controllers', 'series': 'series', 'constraints': 'constraints', 'placement': 'placement'} + _toPy = {'model-tag': 'model_tag', 'placement': 'placement', 'num-controllers': 'num_controllers', 'constraints': 'constraints', 'series': 'series'} + def __init__(self, constraints=None, model_tag=None, num_controllers=None, placement=None, series=None): ''' constraints : Value - endpointbindings : typing.Mapping[str, str] - imagemetadata : typing.Sequence[~CloudImageMetadata] - jobs : typing.Sequence[str] - placement : str + model_tag : str + num_controllers : int + placement : typing.Sequence<+T_co>[str] series : str - subnetstozones : typing.Sequence[str] - tags : typing.Mapping[str, str] - volumes : typing.Sequence[~VolumeParams] ''' self.constraints = Value.from_json(constraints) if constraints else None - self.endpointbindings = endpointbindings - self.imagemetadata = [CloudImageMetadata.from_json(o) for o in imagemetadata or []] - self.jobs = jobs + self.model_tag = model_tag + self.num_controllers = num_controllers self.placement = placement self.series = series - self.subnetstozones = subnetstozones - self.tags = tags - self.volumes = [VolumeParams.from_json(o) for o in volumes or []] -class ProvisioningInfoResult(Type): - _toSchema = {'error': 'Error', 'result': 'Result'} - _toPy = {'Error': 'error', 'Result': 'result'} - def __init__(self, error=None, result=None): +class ControllersSpecs(Type): + _toSchema = {'specs': 'specs'} + _toPy = {'specs': 'specs'} + def __init__(self, specs=None): ''' - error : Error - result : ProvisioningInfo + specs : typing.Sequence<+T_co>[~ControllersSpec]<~ControllersSpec> ''' - self.error = Error.from_json(error) if error else None - self.result = ProvisioningInfo.from_json(result) if result else None + self.specs = [ControllersSpec.from_json(o) for o in specs or []] -class ProvisioningInfoResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): +class HAMember(Type): + _toSchema = {'tag': 'tag', 'series': 'series', 'public_address': 'public-address'} + _toPy = {'public-address': 'public_address', 'tag': 'tag', 'series': 'series'} + def __init__(self, public_address=None, series=None, tag=None): ''' - results : typing.Sequence[~ProvisioningInfoResult] + public_address : Address + series : str + tag : str ''' - self.results = [ProvisioningInfoResult.from_json(o) for o in results or []] + self.public_address = Address.from_json(public_address) if public_address else None + self.series = series + self.tag = tag -class Settings(Type): - _toSchema = {'https': 'Https', 'noproxy': 'NoProxy', 'ftp': 'Ftp', 'http': 'Http'} - _toPy = {'Http': 'http', 'Ftp': 'ftp', 'Https': 'https', 'NoProxy': 'noproxy'} - def __init__(self, ftp=None, http=None, https=None, noproxy=None): +class Member(Type): + _toSchema = {'votes': 'Votes', 'buildindexes': 'BuildIndexes', 'tags': 'Tags', 'arbiter': 'Arbiter', 'address': 'Address', 'priority': 'Priority', 'hidden': 'Hidden', 'id_': 'Id', 'slavedelay': 'SlaveDelay'} + _toPy = {'Id': 'id_', 'BuildIndexes': 'buildindexes', 'Address': 'address', 'SlaveDelay': 'slavedelay', 'Tags': 'tags', 'Votes': 'votes', 'Priority': 'priority', 'Hidden': 'hidden', 'Arbiter': 'arbiter'} + def __init__(self, address=None, arbiter=None, buildindexes=None, hidden=None, id_=None, priority=None, slavedelay=None, tags=None, votes=None): ''' - ftp : str - http : str - https : str - noproxy : str - ''' - self.ftp = ftp - self.http = http - self.https = https - self.noproxy = noproxy - - -class ToolsResult(Type): - _toSchema = {'error': 'Error', 'disablesslhostnameverification': 'DisableSSLHostnameVerification', 'toolslist': 'ToolsList'} - _toPy = {'Error': 'error', 'ToolsList': 'toolslist', 'DisableSSLHostnameVerification': 'disablesslhostnameverification'} - def __init__(self, disablesslhostnameverification=None, error=None, toolslist=None): - ''' - disablesslhostnameverification : bool - error : Error - toolslist : typing.Sequence[~Tools] + address : str + arbiter : bool + buildindexes : bool + hidden : bool + id_ : int + priority : float + slavedelay : int + tags : typing.Mapping<~KT, +VT_co>[str, str] + votes : int ''' - self.disablesslhostnameverification = disablesslhostnameverification - self.error = Error.from_json(error) if error else None - self.toolslist = [Tools.from_json(o) for o in toolslist or []] + self.address = address + self.arbiter = arbiter + self.buildindexes = buildindexes + self.hidden = hidden + self.id_ = id_ + self.priority = priority + self.slavedelay = slavedelay + self.tags = tags + self.votes = votes -class ToolsResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): +class MongoUpgradeResults(Type): + _toSchema = {'rs_members': 'rs-members', 'ha_members': 'ha-members', 'master': 'master'} + _toPy = {'ha-members': 'ha_members', 'rs-members': 'rs_members', 'master': 'master'} + def __init__(self, ha_members=None, master=None, rs_members=None): ''' - results : typing.Sequence[~ToolsResult] + ha_members : typing.Sequence<+T_co>[~HAMember]<~HAMember> + master : HAMember + rs_members : typing.Sequence<+T_co>[~Member]<~Member> ''' - self.results = [ToolsResult.from_json(o) for o in results or []] + self.ha_members = [HAMember.from_json(o) for o in ha_members or []] + self.master = HAMember.from_json(master) if master else None + self.rs_members = [Member.from_json(o) for o in rs_members or []] -class UpdateBehavior(Type): - _toSchema = {'enableosupgrade': 'EnableOSUpgrade', 'enableosrefreshupdate': 'EnableOSRefreshUpdate'} - _toPy = {'EnableOSUpgrade': 'enableosupgrade', 'EnableOSRefreshUpdate': 'enableosrefreshupdate'} - def __init__(self, enableosrefreshupdate=None, enableosupgrade=None): +class ResumeReplicationParams(Type): + _toSchema = {'members': 'members'} + _toPy = {'members': 'members'} + def __init__(self, members=None): ''' - enableosrefreshupdate : bool - enableosupgrade : bool + members : typing.Sequence<+T_co>[~Member]<~Member> ''' - self.enableosrefreshupdate = enableosrefreshupdate - self.enableosupgrade = enableosupgrade + self.members = [Member.from_json(o) for o in members or []] -class Volume(Type): - _toSchema = {'info': 'info', 'volumetag': 'volumetag'} - _toPy = {'info': 'info', 'volumetag': 'volumetag'} - def __init__(self, info=None, volumetag=None): +class UpgradeMongoParams(Type): + _toSchema = {'patch': 'Patch', 'minor': 'Minor', 'major': 'Major', 'storageengine': 'StorageEngine'} + _toPy = {'Major': 'major', 'Minor': 'minor', 'Patch': 'patch', 'StorageEngine': 'storageengine'} + def __init__(self, major=None, minor=None, patch=None, storageengine=None): ''' - info : VolumeInfo - volumetag : str + major : int + minor : int + patch : str + storageengine : str ''' - self.info = VolumeInfo.from_json(info) if info else None - self.volumetag = volumetag + self.major = major + self.minor = minor + self.patch = patch + self.storageengine = storageengine -class VolumeAttachmentInfo(Type): - _toSchema = {'devicename': 'devicename', 'devicelink': 'devicelink', 'read_only': 'read-only', 'busaddress': 'busaddress'} - _toPy = {'read-only': 'read_only', 'devicename': 'devicename', 'devicelink': 'devicelink', 'busaddress': 'busaddress'} - def __init__(self, busaddress=None, devicelink=None, devicename=None, read_only=None): +class Version(Type): + _toSchema = {'patch': 'Patch', 'minor': 'Minor', 'major': 'Major', 'storageengine': 'StorageEngine'} + _toPy = {'Major': 'major', 'Minor': 'minor', 'Patch': 'patch', 'StorageEngine': 'storageengine'} + def __init__(self, major=None, minor=None, patch=None, storageengine=None): ''' - busaddress : str - devicelink : str - devicename : str - read_only : bool + major : int + minor : int + patch : str + storageengine : str ''' - self.busaddress = busaddress - self.devicelink = devicelink - self.devicename = devicename - self.read_only = read_only + self.major = major + self.minor = minor + self.patch = patch + self.storageengine = storageengine -class VolumeAttachmentParams(Type): - _toSchema = {'volumeid': 'volumeid', 'instanceid': 'instanceid', 'volumetag': 'volumetag', 'machinetag': 'machinetag', 'provider': 'provider', 'read_only': 'read-only'} - _toPy = {'volumeid': 'volumeid', 'instanceid': 'instanceid', 'read-only': 'read_only', 'volumetag': 'volumetag', 'machinetag': 'machinetag', 'provider': 'provider'} - def __init__(self, instanceid=None, machinetag=None, provider=None, read_only=None, volumeid=None, volumetag=None): +class SSHHostKeySet(Type): + _toSchema = {'entity_keys': 'entity-keys'} + _toPy = {'entity-keys': 'entity_keys'} + def __init__(self, entity_keys=None): ''' - instanceid : str - machinetag : str - provider : str - read_only : bool - volumeid : str - volumetag : str + entity_keys : typing.Sequence<+T_co>[~SSHHostKeys]<~SSHHostKeys> ''' - self.instanceid = instanceid - self.machinetag = machinetag - self.provider = provider - self.read_only = read_only - self.volumeid = volumeid - self.volumetag = volumetag + self.entity_keys = [SSHHostKeys.from_json(o) for o in entity_keys or []] -class VolumeInfo(Type): - _toSchema = {'volumeid': 'volumeid', 'hardwareid': 'hardwareid', 'persistent': 'persistent', 'size': 'size'} - _toPy = {'volumeid': 'volumeid', 'hardwareid': 'hardwareid', 'persistent': 'persistent', 'size': 'size'} - def __init__(self, hardwareid=None, persistent=None, size=None, volumeid=None): +class SSHHostKeys(Type): + _toSchema = {'tag': 'tag', 'public_keys': 'public-keys'} + _toPy = {'tag': 'tag', 'public-keys': 'public_keys'} + def __init__(self, public_keys=None, tag=None): ''' - hardwareid : str - persistent : bool - size : int - volumeid : str + public_keys : typing.Sequence<+T_co>[str] + tag : str ''' - self.hardwareid = hardwareid - self.persistent = persistent - self.size = size - self.volumeid = volumeid + self.public_keys = public_keys + self.tag = tag -class VolumeParams(Type): - _toSchema = {'volumetag': 'volumetag', 'tags': 'tags', 'attachment': 'attachment', 'provider': 'provider', 'size': 'size', 'attributes': 'attributes'} - _toPy = {'volumetag': 'volumetag', 'tags': 'tags', 'attachment': 'attachment', 'provider': 'provider', 'size': 'size', 'attributes': 'attributes'} - def __init__(self, attachment=None, attributes=None, provider=None, size=None, tags=None, volumetag=None): +class ImageFilterParams(Type): + _toSchema = {'images': 'images'} + _toPy = {'images': 'images'} + def __init__(self, images=None): ''' - attachment : VolumeAttachmentParams - attributes : typing.Mapping[str, typing.Any] - provider : str - size : int - tags : typing.Mapping[str, str] - volumetag : str + images : typing.Sequence<+T_co>[~ImageSpec]<~ImageSpec> ''' - self.attachment = VolumeAttachmentParams.from_json(attachment) if attachment else None - self.attributes = attributes - self.provider = provider - self.size = size - self.tags = tags - self.volumetag = volumetag + self.images = [ImageSpec.from_json(o) for o in images or []] -class WatchContainer(Type): - _toSchema = {'containertype': 'ContainerType', 'machinetag': 'MachineTag'} - _toPy = {'MachineTag': 'machinetag', 'ContainerType': 'containertype'} - def __init__(self, containertype=None, machinetag=None): +class ImageMetadata(Type): + _toSchema = {'kind': 'kind', 'created': 'created', 'url': 'url', 'series': 'series', 'arch': 'arch'} + _toPy = {'kind': 'kind', 'created': 'created', 'url': 'url', 'series': 'series', 'arch': 'arch'} + def __init__(self, arch=None, created=None, kind=None, series=None, url=None): ''' - containertype : str - machinetag : str + arch : str + created : str + kind : str + series : str + url : str ''' - self.containertype = containertype - self.machinetag = machinetag + self.arch = arch + self.created = created + self.kind = kind + self.series = series + self.url = url -class WatchContainers(Type): - _toSchema = {'params': 'Params'} - _toPy = {'Params': 'params'} - def __init__(self, params=None): +class ImageSpec(Type): + _toSchema = {'kind': 'kind', 'series': 'series', 'arch': 'arch'} + _toPy = {'kind': 'kind', 'series': 'series', 'arch': 'arch'} + def __init__(self, arch=None, kind=None, series=None): ''' - params : typing.Sequence[~WatchContainer] + arch : str + kind : str + series : str ''' - self.params = [WatchContainer.from_json(o) for o in params or []] + self.arch = arch + self.kind = kind + self.series = series -class ProxyConfig(Type): - _toSchema = {'https': 'HTTPS', 'noproxy': 'NoProxy', 'ftp': 'FTP', 'http': 'HTTP'} - _toPy = {'HTTP': 'http', 'HTTPS': 'https', 'NoProxy': 'noproxy', 'FTP': 'ftp'} - def __init__(self, ftp=None, http=None, https=None, noproxy=None): +class ListImageResult(Type): + _toSchema = {'result': 'result'} + _toPy = {'result': 'result'} + def __init__(self, result=None): ''' - ftp : str - http : str - https : str - noproxy : str + result : typing.Sequence<+T_co>[~ImageMetadata]<~ImageMetadata> ''' - self.ftp = ftp - self.http = http - self.https = https - self.noproxy = noproxy + self.result = [ImageMetadata.from_json(o) for o in result or []] -class ProxyConfigResult(Type): - _toSchema = {'proxysettings': 'ProxySettings', 'error': 'Error', 'aptproxysettings': 'APTProxySettings'} - _toPy = {'Error': 'error', 'APTProxySettings': 'aptproxysettings', 'ProxySettings': 'proxysettings'} - def __init__(self, aptproxysettings=None, error=None, proxysettings=None): +class CloudImageMetadata(Type): + _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'} + _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'} + 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): ''' - aptproxysettings : ProxyConfig - error : Error - proxysettings : ProxyConfig + arch : str + image_id : str + priority : int + region : str + root_storage_size : int + root_storage_type : str + series : str + source : str + stream : str + version : str + virt_type : str ''' - self.aptproxysettings = ProxyConfig.from_json(aptproxysettings) if aptproxysettings else None - self.error = Error.from_json(error) if error else None - self.proxysettings = ProxyConfig.from_json(proxysettings) if proxysettings else None + self.arch = arch + self.image_id = image_id + self.priority = priority + self.region = region + self.root_storage_size = root_storage_size + self.root_storage_type = root_storage_type + self.series = series + self.source = source + self.stream = stream + self.version = version + self.virt_type = virt_type -class ProxyConfigResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): +class CloudImageMetadataList(Type): + _toSchema = {'metadata': 'metadata'} + _toPy = {'metadata': 'metadata'} + def __init__(self, metadata=None): ''' - results : typing.Sequence[~ProxyConfigResult] + metadata : typing.Sequence<+T_co>[~CloudImageMetadata]<~CloudImageMetadata> ''' - self.results = [ProxyConfigResult.from_json(o) for o in results or []] + self.metadata = [CloudImageMetadata.from_json(o) for o in metadata or []] -class RebootActionResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None): +class ImageMetadataFilter(Type): + _toSchema = {'stream': 'stream', 'root_storage_type': 'root-storage-type', 'virt_type': 'virt-type', 'series': 'series', 'region': 'region', 'arches': 'arches'} + _toPy = {'stream': 'stream', 'arches': 'arches', 'series': 'series', 'virt-type': 'virt_type', 'region': 'region', 'root-storage-type': 'root_storage_type'} + def __init__(self, arches=None, region=None, root_storage_type=None, series=None, stream=None, virt_type=None): ''' - error : Error - result : str + arches : typing.Sequence<+T_co>[str] + region : str + root_storage_type : str + series : typing.Sequence<+T_co>[str] + stream : str + virt_type : str ''' - self.error = Error.from_json(error) if error else None - self.result = result + self.arches = arches + self.region = region + self.root_storage_type = root_storage_type + self.series = series + self.stream = stream + self.virt_type = virt_type -class RebootActionResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None): +class ListCloudImageMetadataResult(Type): + _toSchema = {'result': 'result'} + _toPy = {'result': 'result'} + def __init__(self, result=None): ''' - results : typing.Sequence[~RebootActionResult] + result : typing.Sequence<+T_co>[~CloudImageMetadata]<~CloudImageMetadata> ''' - self.results = [RebootActionResult.from_json(o) for o in results or []] + self.result = [CloudImageMetadata.from_json(o) for o in result or []] -class RelationUnitsChange(Type): - _toSchema = {'departed': 'Departed', 'changed': 'Changed'} - _toPy = {'Departed': 'departed', 'Changed': 'changed'} - def __init__(self, changed=None, departed=None): +class MetadataImageIds(Type): + _toSchema = {'image_ids': 'image-ids'} + _toPy = {'image-ids': 'image_ids'} + def __init__(self, image_ids=None): ''' - changed : typing.Mapping[str, ~UnitSettings] - departed : typing.Sequence[str] + image_ids : typing.Sequence<+T_co>[str] ''' - self.changed = {k: UnitSettings.from_json(v) for k, v in (changed or dict()).items()} - self.departed = departed + self.image_ids = image_ids -class RelationUnitsWatchResult(Type): - _toSchema = {'changes': 'Changes', 'error': 'Error', 'relationunitswatcherid': 'RelationUnitsWatcherId'} - _toPy = {'Changes': 'changes', 'Error': 'error', 'RelationUnitsWatcherId': 'relationunitswatcherid'} - def __init__(self, changes=None, error=None, relationunitswatcherid=None): +class MetadataSaveParams(Type): + _toSchema = {'metadata': 'metadata'} + _toPy = {'metadata': 'metadata'} + def __init__(self, metadata=None): ''' - changes : RelationUnitsChange - error : Error - relationunitswatcherid : str + metadata : typing.Sequence<+T_co>[~CloudImageMetadataList]<~CloudImageMetadataList> ''' - self.changes = RelationUnitsChange.from_json(changes) if changes else None - self.error = Error.from_json(error) if error else None - self.relationunitswatcherid = relationunitswatcherid + self.metadata = [CloudImageMetadataList.from_json(o) for o in metadata or []] -class UnitSettings(Type): - _toSchema = {'version': 'Version'} - _toPy = {'Version': 'version'} - def __init__(self, version=None): +class EntityStatusArgs(Type): + _toSchema = {'info': 'info', 'data': 'data', 'tag': 'tag', 'status': 'status'} + _toPy = {'info': 'info', 'data': 'data', 'tag': 'tag', 'status': 'status'} + def __init__(self, data=None, info=None, status=None, tag=None): ''' - version : int + data : typing.Mapping<~KT, +VT_co>[str, typing.Any] + info : str + status : str + tag : str ''' - self.version = version + self.data = data + self.info = info + self.status = status + self.tag = tag -class RetryStrategy(Type): - _toSchema = {'maxretrytime': 'MaxRetryTime', 'minretrytime': 'MinRetryTime', 'jitterretrytime': 'JitterRetryTime', 'shouldretry': 'ShouldRetry', 'retrytimefactor': 'RetryTimeFactor'} - _toPy = {'MinRetryTime': 'minretrytime', 'ShouldRetry': 'shouldretry', 'MaxRetryTime': 'maxretrytime', 'RetryTimeFactor': 'retrytimefactor', 'JitterRetryTime': 'jitterretrytime'} - def __init__(self, jitterretrytime=None, maxretrytime=None, minretrytime=None, retrytimefactor=None, shouldretry=None): +class MachineAddresses(Type): + _toSchema = {'addresses': 'addresses', 'tag': 'tag'} + _toPy = {'addresses': 'addresses', 'tag': 'tag'} + def __init__(self, addresses=None, tag=None): ''' - jitterretrytime : bool - maxretrytime : int - minretrytime : int - retrytimefactor : int - shouldretry : bool + addresses : typing.Sequence<+T_co>[~Address]<~Address> + tag : str ''' - self.jitterretrytime = jitterretrytime - self.maxretrytime = maxretrytime - self.minretrytime = minretrytime - self.retrytimefactor = retrytimefactor - self.shouldretry = shouldretry + self.addresses = [Address.from_json(o) for o in addresses or []] + self.tag = tag -class RetryStrategyResult(Type): - _toSchema = {'error': 'Error', 'result': 'Result'} - _toPy = {'Error': 'error', 'Result': 'result'} - def __init__(self, error=None, result=None): +class MachineAddressesResult(Type): + _toSchema = {'addresses': 'addresses', 'error': 'error'} + _toPy = {'addresses': 'addresses', 'error': 'error'} + def __init__(self, addresses=None, error=None): ''' + addresses : typing.Sequence<+T_co>[~Address]<~Address> error : Error - result : RetryStrategy ''' + self.addresses = [Address.from_json(o) for o in addresses or []] self.error = Error.from_json(error) if error else None - self.result = RetryStrategy.from_json(result) if result else None -class RetryStrategyResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} +class MachineAddressesResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} def __init__(self, results=None): ''' - results : typing.Sequence[~RetryStrategyResult] + results : typing.Sequence<+T_co>[~MachineAddressesResult]<~MachineAddressesResult> ''' - self.results = [RetryStrategyResult.from_json(o) for o in results or []] - - -class SSHAddressResult(Type): - _toSchema = {'error': 'error', 'address': 'address'} - _toPy = {'error': 'error', 'address': 'address'} - def __init__(self, address=None, error=None): - ''' - address : str - error : Error - ''' - self.address = address - self.error = Error.from_json(error) if error else None + self.results = [MachineAddressesResult.from_json(o) for o in results or []] -class SSHAddressResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None): +class SetMachinesAddresses(Type): + _toSchema = {'machine_addresses': 'machine-addresses'} + _toPy = {'machine-addresses': 'machine_addresses'} + def __init__(self, machine_addresses=None): ''' - results : typing.Sequence[~SSHAddressResult] + machine_addresses : typing.Sequence<+T_co>[~MachineAddresses]<~MachineAddresses> ''' - self.results = [SSHAddressResult.from_json(o) for o in results or []] + self.machine_addresses = [MachineAddresses.from_json(o) for o in machine_addresses or []] -class SSHProxyResult(Type): - _toSchema = {'use_proxy': 'use-proxy'} - _toPy = {'use-proxy': 'use_proxy'} - def __init__(self, use_proxy=None): +class SetStatus(Type): + _toSchema = {'entities': 'entities'} + _toPy = {'entities': 'entities'} + def __init__(self, entities=None): ''' - use_proxy : bool + entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs> ''' - self.use_proxy = use_proxy + self.entities = [EntityStatusArgs.from_json(o) for o in entities or []] -class SSHPublicKeysResult(Type): - _toSchema = {'error': 'error', 'public_keys': 'public-keys'} - _toPy = {'error': 'error', 'public-keys': 'public_keys'} - def __init__(self, error=None, public_keys=None): +class StatusResult(Type): + _toSchema = {'info': 'info', 'data': 'data', 'since': 'since', 'error': 'error', 'life': 'life', 'status': 'status', 'id_': 'id'} + _toPy = {'info': 'info', 'data': 'data', 'since': 'since', 'error': 'error', 'life': 'life', 'status': 'status', 'id': 'id_'} + def __init__(self, data=None, error=None, id_=None, info=None, life=None, since=None, status=None): ''' + data : typing.Mapping<~KT, +VT_co>[str, typing.Any] error : Error - public_keys : typing.Sequence[str] + id_ : str + info : str + life : str + since : str + status : str ''' + self.data = data self.error = Error.from_json(error) if error else None - self.public_keys = public_keys + self.id_ = id_ + self.info = info + self.life = life + self.since = since + self.status = status -class SSHPublicKeysResults(Type): +class StatusResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None): ''' - results : typing.Sequence[~SSHPublicKeysResult] + results : typing.Sequence<+T_co>[~StatusResult]<~StatusResult> ''' - self.results = [SSHPublicKeysResult.from_json(o) for o in results or []] + self.results = [StatusResult.from_json(o) for o in results or []] -class AddRelation(Type): - _toSchema = {'endpoints': 'Endpoints'} - _toPy = {'Endpoints': 'endpoints'} - def __init__(self, endpoints=None): +class ListSSHKeys(Type): + _toSchema = {'entities': 'entities', 'mode': 'mode'} + _toPy = {'entities': 'entities', 'mode': 'mode'} + def __init__(self, entities=None, mode=None): ''' - endpoints : typing.Sequence[str] + entities : Entities + mode : bool ''' - self.endpoints = endpoints + self.entities = Entities.from_json(entities) if entities else None + self.mode = mode -class AddRelationResults(Type): - _toSchema = {'endpoints': 'Endpoints'} - _toPy = {'Endpoints': 'endpoints'} - def __init__(self, endpoints=None): +class ModifyUserSSHKeys(Type): + _toSchema = {'ssh_keys': 'ssh-keys', 'user': 'user'} + _toPy = {'user': 'user', 'ssh-keys': 'ssh_keys'} + def __init__(self, ssh_keys=None, user=None): ''' - endpoints : typing.Mapping[str, ~Relation] + ssh_keys : typing.Sequence<+T_co>[str] + user : str ''' - self.endpoints = {k: Relation.from_json(v) for k, v in (endpoints or dict()).items()} + self.ssh_keys = ssh_keys + self.user = user -class AddServiceUnits(Type): - _toSchema = {'servicename': 'ServiceName', 'placement': 'Placement', 'numunits': 'NumUnits'} - _toPy = {'ServiceName': 'servicename', 'Placement': 'placement', 'NumUnits': 'numunits'} - def __init__(self, numunits=None, placement=None, servicename=None): +class ApplicationTag(Type): + _toSchema = {'name': 'Name'} + _toPy = {'Name': 'name'} + def __init__(self, name=None): ''' - numunits : int - placement : typing.Sequence[~Placement] - servicename : str + name : str ''' - self.numunits = numunits - self.placement = [Placement.from_json(o) for o in placement or []] - self.servicename = servicename + self.name = name -class AddServiceUnitsResults(Type): - _toSchema = {'units': 'Units'} - _toPy = {'Units': 'units'} - def __init__(self, units=None): +class ClaimLeadershipBulkParams(Type): + _toSchema = {'params': 'params'} + _toPy = {'params': 'params'} + def __init__(self, params=None): ''' - units : typing.Sequence[str] + params : typing.Sequence<+T_co>[~ClaimLeadershipParams]<~ClaimLeadershipParams> ''' - self.units = units + self.params = [ClaimLeadershipParams.from_json(o) for o in params or []] -class DestroyRelation(Type): - _toSchema = {'endpoints': 'Endpoints'} - _toPy = {'Endpoints': 'endpoints'} - def __init__(self, endpoints=None): +class ClaimLeadershipBulkResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): ''' - endpoints : typing.Sequence[str] + results : typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' - self.endpoints = endpoints + self.results = [ErrorResult.from_json(o) for o in results or []] -class DestroyServiceUnits(Type): - _toSchema = {'unitnames': 'UnitNames'} - _toPy = {'UnitNames': 'unitnames'} - def __init__(self, unitnames=None): +class ClaimLeadershipParams(Type): + _toSchema = {'unit_tag': 'unit-tag', 'duration': 'duration', 'application_tag': 'application-tag'} + _toPy = {'application-tag': 'application_tag', 'unit-tag': 'unit_tag', 'duration': 'duration'} + def __init__(self, application_tag=None, duration=None, unit_tag=None): ''' - unitnames : typing.Sequence[str] + application_tag : str + duration : float + unit_tag : str ''' - self.unitnames = unitnames + self.application_tag = application_tag + self.duration = duration + self.unit_tag = unit_tag -class GetServiceConstraints(Type): - _toSchema = {'servicename': 'ServiceName'} - _toPy = {'ServiceName': 'servicename'} - def __init__(self, servicename=None): +class LogForwardingGetLastSentParams(Type): + _toSchema = {'ids': 'ids'} + _toPy = {'ids': 'ids'} + def __init__(self, ids=None): ''' - servicename : str + ids : typing.Sequence<+T_co>[~LogForwardingID]<~LogForwardingID> ''' - self.servicename = servicename + self.ids = [LogForwardingID.from_json(o) for o in ids or []] -class Relation(Type): - _toSchema = {'name': 'Name', 'limit': 'Limit', 'role': 'Role', 'optional': 'Optional', 'scope': 'Scope', 'interface': 'Interface'} - _toPy = {'Optional': 'optional', 'Limit': 'limit', 'Scope': 'scope', 'Name': 'name', 'Role': 'role', 'Interface': 'interface'} - def __init__(self, interface=None, limit=None, name=None, optional=None, role=None, scope=None): +class LogForwardingGetLastSentResult(Type): + _toSchema = {'record_id': 'record-id', 'record_timestamp': 'record-timestamp', 'err': 'err'} + _toPy = {'record-timestamp': 'record_timestamp', 'record-id': 'record_id', 'err': 'err'} + def __init__(self, err=None, record_id=None, record_timestamp=None): ''' - interface : str - limit : int - name : str - optional : bool - role : str - scope : str + err : Error + record_id : int + record_timestamp : int ''' - self.interface = interface - self.limit = limit - self.name = name - self.optional = optional - self.role = role - self.scope = scope + self.err = Error.from_json(err) if err else None + self.record_id = record_id + self.record_timestamp = record_timestamp -class ServiceCharmRelations(Type): - _toSchema = {'servicename': 'ServiceName'} - _toPy = {'ServiceName': 'servicename'} - def __init__(self, servicename=None): +class LogForwardingGetLastSentResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): ''' - servicename : str + results : typing.Sequence<+T_co>[~LogForwardingGetLastSentResult]<~LogForwardingGetLastSentResult> ''' - self.servicename = servicename + self.results = [LogForwardingGetLastSentResult.from_json(o) for o in results or []] -class ServiceCharmRelationsResults(Type): - _toSchema = {'charmrelations': 'CharmRelations'} - _toPy = {'CharmRelations': 'charmrelations'} - def __init__(self, charmrelations=None): +class LogForwardingID(Type): + _toSchema = {'model': 'model', 'sink': 'sink'} + _toPy = {'model': 'model', 'sink': 'sink'} + def __init__(self, model=None, sink=None): ''' - charmrelations : typing.Sequence[str] + model : str + sink : str ''' - self.charmrelations = charmrelations + self.model = model + self.sink = sink -class ServiceDeploy(Type): - _toSchema = {'configyaml': 'ConfigYAML', 'storage': 'Storage', 'endpointbindings': 'EndpointBindings', 'resources': 'Resources', 'servicename': 'ServiceName', 'series': 'Series', 'charmurl': 'CharmUrl', 'config': 'Config', 'channel': 'Channel', 'placement': 'Placement', 'numunits': 'NumUnits', 'constraints': 'Constraints'} - _toPy = {'ServiceName': 'servicename', 'Constraints': 'constraints', 'ConfigYAML': 'configyaml', 'Resources': 'resources', 'Channel': 'channel', 'Storage': 'storage', 'Config': 'config', 'Placement': 'placement', 'EndpointBindings': 'endpointbindings', 'NumUnits': 'numunits', 'CharmUrl': 'charmurl', 'Series': 'series'} - def __init__(self, channel=None, charmurl=None, config=None, configyaml=None, constraints=None, endpointbindings=None, numunits=None, placement=None, resources=None, series=None, servicename=None, storage=None): +class LogForwardingSetLastSentParam(Type): + _toSchema = {'record_id': 'record-id', 'logforwardingid': 'LogForwardingID', 'record_timestamp': 'record-timestamp'} + _toPy = {'record-id': 'record_id', 'LogForwardingID': 'logforwardingid', 'record-timestamp': 'record_timestamp'} + def __init__(self, logforwardingid=None, record_id=None, record_timestamp=None): ''' - channel : str - charmurl : str - config : typing.Mapping[str, str] - configyaml : str - constraints : Value - endpointbindings : typing.Mapping[str, str] - numunits : int - placement : typing.Sequence[~Placement] - resources : typing.Mapping[str, str] - series : str - servicename : str - storage : typing.Mapping[str, ~Constraints] + logforwardingid : LogForwardingID + record_id : int + record_timestamp : int ''' - self.channel = channel - self.charmurl = charmurl - self.config = config - self.configyaml = configyaml - self.constraints = Value.from_json(constraints) if constraints else None - self.endpointbindings = endpointbindings - self.numunits = numunits - self.placement = [Placement.from_json(o) for o in placement or []] - self.resources = resources - self.series = series - self.servicename = servicename - self.storage = {k: Constraints.from_json(v) for k, v in (storage or dict()).items()} + self.logforwardingid = LogForwardingID.from_json(logforwardingid) if logforwardingid else None + self.record_id = record_id + self.record_timestamp = record_timestamp -class ServiceDestroy(Type): - _toSchema = {'servicename': 'ServiceName'} - _toPy = {'ServiceName': 'servicename'} - def __init__(self, servicename=None): +class LogForwardingSetLastSentParams(Type): + _toSchema = {'params': 'params'} + _toPy = {'params': 'params'} + def __init__(self, params=None): ''' - servicename : str + params : typing.Sequence<+T_co>[~LogForwardingSetLastSentParam]<~LogForwardingSetLastSentParam> ''' - self.servicename = servicename + self.params = [LogForwardingSetLastSentParam.from_json(o) for o in params or []] -class ServiceExpose(Type): - _toSchema = {'servicename': 'ServiceName'} - _toPy = {'ServiceName': 'servicename'} - def __init__(self, servicename=None): +class ActionExecutionResult(Type): + _toSchema = {'status': 'status', 'action_tag': 'action-tag', 'results': 'results', 'message': 'message'} + _toPy = {'status': 'status', 'results': 'results', 'action-tag': 'action_tag', 'message': 'message'} + def __init__(self, action_tag=None, message=None, results=None, status=None): ''' - servicename : str + action_tag : str + message : str + results : typing.Mapping<~KT, +VT_co>[str, typing.Any] + status : str ''' - self.servicename = servicename + self.action_tag = action_tag + self.message = message + self.results = results + self.status = status -class ServiceGet(Type): - _toSchema = {'servicename': 'ServiceName'} - _toPy = {'ServiceName': 'servicename'} - def __init__(self, servicename=None): +class ActionExecutionResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): ''' - servicename : str + results : typing.Sequence<+T_co>[~ActionExecutionResult]<~ActionExecutionResult> ''' - self.servicename = servicename + self.results = [ActionExecutionResult.from_json(o) for o in results or []] -class ServiceGetResults(Type): - _toSchema = {'config': 'Config', 'charm': 'Charm', 'constraints': 'Constraints', 'service': 'Service'} - _toPy = {'Charm': 'charm', 'Constraints': 'constraints', 'Config': 'config', 'Service': 'service'} - def __init__(self, charm=None, config=None, constraints=None, service=None): +class EntitiesResult(Type): + _toSchema = {'entities': 'entities', 'error': 'error'} + _toPy = {'entities': 'entities', 'error': 'error'} + def __init__(self, entities=None, error=None): ''' - charm : str - config : typing.Mapping[str, typing.Any] - constraints : Value - service : str + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + error : Error ''' - self.charm = charm - self.config = config - self.constraints = Value.from_json(constraints) if constraints else None - self.service = service + self.entities = [Entity.from_json(o) for o in entities or []] + self.error = Error.from_json(error) if error else None -class ServiceMetricCredential(Type): - _toSchema = {'metriccredentials': 'MetricCredentials', 'servicename': 'ServiceName'} - _toPy = {'MetricCredentials': 'metriccredentials', 'ServiceName': 'servicename'} - def __init__(self, metriccredentials=None, servicename=None): +class EntitiesResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): ''' - metriccredentials : typing.Sequence[int] - servicename : str + results : typing.Sequence<+T_co>[~EntitiesResult]<~EntitiesResult> ''' - self.metriccredentials = metriccredentials - self.servicename = servicename + self.results = [EntitiesResult.from_json(o) for o in results or []] -class ServiceMetricCredentials(Type): - _toSchema = {'creds': 'Creds'} - _toPy = {'Creds': 'creds'} - def __init__(self, creds=None): +class ProviderInterfaceInfo(Type): + _toSchema = {'provider_id': 'provider-id', 'mac_address': 'mac-address', 'interface_name': 'interface-name'} + _toPy = {'interface-name': 'interface_name', 'mac-address': 'mac_address', 'provider-id': 'provider_id'} + def __init__(self, interface_name=None, mac_address=None, provider_id=None): ''' - creds : typing.Sequence[~ServiceMetricCredential] + interface_name : str + mac_address : str + provider_id : str ''' - self.creds = [ServiceMetricCredential.from_json(o) for o in creds or []] + self.interface_name = interface_name + self.mac_address = mac_address + self.provider_id = provider_id -class ServiceSet(Type): - _toSchema = {'options': 'Options', 'servicename': 'ServiceName'} - _toPy = {'ServiceName': 'servicename', 'Options': 'options'} - def __init__(self, options=None, servicename=None): +class ProviderInterfaceInfoResult(Type): + _toSchema = {'interfaces': 'interfaces', 'machine_tag': 'machine-tag', 'error': 'error'} + _toPy = {'interfaces': 'interfaces', 'machine-tag': 'machine_tag', 'error': 'error'} + def __init__(self, error=None, interfaces=None, machine_tag=None): ''' - options : typing.Mapping[str, str] - servicename : str + error : Error + interfaces : typing.Sequence<+T_co>[~ProviderInterfaceInfo]<~ProviderInterfaceInfo> + machine_tag : str ''' - self.options = options - self.servicename = servicename + self.error = Error.from_json(error) if error else None + self.interfaces = [ProviderInterfaceInfo.from_json(o) for o in interfaces or []] + self.machine_tag = machine_tag -class ServiceSetCharm(Type): - _toSchema = {'charmurl': 'charmurl', 'forceseries': 'forceseries', 'forceunits': 'forceunits', 'resourceids': 'resourceids', 'cs_channel': 'cs-channel', 'servicename': 'servicename'} - _toPy = {'charmurl': 'charmurl', 'forceseries': 'forceseries', 'forceunits': 'forceunits', 'cs-channel': 'cs_channel', 'resourceids': 'resourceids', 'servicename': 'servicename'} - def __init__(self, charmurl=None, cs_channel=None, forceseries=None, forceunits=None, resourceids=None, servicename=None): +class ProviderInterfaceInfoResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): ''' - charmurl : str - cs_channel : str - forceseries : bool - forceunits : bool - resourceids : typing.Mapping[str, str] - servicename : str + results : typing.Sequence<+T_co>[~ProviderInterfaceInfoResult]<~ProviderInterfaceInfoResult> ''' - self.charmurl = charmurl - self.cs_channel = cs_channel - self.forceseries = forceseries - self.forceunits = forceunits - self.resourceids = resourceids - self.servicename = servicename + self.results = [ProviderInterfaceInfoResult.from_json(o) for o in results or []] -class ServiceUnexpose(Type): - _toSchema = {'servicename': 'ServiceName'} - _toPy = {'ServiceName': 'servicename'} - def __init__(self, servicename=None): +class JobsResult(Type): + _toSchema = {'jobs': 'jobs', 'error': 'error'} + _toPy = {'jobs': 'jobs', 'error': 'error'} + def __init__(self, error=None, jobs=None): ''' - servicename : str + error : Error + jobs : typing.Sequence<+T_co>[str] ''' - self.servicename = servicename + self.error = Error.from_json(error) if error else None + self.jobs = jobs -class ServiceUnset(Type): - _toSchema = {'options': 'Options', 'servicename': 'ServiceName'} - _toPy = {'ServiceName': 'servicename', 'Options': 'options'} - def __init__(self, options=None, servicename=None): - ''' - options : typing.Sequence[str] - servicename : str +class JobsResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): ''' - self.options = options - self.servicename = servicename - - -class ServiceUpdate(Type): - _toSchema = {'charmurl': 'CharmUrl', 'forceseries': 'ForceSeries', 'minunits': 'MinUnits', 'forcecharmurl': 'ForceCharmUrl', 'settingsyaml': 'SettingsYAML', 'settingsstrings': 'SettingsStrings', 'constraints': 'Constraints', 'servicename': 'ServiceName'} - _toPy = {'ServiceName': 'servicename', 'Constraints': 'constraints', 'SettingsStrings': 'settingsstrings', 'ForceSeries': 'forceseries', 'CharmUrl': 'charmurl', 'SettingsYAML': 'settingsyaml', 'MinUnits': 'minunits', 'ForceCharmUrl': 'forcecharmurl'} - def __init__(self, charmurl=None, constraints=None, forcecharmurl=None, forceseries=None, minunits=None, servicename=None, settingsstrings=None, settingsyaml=None): + results : typing.Sequence<+T_co>[~JobsResult]<~JobsResult> ''' - charmurl : str - constraints : Value - forcecharmurl : bool - forceseries : bool - minunits : int - servicename : str - settingsstrings : typing.Mapping[str, str] - settingsyaml : str - ''' - self.charmurl = charmurl - self.constraints = Value.from_json(constraints) if constraints else None - self.forcecharmurl = forcecharmurl - self.forceseries = forceseries - self.minunits = minunits - self.servicename = servicename - self.settingsstrings = settingsstrings - self.settingsyaml = settingsyaml + self.results = [JobsResult.from_json(o) for o in results or []] -class ServicesDeploy(Type): - _toSchema = {'services': 'Services'} - _toPy = {'Services': 'services'} - def __init__(self, services=None): +class NetworkConfig(Type): + _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'} + _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'} + 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): ''' - services : typing.Sequence[~ServiceDeploy] + address : str + cidr : str + config_type : str + device_index : int + disabled : bool + dns_search_domains : typing.Sequence<+T_co>[str] + dns_servers : typing.Sequence<+T_co>[str] + gateway_address : str + interface_name : str + interface_type : str + mac_address : str + mtu : int + no_auto_start : bool + parent_interface_name : str + provider_address_id : str + provider_id : str + provider_space_id : str + provider_subnet_id : str + provider_vlan_id : str + vlan_tag : int ''' - self.services = [ServiceDeploy.from_json(o) for o in services or []] + self.address = address + self.cidr = cidr + self.config_type = config_type + self.device_index = device_index + self.disabled = disabled + self.dns_search_domains = dns_search_domains + self.dns_servers = dns_servers + self.gateway_address = gateway_address + self.interface_name = interface_name + self.interface_type = interface_type + self.mac_address = mac_address + self.mtu = mtu + self.no_auto_start = no_auto_start + self.parent_interface_name = parent_interface_name + self.provider_address_id = provider_address_id + self.provider_id = provider_id + self.provider_space_id = provider_space_id + self.provider_subnet_id = provider_subnet_id + self.provider_vlan_id = provider_vlan_id + self.vlan_tag = vlan_tag -class SingularClaim(Type): - _toSchema = {'modeltag': 'ModelTag', 'controllertag': 'ControllerTag', 'duration': 'Duration'} - _toPy = {'ControllerTag': 'controllertag', 'Duration': 'duration', 'ModelTag': 'modeltag'} - def __init__(self, controllertag=None, duration=None, modeltag=None): +class SetMachineNetworkConfig(Type): + _toSchema = {'config': 'config', 'tag': 'tag'} + _toPy = {'config': 'config', 'tag': 'tag'} + def __init__(self, config=None, tag=None): ''' - controllertag : str - duration : int - modeltag : str + config : typing.Sequence<+T_co>[~NetworkConfig]<~NetworkConfig> + tag : str ''' - self.controllertag = controllertag - self.duration = duration - self.modeltag = modeltag + self.config = [NetworkConfig.from_json(o) for o in config or []] + self.tag = tag -class SingularClaims(Type): - _toSchema = {'claims': 'Claims'} - _toPy = {'Claims': 'claims'} - def __init__(self, claims=None): +class MeterStatusResult(Type): + _toSchema = {'info': 'info', 'code': 'code', 'error': 'error'} + _toPy = {'info': 'info', 'code': 'code', 'error': 'error'} + def __init__(self, code=None, error=None, info=None): ''' - claims : typing.Sequence[~SingularClaim] + code : str + error : Error + info : str ''' - self.claims = [SingularClaim.from_json(o) for o in claims or []] + self.code = code + self.error = Error.from_json(error) if error else None + self.info = info -class ListSpacesResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} +class MeterStatusResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} def __init__(self, results=None): ''' - results : typing.Sequence[~Space] + results : typing.Sequence<+T_co>[~MeterStatusResult]<~MeterStatusResult> ''' - self.results = [Space.from_json(o) for o in results or []] + self.results = [MeterStatusResult.from_json(o) for o in results or []] -class Space(Type): - _toSchema = {'subnets': 'Subnets', 'error': 'Error', 'name': 'Name'} - _toPy = {'Error': 'error', 'Subnets': 'subnets', 'Name': 'name'} - def __init__(self, error=None, name=None, subnets=None): +class Metric(Type): + _toSchema = {'time': 'time', 'value': 'value', 'key': 'key'} + _toPy = {'time': 'time', 'value': 'value', 'key': 'key'} + def __init__(self, key=None, time=None, value=None): ''' - error : Error - name : str - subnets : typing.Sequence[~Subnet] + key : str + time : str + value : str ''' - self.error = Error.from_json(error) if error else None - self.name = name - self.subnets = [Subnet.from_json(o) for o in subnets or []] + self.key = key + self.time = time + self.value = value -class StatusHistoryPruneArgs(Type): - _toSchema = {'maxlogsperentity': 'MaxLogsPerEntity'} - _toPy = {'MaxLogsPerEntity': 'maxlogsperentity'} - def __init__(self, maxlogsperentity=None): +class MetricBatch(Type): + _toSchema = {'uuid': 'uuid', 'created': 'created', 'charm_url': 'charm-url', 'metrics': 'metrics'} + _toPy = {'uuid': 'uuid', 'charm-url': 'charm_url', 'created': 'created', 'metrics': 'metrics'} + def __init__(self, charm_url=None, created=None, metrics=None, uuid=None): ''' - maxlogsperentity : int + charm_url : str + created : str + metrics : typing.Sequence<+T_co>[~Metric]<~Metric> + uuid : str ''' - self.maxlogsperentity = maxlogsperentity + self.charm_url = charm_url + self.created = created + self.metrics = [Metric.from_json(o) for o in metrics or []] + self.uuid = uuid -class FilesystemAttachmentInfo(Type): - _toSchema = {'mountpoint': 'mountpoint', 'read_only': 'read-only'} - _toPy = {'mountpoint': 'mountpoint', 'read-only': 'read_only'} - def __init__(self, mountpoint=None, read_only=None): +class MetricBatchParam(Type): + _toSchema = {'batch': 'batch', 'tag': 'tag'} + _toPy = {'batch': 'batch', 'tag': 'tag'} + def __init__(self, batch=None, tag=None): ''' - mountpoint : str - read_only : bool + batch : MetricBatch + tag : str ''' - self.mountpoint = mountpoint - self.read_only = read_only + self.batch = MetricBatch.from_json(batch) if batch else None + self.tag = tag -class FilesystemDetails(Type): - _toSchema = {'filesystemtag': 'filesystemtag', 'info': 'info', 'status': 'status', 'volumetag': 'volumetag', 'storage': 'storage', 'machineattachments': 'machineattachments'} - _toPy = {'filesystemtag': 'filesystemtag', 'info': 'info', 'status': 'status', 'volumetag': 'volumetag', 'storage': 'storage', 'machineattachments': 'machineattachments'} - def __init__(self, filesystemtag=None, info=None, machineattachments=None, status=None, storage=None, volumetag=None): +class MetricBatchParams(Type): + _toSchema = {'batches': 'batches'} + _toPy = {'batches': 'batches'} + def __init__(self, batches=None): ''' - filesystemtag : str - info : FilesystemInfo - machineattachments : typing.Mapping[str, ~FilesystemAttachmentInfo] - status : EntityStatus - storage : StorageDetails - volumetag : str + batches : typing.Sequence<+T_co>[~MetricBatchParam]<~MetricBatchParam> ''' - self.filesystemtag = filesystemtag - self.info = FilesystemInfo.from_json(info) if info else None - self.machineattachments = {k: FilesystemAttachmentInfo.from_json(v) for k, v in (machineattachments or dict()).items()} - self.status = EntityStatus.from_json(status) if status else None - self.storage = StorageDetails.from_json(storage) if storage else None - self.volumetag = volumetag + self.batches = [MetricBatchParam.from_json(o) for o in batches or []] -class FilesystemDetailsListResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None): +class EntityMetrics(Type): + _toSchema = {'metrics': 'metrics', 'error': 'error'} + _toPy = {'metrics': 'metrics', 'error': 'error'} + def __init__(self, error=None, metrics=None): ''' error : Error - result : typing.Sequence[~FilesystemDetails] + metrics : typing.Sequence<+T_co>[~MetricResult]<~MetricResult> ''' self.error = Error.from_json(error) if error else None - self.result = [FilesystemDetails.from_json(o) for o in result or []] + self.metrics = [MetricResult.from_json(o) for o in metrics or []] -class FilesystemDetailsListResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None): +class MeterStatusParam(Type): + _toSchema = {'info': 'info', 'tag': 'tag', 'code': 'code'} + _toPy = {'info': 'info', 'tag': 'tag', 'code': 'code'} + def __init__(self, code=None, info=None, tag=None): ''' - results : typing.Sequence[~FilesystemDetailsListResult] + code : str + info : str + tag : str ''' - self.results = [FilesystemDetailsListResult.from_json(o) for o in results or []] - - -class FilesystemFilter(Type): - _toSchema = {'machines': 'machines'} - _toPy = {'machines': 'machines'} - def __init__(self, machines=None): + self.code = code + self.info = info + self.tag = tag + + +class MeterStatusParams(Type): + _toSchema = {'statues': 'statues'} + _toPy = {'statues': 'statues'} + def __init__(self, statues=None): ''' - machines : typing.Sequence[str] + statues : typing.Sequence<+T_co>[~MeterStatusParam]<~MeterStatusParam> ''' - self.machines = machines + self.statues = [MeterStatusParam.from_json(o) for o in statues or []] -class FilesystemFilters(Type): - _toSchema = {'filters': 'filters'} - _toPy = {'filters': 'filters'} - def __init__(self, filters=None): +class MetricResult(Type): + _toSchema = {'time': 'time', 'value': 'value', 'key': 'key'} + _toPy = {'time': 'time', 'value': 'value', 'key': 'key'} + def __init__(self, key=None, time=None, value=None): ''' - filters : typing.Sequence[~FilesystemFilter] + key : str + time : str + value : str ''' - self.filters = [FilesystemFilter.from_json(o) for o in filters or []] + self.key = key + self.time = time + self.value = value -class FilesystemInfo(Type): - _toSchema = {'filesystemid': 'filesystemid', 'size': 'size'} - _toPy = {'filesystemid': 'filesystemid', 'size': 'size'} - def __init__(self, filesystemid=None, size=None): +class MetricResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): ''' - filesystemid : str - size : int + results : typing.Sequence<+T_co>[~EntityMetrics]<~EntityMetrics> ''' - self.filesystemid = filesystemid - self.size = size + self.results = [EntityMetrics.from_json(o) for o in results or []] -class StorageAddParams(Type): - _toSchema = {'unit': 'unit', 'storagename': 'StorageName', 'storage': 'storage'} - _toPy = {'unit': 'unit', 'StorageName': 'storagename', 'storage': 'storage'} - def __init__(self, storagename=None, storage=None, unit=None): +class PhaseResult(Type): + _toSchema = {'phase': 'phase', 'error': 'error'} + _toPy = {'phase': 'phase', 'error': 'error'} + def __init__(self, error=None, phase=None): ''' - storagename : str - storage : StorageConstraints - unit : str + error : Error + phase : str ''' - self.storagename = storagename - self.storage = StorageConstraints.from_json(storage) if storage else None - self.unit = unit + self.error = Error.from_json(error) if error else None + self.phase = phase -class StorageAttachmentDetails(Type): - _toSchema = {'unittag': 'unittag', 'location': 'location', 'machinetag': 'machinetag', 'storagetag': 'storagetag'} - _toPy = {'unittag': 'unittag', 'location': 'location', 'machinetag': 'machinetag', 'storagetag': 'storagetag'} - def __init__(self, location=None, machinetag=None, storagetag=None, unittag=None): +class PhaseResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): ''' - location : str - machinetag : str - storagetag : str - unittag : str + results : typing.Sequence<+T_co>[~PhaseResult]<~PhaseResult> ''' - self.location = location - self.machinetag = machinetag - self.storagetag = storagetag - self.unittag = unittag + self.results = [PhaseResult.from_json(o) for o in results or []] -class StorageConstraints(Type): - _toSchema = {'pool': 'Pool', 'count': 'Count', 'size': 'Size'} - _toPy = {'Pool': 'pool', 'Count': 'count', 'Size': 'size'} - def __init__(self, count=None, pool=None, size=None): +class MasterMigrationStatus(Type): + _toSchema = {'phase': 'phase', 'phase_changed_time': 'phase-changed-time', 'migration_id': 'migration-id', 'spec': 'spec'} + _toPy = {'phase': 'phase', 'phase-changed-time': 'phase_changed_time', 'migration-id': 'migration_id', 'spec': 'spec'} + def __init__(self, migration_id=None, phase=None, phase_changed_time=None, spec=None): ''' - count : int - pool : str - size : int + migration_id : str + phase : str + phase_changed_time : str + spec : MigrationSpec ''' - self.count = count - self.pool = pool - self.size = size + self.migration_id = migration_id + self.phase = phase + self.phase_changed_time = phase_changed_time + self.spec = MigrationSpec.from_json(spec) if spec else None -class StorageDetails(Type): - _toSchema = {'attachments': 'attachments', 'status': 'status', 'persistent': 'Persistent', 'kind': 'kind', 'ownertag': 'ownertag', 'storagetag': 'storagetag'} - _toPy = {'Persistent': 'persistent', 'status': 'status', 'attachments': 'attachments', 'kind': 'kind', 'ownertag': 'ownertag', 'storagetag': 'storagetag'} - def __init__(self, persistent=None, attachments=None, kind=None, ownertag=None, status=None, storagetag=None): +class MigrationModelInfo(Type): + _toSchema = {'agent_version': 'agent-version', 'uuid': 'uuid', 'name': 'name'} + _toPy = {'name': 'name', 'uuid': 'uuid', 'agent-version': 'agent_version'} + def __init__(self, agent_version=None, name=None, uuid=None): ''' - persistent : bool - attachments : typing.Mapping[str, ~StorageAttachmentDetails] - kind : int - ownertag : str - status : EntityStatus - storagetag : str + agent_version : Number + name : str + uuid : str ''' - self.persistent = persistent - self.attachments = {k: StorageAttachmentDetails.from_json(v) for k, v in (attachments or dict()).items()} - self.kind = kind - self.ownertag = ownertag - self.status = EntityStatus.from_json(status) if status else None - self.storagetag = storagetag + self.agent_version = Number.from_json(agent_version) if agent_version else None + self.name = name + self.uuid = uuid -class StorageDetailsListResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None): +class MinionReports(Type): + _toSchema = {'unknown_sample': 'unknown-sample', 'phase': 'phase', 'failed': 'failed', 'success_count': 'success-count', 'migration_id': 'migration-id', 'unknown_count': 'unknown-count'} + _toPy = {'phase': 'phase', 'failed': 'failed', 'success-count': 'success_count', 'migration-id': 'migration_id', 'unknown-sample': 'unknown_sample', 'unknown-count': 'unknown_count'} + def __init__(self, failed=None, migration_id=None, phase=None, success_count=None, unknown_count=None, unknown_sample=None): ''' - error : Error - result : typing.Sequence[~StorageDetails] + failed : typing.Sequence<+T_co>[str] + migration_id : str + phase : str + success_count : int + unknown_count : int + unknown_sample : typing.Sequence<+T_co>[str] ''' - self.error = Error.from_json(error) if error else None - self.result = [StorageDetails.from_json(o) for o in result or []] + self.failed = failed + self.migration_id = migration_id + self.phase = phase + self.success_count = success_count + self.unknown_count = unknown_count + self.unknown_sample = unknown_sample -class StorageDetailsListResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None): +class SerializedModel(Type): + _toSchema = {'charms': 'charms', 'bytes_': 'bytes', 'tools': 'tools'} + _toPy = {'charms': 'charms', 'tools': 'tools', 'bytes': 'bytes_'} + def __init__(self, bytes_=None, charms=None, tools=None): ''' - results : typing.Sequence[~StorageDetailsListResult] + bytes_ : typing.Sequence<+T_co>[int] + charms : typing.Sequence<+T_co>[str] + tools : typing.Sequence<+T_co>[~SerializedModelTools]<~SerializedModelTools> ''' - self.results = [StorageDetailsListResult.from_json(o) for o in results or []] + self.bytes_ = bytes_ + self.charms = charms + self.tools = [SerializedModelTools.from_json(o) for o in tools or []] -class StorageDetailsResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None): +class SerializedModelTools(Type): + _toSchema = {'uri': 'uri', 'version': 'version'} + _toPy = {'uri': 'uri', 'version': 'version'} + def __init__(self, uri=None, version=None): ''' - error : Error - result : StorageDetails + uri : str + version : str ''' - self.error = Error.from_json(error) if error else None - self.result = StorageDetails.from_json(result) if result else None + self.uri = uri + self.version = version -class StorageDetailsResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None): +class SetMigrationPhaseArgs(Type): + _toSchema = {'phase': 'phase'} + _toPy = {'phase': 'phase'} + def __init__(self, phase=None): ''' - results : typing.Sequence[~StorageDetailsResult] + phase : str ''' - self.results = [StorageDetailsResult.from_json(o) for o in results or []] + self.phase = phase -class StorageFilter(Type): - _toSchema = {} - _toPy = {} - def __init__(self): +class SetMigrationStatusMessageArgs(Type): + _toSchema = {'message': 'message'} + _toPy = {'message': 'message'} + def __init__(self, message=None): ''' - + message : str ''' - pass + self.message = message -class StorageFilters(Type): - _toSchema = {'filters': 'filters'} - _toPy = {'filters': 'filters'} - def __init__(self, filters=None): +class MinionReport(Type): + _toSchema = {'success': 'success', 'phase': 'phase', 'migration_id': 'migration-id'} + _toPy = {'success': 'success', 'phase': 'phase', 'migration-id': 'migration_id'} + def __init__(self, migration_id=None, phase=None, success=None): ''' - filters : typing.Sequence[~StorageFilter] + migration_id : str + phase : str + success : bool ''' - self.filters = [StorageFilter.from_json(o) for o in filters or []] + self.migration_id = migration_id + self.phase = phase + self.success = success -class StoragePool(Type): - _toSchema = {'name': 'name', 'provider': 'provider', 'attrs': 'attrs'} - _toPy = {'name': 'name', 'provider': 'provider', 'attrs': 'attrs'} - def __init__(self, attrs=None, name=None, provider=None): +class MigrationStatus(Type): + _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'} + _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'} + 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): ''' - attrs : typing.Mapping[str, typing.Any] - name : str - provider : str + attempt : int + migration_id : str + phase : str + source_api_addrs : typing.Sequence<+T_co>[str] + source_ca_cert : str + target_api_addrs : typing.Sequence<+T_co>[str] + target_ca_cert : str ''' - self.attrs = attrs - self.name = name - self.provider = provider + self.attempt = attempt + self.migration_id = migration_id + self.phase = phase + self.source_api_addrs = source_api_addrs + self.source_ca_cert = source_ca_cert + self.target_api_addrs = target_api_addrs + self.target_ca_cert = target_ca_cert -class StoragePoolFilter(Type): - _toSchema = {'providers': 'providers', 'names': 'names'} - _toPy = {'providers': 'providers', 'names': 'names'} - def __init__(self, names=None, providers=None): +class ModelArgs(Type): + _toSchema = {'model_tag': 'model-tag'} + _toPy = {'model-tag': 'model_tag'} + def __init__(self, model_tag=None): ''' - names : typing.Sequence[str] - providers : typing.Sequence[str] + model_tag : str ''' - self.names = names - self.providers = providers + self.model_tag = model_tag -class StoragePoolFilters(Type): - _toSchema = {'filters': 'filters'} - _toPy = {'filters': 'filters'} - def __init__(self, filters=None): +class TargetPrechecksArgs(Type): + _toSchema = {'build': 'Build', 'patch': 'Patch', 'tag': 'Tag', 'minor': 'Minor', 'major': 'Major'} + _toPy = {'Tag': 'tag', 'Major': 'major', 'Patch': 'patch', 'Minor': 'minor', 'Build': 'build'} + def __init__(self, build=None, major=None, minor=None, patch=None, tag=None): ''' - filters : typing.Sequence[~StoragePoolFilter] + build : int + major : int + minor : int + patch : int + tag : str ''' - self.filters = [StoragePoolFilter.from_json(o) for o in filters or []] + self.build = build + self.major = major + self.minor = minor + self.patch = patch + self.tag = tag -class StoragePoolsResult(Type): - _toSchema = {'storagepools': 'storagepools', 'error': 'error'} - _toPy = {'storagepools': 'storagepools', 'error': 'error'} - def __init__(self, error=None, storagepools=None): +class MapResult(Type): + _toSchema = {'result': 'result', 'error': 'error'} + _toPy = {'result': 'result', 'error': 'error'} + def __init__(self, error=None, result=None): ''' error : Error - storagepools : typing.Sequence[~StoragePool] + result : typing.Mapping<~KT, +VT_co>[str, typing.Any] ''' self.error = Error.from_json(error) if error else None - self.storagepools = [StoragePool.from_json(o) for o in storagepools or []] + self.result = result -class StoragePoolsResults(Type): +class MapResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None): ''' - results : typing.Sequence[~StoragePoolsResult] - ''' - self.results = [StoragePoolsResult.from_json(o) for o in results or []] - - -class StoragesAddParams(Type): - _toSchema = {'storages': 'storages'} - _toPy = {'storages': 'storages'} - def __init__(self, storages=None): - ''' - storages : typing.Sequence[~StorageAddParams] + results : typing.Sequence<+T_co>[~MapResult]<~MapResult> ''' - self.storages = [StorageAddParams.from_json(o) for o in storages or []] + self.results = [MapResult.from_json(o) for o in results or []] -class VolumeDetails(Type): - _toSchema = {'info': 'info', 'machineattachments': 'machineattachments', 'status': 'status', 'volumetag': 'volumetag', 'storage': 'storage'} - _toPy = {'info': 'info', 'machineattachments': 'machineattachments', 'status': 'status', 'volumetag': 'volumetag', 'storage': 'storage'} - def __init__(self, info=None, machineattachments=None, status=None, storage=None, volumetag=None): +class ModelCreateArgs(Type): + _toSchema = {'config': 'config', 'cloud_tag': 'cloud-tag', 'owner_tag': 'owner-tag', 'region': 'region', 'name': 'name', 'credential': 'credential'} + _toPy = {'config': 'config', 'region': 'region', 'name': 'name', 'owner-tag': 'owner_tag', 'cloud-tag': 'cloud_tag', 'credential': 'credential'} + def __init__(self, cloud_tag=None, config=None, credential=None, name=None, owner_tag=None, region=None): ''' - info : VolumeInfo - machineattachments : typing.Mapping[str, ~VolumeAttachmentInfo] - status : EntityStatus - storage : StorageDetails - volumetag : str + cloud_tag : str + config : typing.Mapping<~KT, +VT_co>[str, typing.Any] + credential : str + name : str + owner_tag : str + region : str ''' - self.info = VolumeInfo.from_json(info) if info else None - self.machineattachments = {k: VolumeAttachmentInfo.from_json(v) for k, v in (machineattachments or dict()).items()} - self.status = EntityStatus.from_json(status) if status else None - self.storage = StorageDetails.from_json(storage) if storage else None - self.volumetag = volumetag + self.cloud_tag = cloud_tag + self.config = config + self.credential = credential + self.name = name + self.owner_tag = owner_tag + self.region = region -class VolumeDetailsListResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} +class ModelInfoResult(Type): + _toSchema = {'result': 'result', 'error': 'error'} + _toPy = {'result': 'result', 'error': 'error'} def __init__(self, error=None, result=None): ''' error : Error - result : typing.Sequence[~VolumeDetails] + result : ModelInfo ''' self.error = Error.from_json(error) if error else None - self.result = [VolumeDetails.from_json(o) for o in result or []] + self.result = ModelInfo.from_json(result) if result else None -class VolumeDetailsListResults(Type): +class ModelInfoResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None): ''' - results : typing.Sequence[~VolumeDetailsListResult] + results : typing.Sequence<+T_co>[~ModelInfoResult]<~ModelInfoResult> ''' - self.results = [VolumeDetailsListResult.from_json(o) for o in results or []] + self.results = [ModelInfoResult.from_json(o) for o in results or []] -class VolumeFilter(Type): - _toSchema = {'machines': 'machines'} - _toPy = {'machines': 'machines'} - def __init__(self, machines=None): +class ModifyModelAccess(Type): + _toSchema = {'model_tag': 'model-tag', 'access': 'access', 'action': 'action', 'user_tag': 'user-tag'} + _toPy = {'model-tag': 'model_tag', 'access': 'access', 'action': 'action', 'user-tag': 'user_tag'} + def __init__(self, access=None, action=None, model_tag=None, user_tag=None): ''' - machines : typing.Sequence[str] + access : str + action : str + model_tag : str + user_tag : str ''' - self.machines = machines + self.access = access + self.action = action + self.model_tag = model_tag + self.user_tag = user_tag -class VolumeFilters(Type): - _toSchema = {'filters': 'filters'} - _toPy = {'filters': 'filters'} - def __init__(self, filters=None): +class ModifyModelAccessRequest(Type): + _toSchema = {'changes': 'changes'} + _toPy = {'changes': 'changes'} + def __init__(self, changes=None): ''' - filters : typing.Sequence[~VolumeFilter] + changes : typing.Sequence<+T_co>[~ModifyModelAccess]<~ModifyModelAccess> ''' - self.filters = [VolumeFilter.from_json(o) for o in filters or []] + self.changes = [ModifyModelAccess.from_json(o) for o in changes or []] -class BlockDeviceResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None): +class ConstraintsResult(Type): + _toSchema = {'constraints': 'constraints', 'error': 'error'} + _toPy = {'constraints': 'constraints', 'error': 'error'} + def __init__(self, constraints=None, error=None): ''' + constraints : Value error : Error - result : BlockDevice ''' + self.constraints = Value.from_json(constraints) if constraints else None self.error = Error.from_json(error) if error else None - self.result = BlockDevice.from_json(result) if result else None -class BlockDeviceResults(Type): +class ConstraintsResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None): ''' - results : typing.Sequence[~BlockDeviceResult] + results : typing.Sequence<+T_co>[~ConstraintsResult]<~ConstraintsResult> ''' - self.results = [BlockDeviceResult.from_json(o) for o in results or []] + self.results = [ConstraintsResult.from_json(o) for o in results or []] -class Filesystem(Type): - _toSchema = {'filesystemtag': 'filesystemtag', 'info': 'info', 'volumetag': 'volumetag'} - _toPy = {'filesystemtag': 'filesystemtag', 'info': 'info', 'volumetag': 'volumetag'} - def __init__(self, filesystemtag=None, info=None, volumetag=None): +class ContainerConfig(Type): + _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'} + _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'} + def __init__(self, updatebehavior=None, apt_mirror=None, apt_proxy=None, authorized_keys=None, provider_type=None, proxy=None, ssl_hostname_verification=None): ''' - filesystemtag : str - info : FilesystemInfo - volumetag : str + updatebehavior : UpdateBehavior + apt_mirror : str + apt_proxy : Settings + authorized_keys : str + provider_type : str + proxy : Settings + ssl_hostname_verification : bool ''' - self.filesystemtag = filesystemtag - self.info = FilesystemInfo.from_json(info) if info else None - self.volumetag = volumetag + self.updatebehavior = UpdateBehavior.from_json(updatebehavior) if updatebehavior else None + self.apt_mirror = apt_mirror + self.apt_proxy = Settings.from_json(apt_proxy) if apt_proxy else None + self.authorized_keys = authorized_keys + self.provider_type = provider_type + self.proxy = Settings.from_json(proxy) if proxy else None + self.ssl_hostname_verification = ssl_hostname_verification -class FilesystemAttachment(Type): - _toSchema = {'filesystemtag': 'filesystemtag', 'info': 'info', 'machinetag': 'machinetag'} - _toPy = {'filesystemtag': 'filesystemtag', 'info': 'info', 'machinetag': 'machinetag'} - def __init__(self, filesystemtag=None, info=None, machinetag=None): +class ContainerManagerConfig(Type): + _toSchema = {'config': 'config'} + _toPy = {'config': 'config'} + def __init__(self, config=None): ''' - filesystemtag : str - info : FilesystemAttachmentInfo - machinetag : str + config : typing.Mapping<~KT, +VT_co>[str, str] ''' - self.filesystemtag = filesystemtag - self.info = FilesystemAttachmentInfo.from_json(info) if info else None - self.machinetag = machinetag + self.config = config -class FilesystemAttachmentParams(Type): - _toSchema = {'filesystemtag': 'filesystemtag', 'instanceid': 'instanceid', 'mountpoint': 'mountpoint', 'machinetag': 'machinetag', 'filesystemid': 'filesystemid', 'provider': 'provider', 'read_only': 'read-only'} - _toPy = {'filesystemtag': 'filesystemtag', 'instanceid': 'instanceid', 'read-only': 'read_only', 'mountpoint': 'mountpoint', 'machinetag': 'machinetag', 'filesystemid': 'filesystemid', 'provider': 'provider'} - def __init__(self, filesystemid=None, filesystemtag=None, instanceid=None, machinetag=None, mountpoint=None, provider=None, read_only=None): - ''' - filesystemid : str - filesystemtag : str - instanceid : str - machinetag : str - mountpoint : str - provider : str - read_only : bool +class ContainerManagerConfigParams(Type): + _toSchema = {'type_': 'type'} + _toPy = {'type': 'type_'} + def __init__(self, type_=None): ''' - self.filesystemid = filesystemid - self.filesystemtag = filesystemtag - self.instanceid = instanceid - self.machinetag = machinetag - self.mountpoint = mountpoint - self.provider = provider - self.read_only = read_only + type_ : str + ''' + self.type_ = type_ -class FilesystemAttachmentParamsResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} +class DistributionGroupResult(Type): + _toSchema = {'result': 'result', 'error': 'error'} + _toPy = {'result': 'result', 'error': 'error'} def __init__(self, error=None, result=None): ''' error : Error - result : FilesystemAttachmentParams + result : typing.Sequence<+T_co>[str] ''' self.error = Error.from_json(error) if error else None - self.result = FilesystemAttachmentParams.from_json(result) if result else None + self.result = result -class FilesystemAttachmentParamsResults(Type): +class DistributionGroupResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None): ''' - results : typing.Sequence[~FilesystemAttachmentParamsResult] + results : typing.Sequence<+T_co>[~DistributionGroupResult]<~DistributionGroupResult> ''' - self.results = [FilesystemAttachmentParamsResult.from_json(o) for o in results or []] + self.results = [DistributionGroupResult.from_json(o) for o in results or []] -class FilesystemAttachmentResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None): +class InstanceInfo(Type): + _toSchema = {'volumes': 'volumes', 'nonce': 'nonce', 'characteristics': 'characteristics', 'instance_id': 'instance-id', 'network_config': 'network-config', 'tag': 'tag', 'volume_attachments': 'volume-attachments'} + _toPy = {'network-config': 'network_config', 'nonce': 'nonce', 'characteristics': 'characteristics', 'instance-id': 'instance_id', 'tag': 'tag', 'volumes': 'volumes', 'volume-attachments': 'volume_attachments'} + def __init__(self, characteristics=None, instance_id=None, network_config=None, nonce=None, tag=None, volume_attachments=None, volumes=None): + ''' + characteristics : HardwareCharacteristics + instance_id : str + network_config : typing.Sequence<+T_co>[~NetworkConfig]<~NetworkConfig> + nonce : str + tag : str + volume_attachments : typing.Mapping<~KT, +VT_co>[str, ~VolumeAttachmentInfo]<~VolumeAttachmentInfo> + volumes : typing.Sequence<+T_co>[~Volume]<~Volume> + ''' + self.characteristics = HardwareCharacteristics.from_json(characteristics) if characteristics else None + self.instance_id = instance_id + self.network_config = [NetworkConfig.from_json(o) for o in network_config or []] + self.nonce = nonce + self.tag = tag + self.volume_attachments = volume_attachments + self.volumes = [Volume.from_json(o) for o in volumes or []] + + +class InstancesInfo(Type): + _toSchema = {'machines': 'machines'} + _toPy = {'machines': 'machines'} + def __init__(self, machines=None): + ''' + machines : typing.Sequence<+T_co>[~InstanceInfo]<~InstanceInfo> + ''' + self.machines = [InstanceInfo.from_json(o) for o in machines or []] + + +class MachineContainers(Type): + _toSchema = {'machine_tag': 'machine-tag', 'container_types': 'container-types'} + _toPy = {'machine-tag': 'machine_tag', 'container-types': 'container_types'} + def __init__(self, container_types=None, machine_tag=None): + ''' + container_types : typing.Sequence<+T_co>[str] + machine_tag : str + ''' + self.container_types = container_types + self.machine_tag = machine_tag + + +class MachineContainersParams(Type): + _toSchema = {'params': 'params'} + _toPy = {'params': 'params'} + def __init__(self, params=None): + ''' + params : typing.Sequence<+T_co>[~MachineContainers]<~MachineContainers> + ''' + self.params = [MachineContainers.from_json(o) for o in params or []] + + +class MachineNetworkConfigResult(Type): + _toSchema = {'info': 'info', 'error': 'error'} + _toPy = {'info': 'info', 'error': 'error'} + def __init__(self, error=None, info=None): ''' error : Error - result : FilesystemAttachment + info : typing.Sequence<+T_co>[~NetworkConfig]<~NetworkConfig> ''' self.error = Error.from_json(error) if error else None - self.result = FilesystemAttachment.from_json(result) if result else None + self.info = [NetworkConfig.from_json(o) for o in info or []] -class FilesystemAttachmentResults(Type): +class MachineNetworkConfigResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None): ''' - results : typing.Sequence[~FilesystemAttachmentResult] - ''' - self.results = [FilesystemAttachmentResult.from_json(o) for o in results or []] - - -class FilesystemAttachments(Type): - _toSchema = {'filesystemattachments': 'filesystemattachments'} - _toPy = {'filesystemattachments': 'filesystemattachments'} - def __init__(self, filesystemattachments=None): - ''' - filesystemattachments : typing.Sequence[~FilesystemAttachment] + results : typing.Sequence<+T_co>[~MachineNetworkConfigResult]<~MachineNetworkConfigResult> ''' - self.filesystemattachments = [FilesystemAttachment.from_json(o) for o in filesystemattachments or []] + self.results = [MachineNetworkConfigResult.from_json(o) for o in results or []] -class FilesystemParams(Type): - _toSchema = {'filesystemtag': 'filesystemtag', 'volumetag': 'volumetag', 'tags': 'tags', 'attachment': 'attachment', 'provider': 'provider', 'size': 'size', 'attributes': 'attributes'} - _toPy = {'filesystemtag': 'filesystemtag', 'volumetag': 'volumetag', 'tags': 'tags', 'attachment': 'attachment', 'provider': 'provider', 'size': 'size', 'attributes': 'attributes'} - def __init__(self, attachment=None, attributes=None, filesystemtag=None, provider=None, size=None, tags=None, volumetag=None): +class ProvisioningInfo(Type): + _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'} + _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'} + 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): ''' - attachment : FilesystemAttachmentParams - attributes : typing.Mapping[str, typing.Any] - filesystemtag : str - provider : str - size : int - tags : typing.Mapping[str, str] - volumetag : str + constraints : Value + controller_config : typing.Mapping<~KT, +VT_co>[str, typing.Any] + endpoint_bindings : typing.Mapping<~KT, +VT_co>[str, str] + image_metadata : typing.Sequence<+T_co>[~CloudImageMetadata]<~CloudImageMetadata> + jobs : typing.Sequence<+T_co>[str] + placement : str + series : str + subnets_to_zones : typing.Sequence<+T_co>[str] + tags : typing.Mapping<~KT, +VT_co>[str, str] + volumes : typing.Sequence<+T_co>[~VolumeParams]<~VolumeParams> ''' - self.attachment = FilesystemAttachmentParams.from_json(attachment) if attachment else None - self.attributes = attributes - self.filesystemtag = filesystemtag - self.provider = provider - self.size = size + self.constraints = Value.from_json(constraints) if constraints else None + self.controller_config = controller_config + self.endpoint_bindings = endpoint_bindings + self.image_metadata = [CloudImageMetadata.from_json(o) for o in image_metadata or []] + self.jobs = jobs + self.placement = placement + self.series = series + self.subnets_to_zones = subnets_to_zones self.tags = tags - self.volumetag = volumetag + self.volumes = [VolumeParams.from_json(o) for o in volumes or []] -class FilesystemParamsResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} +class ProvisioningInfoResult(Type): + _toSchema = {'result': 'result', 'error': 'error'} + _toPy = {'result': 'result', 'error': 'error'} def __init__(self, error=None, result=None): ''' error : Error - result : FilesystemParams + result : ProvisioningInfo ''' self.error = Error.from_json(error) if error else None - self.result = FilesystemParams.from_json(result) if result else None + self.result = ProvisioningInfo.from_json(result) if result else None -class FilesystemParamsResults(Type): +class ProvisioningInfoResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None): ''' - results : typing.Sequence[~FilesystemParamsResult] + results : typing.Sequence<+T_co>[~ProvisioningInfoResult]<~ProvisioningInfoResult> ''' - self.results = [FilesystemParamsResult.from_json(o) for o in results or []] + self.results = [ProvisioningInfoResult.from_json(o) for o in results or []] -class FilesystemResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None): +class Settings(Type): + _toSchema = {'https': 'Https', 'ftp': 'Ftp', 'noproxy': 'NoProxy', 'http': 'Http'} + _toPy = {'Http': 'http', 'Https': 'https', 'Ftp': 'ftp', 'NoProxy': 'noproxy'} + def __init__(self, ftp=None, http=None, https=None, noproxy=None): + ''' + ftp : str + http : str + https : str + noproxy : str + ''' + self.ftp = ftp + self.http = http + self.https = https + self.noproxy = noproxy + + +class ToolsResult(Type): + _toSchema = {'disable_ssl_hostname_verification': 'disable-ssl-hostname-verification', 'tools': 'tools', 'error': 'error'} + _toPy = {'disable-ssl-hostname-verification': 'disable_ssl_hostname_verification', 'tools': 'tools', 'error': 'error'} + def __init__(self, disable_ssl_hostname_verification=None, error=None, tools=None): ''' + disable_ssl_hostname_verification : bool error : Error - result : Filesystem + tools : typing.Sequence<+T_co>[~Tools]<~Tools> ''' + self.disable_ssl_hostname_verification = disable_ssl_hostname_verification self.error = Error.from_json(error) if error else None - self.result = Filesystem.from_json(result) if result else None + self.tools = [Tools.from_json(o) for o in tools or []] -class FilesystemResults(Type): +class ToolsResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None): ''' - results : typing.Sequence[~FilesystemResult] + results : typing.Sequence<+T_co>[~ToolsResult]<~ToolsResult> ''' - self.results = [FilesystemResult.from_json(o) for o in results or []] + self.results = [ToolsResult.from_json(o) for o in results or []] -class Filesystems(Type): - _toSchema = {'filesystems': 'filesystems'} - _toPy = {'filesystems': 'filesystems'} - def __init__(self, filesystems=None): +class UpdateBehavior(Type): + _toSchema = {'enable_os_upgrade': 'enable-os-upgrade', 'enable_os_refresh_update': 'enable-os-refresh-update'} + _toPy = {'enable-os-refresh-update': 'enable_os_refresh_update', 'enable-os-upgrade': 'enable_os_upgrade'} + def __init__(self, enable_os_refresh_update=None, enable_os_upgrade=None): ''' - filesystems : typing.Sequence[~Filesystem] + enable_os_refresh_update : bool + enable_os_upgrade : bool ''' - self.filesystems = [Filesystem.from_json(o) for o in filesystems or []] + self.enable_os_refresh_update = enable_os_refresh_update + self.enable_os_upgrade = enable_os_upgrade -class MachineStorageIds(Type): - _toSchema = {'ids': 'ids'} - _toPy = {'ids': 'ids'} - def __init__(self, ids=None): +class Volume(Type): + _toSchema = {'info': 'info', 'volume_tag': 'volume-tag'} + _toPy = {'info': 'info', 'volume-tag': 'volume_tag'} + def __init__(self, info=None, volume_tag=None): ''' - ids : typing.Sequence[~MachineStorageId] + info : VolumeInfo + volume_tag : str ''' - self.ids = [MachineStorageId.from_json(o) for o in ids or []] + self.info = VolumeInfo.from_json(info) if info else None + self.volume_tag = volume_tag -class MachineStorageIdsWatchResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): +class VolumeAttachmentInfo(Type): + _toSchema = {'bus_address': 'bus-address', 'device_name': 'device-name', 'device_link': 'device-link', 'read_only': 'read-only'} + _toPy = {'device-link': 'device_link', 'read-only': 'read_only', 'device-name': 'device_name', 'bus-address': 'bus_address'} + def __init__(self, bus_address=None, device_link=None, device_name=None, read_only=None): ''' - results : typing.Sequence[~MachineStorageIdsWatchResult] + bus_address : str + device_link : str + device_name : str + read_only : bool ''' - self.results = [MachineStorageIdsWatchResult.from_json(o) for o in results or []] + self.bus_address = bus_address + self.device_link = device_link + self.device_name = device_name + self.read_only = read_only -class VolumeAttachment(Type): - _toSchema = {'info': 'info', 'machinetag': 'machinetag', 'volumetag': 'volumetag'} - _toPy = {'info': 'info', 'machinetag': 'machinetag', 'volumetag': 'volumetag'} - def __init__(self, info=None, machinetag=None, volumetag=None): +class VolumeAttachmentParams(Type): + _toSchema = {'read_only': 'read-only', 'volume_id': 'volume-id', 'instance_id': 'instance-id', 'provider': 'provider', 'volume_tag': 'volume-tag', 'machine_tag': 'machine-tag'} + _toPy = {'instance-id': 'instance_id', 'volume-id': 'volume_id', 'read-only': 'read_only', 'machine-tag': 'machine_tag', 'provider': 'provider', 'volume-tag': 'volume_tag'} + def __init__(self, instance_id=None, machine_tag=None, provider=None, read_only=None, volume_id=None, volume_tag=None): ''' - info : VolumeAttachmentInfo - machinetag : str - volumetag : str + instance_id : str + machine_tag : str + provider : str + read_only : bool + volume_id : str + volume_tag : str ''' - self.info = VolumeAttachmentInfo.from_json(info) if info else None - self.machinetag = machinetag - self.volumetag = volumetag + self.instance_id = instance_id + self.machine_tag = machine_tag + self.provider = provider + self.read_only = read_only + self.volume_id = volume_id + self.volume_tag = volume_tag -class VolumeAttachmentParamsResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None): +class VolumeInfo(Type): + _toSchema = {'hardware_id': 'hardware-id', 'persistent': 'persistent', 'volume_id': 'volume-id', 'size': 'size'} + _toPy = {'persistent': 'persistent', 'size': 'size', 'volume-id': 'volume_id', 'hardware-id': 'hardware_id'} + def __init__(self, hardware_id=None, persistent=None, size=None, volume_id=None): ''' - error : Error - result : VolumeAttachmentParams + hardware_id : str + persistent : bool + size : int + volume_id : str ''' - self.error = Error.from_json(error) if error else None - self.result = VolumeAttachmentParams.from_json(result) if result else None + self.hardware_id = hardware_id + self.persistent = persistent + self.size = size + self.volume_id = volume_id -class VolumeAttachmentParamsResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None): +class VolumeParams(Type): + _toSchema = {'attachment': 'attachment', 'size': 'size', 'tags': 'tags', 'attributes': 'attributes', 'provider': 'provider', 'volume_tag': 'volume-tag'} + _toPy = {'attachment': 'attachment', 'size': 'size', 'tags': 'tags', 'attributes': 'attributes', 'provider': 'provider', 'volume-tag': 'volume_tag'} + def __init__(self, attachment=None, attributes=None, provider=None, size=None, tags=None, volume_tag=None): ''' - results : typing.Sequence[~VolumeAttachmentParamsResult] + attachment : VolumeAttachmentParams + attributes : typing.Mapping<~KT, +VT_co>[str, typing.Any] + provider : str + size : int + tags : typing.Mapping<~KT, +VT_co>[str, str] + volume_tag : str ''' - self.results = [VolumeAttachmentParamsResult.from_json(o) for o in results or []] + self.attachment = VolumeAttachmentParams.from_json(attachment) if attachment else None + self.attributes = attributes + self.provider = provider + self.size = size + self.tags = tags + self.volume_tag = volume_tag -class VolumeAttachmentResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None): +class WatchContainer(Type): + _toSchema = {'machine_tag': 'machine-tag', 'container_type': 'container-type'} + _toPy = {'machine-tag': 'machine_tag', 'container-type': 'container_type'} + def __init__(self, container_type=None, machine_tag=None): ''' - error : Error - result : VolumeAttachment + container_type : str + machine_tag : str ''' - self.error = Error.from_json(error) if error else None - self.result = VolumeAttachment.from_json(result) if result else None + self.container_type = container_type + self.machine_tag = machine_tag -class VolumeAttachmentResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None): +class WatchContainers(Type): + _toSchema = {'params': 'params'} + _toPy = {'params': 'params'} + def __init__(self, params=None): ''' - results : typing.Sequence[~VolumeAttachmentResult] + params : typing.Sequence<+T_co>[~WatchContainer]<~WatchContainer> ''' - self.results = [VolumeAttachmentResult.from_json(o) for o in results or []] + self.params = [WatchContainer.from_json(o) for o in params or []] -class VolumeAttachments(Type): - _toSchema = {'volumeattachments': 'volumeattachments'} - _toPy = {'volumeattachments': 'volumeattachments'} - def __init__(self, volumeattachments=None): +class ProxyConfig(Type): + _toSchema = {'https': 'https', 'ftp': 'ftp', 'no_proxy': 'no-proxy', 'http': 'http'} + _toPy = {'https': 'https', 'ftp': 'ftp', 'no-proxy': 'no_proxy', 'http': 'http'} + def __init__(self, ftp=None, http=None, https=None, no_proxy=None): ''' - volumeattachments : typing.Sequence[~VolumeAttachment] + ftp : str + http : str + https : str + no_proxy : str ''' - self.volumeattachments = [VolumeAttachment.from_json(o) for o in volumeattachments or []] + self.ftp = ftp + self.http = http + self.https = https + self.no_proxy = no_proxy -class VolumeParamsResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None): +class ProxyConfigResult(Type): + _toSchema = {'proxy_settings': 'proxy-settings', 'apt_proxy_settings': 'apt-proxy-settings', 'error': 'error'} + _toPy = {'proxy-settings': 'proxy_settings', 'error': 'error', 'apt-proxy-settings': 'apt_proxy_settings'} + def __init__(self, apt_proxy_settings=None, error=None, proxy_settings=None): ''' + apt_proxy_settings : ProxyConfig error : Error - result : VolumeParams + proxy_settings : ProxyConfig ''' + self.apt_proxy_settings = ProxyConfig.from_json(apt_proxy_settings) if apt_proxy_settings else None self.error = Error.from_json(error) if error else None - self.result = VolumeParams.from_json(result) if result else None + self.proxy_settings = ProxyConfig.from_json(proxy_settings) if proxy_settings else None -class VolumeParamsResults(Type): +class ProxyConfigResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None): ''' - results : typing.Sequence[~VolumeParamsResult] + results : typing.Sequence<+T_co>[~ProxyConfigResult]<~ProxyConfigResult> ''' - self.results = [VolumeParamsResult.from_json(o) for o in results or []] + self.results = [ProxyConfigResult.from_json(o) for o in results or []] -class VolumeResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} +class RebootActionResult(Type): + _toSchema = {'result': 'result', 'error': 'error'} + _toPy = {'result': 'result', 'error': 'error'} def __init__(self, error=None, result=None): ''' error : Error - result : Volume + result : str ''' self.error = Error.from_json(error) if error else None - self.result = Volume.from_json(result) if result else None + self.result = result -class VolumeResults(Type): +class RebootActionResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None): ''' - results : typing.Sequence[~VolumeResult] + results : typing.Sequence<+T_co>[~RebootActionResult]<~RebootActionResult> ''' - self.results = [VolumeResult.from_json(o) for o in results or []] + self.results = [RebootActionResult.from_json(o) for o in results or []] -class Volumes(Type): - _toSchema = {'volumes': 'volumes'} - _toPy = {'volumes': 'volumes'} - def __init__(self, volumes=None): +class RelationUnitsChange(Type): + _toSchema = {'departed': 'departed', 'changed': 'changed'} + _toPy = {'departed': 'departed', 'changed': 'changed'} + def __init__(self, changed=None, departed=None): ''' - volumes : typing.Sequence[~Volume] + changed : typing.Mapping<~KT, +VT_co>[str, ~UnitSettings]<~UnitSettings> + departed : typing.Sequence<+T_co>[str] ''' - self.volumes = [Volume.from_json(o) for o in volumes or []] + self.changed = changed + self.departed = departed -class SpaceResult(Type): - _toSchema = {'error': 'Error', 'tag': 'Tag'} - _toPy = {'Tag': 'tag', 'Error': 'error'} - def __init__(self, error=None, tag=None): +class RelationUnitsWatchResult(Type): + _toSchema = {'changes': 'changes', 'watcher_id': 'watcher-id', 'error': 'error'} + _toPy = {'watcher-id': 'watcher_id', 'changes': 'changes', 'error': 'error'} + def __init__(self, changes=None, error=None, watcher_id=None): ''' + changes : RelationUnitsChange error : Error - tag : str + watcher_id : str ''' + self.changes = RelationUnitsChange.from_json(changes) if changes else None self.error = Error.from_json(error) if error else None - self.tag = tag + self.watcher_id = watcher_id -class SpaceResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): +class UnitSettings(Type): + _toSchema = {'version': 'version'} + _toPy = {'version': 'version'} + def __init__(self, version=None): ''' - results : typing.Sequence[~SpaceResult] + version : int ''' - self.results = [SpaceResult.from_json(o) for o in results or []] + self.version = version -class ZoneResult(Type): - _toSchema = {'available': 'Available', 'error': 'Error', 'name': 'Name'} - _toPy = {'Error': 'error', 'Available': 'available', 'Name': 'name'} - def __init__(self, available=None, error=None, name=None): +class RetryStrategy(Type): + _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'} + _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'} + def __init__(self, jitter_retry_time=None, max_retry_time=None, min_retry_time=None, retry_time_factor=None, should_retry=None): ''' - available : bool - error : Error - name : str + jitter_retry_time : bool + max_retry_time : int + min_retry_time : int + retry_time_factor : int + should_retry : bool ''' - self.available = available - self.error = Error.from_json(error) if error else None - self.name = name + self.jitter_retry_time = jitter_retry_time + self.max_retry_time = max_retry_time + self.min_retry_time = min_retry_time + self.retry_time_factor = retry_time_factor + self.should_retry = should_retry -class ZoneResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): +class RetryStrategyResult(Type): + _toSchema = {'result': 'result', 'error': 'error'} + _toPy = {'result': 'result', 'error': 'error'} + def __init__(self, error=None, result=None): ''' - results : typing.Sequence[~ZoneResult] - ''' - self.results = [ZoneResult.from_json(o) for o in results or []] - - -class UndertakerModelInfo(Type): - _toSchema = {'globalname': 'GlobalName', 'name': 'Name', 'life': 'Life', 'uuid': 'UUID', 'issystem': 'IsSystem'} - _toPy = {'UUID': 'uuid', 'Name': 'name', 'Life': 'life', 'GlobalName': 'globalname', 'IsSystem': 'issystem'} - def __init__(self, globalname=None, issystem=None, life=None, name=None, uuid=None): - ''' - globalname : str - issystem : bool - life : str - name : str - uuid : str - ''' - self.globalname = globalname - self.issystem = issystem - self.life = life - self.name = name - self.uuid = uuid - - -class UndertakerModelInfoResult(Type): - _toSchema = {'error': 'Error', 'result': 'Result'} - _toPy = {'Error': 'error', 'Result': 'result'} - def __init__(self, error=None, result=None): - ''' - error : Error - result : UndertakerModelInfo + error : Error + result : RetryStrategy ''' self.error = Error.from_json(error) if error else None - self.result = UndertakerModelInfo.from_json(result) if result else None - - -class CharmURL(Type): - _toSchema = {'url': 'URL'} - _toPy = {'URL': 'url'} - def __init__(self, url=None): - ''' - url : str - ''' - self.url = url + self.result = RetryStrategy.from_json(result) if result else None -class CharmURLs(Type): - _toSchema = {'urls': 'URLs'} - _toPy = {'URLs': 'urls'} - def __init__(self, urls=None): +class RetryStrategyResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): ''' - urls : typing.Sequence[~CharmURL] + results : typing.Sequence<+T_co>[~RetryStrategyResult]<~RetryStrategyResult> ''' - self.urls = [CharmURL.from_json(o) for o in urls or []] + self.results = [RetryStrategyResult.from_json(o) for o in results or []] -class ConfigSettingsResult(Type): - _toSchema = {'error': 'Error', 'settings': 'Settings'} - _toPy = {'Error': 'error', 'Settings': 'settings'} - def __init__(self, error=None, settings=None): +class SSHAddressResult(Type): + _toSchema = {'error': 'error', 'address': 'address'} + _toPy = {'error': 'error', 'address': 'address'} + def __init__(self, address=None, error=None): ''' + address : str error : Error - settings : typing.Mapping[str, typing.Any] ''' + self.address = address self.error = Error.from_json(error) if error else None - self.settings = settings -class ConfigSettingsResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} +class SSHAddressResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} def __init__(self, results=None): ''' - results : typing.Sequence[~ConfigSettingsResult] + results : typing.Sequence<+T_co>[~SSHAddressResult]<~SSHAddressResult> ''' - self.results = [ConfigSettingsResult.from_json(o) for o in results or []] + self.results = [SSHAddressResult.from_json(o) for o in results or []] -class Endpoint(Type): - _toSchema = {'relation': 'Relation', 'servicename': 'ServiceName'} - _toPy = {'Relation': 'relation', 'ServiceName': 'servicename'} - def __init__(self, relation=None, servicename=None): +class SSHProxyResult(Type): + _toSchema = {'use_proxy': 'use-proxy'} + _toPy = {'use-proxy': 'use_proxy'} + def __init__(self, use_proxy=None): ''' - relation : Relation - servicename : str + use_proxy : bool ''' - self.relation = Relation.from_json(relation) if relation else None - self.servicename = servicename + self.use_proxy = use_proxy -class EntitiesCharmURL(Type): - _toSchema = {'entities': 'Entities'} - _toPy = {'Entities': 'entities'} - def __init__(self, entities=None): +class SSHPublicKeysResult(Type): + _toSchema = {'public_keys': 'public-keys', 'error': 'error'} + _toPy = {'public-keys': 'public_keys', 'error': 'error'} + def __init__(self, error=None, public_keys=None): ''' - entities : typing.Sequence[~EntityCharmURL] + error : Error + public_keys : typing.Sequence<+T_co>[str] ''' - self.entities = [EntityCharmURL.from_json(o) for o in entities or []] + self.error = Error.from_json(error) if error else None + self.public_keys = public_keys -class EntitiesPortRanges(Type): - _toSchema = {'entities': 'Entities'} - _toPy = {'Entities': 'entities'} - def __init__(self, entities=None): +class SSHPublicKeysResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): ''' - entities : typing.Sequence[~EntityPortRange] + results : typing.Sequence<+T_co>[~SSHPublicKeysResult]<~SSHPublicKeysResult> ''' - self.entities = [EntityPortRange.from_json(o) for o in entities or []] + self.results = [SSHPublicKeysResult.from_json(o) for o in results or []] -class EntityCharmURL(Type): - _toSchema = {'charmurl': 'CharmURL', 'tag': 'Tag'} - _toPy = {'Tag': 'tag', 'CharmURL': 'charmurl'} - def __init__(self, charmurl=None, tag=None): +class SingularClaim(Type): + _toSchema = {'model_tag': 'model-tag', 'duration': 'duration', 'controller_tag': 'controller-tag'} + _toPy = {'model-tag': 'model_tag', 'controller-tag': 'controller_tag', 'duration': 'duration'} + def __init__(self, controller_tag=None, duration=None, model_tag=None): ''' - charmurl : str - tag : str + controller_tag : str + duration : int + model_tag : str ''' - self.charmurl = charmurl - self.tag = tag + self.controller_tag = controller_tag + self.duration = duration + self.model_tag = model_tag -class EntityPortRange(Type): - _toSchema = {'protocol': 'Protocol', 'fromport': 'FromPort', 'tag': 'Tag', 'toport': 'ToPort'} - _toPy = {'Tag': 'tag', 'ToPort': 'toport', 'Protocol': 'protocol', 'FromPort': 'fromport'} - def __init__(self, fromport=None, protocol=None, tag=None, toport=None): +class SingularClaims(Type): + _toSchema = {'claims': 'claims'} + _toPy = {'claims': 'claims'} + def __init__(self, claims=None): ''' - fromport : int - protocol : str - tag : str - toport : int + claims : typing.Sequence<+T_co>[~SingularClaim]<~SingularClaim> ''' - self.fromport = fromport - self.protocol = protocol - self.tag = tag - self.toport = toport + self.claims = [SingularClaim.from_json(o) for o in claims or []] -class GetLeadershipSettingsBulkResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} +class ListSpacesResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} def __init__(self, results=None): ''' - results : typing.Sequence[~GetLeadershipSettingsResult] + results : typing.Sequence<+T_co>[~Space]<~Space> ''' - self.results = [GetLeadershipSettingsResult.from_json(o) for o in results or []] - - -class GetLeadershipSettingsResult(Type): - _toSchema = {'error': 'Error', 'settings': 'Settings'} - _toPy = {'Error': 'error', 'Settings': 'settings'} - def __init__(self, error=None, settings=None): - ''' - error : Error - settings : typing.Mapping[str, str] - ''' - self.error = Error.from_json(error) if error else None - self.settings = settings + self.results = [Space.from_json(o) for o in results or []] -class IntResult(Type): - _toSchema = {'error': 'Error', 'result': 'Result'} - _toPy = {'Error': 'error', 'Result': 'result'} - def __init__(self, error=None, result=None): +class Space(Type): + _toSchema = {'name': 'name', 'subnets': 'subnets', 'error': 'error'} + _toPy = {'name': 'name', 'subnets': 'subnets', 'error': 'error'} + def __init__(self, error=None, name=None, subnets=None): ''' error : Error - result : int + name : str + subnets : typing.Sequence<+T_co>[~Subnet]<~Subnet> ''' self.error = Error.from_json(error) if error else None - self.result = result - - -class IntResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~IntResult] - ''' - self.results = [IntResult.from_json(o) for o in results or []] - - -class MergeLeadershipSettingsBulkParams(Type): - _toSchema = {'params': 'Params'} - _toPy = {'Params': 'params'} - def __init__(self, params=None): - ''' - params : typing.Sequence[~MergeLeadershipSettingsParam] - ''' - self.params = [MergeLeadershipSettingsParam.from_json(o) for o in params or []] + self.name = name + self.subnets = [Subnet.from_json(o) for o in subnets or []] -class MergeLeadershipSettingsParam(Type): - _toSchema = {'settings': 'Settings', 'servicetag': 'ServiceTag'} - _toPy = {'Settings': 'settings', 'ServiceTag': 'servicetag'} - def __init__(self, servicetag=None, settings=None): +class StatusHistoryPruneArgs(Type): + _toSchema = {'max_history_time': 'max-history-time', 'max_history_mb': 'max-history-mb'} + _toPy = {'max-history-mb': 'max_history_mb', 'max-history-time': 'max_history_time'} + def __init__(self, max_history_mb=None, max_history_time=None): ''' - servicetag : str - settings : typing.Mapping[str, str] + max_history_mb : int + max_history_time : int ''' - self.servicetag = servicetag - self.settings = settings + self.max_history_mb = max_history_mb + self.max_history_time = max_history_time -class ModelResult(Type): - _toSchema = {'error': 'Error', 'uuid': 'UUID', 'name': 'Name'} - _toPy = {'Error': 'error', 'UUID': 'uuid', 'Name': 'name'} - def __init__(self, error=None, name=None, uuid=None): +class FilesystemAttachmentInfo(Type): + _toSchema = {'read_only': 'read-only', 'mount_point': 'mount-point'} + _toPy = {'read-only': 'read_only', 'mount-point': 'mount_point'} + def __init__(self, mount_point=None, read_only=None): ''' - error : Error - name : str - uuid : str + mount_point : str + read_only : bool ''' - self.error = Error.from_json(error) if error else None - self.name = name - self.uuid = uuid + self.mount_point = mount_point + self.read_only = read_only -class RelationIds(Type): - _toSchema = {'relationids': 'RelationIds'} - _toPy = {'RelationIds': 'relationids'} - def __init__(self, relationids=None): +class FilesystemDetails(Type): + _toSchema = {'info': 'info', 'machine_attachments': 'machine-attachments', 'status': 'status', 'storage': 'storage', 'filesystem_tag': 'filesystem-tag', 'volume_tag': 'volume-tag'} + _toPy = {'info': 'info', 'status': 'status', 'storage': 'storage', 'machine-attachments': 'machine_attachments', 'volume-tag': 'volume_tag', 'filesystem-tag': 'filesystem_tag'} + def __init__(self, filesystem_tag=None, info=None, machine_attachments=None, status=None, storage=None, volume_tag=None): ''' - relationids : typing.Sequence[int] + filesystem_tag : str + info : FilesystemInfo + machine_attachments : typing.Mapping<~KT, +VT_co>[str, ~FilesystemAttachmentInfo]<~FilesystemAttachmentInfo> + status : EntityStatus + storage : StorageDetails + volume_tag : str ''' - self.relationids = relationids + self.filesystem_tag = filesystem_tag + self.info = FilesystemInfo.from_json(info) if info else None + self.machine_attachments = machine_attachments + self.status = EntityStatus.from_json(status) if status else None + self.storage = StorageDetails.from_json(storage) if storage else None + self.volume_tag = volume_tag -class RelationResult(Type): - _toSchema = {'endpoint': 'Endpoint', 'key': 'Key', 'error': 'Error', 'id_': 'Id', 'life': 'Life'} - _toPy = {'Error': 'error', 'Endpoint': 'endpoint', 'Key': 'key', 'Life': 'life', 'Id': 'id_'} - def __init__(self, endpoint=None, error=None, id_=None, key=None, life=None): +class FilesystemDetailsListResult(Type): + _toSchema = {'result': 'result', 'error': 'error'} + _toPy = {'result': 'result', 'error': 'error'} + def __init__(self, error=None, result=None): ''' - endpoint : Endpoint error : Error - id_ : int - key : str - life : str + result : typing.Sequence<+T_co>[~FilesystemDetails]<~FilesystemDetails> ''' - self.endpoint = Endpoint.from_json(endpoint) if endpoint else None self.error = Error.from_json(error) if error else None - self.id_ = id_ - self.key = key - self.life = life + self.result = [FilesystemDetails.from_json(o) for o in result or []] -class RelationResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} +class FilesystemDetailsListResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} def __init__(self, results=None): ''' - results : typing.Sequence[~RelationResult] + results : typing.Sequence<+T_co>[~FilesystemDetailsListResult]<~FilesystemDetailsListResult> ''' - self.results = [RelationResult.from_json(o) for o in results or []] + self.results = [FilesystemDetailsListResult.from_json(o) for o in results or []] -class RelationUnit(Type): - _toSchema = {'unit': 'Unit', 'relation': 'Relation'} - _toPy = {'Relation': 'relation', 'Unit': 'unit'} - def __init__(self, relation=None, unit=None): +class FilesystemFilter(Type): + _toSchema = {'machines': 'machines'} + _toPy = {'machines': 'machines'} + def __init__(self, machines=None): ''' - relation : str - unit : str + machines : typing.Sequence<+T_co>[str] ''' - self.relation = relation - self.unit = unit + self.machines = machines -class RelationUnitPair(Type): - _toSchema = {'relation': 'Relation', 'localunit': 'LocalUnit', 'remoteunit': 'RemoteUnit'} - _toPy = {'Relation': 'relation', 'RemoteUnit': 'remoteunit', 'LocalUnit': 'localunit'} - def __init__(self, localunit=None, relation=None, remoteunit=None): +class FilesystemFilters(Type): + _toSchema = {'filters': 'filters'} + _toPy = {'filters': 'filters'} + def __init__(self, filters=None): ''' - localunit : str - relation : str - remoteunit : str + filters : typing.Sequence<+T_co>[~FilesystemFilter]<~FilesystemFilter> ''' - self.localunit = localunit - self.relation = relation - self.remoteunit = remoteunit + self.filters = [FilesystemFilter.from_json(o) for o in filters or []] -class RelationUnitPairs(Type): - _toSchema = {'relationunitpairs': 'RelationUnitPairs'} - _toPy = {'RelationUnitPairs': 'relationunitpairs'} - def __init__(self, relationunitpairs=None): +class FilesystemInfo(Type): + _toSchema = {'size': 'size', 'filesystem_id': 'filesystem-id'} + _toPy = {'size': 'size', 'filesystem-id': 'filesystem_id'} + def __init__(self, filesystem_id=None, size=None): ''' - relationunitpairs : typing.Sequence[~RelationUnitPair] + filesystem_id : str + size : int ''' - self.relationunitpairs = [RelationUnitPair.from_json(o) for o in relationunitpairs or []] + self.filesystem_id = filesystem_id + self.size = size -class RelationUnitSettings(Type): - _toSchema = {'unit': 'Unit', 'relation': 'Relation', 'settings': 'Settings'} - _toPy = {'Relation': 'relation', 'Unit': 'unit', 'Settings': 'settings'} - def __init__(self, relation=None, settings=None, unit=None): +class StorageAddParams(Type): + _toSchema = {'name': 'name', 'unit': 'unit', 'storage': 'storage'} + _toPy = {'name': 'name', 'unit': 'unit', 'storage': 'storage'} + def __init__(self, name=None, storage=None, unit=None): ''' - relation : str - settings : typing.Mapping[str, str] + name : str + storage : StorageConstraints unit : str ''' - self.relation = relation - self.settings = settings + self.name = name + self.storage = StorageConstraints.from_json(storage) if storage else None self.unit = unit -class RelationUnits(Type): - _toSchema = {'relationunits': 'RelationUnits'} - _toPy = {'RelationUnits': 'relationunits'} - def __init__(self, relationunits=None): +class StorageAttachmentDetails(Type): + _toSchema = {'unit_tag': 'unit-tag', 'machine_tag': 'machine-tag', 'storage_tag': 'storage-tag', 'location': 'location'} + _toPy = {'unit-tag': 'unit_tag', 'machine-tag': 'machine_tag', 'storage-tag': 'storage_tag', 'location': 'location'} + def __init__(self, location=None, machine_tag=None, storage_tag=None, unit_tag=None): ''' - relationunits : typing.Sequence[~RelationUnit] + location : str + machine_tag : str + storage_tag : str + unit_tag : str ''' - self.relationunits = [RelationUnit.from_json(o) for o in relationunits or []] + self.location = location + self.machine_tag = machine_tag + self.storage_tag = storage_tag + self.unit_tag = unit_tag -class RelationUnitsSettings(Type): - _toSchema = {'relationunits': 'RelationUnits'} - _toPy = {'RelationUnits': 'relationunits'} - def __init__(self, relationunits=None): +class StorageConstraints(Type): + _toSchema = {'size': 'size', 'pool': 'pool', 'count': 'count'} + _toPy = {'size': 'size', 'pool': 'pool', 'count': 'count'} + def __init__(self, count=None, pool=None, size=None): ''' - relationunits : typing.Sequence[~RelationUnitSettings] + count : int + pool : str + size : int ''' - self.relationunits = [RelationUnitSettings.from_json(o) for o in relationunits or []] + self.count = count + self.pool = pool + self.size = size -class RelationUnitsWatchResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): +class StorageDetails(Type): + _toSchema = {'kind': 'kind', 'owner_tag': 'owner-tag', 'status': 'status', 'persistent': 'persistent', 'storage_tag': 'storage-tag', 'attachments': 'attachments'} + _toPy = {'kind': 'kind', 'storage-tag': 'storage_tag', 'status': 'status', 'owner-tag': 'owner_tag', 'persistent': 'persistent', 'attachments': 'attachments'} + def __init__(self, attachments=None, kind=None, owner_tag=None, persistent=None, status=None, storage_tag=None): ''' - results : typing.Sequence[~RelationUnitsWatchResult] + attachments : typing.Mapping<~KT, +VT_co>[str, ~StorageAttachmentDetails]<~StorageAttachmentDetails> + kind : int + owner_tag : str + persistent : bool + status : EntityStatus + storage_tag : str ''' - self.results = [RelationUnitsWatchResult.from_json(o) for o in results or []] + self.attachments = attachments + self.kind = kind + self.owner_tag = owner_tag + self.persistent = persistent + self.status = EntityStatus.from_json(status) if status else None + self.storage_tag = storage_tag -class ResolvedModeResult(Type): - _toSchema = {'error': 'Error', 'mode': 'Mode'} - _toPy = {'Error': 'error', 'Mode': 'mode'} - def __init__(self, error=None, mode=None): +class StorageDetailsListResult(Type): + _toSchema = {'result': 'result', 'error': 'error'} + _toPy = {'result': 'result', 'error': 'error'} + def __init__(self, error=None, result=None): ''' error : Error - mode : str + result : typing.Sequence<+T_co>[~StorageDetails]<~StorageDetails> ''' self.error = Error.from_json(error) if error else None - self.mode = mode + self.result = [StorageDetails.from_json(o) for o in result or []] -class ResolvedModeResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} +class StorageDetailsListResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} def __init__(self, results=None): ''' - results : typing.Sequence[~ResolvedModeResult] + results : typing.Sequence<+T_co>[~StorageDetailsListResult]<~StorageDetailsListResult> ''' - self.results = [ResolvedModeResult.from_json(o) for o in results or []] + self.results = [StorageDetailsListResult.from_json(o) for o in results or []] -class ServiceStatusResult(Type): - _toSchema = {'units': 'Units', 'error': 'Error', 'service': 'Service'} - _toPy = {'Error': 'error', 'Service': 'service', 'Units': 'units'} - def __init__(self, error=None, service=None, units=None): +class StorageDetailsResult(Type): + _toSchema = {'result': 'result', 'error': 'error'} + _toPy = {'result': 'result', 'error': 'error'} + def __init__(self, error=None, result=None): ''' error : Error - service : StatusResult - units : typing.Mapping[str, ~StatusResult] + result : StorageDetails ''' self.error = Error.from_json(error) if error else None - self.service = StatusResult.from_json(service) if service else None - self.units = {k: StatusResult.from_json(v) for k, v in (units or dict()).items()} + self.result = StorageDetails.from_json(result) if result else None -class ServiceStatusResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} +class StorageDetailsResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} def __init__(self, results=None): ''' - results : typing.Sequence[~ServiceStatusResult] + results : typing.Sequence<+T_co>[~StorageDetailsResult]<~StorageDetailsResult> ''' - self.results = [ServiceStatusResult.from_json(o) for o in results or []] + self.results = [StorageDetailsResult.from_json(o) for o in results or []] -class SettingsResult(Type): - _toSchema = {'error': 'Error', 'settings': 'Settings'} - _toPy = {'Error': 'error', 'Settings': 'settings'} - def __init__(self, error=None, settings=None): +class StorageFilter(Type): + _toSchema = {} + _toPy = {} + def __init__(self): ''' - error : Error - settings : typing.Mapping[str, str] + ''' - self.error = Error.from_json(error) if error else None - self.settings = settings + pass -class SettingsResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): +class StorageFilters(Type): + _toSchema = {'filters': 'filters'} + _toPy = {'filters': 'filters'} + def __init__(self, filters=None): ''' - results : typing.Sequence[~SettingsResult] + filters : typing.Sequence<+T_co>[~StorageFilter]<~StorageFilter> ''' - self.results = [SettingsResult.from_json(o) for o in results or []] + self.filters = [StorageFilter.from_json(o) for o in filters or []] -class StorageAttachment(Type): - _toSchema = {'ownertag': 'OwnerTag', 'unittag': 'UnitTag', 'location': 'Location', 'kind': 'Kind', 'life': 'Life', 'storagetag': 'StorageTag'} - _toPy = {'UnitTag': 'unittag', 'OwnerTag': 'ownertag', 'Location': 'location', 'Life': 'life', 'StorageTag': 'storagetag', 'Kind': 'kind'} - def __init__(self, kind=None, life=None, location=None, ownertag=None, storagetag=None, unittag=None): +class StoragePool(Type): + _toSchema = {'name': 'name', 'attrs': 'attrs', 'provider': 'provider'} + _toPy = {'name': 'name', 'attrs': 'attrs', 'provider': 'provider'} + def __init__(self, attrs=None, name=None, provider=None): ''' - kind : int - life : str - location : str - ownertag : str - storagetag : str - unittag : str + attrs : typing.Mapping<~KT, +VT_co>[str, typing.Any] + name : str + provider : str ''' - self.kind = kind - self.life = life - self.location = location - self.ownertag = ownertag - self.storagetag = storagetag - self.unittag = unittag + self.attrs = attrs + self.name = name + self.provider = provider -class StorageAttachmentId(Type): - _toSchema = {'unittag': 'unittag', 'storagetag': 'storagetag'} - _toPy = {'unittag': 'unittag', 'storagetag': 'storagetag'} - def __init__(self, storagetag=None, unittag=None): +class StoragePoolFilter(Type): + _toSchema = {'names': 'names', 'providers': 'providers'} + _toPy = {'names': 'names', 'providers': 'providers'} + def __init__(self, names=None, providers=None): ''' - storagetag : str - unittag : str + names : typing.Sequence<+T_co>[str] + providers : typing.Sequence<+T_co>[str] ''' - self.storagetag = storagetag - self.unittag = unittag + self.names = names + self.providers = providers -class StorageAttachmentIds(Type): - _toSchema = {'ids': 'ids'} - _toPy = {'ids': 'ids'} - def __init__(self, ids=None): +class StoragePoolFilters(Type): + _toSchema = {'filters': 'filters'} + _toPy = {'filters': 'filters'} + def __init__(self, filters=None): ''' - ids : typing.Sequence[~StorageAttachmentId] + filters : typing.Sequence<+T_co>[~StoragePoolFilter]<~StoragePoolFilter> ''' - self.ids = [StorageAttachmentId.from_json(o) for o in ids or []] + self.filters = [StoragePoolFilter.from_json(o) for o in filters or []] -class StorageAttachmentIdsResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None): +class StoragePoolsResult(Type): + _toSchema = {'storage_pools': 'storage-pools', 'error': 'error'} + _toPy = {'storage-pools': 'storage_pools', 'error': 'error'} + def __init__(self, error=None, storage_pools=None): ''' error : Error - result : StorageAttachmentIds + storage_pools : typing.Sequence<+T_co>[~StoragePool]<~StoragePool> ''' self.error = Error.from_json(error) if error else None - self.result = StorageAttachmentIds.from_json(result) if result else None + self.storage_pools = [StoragePool.from_json(o) for o in storage_pools or []] -class StorageAttachmentIdsResults(Type): +class StoragePoolsResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None): ''' - results : typing.Sequence[~StorageAttachmentIdsResult] + results : typing.Sequence<+T_co>[~StoragePoolsResult]<~StoragePoolsResult> ''' - self.results = [StorageAttachmentIdsResult.from_json(o) for o in results or []] + self.results = [StoragePoolsResult.from_json(o) for o in results or []] -class StorageAttachmentResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None): +class StoragesAddParams(Type): + _toSchema = {'storages': 'storages'} + _toPy = {'storages': 'storages'} + def __init__(self, storages=None): ''' - error : Error - result : StorageAttachment + storages : typing.Sequence<+T_co>[~StorageAddParams]<~StorageAddParams> ''' - self.error = Error.from_json(error) if error else None - self.result = StorageAttachment.from_json(result) if result else None + self.storages = [StorageAddParams.from_json(o) for o in storages or []] -class StorageAttachmentResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None): +class VolumeDetails(Type): + _toSchema = {'info': 'info', 'machine_attachments': 'machine-attachments', 'volume_tag': 'volume-tag', 'status': 'status', 'storage': 'storage'} + _toPy = {'info': 'info', 'status': 'status', 'machine-attachments': 'machine_attachments', 'volume-tag': 'volume_tag', 'storage': 'storage'} + def __init__(self, info=None, machine_attachments=None, status=None, storage=None, volume_tag=None): ''' - results : typing.Sequence[~StorageAttachmentResult] + info : VolumeInfo + machine_attachments : typing.Mapping<~KT, +VT_co>[str, ~VolumeAttachmentInfo]<~VolumeAttachmentInfo> + status : EntityStatus + storage : StorageDetails + volume_tag : str ''' - self.results = [StorageAttachmentResult.from_json(o) for o in results or []] + self.info = VolumeInfo.from_json(info) if info else None + self.machine_attachments = machine_attachments + self.status = EntityStatus.from_json(status) if status else None + self.storage = StorageDetails.from_json(storage) if storage else None + self.volume_tag = volume_tag -class StringBoolResult(Type): - _toSchema = {'error': 'Error', 'ok': 'Ok', 'result': 'Result'} - _toPy = {'Error': 'error', 'Result': 'result', 'Ok': 'ok'} - def __init__(self, error=None, ok=None, result=None): +class VolumeDetailsListResult(Type): + _toSchema = {'result': 'result', 'error': 'error'} + _toPy = {'result': 'result', 'error': 'error'} + def __init__(self, error=None, result=None): ''' error : Error - ok : bool - result : str + result : typing.Sequence<+T_co>[~VolumeDetails]<~VolumeDetails> ''' self.error = Error.from_json(error) if error else None - self.ok = ok - self.result = result + self.result = [VolumeDetails.from_json(o) for o in result or []] -class StringBoolResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} +class VolumeDetailsListResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} def __init__(self, results=None): ''' - results : typing.Sequence[~StringBoolResult] + results : typing.Sequence<+T_co>[~VolumeDetailsListResult]<~VolumeDetailsListResult> ''' - self.results = [StringBoolResult.from_json(o) for o in results or []] + self.results = [VolumeDetailsListResult.from_json(o) for o in results or []] -class UnitNetworkConfig(Type): - _toSchema = {'unittag': 'UnitTag', 'bindingname': 'BindingName'} - _toPy = {'UnitTag': 'unittag', 'BindingName': 'bindingname'} - def __init__(self, bindingname=None, unittag=None): +class VolumeFilter(Type): + _toSchema = {'machines': 'machines'} + _toPy = {'machines': 'machines'} + def __init__(self, machines=None): ''' - bindingname : str - unittag : str + machines : typing.Sequence<+T_co>[str] ''' - self.bindingname = bindingname - self.unittag = unittag + self.machines = machines -class UnitNetworkConfigResult(Type): - _toSchema = {'info': 'Info', 'error': 'Error'} - _toPy = {'Info': 'info', 'Error': 'error'} - def __init__(self, error=None, info=None): +class VolumeFilters(Type): + _toSchema = {'filters': 'filters'} + _toPy = {'filters': 'filters'} + def __init__(self, filters=None): + ''' + filters : typing.Sequence<+T_co>[~VolumeFilter]<~VolumeFilter> + ''' + self.filters = [VolumeFilter.from_json(o) for o in filters or []] + + +class BlockDeviceResult(Type): + _toSchema = {'result': 'result', 'error': 'error'} + _toPy = {'result': 'result', 'error': 'error'} + def __init__(self, error=None, result=None): ''' error : Error - info : typing.Sequence[~NetworkConfig] + result : BlockDevice ''' self.error = Error.from_json(error) if error else None - self.info = [NetworkConfig.from_json(o) for o in info or []] + self.result = BlockDevice.from_json(result) if result else None -class UnitNetworkConfigResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} +class BlockDeviceResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} def __init__(self, results=None): ''' - results : typing.Sequence[~UnitNetworkConfigResult] + results : typing.Sequence<+T_co>[~BlockDeviceResult]<~BlockDeviceResult> ''' - self.results = [UnitNetworkConfigResult.from_json(o) for o in results or []] + self.results = [BlockDeviceResult.from_json(o) for o in results or []] -class UnitsNetworkConfig(Type): - _toSchema = {'args': 'Args'} - _toPy = {'Args': 'args'} - def __init__(self, args=None): +class Filesystem(Type): + _toSchema = {'info': 'info', 'filesystem_tag': 'filesystem-tag', 'volume_tag': 'volume-tag'} + _toPy = {'info': 'info', 'volume-tag': 'volume_tag', 'filesystem-tag': 'filesystem_tag'} + def __init__(self, filesystem_tag=None, info=None, volume_tag=None): ''' - args : typing.Sequence[~UnitNetworkConfig] + filesystem_tag : str + info : FilesystemInfo + volume_tag : str ''' - self.args = [UnitNetworkConfig.from_json(o) for o in args or []] + self.filesystem_tag = filesystem_tag + self.info = FilesystemInfo.from_json(info) if info else None + self.volume_tag = volume_tag -class EntitiesVersion(Type): - _toSchema = {'agenttools': 'AgentTools'} - _toPy = {'AgentTools': 'agenttools'} - def __init__(self, agenttools=None): +class FilesystemAttachment(Type): + _toSchema = {'info': 'info', 'filesystem_tag': 'filesystem-tag', 'machine_tag': 'machine-tag'} + _toPy = {'info': 'info', 'machine-tag': 'machine_tag', 'filesystem-tag': 'filesystem_tag'} + def __init__(self, filesystem_tag=None, info=None, machine_tag=None): ''' - agenttools : typing.Sequence[~EntityVersion] + filesystem_tag : str + info : FilesystemAttachmentInfo + machine_tag : str ''' - self.agenttools = [EntityVersion.from_json(o) for o in agenttools or []] + self.filesystem_tag = filesystem_tag + self.info = FilesystemAttachmentInfo.from_json(info) if info else None + self.machine_tag = machine_tag -class EntityVersion(Type): - _toSchema = {'tools': 'Tools', 'tag': 'Tag'} - _toPy = {'Tag': 'tag', 'Tools': 'tools'} - def __init__(self, tag=None, tools=None): - ''' - tag : str - tools : Version +class FilesystemAttachmentParams(Type): + _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'} + _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'} + def __init__(self, filesystem_id=None, filesystem_tag=None, instance_id=None, machine_tag=None, mount_point=None, provider=None, read_only=None): + ''' + filesystem_id : str + filesystem_tag : str + instance_id : str + machine_tag : str + mount_point : str + provider : str + read_only : bool ''' - self.tag = tag - self.tools = Version.from_json(tools) if tools else None + self.filesystem_id = filesystem_id + self.filesystem_tag = filesystem_tag + self.instance_id = instance_id + self.machine_tag = machine_tag + self.mount_point = mount_point + self.provider = provider + self.read_only = read_only -class VersionResult(Type): - _toSchema = {'error': 'Error', 'version': 'Version'} - _toPy = {'Error': 'error', 'Version': 'version'} - def __init__(self, error=None, version=None): +class FilesystemAttachmentParamsResult(Type): + _toSchema = {'result': 'result', 'error': 'error'} + _toPy = {'result': 'result', 'error': 'error'} + def __init__(self, error=None, result=None): ''' error : Error - version : Number + result : FilesystemAttachmentParams ''' self.error = Error.from_json(error) if error else None - self.version = Number.from_json(version) if version else None + self.result = FilesystemAttachmentParams.from_json(result) if result else None -class VersionResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} +class FilesystemAttachmentParamsResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} def __init__(self, results=None): ''' - results : typing.Sequence[~VersionResult] - ''' - self.results = [VersionResult.from_json(o) for o in results or []] - - -class AddUser(Type): - _toSchema = {'model_access_permission': 'model-access-permission', 'display_name': 'display-name', 'username': 'username', 'shared_model_tags': 'shared-model-tags', 'password': 'password'} - _toPy = {'password': 'password', 'model-access-permission': 'model_access_permission', 'display-name': 'display_name', 'username': 'username', 'shared-model-tags': 'shared_model_tags'} - def __init__(self, display_name=None, model_access_permission=None, password=None, shared_model_tags=None, username=None): - ''' - display_name : str - model_access_permission : str - password : str - shared_model_tags : typing.Sequence[str] - username : str + results : typing.Sequence<+T_co>[~FilesystemAttachmentParamsResult]<~FilesystemAttachmentParamsResult> ''' - self.display_name = display_name - self.model_access_permission = model_access_permission - self.password = password - self.shared_model_tags = shared_model_tags - self.username = username + self.results = [FilesystemAttachmentParamsResult.from_json(o) for o in results or []] -class AddUserResult(Type): - _toSchema = {'error': 'error', 'tag': 'tag', 'secret_key': 'secret-key'} - _toPy = {'error': 'error', 'secret-key': 'secret_key', 'tag': 'tag'} - def __init__(self, error=None, secret_key=None, tag=None): +class FilesystemAttachmentResult(Type): + _toSchema = {'result': 'result', 'error': 'error'} + _toPy = {'result': 'result', 'error': 'error'} + def __init__(self, error=None, result=None): ''' error : Error - secret_key : typing.Sequence[int] - tag : str + result : FilesystemAttachment ''' self.error = Error.from_json(error) if error else None - self.secret_key = secret_key - self.tag = tag + self.result = FilesystemAttachment.from_json(result) if result else None -class AddUserResults(Type): +class FilesystemAttachmentResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None): ''' - results : typing.Sequence[~AddUserResult] + results : typing.Sequence<+T_co>[~FilesystemAttachmentResult]<~FilesystemAttachmentResult> ''' - self.results = [AddUserResult.from_json(o) for o in results or []] + self.results = [FilesystemAttachmentResult.from_json(o) for o in results or []] -class AddUsers(Type): - _toSchema = {'users': 'users'} - _toPy = {'users': 'users'} - def __init__(self, users=None): +class FilesystemAttachments(Type): + _toSchema = {'filesystem_attachments': 'filesystem-attachments'} + _toPy = {'filesystem-attachments': 'filesystem_attachments'} + def __init__(self, filesystem_attachments=None): ''' - users : typing.Sequence[~AddUser] + filesystem_attachments : typing.Sequence<+T_co>[~FilesystemAttachment]<~FilesystemAttachment> ''' - self.users = [AddUser.from_json(o) for o in users or []] + self.filesystem_attachments = [FilesystemAttachment.from_json(o) for o in filesystem_attachments or []] -class MacaroonResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} +class FilesystemParams(Type): + _toSchema = {'attachment': 'attachment', 'size': 'size', 'tags': 'tags', 'attributes': 'attributes', 'filesystem_tag': 'filesystem-tag', 'volume_tag': 'volume-tag', 'provider': 'provider'} + _toPy = {'attachment': 'attachment', 'size': 'size', 'tags': 'tags', 'attributes': 'attributes', 'provider': 'provider', 'volume-tag': 'volume_tag', 'filesystem-tag': 'filesystem_tag'} + def __init__(self, attachment=None, attributes=None, filesystem_tag=None, provider=None, size=None, tags=None, volume_tag=None): + ''' + attachment : FilesystemAttachmentParams + attributes : typing.Mapping<~KT, +VT_co>[str, typing.Any] + filesystem_tag : str + provider : str + size : int + tags : typing.Mapping<~KT, +VT_co>[str, str] + volume_tag : str + ''' + self.attachment = FilesystemAttachmentParams.from_json(attachment) if attachment else None + self.attributes = attributes + self.filesystem_tag = filesystem_tag + self.provider = provider + self.size = size + self.tags = tags + self.volume_tag = volume_tag + + +class FilesystemParamsResult(Type): + _toSchema = {'result': 'result', 'error': 'error'} + _toPy = {'result': 'result', 'error': 'error'} def __init__(self, error=None, result=None): ''' error : Error - result : Macaroon + result : FilesystemParams ''' self.error = Error.from_json(error) if error else None - self.result = Macaroon.from_json(result) if result else None + self.result = FilesystemParams.from_json(result) if result else None -class MacaroonResults(Type): +class FilesystemParamsResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None): ''' - results : typing.Sequence[~MacaroonResult] - ''' - self.results = [MacaroonResult.from_json(o) for o in results or []] - - -class UserInfo(Type): - _toSchema = {'created_by': 'created-by', 'username': 'username', 'display_name': 'display-name', 'last_connection': 'last-connection', 'disabled': 'disabled', 'date_created': 'date-created'} - _toPy = {'username': 'username', 'created-by': 'created_by', 'display-name': 'display_name', 'disabled': 'disabled', 'last-connection': 'last_connection', 'date-created': 'date_created'} - def __init__(self, created_by=None, date_created=None, disabled=None, display_name=None, last_connection=None, username=None): - ''' - created_by : str - date_created : str - disabled : bool - display_name : str - last_connection : str - username : str - ''' - self.created_by = created_by - self.date_created = date_created - self.disabled = disabled - self.display_name = display_name - self.last_connection = last_connection - self.username = username - - -class UserInfoRequest(Type): - _toSchema = {'include_disabled': 'include-disabled', 'entities': 'entities'} - _toPy = {'include-disabled': 'include_disabled', 'entities': 'entities'} - def __init__(self, entities=None, include_disabled=None): - ''' - entities : typing.Sequence[~Entity] - include_disabled : bool + results : typing.Sequence<+T_co>[~FilesystemParamsResult]<~FilesystemParamsResult> ''' - self.entities = [Entity.from_json(o) for o in entities or []] - self.include_disabled = include_disabled + self.results = [FilesystemParamsResult.from_json(o) for o in results or []] -class UserInfoResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} +class FilesystemResult(Type): + _toSchema = {'result': 'result', 'error': 'error'} + _toPy = {'result': 'result', 'error': 'error'} def __init__(self, error=None, result=None): ''' error : Error - result : UserInfo + result : Filesystem ''' self.error = Error.from_json(error) if error else None - self.result = UserInfo.from_json(result) if result else None + self.result = Filesystem.from_json(result) if result else None -class UserInfoResults(Type): +class FilesystemResults(Type): _toSchema = {'results': 'results'} _toPy = {'results': 'results'} def __init__(self, results=None): ''' - results : typing.Sequence[~UserInfoResult] + results : typing.Sequence<+T_co>[~FilesystemResult]<~FilesystemResult> ''' - self.results = [UserInfoResult.from_json(o) for o in results or []] + self.results = [FilesystemResult.from_json(o) for o in results or []] -class Action(Type): - name = 'Action' - version = 1 - schema = {'definitions': {'Action': {'additionalProperties': False, - 'properties': {'name': {'type': 'string'}, - 'parameters': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'receiver': {'type': 'string'}, - 'tag': {'type': 'string'}}, - 'required': ['tag', 'receiver', 'name'], - 'type': 'object'}, - 'ActionResult': {'additionalProperties': False, - 'properties': {'action': {'$ref': '#/definitions/Action'}, - 'completed': {'format': 'date-time', - 'type': 'string'}, - 'enqueued': {'format': 'date-time', - 'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}, - 'message': {'type': 'string'}, - 'output': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'started': {'format': 'date-time', - 'type': 'string'}, - 'status': {'type': 'string'}}, - 'type': 'object'}, - 'ActionResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'}, - 'type': 'array'}}, - 'type': 'object'}, - 'Actions': {'additionalProperties': False, - 'properties': {'actions': {'items': {'$ref': '#/definitions/Action'}, - 'type': 'array'}}, - 'type': 'object'}, - 'ActionsByName': {'additionalProperties': False, - 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'}, - 'type': 'array'}, - 'error': {'$ref': '#/definitions/Error'}, - 'name': {'type': 'string'}}, - 'type': 'object'}, - 'ActionsByNames': {'additionalProperties': False, - 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByName'}, - 'type': 'array'}}, - 'type': 'object'}, - 'ActionsByReceiver': {'additionalProperties': False, - 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'}, - 'type': 'array'}, - 'error': {'$ref': '#/definitions/Error'}, - 'receiver': {'type': 'string'}}, - 'type': 'object'}, - 'ActionsByReceivers': {'additionalProperties': False, - 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByReceiver'}, - 'type': 'array'}}, - 'type': 'object'}, - 'Entities': {'additionalProperties': False, - 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'}, - 'type': 'array'}}, - 'required': ['Entities'], - 'type': 'object'}, - 'Entity': {'additionalProperties': False, - 'properties': {'Tag': {'type': 'string'}}, - 'required': ['Tag'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'Code': {'type': 'string'}, - 'Info': {'$ref': '#/definitions/ErrorInfo'}, - 'Message': {'type': 'string'}}, - 'required': ['Message', 'Code'], - 'type': 'object'}, - 'ErrorInfo': {'additionalProperties': False, - 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'}, - 'MacaroonPath': {'type': 'string'}}, - 'type': 'object'}, - 'FindActionsByNames': {'additionalProperties': False, - 'properties': {'names': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'type': 'object'}, - 'FindTags': {'additionalProperties': False, - 'properties': {'prefixes': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['prefixes'], - 'type': 'object'}, - 'FindTagsResults': {'additionalProperties': False, - 'properties': {'matches': {'patternProperties': {'.*': {'items': {'$ref': '#/definitions/Entity'}, - 'type': 'array'}}, - 'type': 'object'}}, - 'required': ['matches'], - 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, - 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'}, - 'type': 'array'}, - 'data': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'id': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'sig': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['data', - 'location', - 'id', - 'caveats', - 'sig'], - 'type': 'object'}, - 'RunParams': {'additionalProperties': False, - 'properties': {'Commands': {'type': 'string'}, - 'Machines': {'items': {'type': 'string'}, - 'type': 'array'}, - 'Services': {'items': {'type': 'string'}, - 'type': 'array'}, - 'Timeout': {'type': 'integer'}, - 'Units': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['Commands', - 'Timeout', - 'Machines', - 'Services', - 'Units'], - 'type': 'object'}, - 'ServiceCharmActionsResult': {'additionalProperties': False, - 'properties': {'actions': {'$ref': '#/definitions/Actions'}, - 'error': {'$ref': '#/definitions/Error'}, - 'servicetag': {'type': 'string'}}, - 'type': 'object'}, - 'ServicesCharmActionsResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ServiceCharmActionsResult'}, - 'type': 'array'}}, - 'type': 'object'}, - 'caveat': {'additionalProperties': False, - 'properties': {'caveatId': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'verificationId': {'$ref': '#/definitions/packet'}}, - 'required': ['location', - 'caveatId', - 'verificationId'], - 'type': 'object'}, - 'packet': {'additionalProperties': False, - 'properties': {'headerLen': {'type': 'integer'}, - 'start': {'type': 'integer'}, - 'totalLen': {'type': 'integer'}}, - 'required': ['start', 'totalLen', 'headerLen'], - 'type': 'object'}}, - 'properties': {'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ActionResults'}}, - 'type': 'object'}, - 'Cancel': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ActionResults'}}, - 'type': 'object'}, - 'Enqueue': {'properties': {'Params': {'$ref': '#/definitions/Actions'}, - 'Result': {'$ref': '#/definitions/ActionResults'}}, - 'type': 'object'}, - 'FindActionTagsByPrefix': {'properties': {'Params': {'$ref': '#/definitions/FindTags'}, - 'Result': {'$ref': '#/definitions/FindTagsResults'}}, - 'type': 'object'}, - 'FindActionsByNames': {'properties': {'Params': {'$ref': '#/definitions/FindActionsByNames'}, - 'Result': {'$ref': '#/definitions/ActionsByNames'}}, - 'type': 'object'}, - 'ListAll': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ActionsByReceivers'}}, - 'type': 'object'}, - 'ListCompleted': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ActionsByReceivers'}}, - 'type': 'object'}, - 'ListPending': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ActionsByReceivers'}}, - 'type': 'object'}, - 'ListRunning': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ActionsByReceivers'}}, - 'type': 'object'}, - 'Run': {'properties': {'Params': {'$ref': '#/definitions/RunParams'}, - 'Result': {'$ref': '#/definitions/ActionResults'}}, - 'type': 'object'}, - 'RunOnAllMachines': {'properties': {'Params': {'$ref': '#/definitions/RunParams'}, - 'Result': {'$ref': '#/definitions/ActionResults'}}, - 'type': 'object'}, - 'ServicesCharmActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ServicesCharmActionsResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(ActionResults) - async def Actions(self, entities): +class Filesystems(Type): + _toSchema = {'filesystems': 'filesystems'} + _toPy = {'filesystems': 'filesystems'} + def __init__(self, filesystems=None): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ActionResult] + filesystems : typing.Sequence<+T_co>[~Filesystem]<~Filesystem> ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Action', Request='Actions', Version=1, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - + self.filesystems = [Filesystem.from_json(o) for o in filesystems or []] - @ReturnMapping(ActionResults) - async def Cancel(self, entities): +class MachineStorageIds(Type): + _toSchema = {'ids': 'ids'} + _toPy = {'ids': 'ids'} + def __init__(self, ids=None): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ActionResult] + ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId> ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Action', Request='Cancel', Version=1, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - + self.ids = [MachineStorageId.from_json(o) for o in ids or []] - @ReturnMapping(ActionResults) - async def Enqueue(self, actions): +class MachineStorageIdsWatchResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): ''' - actions : typing.Sequence[~Action] - Returns -> typing.Sequence[~ActionResult] + results : typing.Sequence<+T_co>[~MachineStorageIdsWatchResult]<~MachineStorageIdsWatchResult> ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Action', Request='Enqueue', Version=1, Params=params) - params['actions'] = actions - reply = await self.rpc(msg) - return reply - + self.results = [MachineStorageIdsWatchResult.from_json(o) for o in results or []] - @ReturnMapping(FindTagsResults) - async def FindActionTagsByPrefix(self, prefixes): +class VolumeAttachment(Type): + _toSchema = {'info': 'info', 'machine_tag': 'machine-tag', 'volume_tag': 'volume-tag'} + _toPy = {'info': 'info', 'machine-tag': 'machine_tag', 'volume-tag': 'volume_tag'} + def __init__(self, info=None, machine_tag=None, volume_tag=None): ''' - prefixes : typing.Sequence[str] - Returns -> typing.Sequence[~Entity] + info : VolumeAttachmentInfo + machine_tag : str + volume_tag : str ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Action', Request='FindActionTagsByPrefix', Version=1, Params=params) - params['prefixes'] = prefixes - reply = await self.rpc(msg) - return reply - + self.info = VolumeAttachmentInfo.from_json(info) if info else None + self.machine_tag = machine_tag + self.volume_tag = volume_tag - @ReturnMapping(ActionsByNames) - async def FindActionsByNames(self, names): +class VolumeAttachmentParamsResult(Type): + _toSchema = {'result': 'result', 'error': 'error'} + _toPy = {'result': 'result', 'error': 'error'} + def __init__(self, error=None, result=None): ''' - names : typing.Sequence[str] - Returns -> typing.Sequence[~ActionsByName] + error : Error + result : VolumeAttachmentParams ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Action', Request='FindActionsByNames', Version=1, Params=params) - params['names'] = names - reply = await self.rpc(msg) - return reply - + self.error = Error.from_json(error) if error else None + self.result = VolumeAttachmentParams.from_json(result) if result else None - @ReturnMapping(ActionsByReceivers) - async def ListAll(self, entities): +class VolumeAttachmentParamsResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ActionsByReceiver] + results : typing.Sequence<+T_co>[~VolumeAttachmentParamsResult]<~VolumeAttachmentParamsResult> ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Action', Request='ListAll', Version=1, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - + self.results = [VolumeAttachmentParamsResult.from_json(o) for o in results or []] - @ReturnMapping(ActionsByReceivers) - async def ListCompleted(self, entities): +class VolumeAttachmentResult(Type): + _toSchema = {'result': 'result', 'error': 'error'} + _toPy = {'result': 'result', 'error': 'error'} + def __init__(self, error=None, result=None): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ActionsByReceiver] + error : Error + result : VolumeAttachment ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Action', Request='ListCompleted', Version=1, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - + self.error = Error.from_json(error) if error else None + self.result = VolumeAttachment.from_json(result) if result else None - @ReturnMapping(ActionsByReceivers) - async def ListPending(self, entities): +class VolumeAttachmentResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ActionsByReceiver] + results : typing.Sequence<+T_co>[~VolumeAttachmentResult]<~VolumeAttachmentResult> ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Action', Request='ListPending', Version=1, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - + self.results = [VolumeAttachmentResult.from_json(o) for o in results or []] - @ReturnMapping(ActionsByReceivers) - async def ListRunning(self, entities): +class VolumeAttachments(Type): + _toSchema = {'volume_attachments': 'volume-attachments'} + _toPy = {'volume-attachments': 'volume_attachments'} + def __init__(self, volume_attachments=None): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ActionsByReceiver] + volume_attachments : typing.Sequence<+T_co>[~VolumeAttachment]<~VolumeAttachment> ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Action', Request='ListRunning', Version=1, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - + self.volume_attachments = [VolumeAttachment.from_json(o) for o in volume_attachments or []] - @ReturnMapping(ActionResults) - async def Run(self, commands, machines, services, timeout, units): +class VolumeParamsResult(Type): + _toSchema = {'result': 'result', 'error': 'error'} + _toPy = {'result': 'result', 'error': 'error'} + def __init__(self, error=None, result=None): ''' - commands : str - machines : typing.Sequence[str] - services : typing.Sequence[str] - timeout : int - units : typing.Sequence[str] - Returns -> typing.Sequence[~ActionResult] + error : Error + result : VolumeParams ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Action', Request='Run', Version=1, Params=params) - params['Commands'] = commands - params['Machines'] = machines - params['Services'] = services - params['Timeout'] = timeout - params['Units'] = units - reply = await self.rpc(msg) - return reply - + self.error = Error.from_json(error) if error else None + self.result = VolumeParams.from_json(result) if result else None - @ReturnMapping(ActionResults) - async def RunOnAllMachines(self, commands, machines, services, timeout, units): +class VolumeParamsResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): ''' - commands : str - machines : typing.Sequence[str] - services : typing.Sequence[str] - timeout : int - units : typing.Sequence[str] - Returns -> typing.Sequence[~ActionResult] + results : typing.Sequence<+T_co>[~VolumeParamsResult]<~VolumeParamsResult> ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Action', Request='RunOnAllMachines', Version=1, Params=params) - params['Commands'] = commands - params['Machines'] = machines - params['Services'] = services - params['Timeout'] = timeout - params['Units'] = units - reply = await self.rpc(msg) - return reply - + self.results = [VolumeParamsResult.from_json(o) for o in results or []] - @ReturnMapping(ServicesCharmActionsResults) - async def ServicesCharmActions(self, entities): +class VolumeResult(Type): + _toSchema = {'result': 'result', 'error': 'error'} + _toPy = {'result': 'result', 'error': 'error'} + def __init__(self, error=None, result=None): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ServiceCharmActionsResult] + error : Error + result : Volume ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Action', Request='ServicesCharmActions', Version=1, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - + self.error = Error.from_json(error) if error else None + self.result = Volume.from_json(result) if result else None -class Addresser(Type): - name = 'Addresser' - version = 2 - schema = {'definitions': {'BoolResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Result': {'type': 'boolean'}}, - 'required': ['Error', 'Result'], - 'type': 'object'}, - 'EntitiesWatchResult': {'additionalProperties': False, - 'properties': {'Changes': {'items': {'type': 'string'}, - 'type': 'array'}, - 'EntityWatcherId': {'type': 'string'}, - 'Error': {'$ref': '#/definitions/Error'}}, - 'required': ['EntityWatcherId', - 'Changes', - 'Error'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'Code': {'type': 'string'}, - 'Info': {'$ref': '#/definitions/ErrorInfo'}, - 'Message': {'type': 'string'}}, - 'required': ['Message', 'Code'], - 'type': 'object'}, - 'ErrorInfo': {'additionalProperties': False, - 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'}, - 'MacaroonPath': {'type': 'string'}}, - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}}, - 'required': ['Error'], - 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, - 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'}, - 'type': 'array'}, - 'data': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'id': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'sig': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['data', - 'location', - 'id', - 'caveats', - 'sig'], - 'type': 'object'}, - 'caveat': {'additionalProperties': False, - 'properties': {'caveatId': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'verificationId': {'$ref': '#/definitions/packet'}}, - 'required': ['location', - 'caveatId', - 'verificationId'], - 'type': 'object'}, - 'packet': {'additionalProperties': False, - 'properties': {'headerLen': {'type': 'integer'}, - 'start': {'type': 'integer'}, - 'totalLen': {'type': 'integer'}}, - 'required': ['start', 'totalLen', 'headerLen'], - 'type': 'object'}}, - 'properties': {'CanDeallocateAddresses': {'properties': {'Result': {'$ref': '#/definitions/BoolResult'}}, - 'type': 'object'}, - 'CleanupIPAddresses': {'properties': {'Result': {'$ref': '#/definitions/ErrorResult'}}, - 'type': 'object'}, - 'WatchIPAddresses': {'properties': {'Result': {'$ref': '#/definitions/EntitiesWatchResult'}}, - 'type': 'object'}}, - 'type': 'object'} - - @ReturnMapping(BoolResult) - async def CanDeallocateAddresses(self): +class VolumeResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): ''' - - Returns -> typing.Union[_ForwardRef('Error'), bool] + results : typing.Sequence<+T_co>[~VolumeResult]<~VolumeResult> ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Addresser', Request='CanDeallocateAddresses', Version=2, Params=params) + self.results = [VolumeResult.from_json(o) for o in results or []] - reply = await self.rpc(msg) - return reply +class Volumes(Type): + _toSchema = {'volumes': 'volumes'} + _toPy = {'volumes': 'volumes'} + def __init__(self, volumes=None): + ''' + volumes : typing.Sequence<+T_co>[~Volume]<~Volume> + ''' + self.volumes = [Volume.from_json(o) for o in volumes or []] - @ReturnMapping(ErrorResult) - async def CleanupIPAddresses(self): +class SpaceResult(Type): + _toSchema = {'tag': 'tag', 'error': 'error'} + _toPy = {'tag': 'tag', 'error': 'error'} + def __init__(self, error=None, tag=None): ''' - - Returns -> Error + error : Error + tag : str ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Addresser', Request='CleanupIPAddresses', Version=2, Params=params) + self.error = Error.from_json(error) if error else None + self.tag = tag - reply = await self.rpc(msg) - return reply +class SpaceResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence<+T_co>[~SpaceResult]<~SpaceResult> + ''' + self.results = [SpaceResult.from_json(o) for o in results or []] - @ReturnMapping(EntitiesWatchResult) - async def WatchIPAddresses(self): +class ZoneResult(Type): + _toSchema = {'name': 'name', 'available': 'available', 'error': 'error'} + _toPy = {'name': 'name', 'available': 'available', 'error': 'error'} + def __init__(self, available=None, error=None, name=None): ''' - - Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')] + available : bool + error : Error + name : str ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Addresser', Request='WatchIPAddresses', Version=2, Params=params) + self.available = available + self.error = Error.from_json(error) if error else None + self.name = name - reply = await self.rpc(msg) - return reply +class ZoneResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence<+T_co>[~ZoneResult]<~ZoneResult> + ''' + self.results = [ZoneResult.from_json(o) for o in results or []] -class Agent(Type): - name = 'Agent' - version = 2 - schema = {'definitions': {'AgentGetEntitiesResult': {'additionalProperties': False, - 'properties': {'ContainerType': {'type': 'string'}, - 'Error': {'$ref': '#/definitions/Error'}, - 'Jobs': {'items': {'type': 'string'}, - 'type': 'array'}, - 'Life': {'type': 'string'}}, - 'required': ['Life', - 'Jobs', - 'ContainerType', - 'Error'], - 'type': 'object'}, - 'AgentGetEntitiesResults': {'additionalProperties': False, - 'properties': {'Entities': {'items': {'$ref': '#/definitions/AgentGetEntitiesResult'}, - 'type': 'array'}}, - 'required': ['Entities'], - 'type': 'object'}, - 'Entities': {'additionalProperties': False, - 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'}, - 'type': 'array'}}, - 'required': ['Entities'], - 'type': 'object'}, - 'Entity': {'additionalProperties': False, - 'properties': {'Tag': {'type': 'string'}}, - 'required': ['Tag'], - 'type': 'object'}, - 'EntityPassword': {'additionalProperties': False, - 'properties': {'Password': {'type': 'string'}, - 'Tag': {'type': 'string'}}, - 'required': ['Tag', 'Password'], - 'type': 'object'}, - 'EntityPasswords': {'additionalProperties': False, - 'properties': {'Changes': {'items': {'$ref': '#/definitions/EntityPassword'}, - 'type': 'array'}}, - 'required': ['Changes'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'Code': {'type': 'string'}, - 'Info': {'$ref': '#/definitions/ErrorInfo'}, - 'Message': {'type': 'string'}}, - 'required': ['Message', 'Code'], - 'type': 'object'}, - 'ErrorInfo': {'additionalProperties': False, - 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'}, - 'MacaroonPath': {'type': 'string'}}, - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}}, - 'required': ['Error'], - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'IsMasterResult': {'additionalProperties': False, - 'properties': {'Master': {'type': 'boolean'}}, - 'required': ['Master'], - 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, - 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'}, - 'type': 'array'}, - 'data': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'id': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'sig': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['data', - 'location', - 'id', - 'caveats', - 'sig'], - 'type': 'object'}, - 'ModelConfigResult': {'additionalProperties': False, - 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}}, - 'required': ['Config'], - 'type': 'object'}, - 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'NotifyWatcherId': {'type': 'string'}}, - 'required': ['NotifyWatcherId', 'Error'], - 'type': 'object'}, - 'StateServingInfo': {'additionalProperties': False, - 'properties': {'APIPort': {'type': 'integer'}, - 'CAPrivateKey': {'type': 'string'}, - 'Cert': {'type': 'string'}, - 'PrivateKey': {'type': 'string'}, - 'SharedSecret': {'type': 'string'}, - 'StatePort': {'type': 'integer'}, - 'SystemIdentity': {'type': 'string'}}, - 'required': ['APIPort', - 'StatePort', - 'Cert', - 'PrivateKey', - 'CAPrivateKey', - 'SharedSecret', - 'SystemIdentity'], - 'type': 'object'}, - 'caveat': {'additionalProperties': False, - 'properties': {'caveatId': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'verificationId': {'$ref': '#/definitions/packet'}}, - 'required': ['location', - 'caveatId', - 'verificationId'], - 'type': 'object'}, - 'packet': {'additionalProperties': False, - 'properties': {'headerLen': {'type': 'integer'}, - 'start': {'type': 'integer'}, - 'totalLen': {'type': 'integer'}}, - 'required': ['start', 'totalLen', 'headerLen'], - 'type': 'object'}}, - 'properties': {'ClearReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'GetEntities': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/AgentGetEntitiesResults'}}, - 'type': 'object'}, - 'IsMaster': {'properties': {'Result': {'$ref': '#/definitions/IsMasterResult'}}, - 'type': 'object'}, - 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}}, - 'type': 'object'}, - 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'StateServingInfo': {'properties': {'Result': {'$ref': '#/definitions/StateServingInfo'}}, - 'type': 'object'}, - 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, - 'type': 'object'}}, - 'type': 'object'} - - @ReturnMapping(ErrorResults) - async def ClearReboot(self, entities): +class UndertakerModelInfo(Type): + _toSchema = {'is_system': 'is-system', 'life': 'life', 'uuid': 'uuid', 'global_name': 'global-name', 'name': 'name'} + _toPy = {'global-name': 'global_name', 'is-system': 'is_system', 'uuid': 'uuid', 'life': 'life', 'name': 'name'} + def __init__(self, global_name=None, is_system=None, life=None, name=None, uuid=None): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ErrorResult] + global_name : str + is_system : bool + life : str + name : str + uuid : str ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Agent', Request='ClearReboot', Version=2, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - + self.global_name = global_name + self.is_system = is_system + self.life = life + self.name = name + self.uuid = uuid - @ReturnMapping(AgentGetEntitiesResults) - async def GetEntities(self, entities): +class UndertakerModelInfoResult(Type): + _toSchema = {'result': 'result', 'error': 'error'} + _toPy = {'result': 'result', 'error': 'error'} + def __init__(self, error=None, result=None): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~AgentGetEntitiesResult] + error : Error + result : UndertakerModelInfo ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Agent', Request='GetEntities', Version=2, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - + self.error = Error.from_json(error) if error else None + self.result = UndertakerModelInfo.from_json(result) if result else None - @ReturnMapping(IsMasterResult) - async def IsMaster(self): +class ApplicationStatusResult(Type): + _toSchema = {'application': 'application', 'units': 'units', 'error': 'error'} + _toPy = {'application': 'application', 'units': 'units', 'error': 'error'} + def __init__(self, application=None, error=None, units=None): ''' - - Returns -> bool + application : StatusResult + error : Error + units : typing.Mapping<~KT, +VT_co>[str, ~StatusResult]<~StatusResult> ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Agent', Request='IsMaster', Version=2, Params=params) + self.application = StatusResult.from_json(application) if application else None + self.error = Error.from_json(error) if error else None + self.units = units - reply = await self.rpc(msg) - return reply +class ApplicationStatusResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence<+T_co>[~ApplicationStatusResult]<~ApplicationStatusResult> + ''' + self.results = [ApplicationStatusResult.from_json(o) for o in results or []] - @ReturnMapping(ModelConfigResult) - async def ModelConfig(self): +class CharmURLs(Type): + _toSchema = {'urls': 'urls'} + _toPy = {'urls': 'urls'} + def __init__(self, urls=None): ''' - - Returns -> typing.Mapping[str, typing.Any] + urls : typing.Sequence<+T_co>[~CharmURL]<~CharmURL> ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Agent', Request='ModelConfig', Version=2, Params=params) + self.urls = [CharmURL.from_json(o) for o in urls or []] - reply = await self.rpc(msg) - return reply +class ConfigSettingsResult(Type): + _toSchema = {'settings': 'settings', 'error': 'error'} + _toPy = {'settings': 'settings', 'error': 'error'} + def __init__(self, error=None, settings=None): + ''' + error : Error + settings : typing.Mapping<~KT, +VT_co>[str, typing.Any] + ''' + self.error = Error.from_json(error) if error else None + self.settings = settings - @ReturnMapping(ErrorResults) - async def SetPasswords(self, changes): +class ConfigSettingsResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): ''' - changes : typing.Sequence[~EntityPassword] - Returns -> typing.Sequence[~ErrorResult] + results : typing.Sequence<+T_co>[~ConfigSettingsResult]<~ConfigSettingsResult> ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Agent', Request='SetPasswords', Version=2, Params=params) - params['Changes'] = changes - reply = await self.rpc(msg) - return reply - + self.results = [ConfigSettingsResult.from_json(o) for o in results or []] - @ReturnMapping(StateServingInfo) - async def StateServingInfo(self): +class Endpoint(Type): + _toSchema = {'relation': 'relation', 'application_name': 'application-name'} + _toPy = {'relation': 'relation', 'application-name': 'application_name'} + def __init__(self, application_name=None, relation=None): ''' - - Returns -> typing.Union[int, str] + application_name : str + relation : CharmRelation ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Agent', Request='StateServingInfo', Version=2, Params=params) + self.application_name = application_name + self.relation = CharmRelation.from_json(relation) if relation else None - reply = await self.rpc(msg) - return reply +class EntitiesCharmURL(Type): + _toSchema = {'entities': 'entities'} + _toPy = {'entities': 'entities'} + def __init__(self, entities=None): + ''' + entities : typing.Sequence<+T_co>[~EntityCharmURL]<~EntityCharmURL> + ''' + self.entities = [EntityCharmURL.from_json(o) for o in entities or []] - @ReturnMapping(NotifyWatchResult) - async def WatchForModelConfigChanges(self): +class EntitiesPortRanges(Type): + _toSchema = {'entities': 'entities'} + _toPy = {'entities': 'entities'} + def __init__(self, entities=None): ''' - - Returns -> typing.Union[_ForwardRef('Error'), str] + entities : typing.Sequence<+T_co>[~EntityPortRange]<~EntityPortRange> ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Agent', Request='WatchForModelConfigChanges', Version=2, Params=params) + self.entities = [EntityPortRange.from_json(o) for o in entities or []] - reply = await self.rpc(msg) - return reply +class EntityCharmURL(Type): + _toSchema = {'tag': 'tag', 'charm_url': 'charm-url'} + _toPy = {'charm-url': 'charm_url', 'tag': 'tag'} + def __init__(self, charm_url=None, tag=None): + ''' + charm_url : str + tag : str + ''' + self.charm_url = charm_url + self.tag = tag -class AgentTools(Type): - name = 'AgentTools' - version = 1 - schema = {'properties': {'UpdateToolsAvailable': {'type': 'object'}}, 'type': 'object'} - - @ReturnMapping(None) - async def UpdateToolsAvailable(self): +class EntityPortRange(Type): + _toSchema = {'from_port': 'from-port', 'to_port': 'to-port', 'tag': 'tag', 'protocol': 'protocol'} + _toPy = {'from-port': 'from_port', 'tag': 'tag', 'protocol': 'protocol', 'to-port': 'to_port'} + def __init__(self, from_port=None, protocol=None, tag=None, to_port=None): ''' - - Returns -> None + from_port : int + protocol : str + tag : str + to_port : int ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='AgentTools', Request='UpdateToolsAvailable', Version=1, Params=params) - - reply = await self.rpc(msg) - return reply - + self.from_port = from_port + self.protocol = protocol + self.tag = tag + self.to_port = to_port -class AllModelWatcher(Type): - name = 'AllModelWatcher' - version = 2 - schema = {'definitions': {'AllWatcherNextResults': {'additionalProperties': False, - 'properties': {'Deltas': {'items': {'$ref': '#/definitions/Delta'}, - 'type': 'array'}}, - 'required': ['Deltas'], - 'type': 'object'}, - 'Delta': {'additionalProperties': False, - 'properties': {'Entity': {'additionalProperties': True, - 'type': 'object'}, - 'Removed': {'type': 'boolean'}}, - 'required': ['Removed', 'Entity'], - 'type': 'object'}}, - 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherNextResults'}}, - 'type': 'object'}, - 'Stop': {'type': 'object'}}, - 'type': 'object'} - - @ReturnMapping(AllWatcherNextResults) - async def Next(self): +class EntityWorkloadVersion(Type): + _toSchema = {'tag': 'tag', 'workload_version': 'workload-version'} + _toPy = {'tag': 'tag', 'workload-version': 'workload_version'} + def __init__(self, tag=None, workload_version=None): ''' - - Returns -> typing.Sequence[~Delta] + tag : str + workload_version : str ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='AllModelWatcher', Request='Next', Version=2, Params=params) - - reply = await self.rpc(msg) - return reply - + self.tag = tag + self.workload_version = workload_version - @ReturnMapping(None) - async def Stop(self): +class EntityWorkloadVersions(Type): + _toSchema = {'entities': 'entities'} + _toPy = {'entities': 'entities'} + def __init__(self, entities=None): ''' - - Returns -> None + entities : typing.Sequence<+T_co>[~EntityWorkloadVersion]<~EntityWorkloadVersion> ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='AllModelWatcher', Request='Stop', Version=2, Params=params) - - reply = await self.rpc(msg) - return reply - + self.entities = [EntityWorkloadVersion.from_json(o) for o in entities or []] -class AllWatcher(Type): - name = 'AllWatcher' - version = 1 - schema = {'definitions': {'AllWatcherNextResults': {'additionalProperties': False, - 'properties': {'Deltas': {'items': {'$ref': '#/definitions/Delta'}, - 'type': 'array'}}, - 'required': ['Deltas'], - 'type': 'object'}, - 'Delta': {'additionalProperties': False, - 'properties': {'Entity': {'additionalProperties': True, - 'type': 'object'}, - 'Removed': {'type': 'boolean'}}, - 'required': ['Removed', 'Entity'], - 'type': 'object'}}, - 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherNextResults'}}, - 'type': 'object'}, - 'Stop': {'type': 'object'}}, - 'type': 'object'} - - @ReturnMapping(AllWatcherNextResults) - async def Next(self): +class GetLeadershipSettingsBulkResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): ''' - - Returns -> typing.Sequence[~Delta] + results : typing.Sequence<+T_co>[~GetLeadershipSettingsResult]<~GetLeadershipSettingsResult> ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='AllWatcher', Request='Next', Version=1, Params=params) - - reply = await self.rpc(msg) - return reply - + self.results = [GetLeadershipSettingsResult.from_json(o) for o in results or []] - @ReturnMapping(None) - async def Stop(self): +class GetLeadershipSettingsResult(Type): + _toSchema = {'settings': 'settings', 'error': 'error'} + _toPy = {'settings': 'settings', 'error': 'error'} + def __init__(self, error=None, settings=None): ''' - - Returns -> None + error : Error + settings : typing.Mapping<~KT, +VT_co>[str, str] ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='AllWatcher', Request='Stop', Version=1, Params=params) - - reply = await self.rpc(msg) - return reply - + self.error = Error.from_json(error) if error else None + self.settings = settings -class Annotations(Type): - name = 'Annotations' - version = 2 - schema = {'definitions': {'AnnotationsGetResult': {'additionalProperties': False, - 'properties': {'Annotations': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'EntityTag': {'type': 'string'}, - 'Error': {'$ref': '#/definitions/ErrorResult'}}, - 'required': ['EntityTag', - 'Annotations', - 'Error'], - 'type': 'object'}, - 'AnnotationsGetResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/AnnotationsGetResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'AnnotationsSet': {'additionalProperties': False, - 'properties': {'Annotations': {'items': {'$ref': '#/definitions/EntityAnnotations'}, - 'type': 'array'}}, - 'required': ['Annotations'], - 'type': 'object'}, - 'Entities': {'additionalProperties': False, - 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'}, - 'type': 'array'}}, - 'required': ['Entities'], - 'type': 'object'}, - 'Entity': {'additionalProperties': False, - 'properties': {'Tag': {'type': 'string'}}, - 'required': ['Tag'], - 'type': 'object'}, - 'EntityAnnotations': {'additionalProperties': False, - 'properties': {'Annotations': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'EntityTag': {'type': 'string'}}, - 'required': ['EntityTag', 'Annotations'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'Code': {'type': 'string'}, - 'Info': {'$ref': '#/definitions/ErrorInfo'}, - 'Message': {'type': 'string'}}, - 'required': ['Message', 'Code'], - 'type': 'object'}, - 'ErrorInfo': {'additionalProperties': False, - 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'}, - 'MacaroonPath': {'type': 'string'}}, - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}}, - 'required': ['Error'], - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, - 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'}, - 'type': 'array'}, - 'data': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'id': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'sig': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['data', - 'location', - 'id', - 'caveats', - 'sig'], - 'type': 'object'}, - 'caveat': {'additionalProperties': False, - 'properties': {'caveatId': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'verificationId': {'$ref': '#/definitions/packet'}}, - 'required': ['location', - 'caveatId', - 'verificationId'], - 'type': 'object'}, - 'packet': {'additionalProperties': False, - 'properties': {'headerLen': {'type': 'integer'}, - 'start': {'type': 'integer'}, - 'totalLen': {'type': 'integer'}}, - 'required': ['start', 'totalLen', 'headerLen'], - 'type': 'object'}}, - 'properties': {'Get': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/AnnotationsGetResults'}}, - 'type': 'object'}, - 'Set': {'properties': {'Params': {'$ref': '#/definitions/AnnotationsSet'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - @ReturnMapping(AnnotationsGetResults) - async def Get(self, entities): +class IntResult(Type): + _toSchema = {'result': 'result', 'error': 'error'} + _toPy = {'result': 'result', 'error': 'error'} + def __init__(self, error=None, result=None): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~AnnotationsGetResult] + error : Error + result : int ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Annotations', Request='Get', Version=2, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - + self.error = Error.from_json(error) if error else None + self.result = result - @ReturnMapping(ErrorResults) - async def Set(self, annotations): +class IntResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): ''' - annotations : typing.Sequence[~EntityAnnotations] - Returns -> typing.Sequence[~ErrorResult] + results : typing.Sequence<+T_co>[~IntResult]<~IntResult> ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Annotations', Request='Set', Version=2, Params=params) - params['Annotations'] = annotations - reply = await self.rpc(msg) - return reply - + self.results = [IntResult.from_json(o) for o in results or []] -class Backups(Type): - name = 'Backups' - version = 1 - schema = {'definitions': {'BackupsCreateArgs': {'additionalProperties': False, - 'properties': {'Notes': {'type': 'string'}}, - 'required': ['Notes'], - 'type': 'object'}, - 'BackupsInfoArgs': {'additionalProperties': False, - 'properties': {'ID': {'type': 'string'}}, - 'required': ['ID'], - 'type': 'object'}, - 'BackupsListArgs': {'additionalProperties': False, - 'type': 'object'}, - 'BackupsListResult': {'additionalProperties': False, - 'properties': {'List': {'items': {'$ref': '#/definitions/BackupsMetadataResult'}, - 'type': 'array'}}, - 'required': ['List'], - 'type': 'object'}, - 'BackupsMetadataResult': {'additionalProperties': False, - 'properties': {'CACert': {'type': 'string'}, - 'CAPrivateKey': {'type': 'string'}, - 'Checksum': {'type': 'string'}, - 'ChecksumFormat': {'type': 'string'}, - 'Finished': {'format': 'date-time', - 'type': 'string'}, - 'Hostname': {'type': 'string'}, - 'ID': {'type': 'string'}, - 'Machine': {'type': 'string'}, - 'Model': {'type': 'string'}, - 'Notes': {'type': 'string'}, - 'Size': {'type': 'integer'}, - 'Started': {'format': 'date-time', - 'type': 'string'}, - 'Stored': {'format': 'date-time', - 'type': 'string'}, - 'Version': {'$ref': '#/definitions/Number'}}, - 'required': ['ID', - 'Checksum', - 'ChecksumFormat', - 'Size', - 'Stored', - 'Started', - 'Finished', - 'Notes', - 'Model', - 'Machine', - 'Hostname', - 'Version', - 'CACert', - 'CAPrivateKey'], - 'type': 'object'}, - 'BackupsRemoveArgs': {'additionalProperties': False, - 'properties': {'ID': {'type': 'string'}}, - 'required': ['ID'], - 'type': 'object'}, - 'Number': {'additionalProperties': False, - 'properties': {'Build': {'type': 'integer'}, - 'Major': {'type': 'integer'}, - 'Minor': {'type': 'integer'}, - 'Patch': {'type': 'integer'}, - 'Tag': {'type': 'string'}}, - 'required': ['Major', - 'Minor', - 'Tag', - 'Patch', - 'Build'], - 'type': 'object'}, - 'RestoreArgs': {'additionalProperties': False, - 'properties': {'BackupId': {'type': 'string'}}, - 'required': ['BackupId'], - 'type': 'object'}}, - 'properties': {'Create': {'properties': {'Params': {'$ref': '#/definitions/BackupsCreateArgs'}, - 'Result': {'$ref': '#/definitions/BackupsMetadataResult'}}, - 'type': 'object'}, - 'FinishRestore': {'type': 'object'}, - 'Info': {'properties': {'Params': {'$ref': '#/definitions/BackupsInfoArgs'}, - 'Result': {'$ref': '#/definitions/BackupsMetadataResult'}}, - 'type': 'object'}, - 'List': {'properties': {'Params': {'$ref': '#/definitions/BackupsListArgs'}, - 'Result': {'$ref': '#/definitions/BackupsListResult'}}, - 'type': 'object'}, - 'PrepareRestore': {'type': 'object'}, - 'Remove': {'properties': {'Params': {'$ref': '#/definitions/BackupsRemoveArgs'}}, - 'type': 'object'}, - 'Restore': {'properties': {'Params': {'$ref': '#/definitions/RestoreArgs'}}, - 'type': 'object'}}, - 'type': 'object'} - - @ReturnMapping(BackupsMetadataResult) - async def Create(self, notes): +class MergeLeadershipSettingsBulkParams(Type): + _toSchema = {'params': 'params'} + _toPy = {'params': 'params'} + def __init__(self, params=None): ''' - notes : str - Returns -> typing.Union[str, int, _ForwardRef('Number')] + params : typing.Sequence<+T_co>[~MergeLeadershipSettingsParam]<~MergeLeadershipSettingsParam> ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Backups', Request='Create', Version=1, Params=params) - params['Notes'] = notes - reply = await self.rpc(msg) - return reply - + self.params = [MergeLeadershipSettingsParam.from_json(o) for o in params or []] - @ReturnMapping(None) - async def FinishRestore(self): +class MergeLeadershipSettingsParam(Type): + _toSchema = {'settings': 'settings', 'application_tag': 'application-tag'} + _toPy = {'application-tag': 'application_tag', 'settings': 'settings'} + def __init__(self, application_tag=None, settings=None): ''' - - Returns -> None + application_tag : str + settings : typing.Mapping<~KT, +VT_co>[str, str] ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Backups', Request='FinishRestore', Version=1, Params=params) - - reply = await self.rpc(msg) - return reply - + self.application_tag = application_tag + self.settings = settings - @ReturnMapping(BackupsMetadataResult) - async def Info(self, id_): +class ModelResult(Type): + _toSchema = {'name': 'name', 'uuid': 'uuid', 'error': 'error'} + _toPy = {'name': 'name', 'uuid': 'uuid', 'error': 'error'} + def __init__(self, error=None, name=None, uuid=None): ''' - id_ : str - Returns -> typing.Union[str, int, _ForwardRef('Number')] + error : Error + name : str + uuid : str ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Backups', Request='Info', Version=1, Params=params) - params['ID'] = id_ - reply = await self.rpc(msg) - return reply - + self.error = Error.from_json(error) if error else None + self.name = name + self.uuid = uuid - @ReturnMapping(BackupsListResult) - async def List(self): +class RelationIds(Type): + _toSchema = {'relation_ids': 'relation-ids'} + _toPy = {'relation-ids': 'relation_ids'} + def __init__(self, relation_ids=None): ''' - - Returns -> typing.Sequence[~BackupsMetadataResult] + relation_ids : typing.Sequence<+T_co>[int] ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Backups', Request='List', Version=1, Params=params) - - reply = await self.rpc(msg) - return reply + self.relation_ids = relation_ids - - @ReturnMapping(None) - async def PrepareRestore(self): +class RelationResult(Type): + _toSchema = {'life': 'life', 'endpoint': 'endpoint', 'id_': 'id', 'key': 'key', 'error': 'error'} + _toPy = {'life': 'life', 'endpoint': 'endpoint', 'id': 'id_', 'key': 'key', 'error': 'error'} + def __init__(self, endpoint=None, error=None, id_=None, key=None, life=None): ''' - - Returns -> None + endpoint : Endpoint + error : Error + id_ : int + key : str + life : str ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Backups', Request='PrepareRestore', Version=1, Params=params) + self.endpoint = Endpoint.from_json(endpoint) if endpoint else None + self.error = Error.from_json(error) if error else None + self.id_ = id_ + self.key = key + self.life = life - reply = await self.rpc(msg) - return reply +class RelationResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence<+T_co>[~RelationResult]<~RelationResult> + ''' + self.results = [RelationResult.from_json(o) for o in results or []] - @ReturnMapping(None) - async def Remove(self, id_): +class RelationUnit(Type): + _toSchema = {'relation': 'relation', 'unit': 'unit'} + _toPy = {'relation': 'relation', 'unit': 'unit'} + def __init__(self, relation=None, unit=None): ''' - id_ : str - Returns -> None + relation : str + unit : str ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Backups', Request='Remove', Version=1, Params=params) - params['ID'] = id_ - reply = await self.rpc(msg) - return reply - + self.relation = relation + self.unit = unit - @ReturnMapping(None) - async def Restore(self, backupid): +class RelationUnitPair(Type): + _toSchema = {'relation': 'relation', 'local_unit': 'local-unit', 'remote_unit': 'remote-unit'} + _toPy = {'remote-unit': 'remote_unit', 'local-unit': 'local_unit', 'relation': 'relation'} + def __init__(self, local_unit=None, relation=None, remote_unit=None): ''' - backupid : str - Returns -> None + local_unit : str + relation : str + remote_unit : str ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Backups', Request='Restore', Version=1, Params=params) - params['BackupId'] = backupid - reply = await self.rpc(msg) - return reply - + self.local_unit = local_unit + self.relation = relation + self.remote_unit = remote_unit -class Block(Type): - name = 'Block' - version = 2 - schema = {'definitions': {'Block': {'additionalProperties': False, - 'properties': {'id': {'type': 'string'}, - 'message': {'type': 'string'}, - 'tag': {'type': 'string'}, - 'type': {'type': 'string'}}, - 'required': ['id', 'tag', 'type'], - 'type': 'object'}, - 'BlockResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'$ref': '#/definitions/Block'}}, - 'required': ['result'], - 'type': 'object'}, - 'BlockResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/BlockResult'}, - 'type': 'array'}}, - 'type': 'object'}, - 'BlockSwitchParams': {'additionalProperties': False, - 'properties': {'message': {'type': 'string'}, - 'type': {'type': 'string'}}, - 'required': ['type'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'Code': {'type': 'string'}, - 'Info': {'$ref': '#/definitions/ErrorInfo'}, - 'Message': {'type': 'string'}}, - 'required': ['Message', 'Code'], - 'type': 'object'}, - 'ErrorInfo': {'additionalProperties': False, - 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'}, - 'MacaroonPath': {'type': 'string'}}, - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}}, - 'required': ['Error'], - 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, - 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'}, - 'type': 'array'}, - 'data': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'id': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'sig': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['data', - 'location', - 'id', - 'caveats', - 'sig'], - 'type': 'object'}, - 'caveat': {'additionalProperties': False, - 'properties': {'caveatId': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'verificationId': {'$ref': '#/definitions/packet'}}, - 'required': ['location', - 'caveatId', - 'verificationId'], - 'type': 'object'}, - 'packet': {'additionalProperties': False, - 'properties': {'headerLen': {'type': 'integer'}, - 'start': {'type': 'integer'}, - 'totalLen': {'type': 'integer'}}, - 'required': ['start', 'totalLen', 'headerLen'], - 'type': 'object'}}, - 'properties': {'List': {'properties': {'Result': {'$ref': '#/definitions/BlockResults'}}, - 'type': 'object'}, - 'SwitchBlockOff': {'properties': {'Params': {'$ref': '#/definitions/BlockSwitchParams'}, - 'Result': {'$ref': '#/definitions/ErrorResult'}}, - 'type': 'object'}, - 'SwitchBlockOn': {'properties': {'Params': {'$ref': '#/definitions/BlockSwitchParams'}, - 'Result': {'$ref': '#/definitions/ErrorResult'}}, - 'type': 'object'}}, - 'type': 'object'} - - @ReturnMapping(BlockResults) - async def List(self): +class RelationUnitPairs(Type): + _toSchema = {'relation_unit_pairs': 'relation-unit-pairs'} + _toPy = {'relation-unit-pairs': 'relation_unit_pairs'} + def __init__(self, relation_unit_pairs=None): ''' - - Returns -> typing.Sequence[~BlockResult] + relation_unit_pairs : typing.Sequence<+T_co>[~RelationUnitPair]<~RelationUnitPair> ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Block', Request='List', Version=2, Params=params) + self.relation_unit_pairs = [RelationUnitPair.from_json(o) for o in relation_unit_pairs or []] - reply = await self.rpc(msg) - return reply +class RelationUnitSettings(Type): + _toSchema = {'relation': 'relation', 'settings': 'settings', 'unit': 'unit'} + _toPy = {'relation': 'relation', 'settings': 'settings', 'unit': 'unit'} + def __init__(self, relation=None, settings=None, unit=None): + ''' + relation : str + settings : typing.Mapping<~KT, +VT_co>[str, str] + unit : str + ''' + self.relation = relation + self.settings = settings + self.unit = unit - @ReturnMapping(ErrorResult) - async def SwitchBlockOff(self, message, type_): +class RelationUnits(Type): + _toSchema = {'relation_units': 'relation-units'} + _toPy = {'relation-units': 'relation_units'} + def __init__(self, relation_units=None): ''' - message : str - type_ : str - Returns -> Error + relation_units : typing.Sequence<+T_co>[~RelationUnit]<~RelationUnit> ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Block', Request='SwitchBlockOff', Version=2, Params=params) - params['message'] = message - params['type'] = type_ - reply = await self.rpc(msg) - return reply + self.relation_units = [RelationUnit.from_json(o) for o in relation_units or []] - - @ReturnMapping(ErrorResult) - async def SwitchBlockOn(self, message, type_): +class RelationUnitsSettings(Type): + _toSchema = {'relation_units': 'relation-units'} + _toPy = {'relation-units': 'relation_units'} + def __init__(self, relation_units=None): ''' - message : str - type_ : str - Returns -> Error + relation_units : typing.Sequence<+T_co>[~RelationUnitSettings]<~RelationUnitSettings> ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Block', Request='SwitchBlockOn', Version=2, Params=params) - params['message'] = message - params['type'] = type_ - reply = await self.rpc(msg) - return reply - + self.relation_units = [RelationUnitSettings.from_json(o) for o in relation_units or []] -class CharmRevisionUpdater(Type): - name = 'CharmRevisionUpdater' - version = 1 - schema = {'definitions': {'Error': {'additionalProperties': False, - 'properties': {'Code': {'type': 'string'}, - 'Info': {'$ref': '#/definitions/ErrorInfo'}, - 'Message': {'type': 'string'}}, - 'required': ['Message', 'Code'], - 'type': 'object'}, - 'ErrorInfo': {'additionalProperties': False, - 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'}, - 'MacaroonPath': {'type': 'string'}}, - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}}, - 'required': ['Error'], - 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, - 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'}, - 'type': 'array'}, - 'data': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'id': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'sig': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['data', - 'location', - 'id', - 'caveats', - 'sig'], - 'type': 'object'}, - 'caveat': {'additionalProperties': False, - 'properties': {'caveatId': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'verificationId': {'$ref': '#/definitions/packet'}}, - 'required': ['location', - 'caveatId', - 'verificationId'], - 'type': 'object'}, - 'packet': {'additionalProperties': False, - 'properties': {'headerLen': {'type': 'integer'}, - 'start': {'type': 'integer'}, - 'totalLen': {'type': 'integer'}}, - 'required': ['start', 'totalLen', 'headerLen'], - 'type': 'object'}}, - 'properties': {'UpdateLatestRevisions': {'properties': {'Result': {'$ref': '#/definitions/ErrorResult'}}, - 'type': 'object'}}, - 'type': 'object'} - - @ReturnMapping(ErrorResult) - async def UpdateLatestRevisions(self): +class RelationUnitsWatchResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): ''' - - Returns -> Error + results : typing.Sequence<+T_co>[~RelationUnitsWatchResult]<~RelationUnitsWatchResult> ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='CharmRevisionUpdater', Request='UpdateLatestRevisions', Version=1, Params=params) + self.results = [RelationUnitsWatchResult.from_json(o) for o in results or []] - reply = await self.rpc(msg) - return reply +class ResolvedModeResult(Type): + _toSchema = {'mode': 'mode', 'error': 'error'} + _toPy = {'mode': 'mode', 'error': 'error'} + def __init__(self, error=None, mode=None): + ''' + error : Error + mode : str + ''' + self.error = Error.from_json(error) if error else None + self.mode = mode -class Charms(Type): - name = 'Charms' - version = 2 - schema = {'definitions': {'CharmInfo': {'additionalProperties': False, - 'properties': {'CharmURL': {'type': 'string'}}, - 'required': ['CharmURL'], - 'type': 'object'}, - 'CharmsList': {'additionalProperties': False, - 'properties': {'Names': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['Names'], - 'type': 'object'}, - 'CharmsListResult': {'additionalProperties': False, - 'properties': {'CharmURLs': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['CharmURLs'], - 'type': 'object'}, - 'IsMeteredResult': {'additionalProperties': False, - 'properties': {'Metered': {'type': 'boolean'}}, - 'required': ['Metered'], - 'type': 'object'}}, - 'properties': {'CharmInfo': {'properties': {'Params': {'$ref': '#/definitions/CharmInfo'}, - 'Result': {'$ref': '#/definitions/CharmInfo'}}, - 'type': 'object'}, - 'IsMetered': {'properties': {'Params': {'$ref': '#/definitions/CharmInfo'}, - 'Result': {'$ref': '#/definitions/IsMeteredResult'}}, - 'type': 'object'}, - 'List': {'properties': {'Params': {'$ref': '#/definitions/CharmsList'}, - 'Result': {'$ref': '#/definitions/CharmsListResult'}}, - 'type': 'object'}}, - 'type': 'object'} - - @ReturnMapping(CharmInfo) - async def CharmInfo(self, charmurl): +class ResolvedModeResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): ''' - charmurl : str - Returns -> str + results : typing.Sequence<+T_co>[~ResolvedModeResult]<~ResolvedModeResult> ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Charms', Request='CharmInfo', Version=2, Params=params) - params['CharmURL'] = charmurl - reply = await self.rpc(msg) - return reply + self.results = [ResolvedModeResult.from_json(o) for o in results or []] +class SettingsResult(Type): + _toSchema = {'settings': 'settings', 'error': 'error'} + _toPy = {'settings': 'settings', 'error': 'error'} + def __init__(self, error=None, settings=None): + ''' + error : Error + settings : typing.Mapping<~KT, +VT_co>[str, str] + ''' + self.error = Error.from_json(error) if error else None + self.settings = settings + - @ReturnMapping(IsMeteredResult) - async def IsMetered(self, charmurl): +class SettingsResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): ''' - charmurl : str - Returns -> bool + results : typing.Sequence<+T_co>[~SettingsResult]<~SettingsResult> ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Charms', Request='IsMetered', Version=2, Params=params) - params['CharmURL'] = charmurl - reply = await self.rpc(msg) - return reply + self.results = [SettingsResult.from_json(o) for o in results or []] + +class StorageAttachment(Type): + _toSchema = {'kind': 'kind', 'owner_tag': 'owner-tag', 'location': 'location', 'life': 'life', 'storage_tag': 'storage-tag', 'unit_tag': 'unit-tag'} + _toPy = {'kind': 'kind', 'storage-tag': 'storage_tag', 'location': 'location', 'life': 'life', 'owner-tag': 'owner_tag', 'unit-tag': 'unit_tag'} + def __init__(self, kind=None, life=None, location=None, owner_tag=None, storage_tag=None, unit_tag=None): + ''' + kind : int + life : str + location : str + owner_tag : str + storage_tag : str + unit_tag : str + ''' + self.kind = kind + self.life = life + self.location = location + self.owner_tag = owner_tag + self.storage_tag = storage_tag + self.unit_tag = unit_tag - @ReturnMapping(CharmsListResult) - async def List(self, names): +class StorageAttachmentId(Type): + _toSchema = {'storage_tag': 'storage-tag', 'unit_tag': 'unit-tag'} + _toPy = {'unit-tag': 'unit_tag', 'storage-tag': 'storage_tag'} + def __init__(self, storage_tag=None, unit_tag=None): ''' - names : typing.Sequence[str] - Returns -> typing.Sequence[str] + storage_tag : str + unit_tag : str ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Charms', Request='List', Version=2, Params=params) - params['Names'] = names - reply = await self.rpc(msg) - return reply + self.storage_tag = storage_tag + self.unit_tag = unit_tag -class Cleaner(Type): - name = 'Cleaner' - version = 2 - schema = {'definitions': {'Error': {'additionalProperties': False, - 'properties': {'Code': {'type': 'string'}, - 'Info': {'$ref': '#/definitions/ErrorInfo'}, - 'Message': {'type': 'string'}}, - 'required': ['Message', 'Code'], - 'type': 'object'}, - 'ErrorInfo': {'additionalProperties': False, - 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'}, - 'MacaroonPath': {'type': 'string'}}, - 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, - 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'}, - 'type': 'array'}, - 'data': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'id': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'sig': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['data', - 'location', - 'id', - 'caveats', - 'sig'], - 'type': 'object'}, - 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'NotifyWatcherId': {'type': 'string'}}, - 'required': ['NotifyWatcherId', 'Error'], - 'type': 'object'}, - 'caveat': {'additionalProperties': False, - 'properties': {'caveatId': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'verificationId': {'$ref': '#/definitions/packet'}}, - 'required': ['location', - 'caveatId', - 'verificationId'], - 'type': 'object'}, - 'packet': {'additionalProperties': False, - 'properties': {'headerLen': {'type': 'integer'}, - 'start': {'type': 'integer'}, - 'totalLen': {'type': 'integer'}}, - 'required': ['start', 'totalLen', 'headerLen'], - 'type': 'object'}}, - 'properties': {'Cleanup': {'type': 'object'}, - 'WatchCleanups': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, - 'type': 'object'}}, - 'type': 'object'} - +class StorageAttachmentIds(Type): + _toSchema = {'ids': 'ids'} + _toPy = {'ids': 'ids'} + def __init__(self, ids=None): + ''' + ids : typing.Sequence<+T_co>[~StorageAttachmentId]<~StorageAttachmentId> + ''' + self.ids = [StorageAttachmentId.from_json(o) for o in ids or []] - @ReturnMapping(None) - async def Cleanup(self): + +class StorageAttachmentIdsResult(Type): + _toSchema = {'result': 'result', 'error': 'error'} + _toPy = {'result': 'result', 'error': 'error'} + def __init__(self, error=None, result=None): + ''' + error : Error + result : StorageAttachmentIds ''' + self.error = Error.from_json(error) if error else None + self.result = StorageAttachmentIds.from_json(result) if result else None - Returns -> None + +class StorageAttachmentIdsResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Cleaner', Request='Cleanup', Version=2, Params=params) + results : typing.Sequence<+T_co>[~StorageAttachmentIdsResult]<~StorageAttachmentIdsResult> + ''' + self.results = [StorageAttachmentIdsResult.from_json(o) for o in results or []] - reply = await self.rpc(msg) - return reply +class StorageAttachmentResult(Type): + _toSchema = {'result': 'result', 'error': 'error'} + _toPy = {'result': 'result', 'error': 'error'} + def __init__(self, error=None, result=None): + ''' + error : Error + result : StorageAttachment + ''' + self.error = Error.from_json(error) if error else None + self.result = StorageAttachment.from_json(result) if result else None - @ReturnMapping(NotifyWatchResult) - async def WatchCleanups(self): +class StorageAttachmentResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): ''' + results : typing.Sequence<+T_co>[~StorageAttachmentResult]<~StorageAttachmentResult> + ''' + self.results = [StorageAttachmentResult.from_json(o) for o in results or []] - Returns -> typing.Union[_ForwardRef('Error'), str] + +class StringBoolResult(Type): + _toSchema = {'result': 'result', 'ok': 'ok', 'error': 'error'} + _toPy = {'result': 'result', 'ok': 'ok', 'error': 'error'} + def __init__(self, error=None, ok=None, result=None): ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Cleaner', Request='WatchCleanups', Version=2, Params=params) + error : Error + ok : bool + result : str + ''' + self.error = Error.from_json(error) if error else None + self.ok = ok + self.result = result - reply = await self.rpc(msg) - return reply +class StringBoolResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence<+T_co>[~StringBoolResult]<~StringBoolResult> + ''' + self.results = [StringBoolResult.from_json(o) for o in results or []] -class Client(Type): - name = 'Client' - version = 1 - schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False, - 'properties': {'Servers': {'items': {'items': {'$ref': '#/definitions/HostPort'}, - 'type': 'array'}, - 'type': 'array'}}, - 'required': ['Servers'], - 'type': 'object'}, - 'AddCharm': {'additionalProperties': False, - 'properties': {'Channel': {'type': 'string'}, - 'URL': {'type': 'string'}}, - 'required': ['URL', 'Channel'], - 'type': 'object'}, - 'AddCharmWithAuthorization': {'additionalProperties': False, - 'properties': {'Channel': {'type': 'string'}, - 'CharmStoreMacaroon': {'$ref': '#/definitions/Macaroon'}, - 'URL': {'type': 'string'}}, - 'required': ['URL', - 'Channel', - 'CharmStoreMacaroon'], - 'type': 'object'}, - 'AddMachineParams': {'additionalProperties': False, - 'properties': {'Addrs': {'items': {'$ref': '#/definitions/Address'}, - 'type': 'array'}, - 'Constraints': {'$ref': '#/definitions/Value'}, - 'ContainerType': {'type': 'string'}, - 'Disks': {'items': {'$ref': '#/definitions/Constraints'}, - 'type': 'array'}, - 'HardwareCharacteristics': {'$ref': '#/definitions/HardwareCharacteristics'}, - 'InstanceId': {'type': 'string'}, - 'Jobs': {'items': {'type': 'string'}, - 'type': 'array'}, - 'Nonce': {'type': 'string'}, - 'ParentId': {'type': 'string'}, - 'Placement': {'$ref': '#/definitions/Placement'}, - 'Series': {'type': 'string'}}, - 'required': ['Series', - 'Constraints', - 'Jobs', - 'Disks', - 'Placement', - 'ParentId', - 'ContainerType', - 'InstanceId', - 'Nonce', - 'HardwareCharacteristics', - 'Addrs'], - 'type': 'object'}, - 'AddMachines': {'additionalProperties': False, - 'properties': {'MachineParams': {'items': {'$ref': '#/definitions/AddMachineParams'}, - 'type': 'array'}}, - 'required': ['MachineParams'], - 'type': 'object'}, - 'AddMachinesResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Machine': {'type': 'string'}}, - 'required': ['Machine', 'Error'], - 'type': 'object'}, - 'AddMachinesResults': {'additionalProperties': False, - 'properties': {'Machines': {'items': {'$ref': '#/definitions/AddMachinesResult'}, - 'type': 'array'}}, - 'required': ['Machines'], - 'type': 'object'}, - 'Address': {'additionalProperties': False, - 'properties': {'Scope': {'type': 'string'}, - 'SpaceName': {'type': 'string'}, - 'Type': {'type': 'string'}, - 'Value': {'type': 'string'}}, - 'required': ['Value', 'Type', 'Scope'], - 'type': 'object'}, - 'AgentVersionResult': {'additionalProperties': False, - 'properties': {'Version': {'$ref': '#/definitions/Number'}}, - 'required': ['Version'], - 'type': 'object'}, - 'AllWatcherId': {'additionalProperties': False, - 'properties': {'AllWatcherId': {'type': 'string'}}, - 'required': ['AllWatcherId'], - 'type': 'object'}, - 'Binary': {'additionalProperties': False, - 'properties': {'Arch': {'type': 'string'}, - 'Number': {'$ref': '#/definitions/Number'}, - 'Series': {'type': 'string'}}, - 'required': ['Number', 'Series', 'Arch'], - 'type': 'object'}, - 'BundleChangesChange': {'additionalProperties': False, - 'properties': {'args': {'items': {'additionalProperties': True, - 'type': 'object'}, - 'type': 'array'}, - 'id': {'type': 'string'}, - 'method': {'type': 'string'}, - 'requires': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['id', - 'method', - 'args', - 'requires'], - 'type': 'object'}, - 'CharmInfo': {'additionalProperties': False, - 'properties': {'CharmURL': {'type': 'string'}}, - 'required': ['CharmURL'], - 'type': 'object'}, - 'Constraints': {'additionalProperties': False, - 'properties': {'Count': {'type': 'integer'}, - 'Pool': {'type': 'string'}, - 'Size': {'type': 'integer'}}, - 'required': ['Pool', 'Size', 'Count'], - 'type': 'object'}, - 'DestroyMachines': {'additionalProperties': False, - 'properties': {'Force': {'type': 'boolean'}, - 'MachineNames': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['MachineNames', 'Force'], - 'type': 'object'}, - 'DetailedStatus': {'additionalProperties': False, - 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'Err': {'additionalProperties': True, - 'type': 'object'}, - 'Info': {'type': 'string'}, - 'Kind': {'type': 'string'}, - 'Life': {'type': 'string'}, - 'Since': {'format': 'date-time', - 'type': 'string'}, - 'Status': {'type': 'string'}, - 'Version': {'type': 'string'}}, - 'required': ['Status', - 'Info', - 'Data', - 'Since', - 'Kind', - 'Version', - 'Life', - 'Err'], - 'type': 'object'}, - 'EndpointStatus': {'additionalProperties': False, - 'properties': {'Name': {'type': 'string'}, - 'Role': {'type': 'string'}, - 'ServiceName': {'type': 'string'}, - 'Subordinate': {'type': 'boolean'}}, - 'required': ['ServiceName', - 'Name', - 'Role', - 'Subordinate'], - 'type': 'object'}, - 'Entities': {'additionalProperties': False, - 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'}, - 'type': 'array'}}, - 'required': ['Entities'], - 'type': 'object'}, - 'Entity': {'additionalProperties': False, - 'properties': {'Tag': {'type': 'string'}}, - 'required': ['Tag'], - 'type': 'object'}, - 'EntityStatus': {'additionalProperties': False, - 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'Info': {'type': 'string'}, - 'Since': {'format': 'date-time', - 'type': 'string'}, - 'Status': {'type': 'string'}}, - 'required': ['Status', - 'Info', - 'Data', - 'Since'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'Code': {'type': 'string'}, - 'Info': {'$ref': '#/definitions/ErrorInfo'}, - 'Message': {'type': 'string'}}, - 'required': ['Message', 'Code'], - 'type': 'object'}, - 'ErrorInfo': {'additionalProperties': False, - 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'}, - 'MacaroonPath': {'type': 'string'}}, - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}}, - 'required': ['Error'], - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'FindToolsParams': {'additionalProperties': False, - 'properties': {'Arch': {'type': 'string'}, - 'MajorVersion': {'type': 'integer'}, - 'MinorVersion': {'type': 'integer'}, - 'Number': {'$ref': '#/definitions/Number'}, - 'Series': {'type': 'string'}}, - 'required': ['Number', - 'MajorVersion', - 'MinorVersion', - 'Arch', - 'Series'], - 'type': 'object'}, - 'FindToolsResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'List': {'items': {'$ref': '#/definitions/Tools'}, - 'type': 'array'}}, - 'required': ['List', 'Error'], - 'type': 'object'}, - 'FullStatus': {'additionalProperties': False, - 'properties': {'AvailableVersion': {'type': 'string'}, - 'Machines': {'patternProperties': {'.*': {'$ref': '#/definitions/MachineStatus'}}, - 'type': 'object'}, - 'ModelName': {'type': 'string'}, - 'Relations': {'items': {'$ref': '#/definitions/RelationStatus'}, - 'type': 'array'}, - 'Services': {'patternProperties': {'.*': {'$ref': '#/definitions/ServiceStatus'}}, - 'type': 'object'}}, - 'required': ['ModelName', - 'AvailableVersion', - 'Machines', - 'Services', - 'Relations'], - 'type': 'object'}, - 'GetBundleChangesParams': {'additionalProperties': False, - 'properties': {'yaml': {'type': 'string'}}, - 'required': ['yaml'], - 'type': 'object'}, - 'GetBundleChangesResults': {'additionalProperties': False, - 'properties': {'changes': {'items': {'$ref': '#/definitions/BundleChangesChange'}, - 'type': 'array'}, - 'errors': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'type': 'object'}, - 'GetConstraintsResults': {'additionalProperties': False, - 'properties': {'Constraints': {'$ref': '#/definitions/Value'}}, - 'required': ['Constraints'], - 'type': 'object'}, - 'HardwareCharacteristics': {'additionalProperties': False, - 'properties': {'Arch': {'type': 'string'}, - 'AvailabilityZone': {'type': 'string'}, - 'CpuCores': {'type': 'integer'}, - 'CpuPower': {'type': 'integer'}, - 'Mem': {'type': 'integer'}, - 'RootDisk': {'type': 'integer'}, - 'Tags': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'type': 'object'}, - 'HostPort': {'additionalProperties': False, - 'properties': {'Address': {'$ref': '#/definitions/Address'}, - 'Port': {'type': 'integer'}}, - 'required': ['Address', 'Port'], - 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, - 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'}, - 'type': 'array'}, - 'data': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'id': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'sig': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['data', - 'location', - 'id', - 'caveats', - 'sig'], - 'type': 'object'}, - 'MachineStatus': {'additionalProperties': False, - 'properties': {'AgentStatus': {'$ref': '#/definitions/DetailedStatus'}, - 'Containers': {'patternProperties': {'.*': {'$ref': '#/definitions/MachineStatus'}}, - 'type': 'object'}, - 'DNSName': {'type': 'string'}, - 'Hardware': {'type': 'string'}, - 'HasVote': {'type': 'boolean'}, - 'Id': {'type': 'string'}, - 'InstanceId': {'type': 'string'}, - 'InstanceStatus': {'$ref': '#/definitions/DetailedStatus'}, - 'Jobs': {'items': {'type': 'string'}, - 'type': 'array'}, - 'Series': {'type': 'string'}, - 'WantsVote': {'type': 'boolean'}}, - 'required': ['AgentStatus', - 'InstanceStatus', - 'DNSName', - 'InstanceId', - 'Series', - 'Id', - 'Containers', - 'Hardware', - 'Jobs', - 'HasVote', - 'WantsVote'], - 'type': 'object'}, - 'MeterStatus': {'additionalProperties': False, - 'properties': {'Color': {'type': 'string'}, - 'Message': {'type': 'string'}}, - 'required': ['Color', 'Message'], - 'type': 'object'}, - 'ModelConfigResults': {'additionalProperties': False, - 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}}, - 'required': ['Config'], - 'type': 'object'}, - 'ModelInfo': {'additionalProperties': False, - 'properties': {'DefaultSeries': {'type': 'string'}, - 'Life': {'type': 'string'}, - 'Name': {'type': 'string'}, - 'OwnerTag': {'type': 'string'}, - 'ProviderType': {'type': 'string'}, - 'ServerUUID': {'type': 'string'}, - 'Status': {'$ref': '#/definitions/EntityStatus'}, - 'UUID': {'type': 'string'}, - 'Users': {'items': {'$ref': '#/definitions/ModelUserInfo'}, - 'type': 'array'}}, - 'required': ['Name', - 'UUID', - 'ServerUUID', - 'ProviderType', - 'DefaultSeries', - 'OwnerTag', - 'Life', - 'Status', - 'Users'], - 'type': 'object'}, - 'ModelSet': {'additionalProperties': False, - 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}}, - 'required': ['Config'], - 'type': 'object'}, - 'ModelUnset': {'additionalProperties': False, - 'properties': {'Keys': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['Keys'], - 'type': 'object'}, - 'ModelUserInfo': {'additionalProperties': False, - 'properties': {'access': {'type': 'string'}, - 'displayname': {'type': 'string'}, - 'lastconnection': {'format': 'date-time', - 'type': 'string'}, - 'user': {'type': 'string'}}, - 'required': ['user', - 'displayname', - 'lastconnection', - 'access'], - 'type': 'object'}, - 'ModelUserInfoResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'$ref': '#/definitions/ModelUserInfo'}}, - 'type': 'object'}, - 'ModelUserInfoResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ModelUserInfoResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'Number': {'additionalProperties': False, - 'properties': {'Build': {'type': 'integer'}, - 'Major': {'type': 'integer'}, - 'Minor': {'type': 'integer'}, - 'Patch': {'type': 'integer'}, - 'Tag': {'type': 'string'}}, - 'required': ['Major', - 'Minor', - 'Tag', - 'Patch', - 'Build'], - 'type': 'object'}, - 'Placement': {'additionalProperties': False, - 'properties': {'Directive': {'type': 'string'}, - 'Scope': {'type': 'string'}}, - 'required': ['Scope', 'Directive'], - 'type': 'object'}, - 'PrivateAddress': {'additionalProperties': False, - 'properties': {'Target': {'type': 'string'}}, - 'required': ['Target'], - 'type': 'object'}, - 'PrivateAddressResults': {'additionalProperties': False, - 'properties': {'PrivateAddress': {'type': 'string'}}, - 'required': ['PrivateAddress'], - 'type': 'object'}, - 'ProvisioningScriptParams': {'additionalProperties': False, - 'properties': {'DataDir': {'type': 'string'}, - 'DisablePackageCommands': {'type': 'boolean'}, - 'MachineId': {'type': 'string'}, - 'Nonce': {'type': 'string'}}, - 'required': ['MachineId', - 'Nonce', - 'DataDir', - 'DisablePackageCommands'], - 'type': 'object'}, - 'ProvisioningScriptResult': {'additionalProperties': False, - 'properties': {'Script': {'type': 'string'}}, - 'required': ['Script'], - 'type': 'object'}, - 'PublicAddress': {'additionalProperties': False, - 'properties': {'Target': {'type': 'string'}}, - 'required': ['Target'], - 'type': 'object'}, - 'PublicAddressResults': {'additionalProperties': False, - 'properties': {'PublicAddress': {'type': 'string'}}, - 'required': ['PublicAddress'], - 'type': 'object'}, - 'RelationStatus': {'additionalProperties': False, - 'properties': {'Endpoints': {'items': {'$ref': '#/definitions/EndpointStatus'}, - 'type': 'array'}, - 'Id': {'type': 'integer'}, - 'Interface': {'type': 'string'}, - 'Key': {'type': 'string'}, - 'Scope': {'type': 'string'}}, - 'required': ['Id', - 'Key', - 'Interface', - 'Scope', - 'Endpoints'], - 'type': 'object'}, - 'ResolveCharmResult': {'additionalProperties': False, - 'properties': {'Error': {'type': 'string'}, - 'URL': {'$ref': '#/definitions/URL'}}, - 'type': 'object'}, - 'ResolveCharmResults': {'additionalProperties': False, - 'properties': {'URLs': {'items': {'$ref': '#/definitions/ResolveCharmResult'}, - 'type': 'array'}}, - 'required': ['URLs'], - 'type': 'object'}, - 'ResolveCharms': {'additionalProperties': False, - 'properties': {'References': {'items': {'$ref': '#/definitions/URL'}, - 'type': 'array'}}, - 'required': ['References'], - 'type': 'object'}, - 'Resolved': {'additionalProperties': False, - 'properties': {'Retry': {'type': 'boolean'}, - 'UnitName': {'type': 'string'}}, - 'required': ['UnitName', 'Retry'], - 'type': 'object'}, - 'ServiceStatus': {'additionalProperties': False, - 'properties': {'CanUpgradeTo': {'type': 'string'}, - 'Charm': {'type': 'string'}, - 'Err': {'additionalProperties': True, - 'type': 'object'}, - 'Exposed': {'type': 'boolean'}, - 'Life': {'type': 'string'}, - 'MeterStatuses': {'patternProperties': {'.*': {'$ref': '#/definitions/MeterStatus'}}, - 'type': 'object'}, - 'Relations': {'patternProperties': {'.*': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'type': 'object'}, - 'Status': {'$ref': '#/definitions/DetailedStatus'}, - 'SubordinateTo': {'items': {'type': 'string'}, - 'type': 'array'}, - 'Units': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitStatus'}}, - 'type': 'object'}}, - 'required': ['Err', - 'Charm', - 'Exposed', - 'Life', - 'Relations', - 'CanUpgradeTo', - 'SubordinateTo', - 'Units', - 'MeterStatuses', - 'Status'], - 'type': 'object'}, - 'SetConstraints': {'additionalProperties': False, - 'properties': {'Constraints': {'$ref': '#/definitions/Value'}, - 'ServiceName': {'type': 'string'}}, - 'required': ['ServiceName', 'Constraints'], - 'type': 'object'}, - 'SetModelAgentVersion': {'additionalProperties': False, - 'properties': {'Version': {'$ref': '#/definitions/Number'}}, - 'required': ['Version'], - 'type': 'object'}, - 'StatusHistoryArgs': {'additionalProperties': False, - 'properties': {'Kind': {'type': 'string'}, - 'Name': {'type': 'string'}, - 'Size': {'type': 'integer'}}, - 'required': ['Kind', 'Size', 'Name'], - 'type': 'object'}, - 'StatusHistoryResults': {'additionalProperties': False, - 'properties': {'Statuses': {'items': {'$ref': '#/definitions/DetailedStatus'}, - 'type': 'array'}}, - 'required': ['Statuses'], - 'type': 'object'}, - 'StatusParams': {'additionalProperties': False, - 'properties': {'Patterns': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['Patterns'], - 'type': 'object'}, - 'Tools': {'additionalProperties': False, - 'properties': {'sha256': {'type': 'string'}, - 'size': {'type': 'integer'}, - 'url': {'type': 'string'}, - 'version': {'$ref': '#/definitions/Binary'}}, - 'required': ['version', 'url', 'size'], - 'type': 'object'}, - 'URL': {'additionalProperties': False, - 'properties': {'Channel': {'type': 'string'}, - 'Name': {'type': 'string'}, - 'Revision': {'type': 'integer'}, - 'Schema': {'type': 'string'}, - 'Series': {'type': 'string'}, - 'User': {'type': 'string'}}, - 'required': ['Schema', - 'User', - 'Name', - 'Revision', - 'Series', - 'Channel'], - 'type': 'object'}, - 'UnitStatus': {'additionalProperties': False, - 'properties': {'AgentStatus': {'$ref': '#/definitions/DetailedStatus'}, - 'Charm': {'type': 'string'}, - 'Machine': {'type': 'string'}, - 'OpenedPorts': {'items': {'type': 'string'}, - 'type': 'array'}, - 'PublicAddress': {'type': 'string'}, - 'Subordinates': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitStatus'}}, - 'type': 'object'}, - 'WorkloadStatus': {'$ref': '#/definitions/DetailedStatus'}}, - 'required': ['AgentStatus', - 'WorkloadStatus', - 'Machine', - 'OpenedPorts', - 'PublicAddress', - 'Charm', - 'Subordinates'], - 'type': 'object'}, - 'Value': {'additionalProperties': False, - 'properties': {'arch': {'type': 'string'}, - 'container': {'type': 'string'}, - 'cpu-cores': {'type': 'integer'}, - 'cpu-power': {'type': 'integer'}, - 'instance-type': {'type': 'string'}, - 'mem': {'type': 'integer'}, - 'root-disk': {'type': 'integer'}, - 'spaces': {'items': {'type': 'string'}, - 'type': 'array'}, - 'tags': {'items': {'type': 'string'}, - 'type': 'array'}, - 'virt-type': {'type': 'string'}}, - 'type': 'object'}, - 'caveat': {'additionalProperties': False, - 'properties': {'caveatId': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'verificationId': {'$ref': '#/definitions/packet'}}, - 'required': ['location', - 'caveatId', - 'verificationId'], - 'type': 'object'}, - 'packet': {'additionalProperties': False, - 'properties': {'headerLen': {'type': 'integer'}, - 'start': {'type': 'integer'}, - 'totalLen': {'type': 'integer'}}, - 'required': ['start', 'totalLen', 'headerLen'], - 'type': 'object'}}, - 'properties': {'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}}, - 'type': 'object'}, - 'AbortCurrentUpgrade': {'type': 'object'}, - 'AddCharm': {'properties': {'Params': {'$ref': '#/definitions/AddCharm'}}, - 'type': 'object'}, - 'AddCharmWithAuthorization': {'properties': {'Params': {'$ref': '#/definitions/AddCharmWithAuthorization'}}, - 'type': 'object'}, - 'AddMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'}, - 'Result': {'$ref': '#/definitions/AddMachinesResults'}}, - 'type': 'object'}, - 'AddMachinesV2': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'}, - 'Result': {'$ref': '#/definitions/AddMachinesResults'}}, - 'type': 'object'}, - 'AgentVersion': {'properties': {'Result': {'$ref': '#/definitions/AgentVersionResult'}}, - 'type': 'object'}, - 'CharmInfo': {'properties': {'Params': {'$ref': '#/definitions/CharmInfo'}, - 'Result': {'$ref': '#/definitions/CharmInfo'}}, - 'type': 'object'}, - 'DestroyMachines': {'properties': {'Params': {'$ref': '#/definitions/DestroyMachines'}}, - 'type': 'object'}, - 'DestroyModel': {'type': 'object'}, - 'FindTools': {'properties': {'Params': {'$ref': '#/definitions/FindToolsParams'}, - 'Result': {'$ref': '#/definitions/FindToolsResult'}}, - 'type': 'object'}, - 'FullStatus': {'properties': {'Params': {'$ref': '#/definitions/StatusParams'}, - 'Result': {'$ref': '#/definitions/FullStatus'}}, - 'type': 'object'}, - 'GetBundleChanges': {'properties': {'Params': {'$ref': '#/definitions/GetBundleChangesParams'}, - 'Result': {'$ref': '#/definitions/GetBundleChangesResults'}}, - 'type': 'object'}, - 'GetModelConstraints': {'properties': {'Result': {'$ref': '#/definitions/GetConstraintsResults'}}, - 'type': 'object'}, - 'InjectMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'}, - 'Result': {'$ref': '#/definitions/AddMachinesResults'}}, - 'type': 'object'}, - 'ModelGet': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}}, - 'type': 'object'}, - 'ModelInfo': {'properties': {'Result': {'$ref': '#/definitions/ModelInfo'}}, - 'type': 'object'}, - 'ModelSet': {'properties': {'Params': {'$ref': '#/definitions/ModelSet'}}, - 'type': 'object'}, - 'ModelUnset': {'properties': {'Params': {'$ref': '#/definitions/ModelUnset'}}, - 'type': 'object'}, - 'ModelUserInfo': {'properties': {'Result': {'$ref': '#/definitions/ModelUserInfoResults'}}, - 'type': 'object'}, - 'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/PrivateAddress'}, - 'Result': {'$ref': '#/definitions/PrivateAddressResults'}}, - 'type': 'object'}, - 'ProvisioningScript': {'properties': {'Params': {'$ref': '#/definitions/ProvisioningScriptParams'}, - 'Result': {'$ref': '#/definitions/ProvisioningScriptResult'}}, - 'type': 'object'}, - 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/PublicAddress'}, - 'Result': {'$ref': '#/definitions/PublicAddressResults'}}, - 'type': 'object'}, - 'ResolveCharms': {'properties': {'Params': {'$ref': '#/definitions/ResolveCharms'}, - 'Result': {'$ref': '#/definitions/ResolveCharmResults'}}, - 'type': 'object'}, - 'Resolved': {'properties': {'Params': {'$ref': '#/definitions/Resolved'}}, - 'type': 'object'}, - 'RetryProvisioning': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetModelAgentVersion': {'properties': {'Params': {'$ref': '#/definitions/SetModelAgentVersion'}}, - 'type': 'object'}, - 'SetModelConstraints': {'properties': {'Params': {'$ref': '#/definitions/SetConstraints'}}, - 'type': 'object'}, - 'StatusHistory': {'properties': {'Params': {'$ref': '#/definitions/StatusHistoryArgs'}, - 'Result': {'$ref': '#/definitions/StatusHistoryResults'}}, - 'type': 'object'}, - 'WatchAll': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherId'}}, - 'type': 'object'}}, - 'type': 'object'} - - @ReturnMapping(APIHostPortsResult) - async def APIHostPorts(self): +class UnitNetworkConfig(Type): + _toSchema = {'binding_name': 'binding-name', 'unit_tag': 'unit-tag'} + _toPy = {'binding-name': 'binding_name', 'unit-tag': 'unit_tag'} + def __init__(self, binding_name=None, unit_tag=None): ''' - - Returns -> typing.Sequence[~HostPort] + binding_name : str + unit_tag : str ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Client', Request='APIHostPorts', Version=1, Params=params) + self.binding_name = binding_name + self.unit_tag = unit_tag - reply = await self.rpc(msg) - return reply +class UnitNetworkConfigResult(Type): + _toSchema = {'info': 'info', 'error': 'error'} + _toPy = {'info': 'info', 'error': 'error'} + def __init__(self, error=None, info=None): + ''' + error : Error + info : typing.Sequence<+T_co>[~NetworkConfig]<~NetworkConfig> + ''' + self.error = Error.from_json(error) if error else None + self.info = [NetworkConfig.from_json(o) for o in info or []] - @ReturnMapping(None) - async def AbortCurrentUpgrade(self): +class UnitNetworkConfigResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): ''' - - Returns -> None + results : typing.Sequence<+T_co>[~UnitNetworkConfigResult]<~UnitNetworkConfigResult> ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Client', Request='AbortCurrentUpgrade', Version=1, Params=params) + self.results = [UnitNetworkConfigResult.from_json(o) for o in results or []] - reply = await self.rpc(msg) - return reply +class UnitsNetworkConfig(Type): + _toSchema = {'args': 'args'} + _toPy = {'args': 'args'} + def __init__(self, args=None): + ''' + args : typing.Sequence<+T_co>[~UnitNetworkConfig]<~UnitNetworkConfig> + ''' + self.args = [UnitNetworkConfig.from_json(o) for o in args or []] - @ReturnMapping(None) - async def AddCharm(self, channel, url): +class EntitiesVersion(Type): + _toSchema = {'agent_tools': 'agent-tools'} + _toPy = {'agent-tools': 'agent_tools'} + def __init__(self, agent_tools=None): ''' - channel : str - url : str - Returns -> None + agent_tools : typing.Sequence<+T_co>[~EntityVersion]<~EntityVersion> ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Client', Request='AddCharm', Version=1, Params=params) - params['Channel'] = channel - params['URL'] = url - reply = await self.rpc(msg) - return reply - + self.agent_tools = [EntityVersion.from_json(o) for o in agent_tools or []] - @ReturnMapping(None) - async def AddCharmWithAuthorization(self, channel, charmstoremacaroon, url): +class EntityVersion(Type): + _toSchema = {'tag': 'tag', 'tools': 'tools'} + _toPy = {'tag': 'tag', 'tools': 'tools'} + def __init__(self, tag=None, tools=None): ''' - channel : str - charmstoremacaroon : Macaroon - url : str - Returns -> None + tag : str + tools : Version ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Client', Request='AddCharmWithAuthorization', Version=1, Params=params) - params['Channel'] = channel - params['CharmStoreMacaroon'] = charmstoremacaroon - params['URL'] = url - reply = await self.rpc(msg) - return reply - + self.tag = tag + self.tools = Version.from_json(tools) if tools else None - @ReturnMapping(AddMachinesResults) - async def AddMachines(self, machineparams): +class VersionResult(Type): + _toSchema = {'version': 'version', 'error': 'error'} + _toPy = {'version': 'version', 'error': 'error'} + def __init__(self, error=None, version=None): ''' - machineparams : typing.Sequence[~AddMachineParams] - Returns -> typing.Sequence[~AddMachinesResult] + error : Error + version : Number ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Client', Request='AddMachines', Version=1, Params=params) - params['MachineParams'] = machineparams - reply = await self.rpc(msg) - return reply - + self.error = Error.from_json(error) if error else None + self.version = Number.from_json(version) if version else None - @ReturnMapping(AddMachinesResults) - async def AddMachinesV2(self, machineparams): +class VersionResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): ''' - machineparams : typing.Sequence[~AddMachineParams] - Returns -> typing.Sequence[~AddMachinesResult] + results : typing.Sequence<+T_co>[~VersionResult]<~VersionResult> ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Client', Request='AddMachinesV2', Version=1, Params=params) - params['MachineParams'] = machineparams - reply = await self.rpc(msg) - return reply - + self.results = [VersionResult.from_json(o) for o in results or []] - @ReturnMapping(AgentVersionResult) - async def AgentVersion(self): +class AddUser(Type): + _toSchema = {'display_name': 'display-name', 'username': 'username', 'password': 'password'} + _toPy = {'display-name': 'display_name', 'password': 'password', 'username': 'username'} + def __init__(self, display_name=None, password=None, username=None): ''' - - Returns -> Number + display_name : str + password : str + username : str ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Client', Request='AgentVersion', Version=1, Params=params) + self.display_name = display_name + self.password = password + self.username = username - reply = await self.rpc(msg) - return reply +class AddUserResult(Type): + _toSchema = {'secret_key': 'secret-key', 'tag': 'tag', 'error': 'error'} + _toPy = {'tag': 'tag', 'secret-key': 'secret_key', 'error': 'error'} + def __init__(self, error=None, secret_key=None, tag=None): + ''' + error : Error + secret_key : typing.Sequence<+T_co>[int] + tag : str + ''' + self.error = Error.from_json(error) if error else None + self.secret_key = secret_key + self.tag = tag - @ReturnMapping(CharmInfo) - async def CharmInfo(self, charmurl): +class AddUserResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): ''' - charmurl : str - Returns -> str + results : typing.Sequence<+T_co>[~AddUserResult]<~AddUserResult> ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Client', Request='CharmInfo', Version=1, Params=params) - params['CharmURL'] = charmurl - reply = await self.rpc(msg) - return reply - + self.results = [AddUserResult.from_json(o) for o in results or []] - @ReturnMapping(None) - async def DestroyMachines(self, force, machinenames): +class AddUsers(Type): + _toSchema = {'users': 'users'} + _toPy = {'users': 'users'} + def __init__(self, users=None): ''' - force : bool - machinenames : typing.Sequence[str] - Returns -> None + users : typing.Sequence<+T_co>[~AddUser]<~AddUser> ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Client', Request='DestroyMachines', Version=1, Params=params) - params['Force'] = force - params['MachineNames'] = machinenames - reply = await self.rpc(msg) - return reply + self.users = [AddUser.from_json(o) for o in users or []] +class MacaroonResult(Type): + _toSchema = {'result': 'result', 'error': 'error'} + _toPy = {'result': 'result', 'error': 'error'} + def __init__(self, error=None, result=None): + ''' + error : Error + result : Macaroon + ''' + self.error = Error.from_json(error) if error else None + self.result = Macaroon.from_json(result) if result else None + - @ReturnMapping(None) - async def DestroyModel(self): +class MacaroonResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence<+T_co>[~MacaroonResult]<~MacaroonResult> ''' + self.results = [MacaroonResult.from_json(o) for o in results or []] - Returns -> None + +class UserInfo(Type): + _toSchema = {'display_name': 'display-name', 'username': 'username', 'last_connection': 'last-connection', 'disabled': 'disabled', 'access': 'access', 'created_by': 'created-by', 'date_created': 'date-created'} + _toPy = {'last-connection': 'last_connection', 'username': 'username', 'disabled': 'disabled', 'date-created': 'date_created', 'created-by': 'created_by', 'access': 'access', 'display-name': 'display_name'} + def __init__(self, access=None, created_by=None, date_created=None, disabled=None, display_name=None, last_connection=None, username=None): ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Client', Request='DestroyModel', Version=1, Params=params) + access : str + created_by : str + date_created : str + disabled : bool + display_name : str + last_connection : str + username : str + ''' + self.access = access + self.created_by = created_by + self.date_created = date_created + self.disabled = disabled + self.display_name = display_name + self.last_connection = last_connection + self.username = username - reply = await self.rpc(msg) - return reply +class UserInfoRequest(Type): + _toSchema = {'include_disabled': 'include-disabled', 'entities': 'entities'} + _toPy = {'entities': 'entities', 'include-disabled': 'include_disabled'} + def __init__(self, entities=None, include_disabled=None): + ''' + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + include_disabled : bool + ''' + self.entities = [Entity.from_json(o) for o in entities or []] + self.include_disabled = include_disabled - @ReturnMapping(FindToolsResult) - async def FindTools(self, arch, majorversion, minorversion, number, series): +class UserInfoResult(Type): + _toSchema = {'result': 'result', 'error': 'error'} + _toPy = {'result': 'result', 'error': 'error'} + def __init__(self, error=None, result=None): ''' - arch : str - majorversion : int - minorversion : int - number : Number - series : str - Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[~Tools]] + error : Error + result : UserInfo ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Client', Request='FindTools', Version=1, Params=params) - params['Arch'] = arch - params['MajorVersion'] = majorversion - params['MinorVersion'] = minorversion - params['Number'] = number - params['Series'] = series - reply = await self.rpc(msg) - return reply + self.error = Error.from_json(error) if error else None + self.result = UserInfo.from_json(result) if result else None + +class UserInfoResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence<+T_co>[~UserInfoResult]<~UserInfoResult> + ''' + self.results = [UserInfoResult.from_json(o) for o in results or []] - @ReturnMapping(FullStatus) - async def FullStatus(self, patterns): +class ActionFacade(Type): + name = 'Action' + version = 2 + schema = {'definitions': {'Action': {'additionalProperties': False, + 'properties': {'name': {'type': 'string'}, + 'parameters': {'patternProperties': {'.*': {'additionalProperties': True, + 'type': 'object'}}, + 'type': 'object'}, + 'receiver': {'type': 'string'}, + 'tag': {'type': 'string'}}, + 'required': ['tag', 'receiver', 'name'], + 'type': 'object'}, + 'ActionResult': {'additionalProperties': False, + 'properties': {'action': {'$ref': '#/definitions/Action'}, + 'completed': {'format': 'date-time', + 'type': 'string'}, + 'enqueued': {'format': 'date-time', + 'type': 'string'}, + 'error': {'$ref': '#/definitions/Error'}, + 'message': {'type': 'string'}, + 'output': {'patternProperties': {'.*': {'additionalProperties': True, + 'type': 'object'}}, + 'type': 'object'}, + 'started': {'format': 'date-time', + 'type': 'string'}, + 'status': {'type': 'string'}}, + 'type': 'object'}, + 'ActionResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'}, + 'type': 'array'}}, + 'type': 'object'}, + 'ActionSpec': {'additionalProperties': False, + 'properties': {'description': {'type': 'string'}, + 'params': {'patternProperties': {'.*': {'additionalProperties': True, + 'type': 'object'}}, + 'type': 'object'}}, + 'required': ['description', 'params'], + 'type': 'object'}, + 'Actions': {'additionalProperties': False, + 'properties': {'actions': {'items': {'$ref': '#/definitions/Action'}, + 'type': 'array'}}, + 'type': 'object'}, + 'ActionsByName': {'additionalProperties': False, + 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'}, + 'type': 'array'}, + 'error': {'$ref': '#/definitions/Error'}, + 'name': {'type': 'string'}}, + 'type': 'object'}, + 'ActionsByNames': {'additionalProperties': False, + 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByName'}, + 'type': 'array'}}, + 'type': 'object'}, + 'ActionsByReceiver': {'additionalProperties': False, + 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'}, + 'type': 'array'}, + 'error': {'$ref': '#/definitions/Error'}, + 'receiver': {'type': 'string'}}, + 'type': 'object'}, + 'ActionsByReceivers': {'additionalProperties': False, + 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByReceiver'}, + 'type': 'array'}}, + 'type': 'object'}, + 'ApplicationCharmActionsResult': {'additionalProperties': False, + 'properties': {'actions': {'patternProperties': {'.*': {'$ref': '#/definitions/ActionSpec'}}, + 'type': 'object'}, + 'application-tag': {'type': 'string'}, + 'error': {'$ref': '#/definitions/Error'}}, + 'type': 'object'}, + 'ApplicationsCharmActionsResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/ApplicationCharmActionsResult'}, + 'type': 'array'}}, + 'type': 'object'}, + 'Entities': {'additionalProperties': False, + 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, + 'type': 'array'}}, + 'required': ['entities'], + 'type': 'object'}, + 'Entity': {'additionalProperties': False, + 'properties': {'tag': {'type': 'string'}}, + 'required': ['tag'], + 'type': 'object'}, + 'Error': {'additionalProperties': False, + 'properties': {'code': {'type': 'string'}, + 'info': {'$ref': '#/definitions/ErrorInfo'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], + 'type': 'object'}, + 'ErrorInfo': {'additionalProperties': False, + 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'macaroon-path': {'type': 'string'}}, + 'type': 'object'}, + 'FindActionsByNames': {'additionalProperties': False, + 'properties': {'names': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'type': 'object'}, + 'FindTags': {'additionalProperties': False, + 'properties': {'prefixes': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'required': ['prefixes'], + 'type': 'object'}, + 'FindTagsResults': {'additionalProperties': False, + 'properties': {'matches': {'patternProperties': {'.*': {'items': {'$ref': '#/definitions/Entity'}, + 'type': 'array'}}, + 'type': 'object'}}, + 'required': ['matches'], + 'type': 'object'}, + 'Macaroon': {'additionalProperties': False, 'type': 'object'}, + 'RunParams': {'additionalProperties': False, + 'properties': {'applications': {'items': {'type': 'string'}, + 'type': 'array'}, + 'commands': {'type': 'string'}, + 'machines': {'items': {'type': 'string'}, + 'type': 'array'}, + 'timeout': {'type': 'integer'}, + 'units': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'required': ['commands', 'timeout'], + 'type': 'object'}}, + 'properties': {'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/ActionResults'}}, + 'type': 'object'}, + 'ApplicationsCharmsActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/ApplicationsCharmActionsResults'}}, + 'type': 'object'}, + 'Cancel': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/ActionResults'}}, + 'type': 'object'}, + 'Enqueue': {'properties': {'Params': {'$ref': '#/definitions/Actions'}, + 'Result': {'$ref': '#/definitions/ActionResults'}}, + 'type': 'object'}, + 'FindActionTagsByPrefix': {'properties': {'Params': {'$ref': '#/definitions/FindTags'}, + 'Result': {'$ref': '#/definitions/FindTagsResults'}}, + 'type': 'object'}, + 'FindActionsByNames': {'properties': {'Params': {'$ref': '#/definitions/FindActionsByNames'}, + 'Result': {'$ref': '#/definitions/ActionsByNames'}}, + 'type': 'object'}, + 'ListAll': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/ActionsByReceivers'}}, + 'type': 'object'}, + 'ListCompleted': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/ActionsByReceivers'}}, + 'type': 'object'}, + 'ListPending': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/ActionsByReceivers'}}, + 'type': 'object'}, + 'ListRunning': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/ActionsByReceivers'}}, + 'type': 'object'}, + 'Run': {'properties': {'Params': {'$ref': '#/definitions/RunParams'}, + 'Result': {'$ref': '#/definitions/ActionResults'}}, + 'type': 'object'}, + 'RunOnAllMachines': {'properties': {'Params': {'$ref': '#/definitions/RunParams'}, + 'Result': {'$ref': '#/definitions/ActionResults'}}, + 'type': 'object'}}, + 'type': 'object'} + + + @ReturnMapping(ActionResults) + async def Actions(self, entities): ''' - patterns : typing.Sequence[str] - Returns -> typing.Union[typing.Sequence[~RelationStatus], typing.Mapping[str, ~ServiceStatus]] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~ActionResult]<~ActionResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Client', Request='FullStatus', Version=1, Params=params) - params['Patterns'] = patterns + msg = dict(type='Action', request='Actions', version=2, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply - @ReturnMapping(GetBundleChangesResults) - async def GetBundleChanges(self, yaml): + @ReturnMapping(ApplicationsCharmActionsResults) + async def ApplicationsCharmsActions(self, entities): ''' - yaml : str - Returns -> typing.Sequence[~BundleChangesChange] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~ApplicationCharmActionsResult]<~ApplicationCharmActionsResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Client', Request='GetBundleChanges', Version=1, Params=params) - params['yaml'] = yaml + msg = dict(type='Action', request='ApplicationsCharmsActions', version=2, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply - @ReturnMapping(GetConstraintsResults) - async def GetModelConstraints(self): + @ReturnMapping(ActionResults) + async def Cancel(self, entities): ''' - - Returns -> Value + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~ActionResult]<~ActionResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Client', Request='GetModelConstraints', Version=1, Params=params) - + msg = dict(type='Action', request='Cancel', version=2, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply - @ReturnMapping(AddMachinesResults) - async def InjectMachines(self, machineparams): + @ReturnMapping(ActionResults) + async def Enqueue(self, actions): ''' - machineparams : typing.Sequence[~AddMachineParams] - Returns -> typing.Sequence[~AddMachinesResult] + actions : typing.Sequence<+T_co>[~Action]<~Action> + Returns -> typing.Sequence<+T_co>[~ActionResult]<~ActionResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Client', Request='InjectMachines', Version=1, Params=params) - params['MachineParams'] = machineparams + msg = dict(type='Action', request='Enqueue', version=2, params=params) + params['actions'] = actions reply = await self.rpc(msg) return reply - @ReturnMapping(ModelConfigResults) - async def ModelGet(self): + @ReturnMapping(FindTagsResults) + async def FindActionTagsByPrefix(self, prefixes): ''' - - Returns -> typing.Mapping[str, typing.Any] + prefixes : typing.Sequence<+T_co>[str] + Returns -> typing.Sequence<+T_co>[~Entity]<~Entity> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Client', Request='ModelGet', Version=1, Params=params) - + msg = dict(type='Action', request='FindActionTagsByPrefix', version=2, params=params) + params['prefixes'] = prefixes reply = await self.rpc(msg) return reply - @ReturnMapping(ModelInfo) - async def ModelInfo(self): + @ReturnMapping(ActionsByNames) + async def FindActionsByNames(self, names): ''' - - Returns -> typing.Union[_ForwardRef('EntityStatus'), typing.Sequence[~ModelUserInfo]] + names : typing.Sequence<+T_co>[str] + Returns -> typing.Sequence<+T_co>[~ActionsByName]<~ActionsByName> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Client', Request='ModelInfo', Version=1, Params=params) - + msg = dict(type='Action', request='FindActionsByNames', version=2, params=params) + params['names'] = names reply = await self.rpc(msg) return reply - @ReturnMapping(None) - async def ModelSet(self, config): + @ReturnMapping(ActionsByReceivers) + async def ListAll(self, entities): ''' - config : typing.Mapping[str, typing.Any] - Returns -> None + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~ActionsByReceiver]<~ActionsByReceiver> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Client', Request='ModelSet', Version=1, Params=params) - params['Config'] = config + msg = dict(type='Action', request='ListAll', version=2, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply - @ReturnMapping(None) - async def ModelUnset(self, keys): + @ReturnMapping(ActionsByReceivers) + async def ListCompleted(self, entities): ''' - keys : typing.Sequence[str] - Returns -> None + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~ActionsByReceiver]<~ActionsByReceiver> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Client', Request='ModelUnset', Version=1, Params=params) - params['Keys'] = keys + msg = dict(type='Action', request='ListCompleted', version=2, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply - @ReturnMapping(ModelUserInfoResults) - async def ModelUserInfo(self): + @ReturnMapping(ActionsByReceivers) + async def ListPending(self, entities): ''' - - Returns -> typing.Sequence[~ModelUserInfoResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~ActionsByReceiver]<~ActionsByReceiver> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Client', Request='ModelUserInfo', Version=1, Params=params) - + msg = dict(type='Action', request='ListPending', version=2, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply - @ReturnMapping(PrivateAddressResults) - async def PrivateAddress(self, target): + @ReturnMapping(ActionsByReceivers) + async def ListRunning(self, entities): ''' - target : str - Returns -> str + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~ActionsByReceiver]<~ActionsByReceiver> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Client', Request='PrivateAddress', Version=1, Params=params) - params['Target'] = target + msg = dict(type='Action', request='ListRunning', version=2, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply - @ReturnMapping(ProvisioningScriptResult) - async def ProvisioningScript(self, datadir, disablepackagecommands, machineid, nonce): + @ReturnMapping(ActionResults) + async def Run(self, applications, commands, machines, timeout, units): ''' - datadir : str - disablepackagecommands : bool - machineid : str - nonce : str - Returns -> str + applications : typing.Sequence<+T_co>[str] + commands : str + machines : typing.Sequence<+T_co>[str] + timeout : int + units : typing.Sequence<+T_co>[str] + Returns -> typing.Sequence<+T_co>[~ActionResult]<~ActionResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Client', Request='ProvisioningScript', Version=1, Params=params) - params['DataDir'] = datadir - params['DisablePackageCommands'] = disablepackagecommands - params['MachineId'] = machineid - params['Nonce'] = nonce + msg = dict(type='Action', request='Run', version=2, params=params) + params['applications'] = applications + params['commands'] = commands + params['machines'] = machines + params['timeout'] = timeout + params['units'] = units reply = await self.rpc(msg) return reply - @ReturnMapping(PublicAddressResults) - async def PublicAddress(self, target): + @ReturnMapping(ActionResults) + async def RunOnAllMachines(self, applications, commands, machines, timeout, units): ''' - target : str - Returns -> str + applications : typing.Sequence<+T_co>[str] + commands : str + machines : typing.Sequence<+T_co>[str] + timeout : int + units : typing.Sequence<+T_co>[str] + Returns -> typing.Sequence<+T_co>[~ActionResult]<~ActionResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Client', Request='PublicAddress', Version=1, Params=params) - params['Target'] = target + msg = dict(type='Action', request='RunOnAllMachines', version=2, params=params) + params['applications'] = applications + params['commands'] = commands + params['machines'] = machines + params['timeout'] = timeout + params['units'] = units reply = await self.rpc(msg) return reply +class AgentFacade(Type): + name = 'Agent' + version = 2 + schema = {'definitions': {'AgentGetEntitiesResult': {'additionalProperties': False, + 'properties': {'container-type': {'type': 'string'}, + 'error': {'$ref': '#/definitions/Error'}, + 'jobs': {'items': {'type': 'string'}, + 'type': 'array'}, + 'life': {'type': 'string'}}, + 'required': ['life', + 'jobs', + 'container-type'], + 'type': 'object'}, + 'AgentGetEntitiesResults': {'additionalProperties': False, + 'properties': {'entities': {'items': {'$ref': '#/definitions/AgentGetEntitiesResult'}, + 'type': 'array'}}, + 'required': ['entities'], + 'type': 'object'}, + 'CloudCredential': {'additionalProperties': False, + 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}}, + 'type': 'object'}, + 'auth-type': {'type': 'string'}, + 'redacted': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'required': ['auth-type'], + 'type': 'object'}, + 'CloudSpec': {'additionalProperties': False, + 'properties': {'credential': {'$ref': '#/definitions/CloudCredential'}, + 'endpoint': {'type': 'string'}, + 'identity-endpoint': {'type': 'string'}, + 'name': {'type': 'string'}, + 'region': {'type': 'string'}, + 'storage-endpoint': {'type': 'string'}, + 'type': {'type': 'string'}}, + 'required': ['type', 'name'], + 'type': 'object'}, + 'CloudSpecResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'$ref': '#/definitions/CloudSpec'}}, + 'type': 'object'}, + 'CloudSpecResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/CloudSpecResult'}, + 'type': 'array'}}, + 'type': 'object'}, + 'ControllerConfigResult': {'additionalProperties': False, + 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True, + 'type': 'object'}}, + 'type': 'object'}}, + 'required': ['config'], + 'type': 'object'}, + 'Entities': {'additionalProperties': False, + 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, + 'type': 'array'}}, + 'required': ['entities'], + 'type': 'object'}, + 'Entity': {'additionalProperties': False, + 'properties': {'tag': {'type': 'string'}}, + 'required': ['tag'], + 'type': 'object'}, + 'EntityPassword': {'additionalProperties': False, + 'properties': {'password': {'type': 'string'}, + 'tag': {'type': 'string'}}, + 'required': ['tag', 'password'], + 'type': 'object'}, + 'EntityPasswords': {'additionalProperties': False, + 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'}, + 'type': 'array'}}, + 'required': ['changes'], + 'type': 'object'}, + 'Error': {'additionalProperties': False, + 'properties': {'code': {'type': 'string'}, + 'info': {'$ref': '#/definitions/ErrorInfo'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], + 'type': 'object'}, + 'ErrorInfo': {'additionalProperties': False, + 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'macaroon-path': {'type': 'string'}}, + 'type': 'object'}, + 'ErrorResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}}, + 'type': 'object'}, + 'ErrorResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'IsMasterResult': {'additionalProperties': False, + 'properties': {'master': {'type': 'boolean'}}, + 'required': ['master'], + 'type': 'object'}, + 'Macaroon': {'additionalProperties': False, 'type': 'object'}, + 'ModelConfigResult': {'additionalProperties': False, + 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True, + 'type': 'object'}}, + 'type': 'object'}}, + 'required': ['config'], + 'type': 'object'}, + 'NotifyWatchResult': {'additionalProperties': False, + 'properties': {'NotifyWatcherId': {'type': 'string'}, + 'error': {'$ref': '#/definitions/Error'}}, + 'required': ['NotifyWatcherId'], + 'type': 'object'}, + 'StateServingInfo': {'additionalProperties': False, + 'properties': {'api-port': {'type': 'integer'}, + 'ca-private-key': {'type': 'string'}, + 'cert': {'type': 'string'}, + 'private-key': {'type': 'string'}, + 'shared-secret': {'type': 'string'}, + 'state-port': {'type': 'integer'}, + 'system-identity': {'type': 'string'}}, + 'required': ['api-port', + 'state-port', + 'cert', + 'private-key', + 'ca-private-key', + 'shared-secret', + 'system-identity'], + 'type': 'object'}}, + 'properties': {'ClearReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'CloudSpec': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/CloudSpecResults'}}, + 'type': 'object'}, + 'ControllerConfig': {'properties': {'Result': {'$ref': '#/definitions/ControllerConfigResult'}}, + 'type': 'object'}, + 'GetEntities': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/AgentGetEntitiesResults'}}, + 'type': 'object'}, + 'IsMaster': {'properties': {'Result': {'$ref': '#/definitions/IsMasterResult'}}, + 'type': 'object'}, + 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}}, + 'type': 'object'}, + 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'StateServingInfo': {'properties': {'Result': {'$ref': '#/definitions/StateServingInfo'}}, + 'type': 'object'}, + 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, + 'type': 'object'}}, + 'type': 'object'} + - @ReturnMapping(ResolveCharmResults) - async def ResolveCharms(self, references): + @ReturnMapping(ErrorResults) + async def ClearReboot(self, entities): ''' - references : typing.Sequence[~URL] - Returns -> typing.Sequence[~ResolveCharmResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Client', Request='ResolveCharms', Version=1, Params=params) - params['References'] = references + msg = dict(type='Agent', request='ClearReboot', version=2, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply - @ReturnMapping(None) - async def Resolved(self, retry, unitname): + @ReturnMapping(CloudSpecResults) + async def CloudSpec(self, entities): ''' - retry : bool - unitname : str - Returns -> None + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~CloudSpecResult]<~CloudSpecResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Client', Request='Resolved', Version=1, Params=params) - params['Retry'] = retry - params['UnitName'] = unitname + msg = dict(type='Agent', request='CloudSpec', version=2, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply - @ReturnMapping(ErrorResults) - async def RetryProvisioning(self, entities): + @ReturnMapping(ControllerConfigResult) + async def ControllerConfig(self): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ErrorResult] + + Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any] ''' # map input types to rpc msg params = dict() - msg = dict(Type='Client', Request='RetryProvisioning', Version=1, Params=params) - params['Entities'] = entities + msg = dict(type='Agent', request='ControllerConfig', version=2, params=params) + reply = await self.rpc(msg) return reply - @ReturnMapping(None) - async def SetModelAgentVersion(self, build, major, minor, patch, tag): + @ReturnMapping(AgentGetEntitiesResults) + async def GetEntities(self, entities): ''' - build : int - major : int - minor : int - patch : int - tag : str - Returns -> None + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~AgentGetEntitiesResult]<~AgentGetEntitiesResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Client', Request='SetModelAgentVersion', Version=1, Params=params) - params['Build'] = build - params['Major'] = major - params['Minor'] = minor - params['Patch'] = patch - params['Tag'] = tag + msg = dict(type='Agent', request='GetEntities', version=2, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply - @ReturnMapping(None) - async def SetModelConstraints(self, constraints, servicename): + @ReturnMapping(IsMasterResult) + async def IsMaster(self): ''' - constraints : Value - servicename : str - Returns -> None + + Returns -> bool ''' # map input types to rpc msg params = dict() - msg = dict(Type='Client', Request='SetModelConstraints', Version=1, Params=params) - params['Constraints'] = constraints - params['ServiceName'] = servicename + msg = dict(type='Agent', request='IsMaster', version=2, params=params) + reply = await self.rpc(msg) return reply - @ReturnMapping(StatusHistoryResults) - async def StatusHistory(self, kind, name, size): + @ReturnMapping(ModelConfigResult) + async def ModelConfig(self): ''' - kind : str - name : str - size : int - Returns -> typing.Sequence[~DetailedStatus] + + Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any] ''' # map input types to rpc msg params = dict() - msg = dict(Type='Client', Request='StatusHistory', Version=1, Params=params) - params['Kind'] = kind - params['Name'] = name - params['Size'] = size + msg = dict(type='Agent', request='ModelConfig', version=2, params=params) + reply = await self.rpc(msg) return reply - @ReturnMapping(AllWatcherId) - async def WatchAll(self): + @ReturnMapping(ErrorResults) + async def SetPasswords(self, changes): ''' - - Returns -> str + changes : typing.Sequence<+T_co>[~EntityPassword]<~EntityPassword> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Client', Request='WatchAll', Version=1, Params=params) - + msg = dict(type='Agent', request='SetPasswords', version=2, params=params) + params['changes'] = changes reply = await self.rpc(msg) return reply -class Controller(Type): - name = 'Controller' - version = 2 - schema = {'definitions': {'AllWatcherId': {'additionalProperties': False, - 'properties': {'AllWatcherId': {'type': 'string'}}, - 'required': ['AllWatcherId'], - 'type': 'object'}, - 'DestroyControllerArgs': {'additionalProperties': False, - 'properties': {'destroy-models': {'type': 'boolean'}}, - 'required': ['destroy-models'], - 'type': 'object'}, - 'Entities': {'additionalProperties': False, - 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'}, - 'type': 'array'}}, - 'required': ['Entities'], - 'type': 'object'}, - 'Entity': {'additionalProperties': False, - 'properties': {'Tag': {'type': 'string'}}, - 'required': ['Tag'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'Code': {'type': 'string'}, - 'Info': {'$ref': '#/definitions/ErrorInfo'}, - 'Message': {'type': 'string'}}, - 'required': ['Message', 'Code'], - 'type': 'object'}, - 'ErrorInfo': {'additionalProperties': False, - 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'}, - 'MacaroonPath': {'type': 'string'}}, - 'type': 'object'}, - 'InitiateModelMigrationArgs': {'additionalProperties': False, - 'properties': {'specs': {'items': {'$ref': '#/definitions/ModelMigrationSpec'}, - 'type': 'array'}}, - 'required': ['specs'], - 'type': 'object'}, - 'InitiateModelMigrationResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'id': {'type': 'string'}, - 'model-tag': {'type': 'string'}}, - 'required': ['model-tag', - 'error', - 'id'], - 'type': 'object'}, - 'InitiateModelMigrationResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/InitiateModelMigrationResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, - 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'}, - 'type': 'array'}, - 'data': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'id': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'sig': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['data', - 'location', - 'id', - 'caveats', - 'sig'], - 'type': 'object'}, - 'Model': {'additionalProperties': False, - 'properties': {'Name': {'type': 'string'}, - 'OwnerTag': {'type': 'string'}, - 'UUID': {'type': 'string'}}, - 'required': ['Name', 'UUID', 'OwnerTag'], - 'type': 'object'}, - 'ModelBlockInfo': {'additionalProperties': False, - 'properties': {'blocks': {'items': {'type': 'string'}, - 'type': 'array'}, - 'model-uuid': {'type': 'string'}, - 'name': {'type': 'string'}, - 'owner-tag': {'type': 'string'}}, - 'required': ['name', - 'model-uuid', - 'owner-tag', - 'blocks'], - 'type': 'object'}, - 'ModelBlockInfoList': {'additionalProperties': False, - 'properties': {'models': {'items': {'$ref': '#/definitions/ModelBlockInfo'}, - 'type': 'array'}}, - 'type': 'object'}, - 'ModelConfigResults': {'additionalProperties': False, - 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}}, - 'required': ['Config'], - 'type': 'object'}, - 'ModelMigrationSpec': {'additionalProperties': False, - 'properties': {'model-tag': {'type': 'string'}, - 'target-info': {'$ref': '#/definitions/ModelMigrationTargetInfo'}}, - 'required': ['model-tag', - 'target-info'], - 'type': 'object'}, - 'ModelMigrationTargetInfo': {'additionalProperties': False, - 'properties': {'addrs': {'items': {'type': 'string'}, - 'type': 'array'}, - 'auth-tag': {'type': 'string'}, - 'ca-cert': {'type': 'string'}, - 'controller-tag': {'type': 'string'}, - 'password': {'type': 'string'}}, - 'required': ['controller-tag', - 'addrs', - 'ca-cert', - 'auth-tag', - 'password'], - 'type': 'object'}, - 'ModelStatus': {'additionalProperties': False, - 'properties': {'hosted-machine-count': {'type': 'integer'}, - 'life': {'type': 'string'}, - 'model-tag': {'type': 'string'}, - 'owner-tag': {'type': 'string'}, - 'service-count': {'type': 'integer'}}, - 'required': ['model-tag', - 'life', - 'hosted-machine-count', - 'service-count', - 'owner-tag'], - 'type': 'object'}, - 'ModelStatusResults': {'additionalProperties': False, - 'properties': {'models': {'items': {'$ref': '#/definitions/ModelStatus'}, - 'type': 'array'}}, - 'required': ['models'], - 'type': 'object'}, - 'RemoveBlocksArgs': {'additionalProperties': False, - 'properties': {'all': {'type': 'boolean'}}, - 'required': ['all'], - 'type': 'object'}, - 'UserModel': {'additionalProperties': False, - 'properties': {'LastConnection': {'format': 'date-time', - 'type': 'string'}, - 'Model': {'$ref': '#/definitions/Model'}}, - 'required': ['Model', 'LastConnection'], - 'type': 'object'}, - 'UserModelList': {'additionalProperties': False, - 'properties': {'UserModels': {'items': {'$ref': '#/definitions/UserModel'}, - 'type': 'array'}}, - 'required': ['UserModels'], - 'type': 'object'}, - 'caveat': {'additionalProperties': False, - 'properties': {'caveatId': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'verificationId': {'$ref': '#/definitions/packet'}}, - 'required': ['location', - 'caveatId', - 'verificationId'], - 'type': 'object'}, - 'packet': {'additionalProperties': False, - 'properties': {'headerLen': {'type': 'integer'}, - 'start': {'type': 'integer'}, - 'totalLen': {'type': 'integer'}}, - 'required': ['start', 'totalLen', 'headerLen'], - 'type': 'object'}}, - 'properties': {'AllModels': {'properties': {'Result': {'$ref': '#/definitions/UserModelList'}}, - 'type': 'object'}, - 'DestroyController': {'properties': {'Params': {'$ref': '#/definitions/DestroyControllerArgs'}}, - 'type': 'object'}, - 'InitiateModelMigration': {'properties': {'Params': {'$ref': '#/definitions/InitiateModelMigrationArgs'}, - 'Result': {'$ref': '#/definitions/InitiateModelMigrationResults'}}, - 'type': 'object'}, - 'ListBlockedModels': {'properties': {'Result': {'$ref': '#/definitions/ModelBlockInfoList'}}, - 'type': 'object'}, - 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}}, - 'type': 'object'}, - 'ModelStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ModelStatusResults'}}, - 'type': 'object'}, - 'RemoveBlocks': {'properties': {'Params': {'$ref': '#/definitions/RemoveBlocksArgs'}}, - 'type': 'object'}, - 'WatchAllModels': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherId'}}, - 'type': 'object'}}, - 'type': 'object'} - - @ReturnMapping(UserModelList) - async def AllModels(self): + @ReturnMapping(StateServingInfo) + async def StateServingInfo(self): ''' - Returns -> typing.Sequence[~UserModel] + Returns -> typing.Union[int, str] ''' # map input types to rpc msg params = dict() - msg = dict(Type='Controller', Request='AllModels', Version=2, Params=params) + msg = dict(type='Agent', request='StateServingInfo', version=2, params=params) reply = await self.rpc(msg) return reply - @ReturnMapping(None) - async def DestroyController(self, destroy_models): + @ReturnMapping(NotifyWatchResult) + async def WatchForModelConfigChanges(self): ''' - destroy_models : bool - Returns -> None + + Returns -> typing.Union[str, _ForwardRef('Error')] ''' # map input types to rpc msg params = dict() - msg = dict(Type='Controller', Request='DestroyController', Version=2, Params=params) - params['destroy-models'] = destroy_models - reply = await self.rpc(msg) - return reply - - + msg = dict(type='Agent', request='WatchForModelConfigChanges', version=2, params=params) - @ReturnMapping(InitiateModelMigrationResults) - async def InitiateModelMigration(self, specs): - ''' - specs : typing.Sequence[~ModelMigrationSpec] - Returns -> typing.Sequence[~InitiateModelMigrationResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Controller', Request='InitiateModelMigration', Version=2, Params=params) - params['specs'] = specs reply = await self.rpc(msg) return reply +class AgentToolsFacade(Type): + name = 'AgentTools' + version = 1 + schema = {'properties': {'UpdateToolsAvailable': {'type': 'object'}}, 'type': 'object'} + - @ReturnMapping(ModelBlockInfoList) - async def ListBlockedModels(self): + @ReturnMapping(None) + async def UpdateToolsAvailable(self): ''' - Returns -> typing.Sequence[~ModelBlockInfo] + Returns -> None ''' # map input types to rpc msg params = dict() - msg = dict(Type='Controller', Request='ListBlockedModels', Version=2, Params=params) + msg = dict(type='AgentTools', request='UpdateToolsAvailable', version=1, params=params) reply = await self.rpc(msg) return reply +class AllModelWatcherFacade(Type): + name = 'AllModelWatcher' + version = 2 + schema = {'definitions': {'AllWatcherNextResults': {'additionalProperties': False, + 'properties': {'deltas': {'items': {'$ref': '#/definitions/Delta'}, + 'type': 'array'}}, + 'required': ['deltas'], + 'type': 'object'}, + 'Delta': {'additionalProperties': False, + 'properties': {'entity': {'additionalProperties': True, + 'type': 'object'}, + 'removed': {'type': 'boolean'}}, + 'required': ['removed', 'entity'], + 'type': 'object'}}, + 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherNextResults'}}, + 'type': 'object'}, + 'Stop': {'type': 'object'}}, + 'type': 'object'} + - @ReturnMapping(ModelConfigResults) - async def ModelConfig(self): + @ReturnMapping(AllWatcherNextResults) + async def Next(self): ''' - Returns -> typing.Mapping[str, typing.Any] + Returns -> typing.Sequence<+T_co>[~Delta]<~Delta> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Controller', Request='ModelConfig', Version=2, Params=params) + msg = dict(type='AllModelWatcher', request='Next', version=2, params=params) reply = await self.rpc(msg) return reply - @ReturnMapping(ModelStatusResults) - async def ModelStatus(self, entities): + @ReturnMapping(None) + async def Stop(self): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ModelStatus] + + Returns -> None ''' # map input types to rpc msg params = dict() - msg = dict(Type='Controller', Request='ModelStatus', Version=2, Params=params) - params['Entities'] = entities + msg = dict(type='AllModelWatcher', request='Stop', version=2, params=params) + reply = await self.rpc(msg) return reply +class AllWatcherFacade(Type): + name = 'AllWatcher' + version = 1 + schema = {'definitions': {'AllWatcherNextResults': {'additionalProperties': False, + 'properties': {'deltas': {'items': {'$ref': '#/definitions/Delta'}, + 'type': 'array'}}, + 'required': ['deltas'], + 'type': 'object'}, + 'Delta': {'additionalProperties': False, + 'properties': {'entity': {'additionalProperties': True, + 'type': 'object'}, + 'removed': {'type': 'boolean'}}, + 'required': ['removed', 'entity'], + 'type': 'object'}}, + 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherNextResults'}}, + 'type': 'object'}, + 'Stop': {'type': 'object'}}, + 'type': 'object'} + - @ReturnMapping(None) - async def RemoveBlocks(self, all_): + @ReturnMapping(AllWatcherNextResults) + async def Next(self): ''' - all_ : bool - Returns -> None + + Returns -> typing.Sequence<+T_co>[~Delta]<~Delta> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Controller', Request='RemoveBlocks', Version=2, Params=params) - params['all'] = all_ + msg = dict(type='AllWatcher', request='Next', version=1, params=params) + reply = await self.rpc(msg) return reply - @ReturnMapping(AllWatcherId) - async def WatchAllModels(self): + @ReturnMapping(None) + async def Stop(self): ''' - Returns -> str + Returns -> None ''' # map input types to rpc msg params = dict() - msg = dict(Type='Controller', Request='WatchAllModels', Version=2, Params=params) + msg = dict(type='AllWatcher', request='Stop', version=1, params=params) reply = await self.rpc(msg) return reply -class Deployer(Type): - name = 'Deployer' - version = 1 - schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False, - 'properties': {'Servers': {'items': {'items': {'$ref': '#/definitions/HostPort'}, - 'type': 'array'}, +class AnnotationsFacade(Type): + name = 'Annotations' + version = 2 + schema = {'definitions': {'AnnotationsGetResult': {'additionalProperties': False, + 'properties': {'annotations': {'patternProperties': {'.*': {'type': 'string'}}, + 'type': 'object'}, + 'entity': {'type': 'string'}, + 'error': {'$ref': '#/definitions/ErrorResult'}}, + 'required': ['entity', 'annotations'], + 'type': 'object'}, + 'AnnotationsGetResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/AnnotationsGetResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'AnnotationsSet': {'additionalProperties': False, + 'properties': {'annotations': {'items': {'$ref': '#/definitions/EntityAnnotations'}, 'type': 'array'}}, - 'required': ['Servers'], - 'type': 'object'}, - 'Address': {'additionalProperties': False, - 'properties': {'Scope': {'type': 'string'}, - 'SpaceName': {'type': 'string'}, - 'Type': {'type': 'string'}, - 'Value': {'type': 'string'}}, - 'required': ['Value', 'Type', 'Scope'], - 'type': 'object'}, - 'BytesResult': {'additionalProperties': False, - 'properties': {'Result': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['Result'], - 'type': 'object'}, - 'DeployerConnectionValues': {'additionalProperties': False, - 'properties': {'APIAddresses': {'items': {'type': 'string'}, - 'type': 'array'}, - 'StateAddresses': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['StateAddresses', - 'APIAddresses'], - 'type': 'object'}, + 'required': ['annotations'], + 'type': 'object'}, 'Entities': {'additionalProperties': False, - 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'}, + 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, 'type': 'array'}}, - 'required': ['Entities'], + 'required': ['entities'], 'type': 'object'}, 'Entity': {'additionalProperties': False, - 'properties': {'Tag': {'type': 'string'}}, - 'required': ['Tag'], + 'properties': {'tag': {'type': 'string'}}, + 'required': ['tag'], 'type': 'object'}, - 'EntityPassword': {'additionalProperties': False, - 'properties': {'Password': {'type': 'string'}, - 'Tag': {'type': 'string'}}, - 'required': ['Tag', 'Password'], - 'type': 'object'}, - 'EntityPasswords': {'additionalProperties': False, - 'properties': {'Changes': {'items': {'$ref': '#/definitions/EntityPassword'}, - 'type': 'array'}}, - 'required': ['Changes'], - 'type': 'object'}, + 'EntityAnnotations': {'additionalProperties': False, + 'properties': {'annotations': {'patternProperties': {'.*': {'type': 'string'}}, + 'type': 'object'}, + 'entity': {'type': 'string'}}, + 'required': ['entity', 'annotations'], + 'type': 'object'}, 'Error': {'additionalProperties': False, - 'properties': {'Code': {'type': 'string'}, - 'Info': {'$ref': '#/definitions/ErrorInfo'}, - 'Message': {'type': 'string'}}, - 'required': ['Message', 'Code'], + 'properties': {'code': {'type': 'string'}, + 'info': {'$ref': '#/definitions/ErrorInfo'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], 'type': 'object'}, 'ErrorInfo': {'additionalProperties': False, - 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'}, - 'MacaroonPath': {'type': 'string'}}, + 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'macaroon-path': {'type': 'string'}}, 'type': 'object'}, 'ErrorResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}}, - 'required': ['Error'], + 'properties': {'error': {'$ref': '#/definitions/Error'}}, 'type': 'object'}, 'ErrorResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'}, + 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'HostPort': {'additionalProperties': False, - 'properties': {'Address': {'$ref': '#/definitions/Address'}, - 'Port': {'type': 'integer'}}, - 'required': ['Address', 'Port'], - 'type': 'object'}, - 'LifeResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Life': {'type': 'string'}}, - 'required': ['Life', 'Error'], - 'type': 'object'}, - 'LifeResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/LifeResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, - 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'}, - 'type': 'array'}, - 'data': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'id': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'sig': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['data', - 'location', - 'id', - 'caveats', - 'sig'], - 'type': 'object'}, - 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'NotifyWatcherId': {'type': 'string'}}, - 'required': ['NotifyWatcherId', 'Error'], - 'type': 'object'}, - 'StringResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Result': {'type': 'string'}}, - 'required': ['Error', 'Result'], + 'required': ['results'], 'type': 'object'}, - 'StringsResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Result': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['Error', 'Result'], - 'type': 'object'}, - 'StringsWatchResult': {'additionalProperties': False, - 'properties': {'Changes': {'items': {'type': 'string'}, - 'type': 'array'}, - 'Error': {'$ref': '#/definitions/Error'}, - 'StringsWatcherId': {'type': 'string'}}, - 'required': ['StringsWatcherId', - 'Changes', - 'Error'], - 'type': 'object'}, - 'StringsWatchResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsWatchResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'caveat': {'additionalProperties': False, - 'properties': {'caveatId': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'verificationId': {'$ref': '#/definitions/packet'}}, - 'required': ['location', - 'caveatId', - 'verificationId'], - 'type': 'object'}, - 'packet': {'additionalProperties': False, - 'properties': {'headerLen': {'type': 'integer'}, - 'start': {'type': 'integer'}, - 'totalLen': {'type': 'integer'}}, - 'required': ['start', 'totalLen', 'headerLen'], - 'type': 'object'}}, - 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}}, - 'type': 'object'}, - 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}}, - 'type': 'object'}, - 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}}, - 'type': 'object'}, - 'ConnectionInfo': {'properties': {'Result': {'$ref': '#/definitions/DeployerConnectionValues'}}, - 'type': 'object'}, - 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/LifeResults'}}, - 'type': 'object'}, - 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}}, - 'type': 'object'}, - 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'StateAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}}, - 'type': 'object'}, - 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, - 'type': 'object'}, - 'WatchUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, - 'type': 'object'}}, + 'Macaroon': {'additionalProperties': False, 'type': 'object'}}, + 'properties': {'Get': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/AnnotationsGetResults'}}, + 'type': 'object'}, + 'Set': {'properties': {'Params': {'$ref': '#/definitions/AnnotationsSet'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}}, 'type': 'object'} - @ReturnMapping(StringsResult) - async def APIAddresses(self): - ''' - - Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[str]] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Deployer', Request='APIAddresses', Version=1, Params=params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(APIHostPortsResult) - async def APIHostPorts(self): - ''' - - Returns -> typing.Sequence[~HostPort] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Deployer', Request='APIHostPorts', Version=1, Params=params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(BytesResult) - async def CACert(self): - ''' - - Returns -> typing.Sequence[int] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Deployer', Request='CACert', Version=1, Params=params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(DeployerConnectionValues) - async def ConnectionInfo(self): - ''' - - Returns -> typing.Sequence[str] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Deployer', Request='ConnectionInfo', Version=1, Params=params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(LifeResults) - async def Life(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~LifeResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Deployer', Request='Life', Version=1, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringResult) - async def ModelUUID(self): - ''' - - Returns -> typing.Union[_ForwardRef('Error'), str] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Deployer', Request='ModelUUID', Version=1, Params=params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def Remove(self, entities): + @ReturnMapping(AnnotationsGetResults) + async def Get(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ErrorResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~AnnotationsGetResult]<~AnnotationsGetResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Deployer', Request='Remove', Version=1, Params=params) - params['Entities'] = entities + msg = dict(type='Annotations', request='Get', version=2, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @ReturnMapping(ErrorResults) - async def SetPasswords(self, changes): + async def Set(self, annotations): ''' - changes : typing.Sequence[~EntityPassword] - Returns -> typing.Sequence[~ErrorResult] + annotations : typing.Sequence<+T_co>[~EntityAnnotations]<~EntityAnnotations> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Deployer', Request='SetPasswords', Version=1, Params=params) - params['Changes'] = changes + msg = dict(type='Annotations', request='Set', version=2, params=params) + params['annotations'] = annotations reply = await self.rpc(msg) return reply - - @ReturnMapping(StringsResult) - async def StateAddresses(self): - ''' - - Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[str]] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Deployer', Request='StateAddresses', Version=1, Params=params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResult) - async def WatchAPIHostPorts(self): - ''' - - Returns -> typing.Union[_ForwardRef('Error'), str] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Deployer', Request='WatchAPIHostPorts', Version=1, Params=params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResults) - async def WatchUnits(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~StringsWatchResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Deployer', Request='WatchUnits', Version=1, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - -class DiscoverSpaces(Type): - name = 'DiscoverSpaces' - version = 2 - schema = {'definitions': {'AddSubnetParams': {'additionalProperties': False, - 'properties': {'SpaceTag': {'type': 'string'}, - 'SubnetProviderId': {'type': 'string'}, - 'SubnetTag': {'type': 'string'}, - 'Zones': {'items': {'type': 'string'}, +class ApplicationFacade(Type): + name = 'Application' + version = 1 + schema = {'definitions': {'AddApplicationUnits': {'additionalProperties': False, + 'properties': {'application': {'type': 'string'}, + 'num-units': {'type': 'integer'}, + 'placement': {'items': {'$ref': '#/definitions/Placement'}, + 'type': 'array'}}, + 'required': ['application', + 'num-units', + 'placement'], + 'type': 'object'}, + 'AddApplicationUnitsResults': {'additionalProperties': False, + 'properties': {'units': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'required': ['units'], + 'type': 'object'}, + 'AddRelation': {'additionalProperties': False, + 'properties': {'endpoints': {'items': {'type': 'string'}, 'type': 'array'}}, - 'required': ['SpaceTag'], - 'type': 'object'}, - 'AddSubnetsParams': {'additionalProperties': False, - 'properties': {'Subnets': {'items': {'$ref': '#/definitions/AddSubnetParams'}, + 'required': ['endpoints'], + 'type': 'object'}, + 'AddRelationResults': {'additionalProperties': False, + 'properties': {'endpoints': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}}, + 'type': 'object'}}, + 'required': ['endpoints'], + 'type': 'object'}, + 'ApplicationCharmRelations': {'additionalProperties': False, + 'properties': {'application': {'type': 'string'}}, + 'required': ['application'], + 'type': 'object'}, + 'ApplicationCharmRelationsResults': {'additionalProperties': False, + 'properties': {'charm-relations': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'required': ['charm-relations'], + 'type': 'object'}, + 'ApplicationDeploy': {'additionalProperties': False, + 'properties': {'application': {'type': 'string'}, + 'channel': {'type': 'string'}, + 'charm-url': {'type': 'string'}, + 'config': {'patternProperties': {'.*': {'type': 'string'}}, + 'type': 'object'}, + 'config-yaml': {'type': 'string'}, + 'constraints': {'$ref': '#/definitions/Value'}, + 'endpoint-bindings': {'patternProperties': {'.*': {'type': 'string'}}, + 'type': 'object'}, + 'num-units': {'type': 'integer'}, + 'placement': {'items': {'$ref': '#/definitions/Placement'}, + 'type': 'array'}, + 'resources': {'patternProperties': {'.*': {'type': 'string'}}, + 'type': 'object'}, + 'series': {'type': 'string'}, + 'storage': {'patternProperties': {'.*': {'$ref': '#/definitions/Constraints'}}, + 'type': 'object'}}, + 'required': ['application', + 'series', + 'charm-url', + 'channel', + 'num-units', + 'config-yaml', + 'constraints'], + 'type': 'object'}, + 'ApplicationDestroy': {'additionalProperties': False, + 'properties': {'application': {'type': 'string'}}, + 'required': ['application'], + 'type': 'object'}, + 'ApplicationExpose': {'additionalProperties': False, + 'properties': {'application': {'type': 'string'}}, + 'required': ['application'], + 'type': 'object'}, + 'ApplicationGet': {'additionalProperties': False, + 'properties': {'application': {'type': 'string'}}, + 'required': ['application'], + 'type': 'object'}, + 'ApplicationGetResults': {'additionalProperties': False, + 'properties': {'application': {'type': 'string'}, + 'charm': {'type': 'string'}, + 'config': {'patternProperties': {'.*': {'additionalProperties': True, + 'type': 'object'}}, + 'type': 'object'}, + 'constraints': {'$ref': '#/definitions/Value'}, + 'series': {'type': 'string'}}, + 'required': ['application', + 'charm', + 'config', + 'constraints', + 'series'], + 'type': 'object'}, + 'ApplicationMetricCredential': {'additionalProperties': False, + 'properties': {'application': {'type': 'string'}, + 'metrics-credentials': {'items': {'type': 'integer'}, + 'type': 'array'}}, + 'required': ['application', + 'metrics-credentials'], + 'type': 'object'}, + 'ApplicationMetricCredentials': {'additionalProperties': False, + 'properties': {'creds': {'items': {'$ref': '#/definitions/ApplicationMetricCredential'}, + 'type': 'array'}}, + 'required': ['creds'], + 'type': 'object'}, + 'ApplicationSet': {'additionalProperties': False, + 'properties': {'application': {'type': 'string'}, + 'options': {'patternProperties': {'.*': {'type': 'string'}}, + 'type': 'object'}}, + 'required': ['application', 'options'], + 'type': 'object'}, + 'ApplicationSetCharm': {'additionalProperties': False, + 'properties': {'application': {'type': 'string'}, + 'channel': {'type': 'string'}, + 'charm-url': {'type': 'string'}, + 'force-series': {'type': 'boolean'}, + 'force-units': {'type': 'boolean'}, + 'resource-ids': {'patternProperties': {'.*': {'type': 'string'}}, + 'type': 'object'}}, + 'required': ['application', + 'charm-url', + 'channel', + 'force-units', + 'force-series'], + 'type': 'object'}, + 'ApplicationUnexpose': {'additionalProperties': False, + 'properties': {'application': {'type': 'string'}}, + 'required': ['application'], + 'type': 'object'}, + 'ApplicationUnset': {'additionalProperties': False, + 'properties': {'application': {'type': 'string'}, + 'options': {'items': {'type': 'string'}, 'type': 'array'}}, - 'required': ['Subnets'], + 'required': ['application', 'options'], 'type': 'object'}, - 'CreateSpaceParams': {'additionalProperties': False, - 'properties': {'ProviderId': {'type': 'string'}, - 'Public': {'type': 'boolean'}, - 'SpaceTag': {'type': 'string'}, - 'SubnetTags': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['SubnetTags', - 'SpaceTag', - 'Public'], + 'ApplicationUpdate': {'additionalProperties': False, + 'properties': {'application': {'type': 'string'}, + 'charm-url': {'type': 'string'}, + 'constraints': {'$ref': '#/definitions/Value'}, + 'force-charm-url': {'type': 'boolean'}, + 'force-series': {'type': 'boolean'}, + 'min-units': {'type': 'integer'}, + 'settings': {'patternProperties': {'.*': {'type': 'string'}}, + 'type': 'object'}, + 'settings-yaml': {'type': 'string'}}, + 'required': ['application', + 'charm-url', + 'force-charm-url', + 'force-series', + 'settings-yaml'], 'type': 'object'}, - 'CreateSpacesParams': {'additionalProperties': False, - 'properties': {'Spaces': {'items': {'$ref': '#/definitions/CreateSpaceParams'}, - 'type': 'array'}}, - 'required': ['Spaces'], + 'ApplicationsDeploy': {'additionalProperties': False, + 'properties': {'applications': {'items': {'$ref': '#/definitions/ApplicationDeploy'}, + 'type': 'array'}}, + 'required': ['applications'], 'type': 'object'}, - 'DiscoverSpacesResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/ProviderSpace'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, + 'CharmRelation': {'additionalProperties': False, + 'properties': {'interface': {'type': 'string'}, + 'limit': {'type': 'integer'}, + 'name': {'type': 'string'}, + 'optional': {'type': 'boolean'}, + 'role': {'type': 'string'}, + 'scope': {'type': 'string'}}, + 'required': ['name', + 'role', + 'interface', + 'optional', + 'limit', + 'scope'], + 'type': 'object'}, + 'Constraints': {'additionalProperties': False, + 'properties': {'Count': {'type': 'integer'}, + 'Pool': {'type': 'string'}, + 'Size': {'type': 'integer'}}, + 'required': ['Pool', 'Size', 'Count'], + 'type': 'object'}, + 'DestroyApplicationUnits': {'additionalProperties': False, + 'properties': {'unit-names': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'required': ['unit-names'], + 'type': 'object'}, + 'DestroyRelation': {'additionalProperties': False, + 'properties': {'endpoints': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'required': ['endpoints'], + 'type': 'object'}, 'Error': {'additionalProperties': False, - 'properties': {'Code': {'type': 'string'}, - 'Info': {'$ref': '#/definitions/ErrorInfo'}, - 'Message': {'type': 'string'}}, - 'required': ['Message', 'Code'], + 'properties': {'code': {'type': 'string'}, + 'info': {'$ref': '#/definitions/ErrorInfo'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], 'type': 'object'}, 'ErrorInfo': {'additionalProperties': False, - 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'}, - 'MacaroonPath': {'type': 'string'}}, + 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'macaroon-path': {'type': 'string'}}, 'type': 'object'}, 'ErrorResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}}, - 'required': ['Error'], + 'properties': {'error': {'$ref': '#/definitions/Error'}}, 'type': 'object'}, 'ErrorResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'}, + 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, 'type': 'array'}}, - 'required': ['Results'], + 'required': ['results'], 'type': 'object'}, - 'ListSubnetsResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/Subnet'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, - 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'}, - 'type': 'array'}, - 'data': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'id': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'sig': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['data', - 'location', - 'id', - 'caveats', - 'sig'], - 'type': 'object'}, - 'ModelConfigResult': {'additionalProperties': False, - 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}}, - 'required': ['Config'], - 'type': 'object'}, - 'ProviderSpace': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Name': {'type': 'string'}, - 'ProviderId': {'type': 'string'}, - 'Subnets': {'items': {'$ref': '#/definitions/Subnet'}, - 'type': 'array'}}, - 'required': ['Name', - 'ProviderId', - 'Subnets'], + 'GetApplicationConstraints': {'additionalProperties': False, + 'properties': {'application': {'type': 'string'}}, + 'required': ['application'], + 'type': 'object'}, + 'GetConstraintsResults': {'additionalProperties': False, + 'properties': {'constraints': {'$ref': '#/definitions/Value'}}, + 'required': ['constraints'], + 'type': 'object'}, + 'Macaroon': {'additionalProperties': False, 'type': 'object'}, + 'Placement': {'additionalProperties': False, + 'properties': {'directive': {'type': 'string'}, + 'scope': {'type': 'string'}}, + 'required': ['scope', 'directive'], + 'type': 'object'}, + 'SetConstraints': {'additionalProperties': False, + 'properties': {'application': {'type': 'string'}, + 'constraints': {'$ref': '#/definitions/Value'}}, + 'required': ['application', 'constraints'], + 'type': 'object'}, + 'StringResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'type': 'string'}}, + 'required': ['result'], + 'type': 'object'}, + 'Value': {'additionalProperties': False, + 'properties': {'arch': {'type': 'string'}, + 'container': {'type': 'string'}, + 'cpu-cores': {'type': 'integer'}, + 'cpu-power': {'type': 'integer'}, + 'instance-type': {'type': 'string'}, + 'mem': {'type': 'integer'}, + 'root-disk': {'type': 'integer'}, + 'spaces': {'items': {'type': 'string'}, + 'type': 'array'}, + 'tags': {'items': {'type': 'string'}, + 'type': 'array'}, + 'virt-type': {'type': 'string'}}, + 'type': 'object'}}, + 'properties': {'AddRelation': {'properties': {'Params': {'$ref': '#/definitions/AddRelation'}, + 'Result': {'$ref': '#/definitions/AddRelationResults'}}, + 'type': 'object'}, + 'AddUnits': {'properties': {'Params': {'$ref': '#/definitions/AddApplicationUnits'}, + 'Result': {'$ref': '#/definitions/AddApplicationUnitsResults'}}, + 'type': 'object'}, + 'CharmRelations': {'properties': {'Params': {'$ref': '#/definitions/ApplicationCharmRelations'}, + 'Result': {'$ref': '#/definitions/ApplicationCharmRelationsResults'}}, 'type': 'object'}, - 'Subnet': {'additionalProperties': False, - 'properties': {'CIDR': {'type': 'string'}, - 'Life': {'type': 'string'}, - 'ProviderId': {'type': 'string'}, - 'SpaceTag': {'type': 'string'}, - 'StaticRangeHighIP': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'StaticRangeLowIP': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'Status': {'type': 'string'}, - 'VLANTag': {'type': 'integer'}, - 'Zones': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['CIDR', - 'VLANTag', - 'Life', - 'SpaceTag', - 'Zones'], + 'Deploy': {'properties': {'Params': {'$ref': '#/definitions/ApplicationsDeploy'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'Destroy': {'properties': {'Params': {'$ref': '#/definitions/ApplicationDestroy'}}, 'type': 'object'}, - 'SubnetsFilters': {'additionalProperties': False, - 'properties': {'SpaceTag': {'type': 'string'}, - 'Zone': {'type': 'string'}}, + 'DestroyRelation': {'properties': {'Params': {'$ref': '#/definitions/DestroyRelation'}}, 'type': 'object'}, - 'caveat': {'additionalProperties': False, - 'properties': {'caveatId': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'verificationId': {'$ref': '#/definitions/packet'}}, - 'required': ['location', - 'caveatId', - 'verificationId'], - 'type': 'object'}, - 'packet': {'additionalProperties': False, - 'properties': {'headerLen': {'type': 'integer'}, - 'start': {'type': 'integer'}, - 'totalLen': {'type': 'integer'}}, - 'required': ['start', 'totalLen', 'headerLen'], - 'type': 'object'}}, - 'properties': {'AddSubnets': {'properties': {'Params': {'$ref': '#/definitions/AddSubnetsParams'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'CreateSpaces': {'properties': {'Params': {'$ref': '#/definitions/CreateSpacesParams'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'DestroyUnits': {'properties': {'Params': {'$ref': '#/definitions/DestroyApplicationUnits'}}, 'type': 'object'}, - 'ListSpaces': {'properties': {'Result': {'$ref': '#/definitions/DiscoverSpacesResults'}}, - 'type': 'object'}, - 'ListSubnets': {'properties': {'Params': {'$ref': '#/definitions/SubnetsFilters'}, - 'Result': {'$ref': '#/definitions/ListSubnetsResults'}}, + 'Expose': {'properties': {'Params': {'$ref': '#/definitions/ApplicationExpose'}}, + 'type': 'object'}, + 'Get': {'properties': {'Params': {'$ref': '#/definitions/ApplicationGet'}, + 'Result': {'$ref': '#/definitions/ApplicationGetResults'}}, + 'type': 'object'}, + 'GetCharmURL': {'properties': {'Params': {'$ref': '#/definitions/ApplicationGet'}, + 'Result': {'$ref': '#/definitions/StringResult'}}, 'type': 'object'}, - 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}}, - 'type': 'object'}}, + 'GetConstraints': {'properties': {'Params': {'$ref': '#/definitions/GetApplicationConstraints'}, + 'Result': {'$ref': '#/definitions/GetConstraintsResults'}}, + 'type': 'object'}, + 'Set': {'properties': {'Params': {'$ref': '#/definitions/ApplicationSet'}}, + 'type': 'object'}, + 'SetCharm': {'properties': {'Params': {'$ref': '#/definitions/ApplicationSetCharm'}}, + 'type': 'object'}, + 'SetConstraints': {'properties': {'Params': {'$ref': '#/definitions/SetConstraints'}}, + 'type': 'object'}, + 'SetMetricCredentials': {'properties': {'Params': {'$ref': '#/definitions/ApplicationMetricCredentials'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'Unexpose': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUnexpose'}}, + 'type': 'object'}, + 'Unset': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUnset'}}, + 'type': 'object'}, + 'Update': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUpdate'}}, + 'type': 'object'}}, 'type': 'object'} - @ReturnMapping(ErrorResults) - async def AddSubnets(self, subnets): + @ReturnMapping(AddRelationResults) + async def AddRelation(self, endpoints): ''' - subnets : typing.Sequence[~AddSubnetParams] - Returns -> typing.Sequence[~ErrorResult] + endpoints : typing.Sequence<+T_co>[str] + Returns -> typing.Mapping<~KT, +VT_co>[str, ~CharmRelation]<~CharmRelation> ''' # map input types to rpc msg params = dict() - msg = dict(Type='DiscoverSpaces', Request='AddSubnets', Version=2, Params=params) - params['Subnets'] = subnets + msg = dict(type='Application', request='AddRelation', version=1, params=params) + params['endpoints'] = endpoints reply = await self.rpc(msg) return reply - @ReturnMapping(ErrorResults) - async def CreateSpaces(self, spaces): + @ReturnMapping(AddApplicationUnitsResults) + async def AddUnits(self, application, num_units, placement): ''' - spaces : typing.Sequence[~CreateSpaceParams] - Returns -> typing.Sequence[~ErrorResult] + application : str + num_units : int + placement : typing.Sequence<+T_co>[~Placement]<~Placement> + Returns -> typing.Sequence<+T_co>[str] ''' # map input types to rpc msg params = dict() - msg = dict(Type='DiscoverSpaces', Request='CreateSpaces', Version=2, Params=params) - params['Spaces'] = spaces + msg = dict(type='Application', request='AddUnits', version=1, params=params) + params['application'] = application + params['num-units'] = num_units + params['placement'] = placement reply = await self.rpc(msg) return reply - @ReturnMapping(DiscoverSpacesResults) - async def ListSpaces(self): + @ReturnMapping(ApplicationCharmRelationsResults) + async def CharmRelations(self, application): ''' - - Returns -> typing.Sequence[~ProviderSpace] + application : str + Returns -> typing.Sequence<+T_co>[str] ''' # map input types to rpc msg params = dict() - msg = dict(Type='DiscoverSpaces', Request='ListSpaces', Version=2, Params=params) - + msg = dict(type='Application', request='CharmRelations', version=1, params=params) + params['application'] = application reply = await self.rpc(msg) return reply - @ReturnMapping(ListSubnetsResults) - async def ListSubnets(self, spacetag, zone): + @ReturnMapping(ErrorResults) + async def Deploy(self, applications): ''' - spacetag : str - zone : str - Returns -> typing.Sequence[~Subnet] + applications : typing.Sequence<+T_co>[~ApplicationDeploy]<~ApplicationDeploy> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='DiscoverSpaces', Request='ListSubnets', Version=2, Params=params) - params['SpaceTag'] = spacetag - params['Zone'] = zone + msg = dict(type='Application', request='Deploy', version=1, params=params) + params['applications'] = applications reply = await self.rpc(msg) return reply - @ReturnMapping(ModelConfigResult) - async def ModelConfig(self): + @ReturnMapping(None) + async def Destroy(self, application): + ''' + application : str + Returns -> None ''' + # map input types to rpc msg + params = dict() + msg = dict(type='Application', request='Destroy', version=1, params=params) + params['application'] = application + reply = await self.rpc(msg) + return reply + - Returns -> typing.Mapping[str, typing.Any] + + @ReturnMapping(None) + async def DestroyRelation(self, endpoints): + ''' + endpoints : typing.Sequence<+T_co>[str] + Returns -> None ''' # map input types to rpc msg params = dict() - msg = dict(Type='DiscoverSpaces', Request='ModelConfig', Version=2, Params=params) + msg = dict(type='Application', request='DestroyRelation', version=1, params=params) + params['endpoints'] = endpoints + reply = await self.rpc(msg) + return reply + + + @ReturnMapping(None) + async def DestroyUnits(self, unit_names): + ''' + unit_names : typing.Sequence<+T_co>[str] + Returns -> None + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='Application', request='DestroyUnits', version=1, params=params) + params['unit-names'] = unit_names reply = await self.rpc(msg) return reply -class DiskManager(Type): - name = 'DiskManager' - version = 2 - schema = {'definitions': {'BlockDevice': {'additionalProperties': False, - 'properties': {'BusAddress': {'type': 'string'}, - 'DeviceLinks': {'items': {'type': 'string'}, - 'type': 'array'}, - 'DeviceName': {'type': 'string'}, - 'FilesystemType': {'type': 'string'}, - 'HardwareId': {'type': 'string'}, - 'InUse': {'type': 'boolean'}, - 'Label': {'type': 'string'}, - 'MountPoint': {'type': 'string'}, - 'Size': {'type': 'integer'}, - 'UUID': {'type': 'string'}}, - 'required': ['DeviceName', - 'DeviceLinks', - 'Label', - 'UUID', - 'HardwareId', - 'BusAddress', - 'Size', - 'FilesystemType', - 'InUse', - 'MountPoint'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'Code': {'type': 'string'}, - 'Info': {'$ref': '#/definitions/ErrorInfo'}, - 'Message': {'type': 'string'}}, - 'required': ['Message', 'Code'], - 'type': 'object'}, - 'ErrorInfo': {'additionalProperties': False, - 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'}, - 'MacaroonPath': {'type': 'string'}}, - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}}, - 'required': ['Error'], - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, - 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'}, - 'type': 'array'}, - 'data': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'id': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'sig': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['data', - 'location', - 'id', - 'caveats', - 'sig'], - 'type': 'object'}, - 'MachineBlockDevices': {'additionalProperties': False, - 'properties': {'blockdevices': {'items': {'$ref': '#/definitions/BlockDevice'}, - 'type': 'array'}, - 'machine': {'type': 'string'}}, - 'required': ['machine'], - 'type': 'object'}, - 'SetMachineBlockDevices': {'additionalProperties': False, - 'properties': {'machineblockdevices': {'items': {'$ref': '#/definitions/MachineBlockDevices'}, - 'type': 'array'}}, - 'required': ['machineblockdevices'], - 'type': 'object'}, - 'caveat': {'additionalProperties': False, - 'properties': {'caveatId': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'verificationId': {'$ref': '#/definitions/packet'}}, - 'required': ['location', - 'caveatId', - 'verificationId'], - 'type': 'object'}, - 'packet': {'additionalProperties': False, - 'properties': {'headerLen': {'type': 'integer'}, - 'start': {'type': 'integer'}, - 'totalLen': {'type': 'integer'}}, - 'required': ['start', 'totalLen', 'headerLen'], - 'type': 'object'}}, - 'properties': {'SetMachineBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/SetMachineBlockDevices'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - @ReturnMapping(ErrorResults) - async def SetMachineBlockDevices(self, machineblockdevices): + @ReturnMapping(None) + async def Expose(self, application): ''' - machineblockdevices : typing.Sequence[~MachineBlockDevices] - Returns -> typing.Sequence[~ErrorResult] + application : str + Returns -> None ''' # map input types to rpc msg params = dict() - msg = dict(Type='DiskManager', Request='SetMachineBlockDevices', Version=2, Params=params) - params['machineblockdevices'] = machineblockdevices + msg = dict(type='Application', request='Expose', version=1, params=params) + params['application'] = application reply = await self.rpc(msg) return reply -class EntityWatcher(Type): - name = 'EntityWatcher' - version = 2 - schema = {'definitions': {'EntitiesWatchResult': {'additionalProperties': False, - 'properties': {'Changes': {'items': {'type': 'string'}, - 'type': 'array'}, - 'EntityWatcherId': {'type': 'string'}, - 'Error': {'$ref': '#/definitions/Error'}}, - 'required': ['EntityWatcherId', - 'Changes', - 'Error'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'Code': {'type': 'string'}, - 'Info': {'$ref': '#/definitions/ErrorInfo'}, - 'Message': {'type': 'string'}}, - 'required': ['Message', 'Code'], - 'type': 'object'}, - 'ErrorInfo': {'additionalProperties': False, - 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'}, - 'MacaroonPath': {'type': 'string'}}, - 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, - 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'}, - 'type': 'array'}, - 'data': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'id': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'sig': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['data', - 'location', - 'id', - 'caveats', - 'sig'], - 'type': 'object'}, - 'caveat': {'additionalProperties': False, - 'properties': {'caveatId': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'verificationId': {'$ref': '#/definitions/packet'}}, - 'required': ['location', - 'caveatId', - 'verificationId'], - 'type': 'object'}, - 'packet': {'additionalProperties': False, - 'properties': {'headerLen': {'type': 'integer'}, - 'start': {'type': 'integer'}, - 'totalLen': {'type': 'integer'}}, - 'required': ['start', 'totalLen', 'headerLen'], - 'type': 'object'}}, - 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/EntitiesWatchResult'}}, - 'type': 'object'}, - 'Stop': {'type': 'object'}}, - 'type': 'object'} - - @ReturnMapping(EntitiesWatchResult) - async def Next(self): + @ReturnMapping(ApplicationGetResults) + async def Get(self, application): ''' - - Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')] + application : str + Returns -> typing.Union[str, typing.Mapping<~KT, +VT_co>[str, typing.Any], _ForwardRef('Value')] ''' # map input types to rpc msg params = dict() - msg = dict(Type='EntityWatcher', Request='Next', Version=2, Params=params) - + msg = dict(type='Application', request='Get', version=1, params=params) + params['application'] = application reply = await self.rpc(msg) return reply - @ReturnMapping(None) - async def Stop(self): + @ReturnMapping(StringResult) + async def GetCharmURL(self, application): ''' - - Returns -> None + application : str + Returns -> typing.Union[_ForwardRef('Error'), str] ''' # map input types to rpc msg params = dict() - msg = dict(Type='EntityWatcher', Request='Stop', Version=2, Params=params) - + msg = dict(type='Application', request='GetCharmURL', version=1, params=params) + params['application'] = application reply = await self.rpc(msg) return reply -class FilesystemAttachmentsWatcher(Type): - name = 'FilesystemAttachmentsWatcher' - version = 2 - schema = {'definitions': {'Error': {'additionalProperties': False, - 'properties': {'Code': {'type': 'string'}, - 'Info': {'$ref': '#/definitions/ErrorInfo'}, - 'Message': {'type': 'string'}}, - 'required': ['Message', 'Code'], - 'type': 'object'}, - 'ErrorInfo': {'additionalProperties': False, - 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'}, - 'MacaroonPath': {'type': 'string'}}, - 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, - 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'}, - 'type': 'array'}, - 'data': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'id': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'sig': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['data', - 'location', - 'id', - 'caveats', - 'sig'], - 'type': 'object'}, - 'MachineStorageId': {'additionalProperties': False, - 'properties': {'attachmenttag': {'type': 'string'}, - 'machinetag': {'type': 'string'}}, - 'required': ['machinetag', - 'attachmenttag'], - 'type': 'object'}, - 'MachineStorageIdsWatchResult': {'additionalProperties': False, - 'properties': {'Changes': {'items': {'$ref': '#/definitions/MachineStorageId'}, - 'type': 'array'}, - 'Error': {'$ref': '#/definitions/Error'}, - 'MachineStorageIdsWatcherId': {'type': 'string'}}, - 'required': ['MachineStorageIdsWatcherId', - 'Changes', - 'Error'], - 'type': 'object'}, - 'caveat': {'additionalProperties': False, - 'properties': {'caveatId': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'verificationId': {'$ref': '#/definitions/packet'}}, - 'required': ['location', - 'caveatId', - 'verificationId'], - 'type': 'object'}, - 'packet': {'additionalProperties': False, - 'properties': {'headerLen': {'type': 'integer'}, - 'start': {'type': 'integer'}, - 'totalLen': {'type': 'integer'}}, - 'required': ['start', 'totalLen', 'headerLen'], - 'type': 'object'}}, - 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResult'}}, - 'type': 'object'}, - 'Stop': {'type': 'object'}}, - 'type': 'object'} - - @ReturnMapping(MachineStorageIdsWatchResult) - async def Next(self): + @ReturnMapping(GetConstraintsResults) + async def GetConstraints(self, application): ''' - - Returns -> typing.Union[typing.Sequence[~MachineStorageId], _ForwardRef('Error')] + application : str + Returns -> Value ''' # map input types to rpc msg params = dict() - msg = dict(Type='FilesystemAttachmentsWatcher', Request='Next', Version=2, Params=params) - + msg = dict(type='Application', request='GetConstraints', version=1, params=params) + params['application'] = application reply = await self.rpc(msg) return reply @ReturnMapping(None) - async def Stop(self): + async def Set(self, application, options): ''' - + application : str + options : typing.Mapping<~KT, +VT_co>[str, str] Returns -> None ''' # map input types to rpc msg params = dict() - msg = dict(Type='FilesystemAttachmentsWatcher', Request='Stop', Version=2, Params=params) - - reply = await self.rpc(msg) - return reply - - -class Firewaller(Type): - name = 'Firewaller' - version = 2 - schema = {'definitions': {'BoolResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Result': {'type': 'boolean'}}, - 'required': ['Error', 'Result'], - 'type': 'object'}, - 'BoolResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/BoolResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'Entities': {'additionalProperties': False, - 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'}, - 'type': 'array'}}, - 'required': ['Entities'], - 'type': 'object'}, - 'Entity': {'additionalProperties': False, - 'properties': {'Tag': {'type': 'string'}}, - 'required': ['Tag'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'Code': {'type': 'string'}, - 'Info': {'$ref': '#/definitions/ErrorInfo'}, - 'Message': {'type': 'string'}}, - 'required': ['Message', 'Code'], - 'type': 'object'}, - 'ErrorInfo': {'additionalProperties': False, - 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'}, - 'MacaroonPath': {'type': 'string'}}, - 'type': 'object'}, - 'LifeResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Life': {'type': 'string'}}, - 'required': ['Life', 'Error'], - 'type': 'object'}, - 'LifeResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/LifeResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, - 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'}, - 'type': 'array'}, - 'data': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'id': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'sig': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['data', - 'location', - 'id', - 'caveats', - 'sig'], - 'type': 'object'}, - 'MachinePortRange': {'additionalProperties': False, - 'properties': {'PortRange': {'$ref': '#/definitions/PortRange'}, - 'RelationTag': {'type': 'string'}, - 'UnitTag': {'type': 'string'}}, - 'required': ['UnitTag', - 'RelationTag', - 'PortRange'], - 'type': 'object'}, - 'MachinePorts': {'additionalProperties': False, - 'properties': {'MachineTag': {'type': 'string'}, - 'SubnetTag': {'type': 'string'}}, - 'required': ['MachineTag', 'SubnetTag'], - 'type': 'object'}, - 'MachinePortsParams': {'additionalProperties': False, - 'properties': {'Params': {'items': {'$ref': '#/definitions/MachinePorts'}, - 'type': 'array'}}, - 'required': ['Params'], - 'type': 'object'}, - 'MachinePortsResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Ports': {'items': {'$ref': '#/definitions/MachinePortRange'}, - 'type': 'array'}}, - 'required': ['Error', 'Ports'], - 'type': 'object'}, - 'MachinePortsResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/MachinePortsResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'ModelConfigResult': {'additionalProperties': False, - 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}}, - 'required': ['Config'], - 'type': 'object'}, - 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'NotifyWatcherId': {'type': 'string'}}, - 'required': ['NotifyWatcherId', 'Error'], - 'type': 'object'}, - 'NotifyWatchResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'PortRange': {'additionalProperties': False, - 'properties': {'FromPort': {'type': 'integer'}, - 'Protocol': {'type': 'string'}, - 'ToPort': {'type': 'integer'}}, - 'required': ['FromPort', 'ToPort', 'Protocol'], - 'type': 'object'}, - 'StringResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Result': {'type': 'string'}}, - 'required': ['Error', 'Result'], - 'type': 'object'}, - 'StringResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/StringResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'StringsResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Result': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['Error', 'Result'], - 'type': 'object'}, - 'StringsResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'StringsWatchResult': {'additionalProperties': False, - 'properties': {'Changes': {'items': {'type': 'string'}, - 'type': 'array'}, - 'Error': {'$ref': '#/definitions/Error'}, - 'StringsWatcherId': {'type': 'string'}}, - 'required': ['StringsWatcherId', - 'Changes', - 'Error'], - 'type': 'object'}, - 'StringsWatchResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsWatchResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'caveat': {'additionalProperties': False, - 'properties': {'caveatId': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'verificationId': {'$ref': '#/definitions/packet'}}, - 'required': ['location', - 'caveatId', - 'verificationId'], - 'type': 'object'}, - 'packet': {'additionalProperties': False, - 'properties': {'headerLen': {'type': 'integer'}, - 'start': {'type': 'integer'}, - 'totalLen': {'type': 'integer'}}, - 'required': ['start', 'totalLen', 'headerLen'], - 'type': 'object'}}, - 'properties': {'GetAssignedMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringResults'}}, - 'type': 'object'}, - 'GetExposed': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/BoolResults'}}, - 'type': 'object'}, - 'GetMachineActiveSubnets': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringsResults'}}, - 'type': 'object'}, - 'GetMachinePorts': {'properties': {'Params': {'$ref': '#/definitions/MachinePortsParams'}, - 'Result': {'$ref': '#/definitions/MachinePortsResults'}}, - 'type': 'object'}, - 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringResults'}}, - 'type': 'object'}, - 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/LifeResults'}}, - 'type': 'object'}, - 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}}, - 'type': 'object'}, - 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, - 'type': 'object'}, - 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, - 'type': 'object'}, - 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}}, - 'type': 'object'}, - 'WatchOpenedPorts': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, - 'type': 'object'}, - 'WatchUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(StringResults) - async def GetAssignedMachine(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~StringResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Firewaller', Request='GetAssignedMachine', Version=2, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(BoolResults) - async def GetExposed(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~BoolResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Firewaller', Request='GetExposed', Version=2, Params=params) - params['Entities'] = entities + msg = dict(type='Application', request='Set', version=1, params=params) + params['application'] = application + params['options'] = options reply = await self.rpc(msg) return reply - @ReturnMapping(StringsResults) - async def GetMachineActiveSubnets(self, entities): + @ReturnMapping(None) + async def SetCharm(self, application, channel, charm_url, force_series, force_units, resource_ids): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~StringsResult] + application : str + channel : str + charm_url : str + force_series : bool + force_units : bool + resource_ids : typing.Mapping<~KT, +VT_co>[str, str] + Returns -> None ''' # map input types to rpc msg params = dict() - msg = dict(Type='Firewaller', Request='GetMachineActiveSubnets', Version=2, Params=params) - params['Entities'] = entities + msg = dict(type='Application', request='SetCharm', version=1, params=params) + params['application'] = application + params['channel'] = channel + params['charm-url'] = charm_url + params['force-series'] = force_series + params['force-units'] = force_units + params['resource-ids'] = resource_ids reply = await self.rpc(msg) return reply - @ReturnMapping(MachinePortsResults) - async def GetMachinePorts(self, params): + @ReturnMapping(None) + async def SetConstraints(self, application, constraints): ''' - params : typing.Sequence[~MachinePorts] - Returns -> typing.Sequence[~MachinePortsResult] + application : str + constraints : Value + Returns -> None ''' # map input types to rpc msg params = dict() - msg = dict(Type='Firewaller', Request='GetMachinePorts', Version=2, Params=params) - params['Params'] = params + msg = dict(type='Application', request='SetConstraints', version=1, params=params) + params['application'] = application + params['constraints'] = constraints reply = await self.rpc(msg) return reply - @ReturnMapping(StringResults) - async def InstanceId(self, entities): + @ReturnMapping(ErrorResults) + async def SetMetricCredentials(self, creds): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~StringResult] + creds : typing.Sequence<+T_co>[~ApplicationMetricCredential]<~ApplicationMetricCredential> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Firewaller', Request='InstanceId', Version=2, Params=params) - params['Entities'] = entities + msg = dict(type='Application', request='SetMetricCredentials', version=1, params=params) + params['creds'] = creds reply = await self.rpc(msg) return reply - @ReturnMapping(LifeResults) - async def Life(self, entities): + @ReturnMapping(None) + async def Unexpose(self, application): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~LifeResult] + application : str + Returns -> None ''' # map input types to rpc msg params = dict() - msg = dict(Type='Firewaller', Request='Life', Version=2, Params=params) - params['Entities'] = entities + msg = dict(type='Application', request='Unexpose', version=1, params=params) + params['application'] = application reply = await self.rpc(msg) return reply - @ReturnMapping(ModelConfigResult) - async def ModelConfig(self): + @ReturnMapping(None) + async def Unset(self, application, options): ''' - - Returns -> typing.Mapping[str, typing.Any] + application : str + options : typing.Sequence<+T_co>[str] + Returns -> None ''' # map input types to rpc msg params = dict() - msg = dict(Type='Firewaller', Request='ModelConfig', Version=2, Params=params) - + msg = dict(type='Application', request='Unset', version=1, params=params) + params['application'] = application + params['options'] = options reply = await self.rpc(msg) return reply - @ReturnMapping(NotifyWatchResults) - async def Watch(self, entities): + @ReturnMapping(None) + async def Update(self, application, charm_url, constraints, force_charm_url, force_series, min_units, settings, settings_yaml): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~NotifyWatchResult] + application : str + charm_url : str + constraints : Value + force_charm_url : bool + force_series : bool + min_units : int + settings : typing.Mapping<~KT, +VT_co>[str, str] + settings_yaml : str + Returns -> None ''' # map input types to rpc msg params = dict() - msg = dict(Type='Firewaller', Request='Watch', Version=2, Params=params) - params['Entities'] = entities + msg = dict(type='Application', request='Update', version=1, params=params) + params['application'] = application + params['charm-url'] = charm_url + params['constraints'] = constraints + params['force-charm-url'] = force_charm_url + params['force-series'] = force_series + params['min-units'] = min_units + params['settings'] = settings + params['settings-yaml'] = settings_yaml reply = await self.rpc(msg) return reply +class ApplicationScalerFacade(Type): + name = 'ApplicationScaler' + version = 1 + schema = {'definitions': {'Entities': {'additionalProperties': False, + 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, + 'type': 'array'}}, + 'required': ['entities'], + 'type': 'object'}, + 'Entity': {'additionalProperties': False, + 'properties': {'tag': {'type': 'string'}}, + 'required': ['tag'], + 'type': 'object'}, + 'Error': {'additionalProperties': False, + 'properties': {'code': {'type': 'string'}, + 'info': {'$ref': '#/definitions/ErrorInfo'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], + 'type': 'object'}, + 'ErrorInfo': {'additionalProperties': False, + 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'macaroon-path': {'type': 'string'}}, + 'type': 'object'}, + 'ErrorResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}}, + 'type': 'object'}, + 'ErrorResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'Macaroon': {'additionalProperties': False, 'type': 'object'}, + 'StringsWatchResult': {'additionalProperties': False, + 'properties': {'changes': {'items': {'type': 'string'}, + 'type': 'array'}, + 'error': {'$ref': '#/definitions/Error'}, + 'watcher-id': {'type': 'string'}}, + 'required': ['watcher-id'], + 'type': 'object'}}, + 'properties': {'Rescale': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'Watch': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}}, + 'type': 'object'}}, + 'type': 'object'} + - @ReturnMapping(NotifyWatchResult) - async def WatchForModelConfigChanges(self): + @ReturnMapping(ErrorResults) + async def Rescale(self, entities): ''' - - Returns -> typing.Union[_ForwardRef('Error'), str] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Firewaller', Request='WatchForModelConfigChanges', Version=2, Params=params) - + msg = dict(type='ApplicationScaler', request='Rescale', version=1, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @ReturnMapping(StringsWatchResult) - async def WatchModelMachines(self): + async def Watch(self): ''' - Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')] + Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')] ''' # map input types to rpc msg params = dict() - msg = dict(Type='Firewaller', Request='WatchModelMachines', Version=2, Params=params) + msg = dict(type='ApplicationScaler', request='Watch', version=1, params=params) reply = await self.rpc(msg) return reply - - @ReturnMapping(StringsWatchResults) - async def WatchOpenedPorts(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~StringsWatchResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Firewaller', Request='WatchOpenedPorts', Version=2, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - +class BackupsFacade(Type): + name = 'Backups' + version = 1 + schema = {'definitions': {'BackupsCreateArgs': {'additionalProperties': False, + 'properties': {'notes': {'type': 'string'}}, + 'required': ['notes'], + 'type': 'object'}, + 'BackupsInfoArgs': {'additionalProperties': False, + 'properties': {'id': {'type': 'string'}}, + 'required': ['id'], + 'type': 'object'}, + 'BackupsListArgs': {'additionalProperties': False, + 'type': 'object'}, + 'BackupsListResult': {'additionalProperties': False, + 'properties': {'list': {'items': {'$ref': '#/definitions/BackupsMetadataResult'}, + 'type': 'array'}}, + 'required': ['list'], + 'type': 'object'}, + 'BackupsMetadataResult': {'additionalProperties': False, + 'properties': {'ca-cert': {'type': 'string'}, + 'ca-private-key': {'type': 'string'}, + 'checksum': {'type': 'string'}, + 'checksum-format': {'type': 'string'}, + 'finished': {'format': 'date-time', + 'type': 'string'}, + 'hostname': {'type': 'string'}, + 'id': {'type': 'string'}, + 'machine': {'type': 'string'}, + 'model': {'type': 'string'}, + 'notes': {'type': 'string'}, + 'series': {'type': 'string'}, + 'size': {'type': 'integer'}, + 'started': {'format': 'date-time', + 'type': 'string'}, + 'stored': {'format': 'date-time', + 'type': 'string'}, + 'version': {'$ref': '#/definitions/Number'}}, + 'required': ['id', + 'checksum', + 'checksum-format', + 'size', + 'stored', + 'started', + 'finished', + 'notes', + 'model', + 'machine', + 'hostname', + 'version', + 'series', + 'ca-cert', + 'ca-private-key'], + 'type': 'object'}, + 'BackupsRemoveArgs': {'additionalProperties': False, + 'properties': {'id': {'type': 'string'}}, + 'required': ['id'], + 'type': 'object'}, + 'Number': {'additionalProperties': False, + 'properties': {'Build': {'type': 'integer'}, + 'Major': {'type': 'integer'}, + 'Minor': {'type': 'integer'}, + 'Patch': {'type': 'integer'}, + 'Tag': {'type': 'string'}}, + 'required': ['Major', + 'Minor', + 'Tag', + 'Patch', + 'Build'], + 'type': 'object'}, + 'RestoreArgs': {'additionalProperties': False, + 'properties': {'backup-id': {'type': 'string'}}, + 'required': ['backup-id'], + 'type': 'object'}}, + 'properties': {'Create': {'properties': {'Params': {'$ref': '#/definitions/BackupsCreateArgs'}, + 'Result': {'$ref': '#/definitions/BackupsMetadataResult'}}, + 'type': 'object'}, + 'FinishRestore': {'type': 'object'}, + 'Info': {'properties': {'Params': {'$ref': '#/definitions/BackupsInfoArgs'}, + 'Result': {'$ref': '#/definitions/BackupsMetadataResult'}}, + 'type': 'object'}, + 'List': {'properties': {'Params': {'$ref': '#/definitions/BackupsListArgs'}, + 'Result': {'$ref': '#/definitions/BackupsListResult'}}, + 'type': 'object'}, + 'PrepareRestore': {'type': 'object'}, + 'Remove': {'properties': {'Params': {'$ref': '#/definitions/BackupsRemoveArgs'}}, + 'type': 'object'}, + 'Restore': {'properties': {'Params': {'$ref': '#/definitions/RestoreArgs'}}, + 'type': 'object'}}, + 'type': 'object'} + + + @ReturnMapping(BackupsMetadataResult) + async def Create(self, notes): + ''' + notes : str + Returns -> typing.Union[str, int, _ForwardRef('Number')] + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='Backups', request='Create', version=1, params=params) + params['notes'] = notes + reply = await self.rpc(msg) + return reply - @ReturnMapping(StringsWatchResults) - async def WatchUnits(self, entities): + + @ReturnMapping(None) + async def FinishRestore(self): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~StringsWatchResult] + + Returns -> None ''' # map input types to rpc msg params = dict() - msg = dict(Type='Firewaller', Request='WatchUnits', Version=2, Params=params) - params['Entities'] = entities + msg = dict(type='Backups', request='FinishRestore', version=1, params=params) + reply = await self.rpc(msg) return reply -class HighAvailability(Type): - name = 'HighAvailability' - version = 2 - schema = {'definitions': {'Address': {'additionalProperties': False, - 'properties': {'Scope': {'type': 'string'}, - 'SpaceName': {'type': 'string'}, - 'SpaceProviderId': {'type': 'string'}, - 'Type': {'type': 'string'}, - 'Value': {'type': 'string'}}, - 'required': ['Value', - 'Type', - 'Scope', - 'SpaceName', - 'SpaceProviderId'], - 'type': 'object'}, - 'ControllersChangeResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Result': {'$ref': '#/definitions/ControllersChanges'}}, - 'required': ['Result', 'Error'], - 'type': 'object'}, - 'ControllersChangeResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/ControllersChangeResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'ControllersChanges': {'additionalProperties': False, - 'properties': {'added': {'items': {'type': 'string'}, - 'type': 'array'}, - 'converted': {'items': {'type': 'string'}, - 'type': 'array'}, - 'demoted': {'items': {'type': 'string'}, - 'type': 'array'}, - 'maintained': {'items': {'type': 'string'}, - 'type': 'array'}, - 'promoted': {'items': {'type': 'string'}, - 'type': 'array'}, - 'removed': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'type': 'object'}, - 'ControllersSpec': {'additionalProperties': False, - 'properties': {'ModelTag': {'type': 'string'}, - 'constraints': {'$ref': '#/definitions/Value'}, - 'num-controllers': {'type': 'integer'}, - 'placement': {'items': {'type': 'string'}, - 'type': 'array'}, - 'series': {'type': 'string'}}, - 'required': ['ModelTag', - 'num-controllers'], - 'type': 'object'}, - 'ControllersSpecs': {'additionalProperties': False, - 'properties': {'Specs': {'items': {'$ref': '#/definitions/ControllersSpec'}, - 'type': 'array'}}, - 'required': ['Specs'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'Code': {'type': 'string'}, - 'Info': {'$ref': '#/definitions/ErrorInfo'}, - 'Message': {'type': 'string'}}, - 'required': ['Message', 'Code'], - 'type': 'object'}, - 'ErrorInfo': {'additionalProperties': False, - 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'}, - 'MacaroonPath': {'type': 'string'}}, - 'type': 'object'}, - 'HAMember': {'additionalProperties': False, - 'properties': {'PublicAddress': {'$ref': '#/definitions/Address'}, - 'Series': {'type': 'string'}, - 'Tag': {'type': 'string'}}, - 'required': ['Tag', 'PublicAddress', 'Series'], - 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, - 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'}, - 'type': 'array'}, - 'data': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'id': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'sig': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['data', - 'location', - 'id', - 'caveats', - 'sig'], - 'type': 'object'}, - 'Member': {'additionalProperties': False, - 'properties': {'Address': {'type': 'string'}, - 'Arbiter': {'type': 'boolean'}, - 'BuildIndexes': {'type': 'boolean'}, - 'Hidden': {'type': 'boolean'}, - 'Id': {'type': 'integer'}, - 'Priority': {'type': 'number'}, - 'SlaveDelay': {'type': 'integer'}, - 'Tags': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'Votes': {'type': 'integer'}}, - 'required': ['Id', - 'Address', - 'Arbiter', - 'BuildIndexes', - 'Hidden', - 'Priority', - 'Tags', - 'SlaveDelay', - 'Votes'], - 'type': 'object'}, - 'MongoUpgradeResults': {'additionalProperties': False, - 'properties': {'Master': {'$ref': '#/definitions/HAMember'}, - 'Members': {'items': {'$ref': '#/definitions/HAMember'}, - 'type': 'array'}, - 'RsMembers': {'items': {'$ref': '#/definitions/Member'}, - 'type': 'array'}}, - 'required': ['RsMembers', - 'Master', - 'Members'], - 'type': 'object'}, - 'ResumeReplicationParams': {'additionalProperties': False, - 'properties': {'Members': {'items': {'$ref': '#/definitions/Member'}, - 'type': 'array'}}, - 'required': ['Members'], - 'type': 'object'}, - 'UpgradeMongoParams': {'additionalProperties': False, - 'properties': {'Target': {'$ref': '#/definitions/Version'}}, - 'required': ['Target'], - 'type': 'object'}, - 'Value': {'additionalProperties': False, - 'properties': {'arch': {'type': 'string'}, - 'container': {'type': 'string'}, - 'cpu-cores': {'type': 'integer'}, - 'cpu-power': {'type': 'integer'}, - 'instance-type': {'type': 'string'}, - 'mem': {'type': 'integer'}, - 'root-disk': {'type': 'integer'}, - 'spaces': {'items': {'type': 'string'}, - 'type': 'array'}, - 'tags': {'items': {'type': 'string'}, - 'type': 'array'}, - 'virt-type': {'type': 'string'}}, - 'type': 'object'}, - 'Version': {'additionalProperties': False, - 'properties': {'Major': {'type': 'integer'}, - 'Minor': {'type': 'integer'}, - 'Patch': {'type': 'string'}, - 'StorageEngine': {'type': 'string'}}, - 'required': ['Major', - 'Minor', - 'Patch', - 'StorageEngine'], - 'type': 'object'}, - 'caveat': {'additionalProperties': False, - 'properties': {'caveatId': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'verificationId': {'$ref': '#/definitions/packet'}}, - 'required': ['location', - 'caveatId', - 'verificationId'], - 'type': 'object'}, - 'packet': {'additionalProperties': False, - 'properties': {'headerLen': {'type': 'integer'}, - 'start': {'type': 'integer'}, - 'totalLen': {'type': 'integer'}}, - 'required': ['start', 'totalLen', 'headerLen'], - 'type': 'object'}}, - 'properties': {'EnableHA': {'properties': {'Params': {'$ref': '#/definitions/ControllersSpecs'}, - 'Result': {'$ref': '#/definitions/ControllersChangeResults'}}, - 'type': 'object'}, - 'ResumeHAReplicationAfterUpgrade': {'properties': {'Params': {'$ref': '#/definitions/ResumeReplicationParams'}}, - 'type': 'object'}, - 'StopHAReplicationForUpgrade': {'properties': {'Params': {'$ref': '#/definitions/UpgradeMongoParams'}, - 'Result': {'$ref': '#/definitions/MongoUpgradeResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - @ReturnMapping(ControllersChangeResults) - async def EnableHA(self, specs): + @ReturnMapping(BackupsMetadataResult) + async def Info(self, id_): ''' - specs : typing.Sequence[~ControllersSpec] - Returns -> typing.Sequence[~ControllersChangeResult] + id_ : str + Returns -> typing.Union[str, int, _ForwardRef('Number')] ''' # map input types to rpc msg params = dict() - msg = dict(Type='HighAvailability', Request='EnableHA', Version=2, Params=params) - params['Specs'] = specs + msg = dict(type='Backups', request='Info', version=1, params=params) + params['id'] = id_ reply = await self.rpc(msg) return reply - @ReturnMapping(None) - async def ResumeHAReplicationAfterUpgrade(self, members): + @ReturnMapping(BackupsListResult) + async def List(self): ''' - members : typing.Sequence[~Member] - Returns -> None + + Returns -> typing.Sequence<+T_co>[~BackupsMetadataResult]<~BackupsMetadataResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='HighAvailability', Request='ResumeHAReplicationAfterUpgrade', Version=2, Params=params) - params['Members'] = members + msg = dict(type='Backups', request='List', version=1, params=params) + reply = await self.rpc(msg) return reply - @ReturnMapping(MongoUpgradeResults) - async def StopHAReplicationForUpgrade(self, major, minor, patch, storageengine): + @ReturnMapping(None) + async def PrepareRestore(self): ''' - major : int - minor : int - patch : str - storageengine : str - Returns -> typing.Union[_ForwardRef('HAMember'), typing.Sequence[~Member]] + + Returns -> None ''' # map input types to rpc msg params = dict() - msg = dict(Type='HighAvailability', Request='StopHAReplicationForUpgrade', Version=2, Params=params) - params['Major'] = major - params['Minor'] = minor - params['Patch'] = patch - params['StorageEngine'] = storageengine + msg = dict(type='Backups', request='PrepareRestore', version=1, params=params) + reply = await self.rpc(msg) return reply -class HostKeyReporter(Type): - name = 'HostKeyReporter' - version = 1 - schema = {'definitions': {'Error': {'additionalProperties': False, - 'properties': {'Code': {'type': 'string'}, - 'Info': {'$ref': '#/definitions/ErrorInfo'}, - 'Message': {'type': 'string'}}, - 'required': ['Message', 'Code'], - 'type': 'object'}, - 'ErrorInfo': {'additionalProperties': False, - 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'}, - 'MacaroonPath': {'type': 'string'}}, - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}}, - 'required': ['Error'], - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, - 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'}, - 'type': 'array'}, - 'data': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'id': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'sig': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['data', - 'location', - 'id', - 'caveats', - 'sig'], - 'type': 'object'}, - 'SSHHostKeySet': {'additionalProperties': False, - 'properties': {'entity-keys': {'items': {'$ref': '#/definitions/SSHHostKeys'}, - 'type': 'array'}}, - 'required': ['entity-keys'], - 'type': 'object'}, - 'SSHHostKeys': {'additionalProperties': False, - 'properties': {'public-keys': {'items': {'type': 'string'}, - 'type': 'array'}, - 'tag': {'type': 'string'}}, - 'required': ['tag', 'public-keys'], - 'type': 'object'}, - 'caveat': {'additionalProperties': False, - 'properties': {'caveatId': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'verificationId': {'$ref': '#/definitions/packet'}}, - 'required': ['location', - 'caveatId', - 'verificationId'], - 'type': 'object'}, - 'packet': {'additionalProperties': False, - 'properties': {'headerLen': {'type': 'integer'}, - 'start': {'type': 'integer'}, - 'totalLen': {'type': 'integer'}}, - 'required': ['start', 'totalLen', 'headerLen'], - 'type': 'object'}}, - 'properties': {'ReportKeys': {'properties': {'Params': {'$ref': '#/definitions/SSHHostKeySet'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - @ReturnMapping(ErrorResults) - async def ReportKeys(self, entity_keys): + @ReturnMapping(None) + async def Remove(self, id_): ''' - entity_keys : typing.Sequence[~SSHHostKeys] - Returns -> typing.Sequence[~ErrorResult] + id_ : str + Returns -> None ''' # map input types to rpc msg params = dict() - msg = dict(Type='HostKeyReporter', Request='ReportKeys', Version=1, Params=params) - params['entity-keys'] = entity_keys + msg = dict(type='Backups', request='Remove', version=1, params=params) + params['id'] = id_ reply = await self.rpc(msg) return reply -class ImageManager(Type): - name = 'ImageManager' + + @ReturnMapping(None) + async def Restore(self, backup_id): + ''' + backup_id : str + Returns -> None + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='Backups', request='Restore', version=1, params=params) + params['backup-id'] = backup_id + reply = await self.rpc(msg) + return reply + + +class BlockFacade(Type): + name = 'Block' version = 2 - schema = {'definitions': {'Error': {'additionalProperties': False, - 'properties': {'Code': {'type': 'string'}, - 'Info': {'$ref': '#/definitions/ErrorInfo'}, - 'Message': {'type': 'string'}}, - 'required': ['Message', 'Code'], + schema = {'definitions': {'Block': {'additionalProperties': False, + 'properties': {'id': {'type': 'string'}, + 'message': {'type': 'string'}, + 'tag': {'type': 'string'}, + 'type': {'type': 'string'}}, + 'required': ['id', 'tag', 'type'], 'type': 'object'}, - 'ErrorInfo': {'additionalProperties': False, - 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'}, - 'MacaroonPath': {'type': 'string'}}, - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}}, - 'required': ['Error'], + 'BlockResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'$ref': '#/definitions/Block'}}, + 'required': ['result'], 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'}, + 'BlockResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/BlockResult'}, 'type': 'array'}}, - 'required': ['Results'], 'type': 'object'}, - 'ImageFilterParams': {'additionalProperties': False, - 'properties': {'images': {'items': {'$ref': '#/definitions/ImageSpec'}, - 'type': 'array'}}, - 'required': ['images'], + 'BlockSwitchParams': {'additionalProperties': False, + 'properties': {'message': {'type': 'string'}, + 'type': {'type': 'string'}}, + 'required': ['type'], 'type': 'object'}, - 'ImageMetadata': {'additionalProperties': False, - 'properties': {'arch': {'type': 'string'}, - 'created': {'format': 'date-time', - 'type': 'string'}, - 'kind': {'type': 'string'}, - 'series': {'type': 'string'}, - 'url': {'type': 'string'}}, - 'required': ['kind', - 'arch', - 'series', - 'url', - 'created'], - 'type': 'object'}, - 'ImageSpec': {'additionalProperties': False, - 'properties': {'arch': {'type': 'string'}, - 'kind': {'type': 'string'}, - 'series': {'type': 'string'}}, - 'required': ['kind', 'arch', 'series'], + 'Error': {'additionalProperties': False, + 'properties': {'code': {'type': 'string'}, + 'info': {'$ref': '#/definitions/ErrorInfo'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], + 'type': 'object'}, + 'ErrorInfo': {'additionalProperties': False, + 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'macaroon-path': {'type': 'string'}}, 'type': 'object'}, - 'ListImageResult': {'additionalProperties': False, - 'properties': {'result': {'items': {'$ref': '#/definitions/ImageMetadata'}, - 'type': 'array'}}, - 'required': ['result'], - 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, - 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'}, - 'type': 'array'}, - 'data': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'id': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'sig': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['data', - 'location', - 'id', - 'caveats', - 'sig'], - 'type': 'object'}, - 'caveat': {'additionalProperties': False, - 'properties': {'caveatId': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'verificationId': {'$ref': '#/definitions/packet'}}, - 'required': ['location', - 'caveatId', - 'verificationId'], - 'type': 'object'}, - 'packet': {'additionalProperties': False, - 'properties': {'headerLen': {'type': 'integer'}, - 'start': {'type': 'integer'}, - 'totalLen': {'type': 'integer'}}, - 'required': ['start', 'totalLen', 'headerLen'], - 'type': 'object'}}, - 'properties': {'DeleteImages': {'properties': {'Params': {'$ref': '#/definitions/ImageFilterParams'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'ErrorResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}}, 'type': 'object'}, - 'ListImages': {'properties': {'Params': {'$ref': '#/definitions/ImageFilterParams'}, - 'Result': {'$ref': '#/definitions/ListImageResult'}}, - 'type': 'object'}}, + 'Macaroon': {'additionalProperties': False, 'type': 'object'}}, + 'properties': {'List': {'properties': {'Result': {'$ref': '#/definitions/BlockResults'}}, + 'type': 'object'}, + 'SwitchBlockOff': {'properties': {'Params': {'$ref': '#/definitions/BlockSwitchParams'}, + 'Result': {'$ref': '#/definitions/ErrorResult'}}, + 'type': 'object'}, + 'SwitchBlockOn': {'properties': {'Params': {'$ref': '#/definitions/BlockSwitchParams'}, + 'Result': {'$ref': '#/definitions/ErrorResult'}}, + 'type': 'object'}}, 'type': 'object'} - @ReturnMapping(ErrorResults) - async def DeleteImages(self, images): + @ReturnMapping(BlockResults) + async def List(self): ''' - images : typing.Sequence[~ImageSpec] - Returns -> typing.Sequence[~ErrorResult] + + Returns -> typing.Sequence<+T_co>[~BlockResult]<~BlockResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='ImageManager', Request='DeleteImages', Version=2, Params=params) - params['images'] = images + msg = dict(type='Block', request='List', version=2, params=params) + reply = await self.rpc(msg) return reply - @ReturnMapping(ListImageResult) - async def ListImages(self, images): + @ReturnMapping(ErrorResult) + async def SwitchBlockOff(self, message, type_): + ''' + message : str + type_ : str + Returns -> Error + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='Block', request='SwitchBlockOff', version=2, params=params) + params['message'] = message + params['type'] = type_ + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResult) + async def SwitchBlockOn(self, message, type_): ''' - images : typing.Sequence[~ImageSpec] - Returns -> typing.Sequence[~ImageMetadata] + message : str + type_ : str + Returns -> Error ''' # map input types to rpc msg params = dict() - msg = dict(Type='ImageManager', Request='ListImages', Version=2, Params=params) - params['images'] = images + msg = dict(type='Block', request='SwitchBlockOn', version=2, params=params) + params['message'] = message + params['type'] = type_ reply = await self.rpc(msg) return reply -class ImageMetadata(Type): - name = 'ImageMetadata' +class CharmRevisionUpdaterFacade(Type): + name = 'CharmRevisionUpdater' version = 2 - schema = {'definitions': {'CloudImageMetadata': {'additionalProperties': False, - 'properties': {'arch': {'type': 'string'}, - 'image_id': {'type': 'string'}, - 'priority': {'type': 'integer'}, - 'region': {'type': 'string'}, - 'root_storage_size': {'type': 'integer'}, - 'root_storage_type': {'type': 'string'}, - 'series': {'type': 'string'}, - 'source': {'type': 'string'}, - 'stream': {'type': 'string'}, - 'version': {'type': 'string'}, - 'virt_type': {'type': 'string'}}, - 'required': ['image_id', - 'region', - 'version', - 'series', - 'arch', - 'source', - 'priority'], - 'type': 'object'}, - 'CloudImageMetadataList': {'additionalProperties': False, - 'properties': {'metadata': {'items': {'$ref': '#/definitions/CloudImageMetadata'}, - 'type': 'array'}}, - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'Code': {'type': 'string'}, - 'Info': {'$ref': '#/definitions/ErrorInfo'}, - 'Message': {'type': 'string'}}, - 'required': ['Message', 'Code'], + schema = {'definitions': {'Error': {'additionalProperties': False, + 'properties': {'code': {'type': 'string'}, + 'info': {'$ref': '#/definitions/ErrorInfo'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], 'type': 'object'}, 'ErrorInfo': {'additionalProperties': False, - 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'}, - 'MacaroonPath': {'type': 'string'}}, + 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'macaroon-path': {'type': 'string'}}, 'type': 'object'}, 'ErrorResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}}, - 'required': ['Error'], + 'properties': {'error': {'$ref': '#/definitions/Error'}}, 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'ImageMetadataFilter': {'additionalProperties': False, - 'properties': {'arches': {'items': {'type': 'string'}, - 'type': 'array'}, - 'region': {'type': 'string'}, - 'root-storage-type': {'type': 'string'}, - 'series': {'items': {'type': 'string'}, - 'type': 'array'}, - 'stream': {'type': 'string'}, - 'virt_type': {'type': 'string'}}, - 'type': 'object'}, - 'ListCloudImageMetadataResult': {'additionalProperties': False, - 'properties': {'result': {'items': {'$ref': '#/definitions/CloudImageMetadata'}, - 'type': 'array'}}, - 'required': ['result'], - 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, - 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'}, - 'type': 'array'}, - 'data': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'id': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'sig': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['data', - 'location', - 'id', - 'caveats', - 'sig'], - 'type': 'object'}, - 'MetadataImageIds': {'additionalProperties': False, - 'properties': {'image_ids': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['image_ids'], - 'type': 'object'}, - 'MetadataSaveParams': {'additionalProperties': False, - 'properties': {'metadata': {'items': {'$ref': '#/definitions/CloudImageMetadataList'}, - 'type': 'array'}}, - 'type': 'object'}, - 'caveat': {'additionalProperties': False, - 'properties': {'caveatId': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'verificationId': {'$ref': '#/definitions/packet'}}, - 'required': ['location', - 'caveatId', - 'verificationId'], - 'type': 'object'}, - 'packet': {'additionalProperties': False, - 'properties': {'headerLen': {'type': 'integer'}, - 'start': {'type': 'integer'}, - 'totalLen': {'type': 'integer'}}, - 'required': ['start', 'totalLen', 'headerLen'], - 'type': 'object'}}, - 'properties': {'Delete': {'properties': {'Params': {'$ref': '#/definitions/MetadataImageIds'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'List': {'properties': {'Params': {'$ref': '#/definitions/ImageMetadataFilter'}, - 'Result': {'$ref': '#/definitions/ListCloudImageMetadataResult'}}, - 'type': 'object'}, - 'Save': {'properties': {'Params': {'$ref': '#/definitions/MetadataSaveParams'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'UpdateFromPublishedImages': {'type': 'object'}}, + 'Macaroon': {'additionalProperties': False, 'type': 'object'}}, + 'properties': {'UpdateLatestRevisions': {'properties': {'Result': {'$ref': '#/definitions/ErrorResult'}}, + 'type': 'object'}}, 'type': 'object'} - @ReturnMapping(ErrorResults) - async def Delete(self, image_ids): + @ReturnMapping(ErrorResult) + async def UpdateLatestRevisions(self): ''' - image_ids : typing.Sequence[str] - Returns -> typing.Sequence[~ErrorResult] + + Returns -> Error ''' # map input types to rpc msg params = dict() - msg = dict(Type='ImageMetadata', Request='Delete', Version=2, Params=params) - params['image_ids'] = image_ids + msg = dict(type='CharmRevisionUpdater', request='UpdateLatestRevisions', version=2, params=params) + reply = await self.rpc(msg) return reply +class CharmsFacade(Type): + name = 'Charms' + version = 2 + schema = {'definitions': {'CharmActionSpec': {'additionalProperties': False, + 'properties': {'description': {'type': 'string'}, + 'params': {'patternProperties': {'.*': {'additionalProperties': True, + 'type': 'object'}}, + 'type': 'object'}}, + 'required': ['description', 'params'], + 'type': 'object'}, + 'CharmActions': {'additionalProperties': False, + 'properties': {'specs': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmActionSpec'}}, + 'type': 'object'}}, + 'type': 'object'}, + 'CharmInfo': {'additionalProperties': False, + 'properties': {'actions': {'$ref': '#/definitions/CharmActions'}, + 'config': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmOption'}}, + 'type': 'object'}, + 'meta': {'$ref': '#/definitions/CharmMeta'}, + 'metrics': {'$ref': '#/definitions/CharmMetrics'}, + 'revision': {'type': 'integer'}, + 'url': {'type': 'string'}}, + 'required': ['revision', 'url', 'config'], + 'type': 'object'}, + 'CharmMeta': {'additionalProperties': False, + 'properties': {'categories': {'items': {'type': 'string'}, + 'type': 'array'}, + 'description': {'type': 'string'}, + 'extra-bindings': {'patternProperties': {'.*': {'type': 'string'}}, + 'type': 'object'}, + 'min-juju-version': {'type': 'string'}, + 'name': {'type': 'string'}, + 'payload-classes': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmPayloadClass'}}, + 'type': 'object'}, + 'peers': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}}, + 'type': 'object'}, + 'provides': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}}, + 'type': 'object'}, + 'requires': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}}, + 'type': 'object'}, + 'resources': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmResourceMeta'}}, + 'type': 'object'}, + 'series': {'items': {'type': 'string'}, + 'type': 'array'}, + 'storage': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmStorage'}}, + 'type': 'object'}, + 'subordinate': {'type': 'boolean'}, + 'summary': {'type': 'string'}, + 'tags': {'items': {'type': 'string'}, + 'type': 'array'}, + 'terms': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'required': ['name', + 'summary', + 'description', + 'subordinate'], + 'type': 'object'}, + 'CharmMetric': {'additionalProperties': False, + 'properties': {'description': {'type': 'string'}, + 'type': {'type': 'string'}}, + 'required': ['type', 'description'], + 'type': 'object'}, + 'CharmMetrics': {'additionalProperties': False, + 'properties': {'metrics': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmMetric'}}, + 'type': 'object'}}, + 'required': ['metrics'], + 'type': 'object'}, + 'CharmOption': {'additionalProperties': False, + 'properties': {'default': {'additionalProperties': True, + 'type': 'object'}, + 'description': {'type': 'string'}, + 'type': {'type': 'string'}}, + 'required': ['type'], + 'type': 'object'}, + 'CharmPayloadClass': {'additionalProperties': False, + 'properties': {'name': {'type': 'string'}, + 'type': {'type': 'string'}}, + 'required': ['name', 'type'], + 'type': 'object'}, + 'CharmRelation': {'additionalProperties': False, + 'properties': {'interface': {'type': 'string'}, + 'limit': {'type': 'integer'}, + 'name': {'type': 'string'}, + 'optional': {'type': 'boolean'}, + 'role': {'type': 'string'}, + 'scope': {'type': 'string'}}, + 'required': ['name', + 'role', + 'interface', + 'optional', + 'limit', + 'scope'], + 'type': 'object'}, + 'CharmResourceMeta': {'additionalProperties': False, + 'properties': {'description': {'type': 'string'}, + 'name': {'type': 'string'}, + 'path': {'type': 'string'}, + 'type': {'type': 'string'}}, + 'required': ['name', + 'type', + 'path', + 'description'], + 'type': 'object'}, + 'CharmStorage': {'additionalProperties': False, + 'properties': {'count-max': {'type': 'integer'}, + 'count-min': {'type': 'integer'}, + 'description': {'type': 'string'}, + 'location': {'type': 'string'}, + 'minimum-size': {'type': 'integer'}, + 'name': {'type': 'string'}, + 'properties': {'items': {'type': 'string'}, + 'type': 'array'}, + 'read-only': {'type': 'boolean'}, + 'shared': {'type': 'boolean'}, + 'type': {'type': 'string'}}, + 'required': ['name', + 'description', + 'type', + 'shared', + 'read-only', + 'count-min', + 'count-max', + 'minimum-size'], + 'type': 'object'}, + 'CharmURL': {'additionalProperties': False, + 'properties': {'url': {'type': 'string'}}, + 'required': ['url'], + 'type': 'object'}, + 'CharmsList': {'additionalProperties': False, + 'properties': {'names': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'required': ['names'], + 'type': 'object'}, + 'CharmsListResult': {'additionalProperties': False, + 'properties': {'charm-urls': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'required': ['charm-urls'], + 'type': 'object'}, + 'IsMeteredResult': {'additionalProperties': False, + 'properties': {'metered': {'type': 'boolean'}}, + 'required': ['metered'], + 'type': 'object'}}, + 'properties': {'CharmInfo': {'properties': {'Params': {'$ref': '#/definitions/CharmURL'}, + 'Result': {'$ref': '#/definitions/CharmInfo'}}, + 'type': 'object'}, + 'IsMetered': {'properties': {'Params': {'$ref': '#/definitions/CharmURL'}, + 'Result': {'$ref': '#/definitions/IsMeteredResult'}}, + 'type': 'object'}, + 'List': {'properties': {'Params': {'$ref': '#/definitions/CharmsList'}, + 'Result': {'$ref': '#/definitions/CharmsListResult'}}, + 'type': 'object'}}, + 'type': 'object'} + - @ReturnMapping(ListCloudImageMetadataResult) - async def List(self, arches, region, root_storage_type, series, stream, virt_type): + @ReturnMapping(CharmInfo) + async def CharmInfo(self, url): ''' - arches : typing.Sequence[str] - region : str - root_storage_type : str - series : typing.Sequence[str] - stream : str - virt_type : str - Returns -> typing.Sequence[~CloudImageMetadata] + url : str + Returns -> typing.Union[_ForwardRef('CharmActions'), typing.Mapping<~KT, +VT_co>[str, ~CharmOption]<~CharmOption>, _ForwardRef('CharmMeta'), _ForwardRef('CharmMetrics'), int, str] ''' # map input types to rpc msg params = dict() - msg = dict(Type='ImageMetadata', Request='List', Version=2, Params=params) - params['arches'] = arches - params['region'] = region - params['root-storage-type'] = root_storage_type - params['series'] = series - params['stream'] = stream - params['virt_type'] = virt_type + msg = dict(type='Charms', request='CharmInfo', version=2, params=params) + params['url'] = url reply = await self.rpc(msg) return reply - @ReturnMapping(ErrorResults) - async def Save(self, metadata): + @ReturnMapping(IsMeteredResult) + async def IsMetered(self, url): ''' - metadata : typing.Sequence[~CloudImageMetadataList] - Returns -> typing.Sequence[~ErrorResult] + url : str + Returns -> bool ''' # map input types to rpc msg params = dict() - msg = dict(Type='ImageMetadata', Request='Save', Version=2, Params=params) - params['metadata'] = metadata + msg = dict(type='Charms', request='IsMetered', version=2, params=params) + params['url'] = url reply = await self.rpc(msg) return reply - @ReturnMapping(None) - async def UpdateFromPublishedImages(self): + @ReturnMapping(CharmsListResult) + async def List(self, names): ''' - - Returns -> None + names : typing.Sequence<+T_co>[str] + Returns -> typing.Sequence<+T_co>[str] ''' # map input types to rpc msg params = dict() - msg = dict(Type='ImageMetadata', Request='UpdateFromPublishedImages', Version=2, Params=params) - + msg = dict(type='Charms', request='List', version=2, params=params) + params['names'] = names reply = await self.rpc(msg) return reply -class InstancePoller(Type): - name = 'InstancePoller' +class CleanerFacade(Type): + name = 'Cleaner' version = 2 - schema = {'definitions': {'Address': {'additionalProperties': False, - 'properties': {'Scope': {'type': 'string'}, - 'SpaceName': {'type': 'string'}, - 'Type': {'type': 'string'}, - 'Value': {'type': 'string'}}, - 'required': ['Value', 'Type', 'Scope'], - 'type': 'object'}, - 'BoolResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Result': {'type': 'boolean'}}, - 'required': ['Error', 'Result'], - 'type': 'object'}, - 'BoolResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/BoolResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'Entities': {'additionalProperties': False, - 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'}, - 'type': 'array'}}, - 'required': ['Entities'], - 'type': 'object'}, - 'Entity': {'additionalProperties': False, - 'properties': {'Tag': {'type': 'string'}}, - 'required': ['Tag'], - 'type': 'object'}, - 'EntityStatusArgs': {'additionalProperties': False, - 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'Info': {'type': 'string'}, - 'Status': {'type': 'string'}, - 'Tag': {'type': 'string'}}, - 'required': ['Tag', - 'Status', - 'Info', - 'Data'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'Code': {'type': 'string'}, - 'Info': {'$ref': '#/definitions/ErrorInfo'}, - 'Message': {'type': 'string'}}, - 'required': ['Message', 'Code'], + schema = {'definitions': {'Error': {'additionalProperties': False, + 'properties': {'code': {'type': 'string'}, + 'info': {'$ref': '#/definitions/ErrorInfo'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], 'type': 'object'}, 'ErrorInfo': {'additionalProperties': False, - 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'}, - 'MacaroonPath': {'type': 'string'}}, + 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'macaroon-path': {'type': 'string'}}, 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}}, - 'required': ['Error'], - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'LifeResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Life': {'type': 'string'}}, - 'required': ['Life', 'Error'], - 'type': 'object'}, - 'LifeResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/LifeResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, - 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'}, - 'type': 'array'}, - 'data': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'id': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'sig': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['data', - 'location', - 'id', - 'caveats', - 'sig'], - 'type': 'object'}, - 'MachineAddresses': {'additionalProperties': False, - 'properties': {'Addresses': {'items': {'$ref': '#/definitions/Address'}, - 'type': 'array'}, - 'Tag': {'type': 'string'}}, - 'required': ['Tag', 'Addresses'], - 'type': 'object'}, - 'MachineAddressesResult': {'additionalProperties': False, - 'properties': {'Addresses': {'items': {'$ref': '#/definitions/Address'}, - 'type': 'array'}, - 'Error': {'$ref': '#/definitions/Error'}}, - 'required': ['Error', 'Addresses'], - 'type': 'object'}, - 'MachineAddressesResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/MachineAddressesResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'ModelConfigResult': {'additionalProperties': False, - 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}}, - 'required': ['Config'], - 'type': 'object'}, + 'Macaroon': {'additionalProperties': False, 'type': 'object'}, 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'NotifyWatcherId': {'type': 'string'}}, - 'required': ['NotifyWatcherId', 'Error'], - 'type': 'object'}, - 'SetMachinesAddresses': {'additionalProperties': False, - 'properties': {'MachineAddresses': {'items': {'$ref': '#/definitions/MachineAddresses'}, - 'type': 'array'}}, - 'required': ['MachineAddresses'], - 'type': 'object'}, - 'SetStatus': {'additionalProperties': False, - 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'}, - 'type': 'array'}}, - 'required': ['Entities'], - 'type': 'object'}, - 'StatusResult': {'additionalProperties': False, - 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'Error': {'$ref': '#/definitions/Error'}, - 'Id': {'type': 'string'}, - 'Info': {'type': 'string'}, - 'Life': {'type': 'string'}, - 'Since': {'format': 'date-time', - 'type': 'string'}, - 'Status': {'type': 'string'}}, - 'required': ['Error', - 'Id', - 'Life', - 'Status', - 'Info', - 'Data', - 'Since'], - 'type': 'object'}, - 'StatusResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/StatusResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'StringResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Result': {'type': 'string'}}, - 'required': ['Error', 'Result'], - 'type': 'object'}, - 'StringResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/StringResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'StringsWatchResult': {'additionalProperties': False, - 'properties': {'Changes': {'items': {'type': 'string'}, - 'type': 'array'}, - 'Error': {'$ref': '#/definitions/Error'}, - 'StringsWatcherId': {'type': 'string'}}, - 'required': ['StringsWatcherId', - 'Changes', - 'Error'], - 'type': 'object'}, - 'caveat': {'additionalProperties': False, - 'properties': {'caveatId': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'verificationId': {'$ref': '#/definitions/packet'}}, - 'required': ['location', - 'caveatId', - 'verificationId'], - 'type': 'object'}, - 'packet': {'additionalProperties': False, - 'properties': {'headerLen': {'type': 'integer'}, - 'start': {'type': 'integer'}, - 'totalLen': {'type': 'integer'}}, - 'required': ['start', 'totalLen', 'headerLen'], - 'type': 'object'}}, - 'properties': {'AreManuallyProvisioned': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/BoolResults'}}, - 'type': 'object'}, - 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringResults'}}, - 'type': 'object'}, - 'InstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StatusResults'}}, - 'type': 'object'}, - 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/LifeResults'}}, - 'type': 'object'}, - 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}}, - 'type': 'object'}, - 'ProviderAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/MachineAddressesResults'}}, - 'type': 'object'}, - 'SetInstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetProviderAddresses': {'properties': {'Params': {'$ref': '#/definitions/SetMachinesAddresses'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'Status': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StatusResults'}}, - 'type': 'object'}, - 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, - 'type': 'object'}, - 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}}, + 'properties': {'NotifyWatcherId': {'type': 'string'}, + 'error': {'$ref': '#/definitions/Error'}}, + 'required': ['NotifyWatcherId'], 'type': 'object'}}, + 'properties': {'Cleanup': {'type': 'object'}, + 'WatchCleanups': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, + 'type': 'object'}}, 'type': 'object'} - @ReturnMapping(BoolResults) - async def AreManuallyProvisioned(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~BoolResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='InstancePoller', Request='AreManuallyProvisioned', Version=2, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringResults) - async def InstanceId(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~StringResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='InstancePoller', Request='InstanceId', Version=2, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StatusResults) - async def InstanceStatus(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~StatusResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='InstancePoller', Request='InstanceStatus', Version=2, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(LifeResults) - async def Life(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~LifeResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='InstancePoller', Request='Life', Version=2, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ModelConfigResult) - async def ModelConfig(self): - ''' - - Returns -> typing.Mapping[str, typing.Any] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='InstancePoller', Request='ModelConfig', Version=2, Params=params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(MachineAddressesResults) - async def ProviderAddresses(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~MachineAddressesResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='InstancePoller', Request='ProviderAddresses', Version=2, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetInstanceStatus(self, entities): - ''' - entities : typing.Sequence[~EntityStatusArgs] - Returns -> typing.Sequence[~ErrorResult] + @ReturnMapping(None) + async def Cleanup(self): ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='InstancePoller', Request='SetInstanceStatus', Version=2, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - @ReturnMapping(ErrorResults) - async def SetProviderAddresses(self, machineaddresses): - ''' - machineaddresses : typing.Sequence[~MachineAddresses] - Returns -> typing.Sequence[~ErrorResult] + Returns -> None ''' # map input types to rpc msg params = dict() - msg = dict(Type='InstancePoller', Request='SetProviderAddresses', Version=2, Params=params) - params['MachineAddresses'] = machineaddresses - reply = await self.rpc(msg) - return reply - + msg = dict(type='Cleaner', request='Cleanup', version=2, params=params) - - @ReturnMapping(StatusResults) - async def Status(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~StatusResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='InstancePoller', Request='Status', Version=2, Params=params) - params['Entities'] = entities reply = await self.rpc(msg) return reply @ReturnMapping(NotifyWatchResult) - async def WatchForModelConfigChanges(self): - ''' - - Returns -> typing.Union[_ForwardRef('Error'), str] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='InstancePoller', Request='WatchForModelConfigChanges', Version=2, Params=params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResult) - async def WatchModelMachines(self): + async def WatchCleanups(self): ''' - Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')] + Returns -> typing.Union[str, _ForwardRef('Error')] ''' # map input types to rpc msg params = dict() - msg = dict(Type='InstancePoller', Request='WatchModelMachines', Version=2, Params=params) + msg = dict(type='Cleaner', request='WatchCleanups', version=2, params=params) reply = await self.rpc(msg) return reply -class KeyManager(Type): - name = 'KeyManager' +class ClientFacade(Type): + name = 'Client' version = 1 - schema = {'definitions': {'Entities': {'additionalProperties': False, - 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'}, - 'type': 'array'}}, - 'required': ['Entities'], - 'type': 'object'}, - 'Entity': {'additionalProperties': False, - 'properties': {'Tag': {'type': 'string'}}, - 'required': ['Tag'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'Code': {'type': 'string'}, - 'Info': {'$ref': '#/definitions/ErrorInfo'}, - 'Message': {'type': 'string'}}, - 'required': ['Message', 'Code'], - 'type': 'object'}, - 'ErrorInfo': {'additionalProperties': False, - 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'}, - 'MacaroonPath': {'type': 'string'}}, - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}}, - 'required': ['Error'], - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'ListSSHKeys': {'additionalProperties': False, - 'properties': {'Entities': {'$ref': '#/definitions/Entities'}, - 'Mode': {'type': 'boolean'}}, - 'required': ['Entities', 'Mode'], - 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, - 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'}, - 'type': 'array'}, - 'data': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'id': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'sig': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['data', - 'location', - 'id', - 'caveats', - 'sig'], + schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False, + 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'}, + 'type': 'array'}, + 'type': 'array'}}, + 'required': ['servers'], + 'type': 'object'}, + 'AddCharm': {'additionalProperties': False, + 'properties': {'channel': {'type': 'string'}, + 'url': {'type': 'string'}}, + 'required': ['url', 'channel'], 'type': 'object'}, - 'ModifyUserSSHKeys': {'additionalProperties': False, - 'properties': {'Keys': {'items': {'type': 'string'}, + 'AddCharmWithAuthorization': {'additionalProperties': False, + 'properties': {'channel': {'type': 'string'}, + 'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'url': {'type': 'string'}}, + 'required': ['url', + 'channel', + 'macaroon'], + 'type': 'object'}, + 'AddMachineParams': {'additionalProperties': False, + 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'}, + 'type': 'array'}, + 'constraints': {'$ref': '#/definitions/Value'}, + 'container-type': {'type': 'string'}, + 'disks': {'items': {'$ref': '#/definitions/Constraints'}, 'type': 'array'}, - 'User': {'type': 'string'}}, - 'required': ['User', 'Keys'], - 'type': 'object'}, - 'StringsResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Result': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['Error', 'Result'], - 'type': 'object'}, - 'StringsResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'caveat': {'additionalProperties': False, - 'properties': {'caveatId': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'verificationId': {'$ref': '#/definitions/packet'}}, - 'required': ['location', - 'caveatId', - 'verificationId'], - 'type': 'object'}, - 'packet': {'additionalProperties': False, - 'properties': {'headerLen': {'type': 'integer'}, - 'start': {'type': 'integer'}, - 'totalLen': {'type': 'integer'}}, - 'required': ['start', 'totalLen', 'headerLen'], - 'type': 'object'}}, - 'properties': {'AddKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'hardware-characteristics': {'$ref': '#/definitions/HardwareCharacteristics'}, + 'instance-id': {'type': 'string'}, + 'jobs': {'items': {'type': 'string'}, + 'type': 'array'}, + 'nonce': {'type': 'string'}, + 'parent-id': {'type': 'string'}, + 'placement': {'$ref': '#/definitions/Placement'}, + 'series': {'type': 'string'}}, + 'required': ['series', + 'constraints', + 'jobs', + 'parent-id', + 'container-type', + 'instance-id', + 'nonce', + 'hardware-characteristics', + 'addresses'], + 'type': 'object'}, + 'AddMachines': {'additionalProperties': False, + 'properties': {'params': {'items': {'$ref': '#/definitions/AddMachineParams'}, + 'type': 'array'}}, + 'required': ['params'], + 'type': 'object'}, + 'AddMachinesResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'machine': {'type': 'string'}}, + 'required': ['machine'], + 'type': 'object'}, + 'AddMachinesResults': {'additionalProperties': False, + 'properties': {'machines': {'items': {'$ref': '#/definitions/AddMachinesResult'}, + 'type': 'array'}}, + 'required': ['machines'], + 'type': 'object'}, + 'Address': {'additionalProperties': False, + 'properties': {'scope': {'type': 'string'}, + 'space-name': {'type': 'string'}, + 'type': {'type': 'string'}, + 'value': {'type': 'string'}}, + 'required': ['value', 'type', 'scope'], + 'type': 'object'}, + 'AgentVersionResult': {'additionalProperties': False, + 'properties': {'version': {'$ref': '#/definitions/Number'}}, + 'required': ['version'], + 'type': 'object'}, + 'AllWatcherId': {'additionalProperties': False, + 'properties': {'watcher-id': {'type': 'string'}}, + 'required': ['watcher-id'], + 'type': 'object'}, + 'ApplicationStatus': {'additionalProperties': False, + 'properties': {'can-upgrade-to': {'type': 'string'}, + 'charm': {'type': 'string'}, + 'err': {'additionalProperties': True, + 'type': 'object'}, + 'exposed': {'type': 'boolean'}, + 'life': {'type': 'string'}, + 'meter-statuses': {'patternProperties': {'.*': {'$ref': '#/definitions/MeterStatus'}}, + 'type': 'object'}, + 'relations': {'patternProperties': {'.*': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'type': 'object'}, + 'series': {'type': 'string'}, + 'status': {'$ref': '#/definitions/DetailedStatus'}, + 'subordinate-to': {'items': {'type': 'string'}, + 'type': 'array'}, + 'units': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitStatus'}}, + 'type': 'object'}, + 'workload-version': {'type': 'string'}}, + 'required': ['charm', + 'series', + 'exposed', + 'life', + 'relations', + 'can-upgrade-to', + 'subordinate-to', + 'units', + 'meter-statuses', + 'status', + 'workload-version'], + 'type': 'object'}, + 'Binary': {'additionalProperties': False, + 'properties': {'Arch': {'type': 'string'}, + 'Number': {'$ref': '#/definitions/Number'}, + 'Series': {'type': 'string'}}, + 'required': ['Number', 'Series', 'Arch'], 'type': 'object'}, - 'DeleteKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'ImportKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'ListKeys': {'properties': {'Params': {'$ref': '#/definitions/ListSSHKeys'}, - 'Result': {'$ref': '#/definitions/StringsResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(ErrorResults) - async def AddKeys(self, keys, user): - ''' - keys : typing.Sequence[str] - user : str - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='KeyManager', Request='AddKeys', Version=1, Params=params) - params['Keys'] = keys - params['User'] = user - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def DeleteKeys(self, keys, user): - ''' - keys : typing.Sequence[str] - user : str - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='KeyManager', Request='DeleteKeys', Version=1, Params=params) - params['Keys'] = keys - params['User'] = user - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def ImportKeys(self, keys, user): - ''' - keys : typing.Sequence[str] - user : str - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='KeyManager', Request='ImportKeys', Version=1, Params=params) - params['Keys'] = keys - params['User'] = user - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsResults) - async def ListKeys(self, entities, mode): - ''' - entities : Entities - mode : bool - Returns -> typing.Sequence[~StringsResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='KeyManager', Request='ListKeys', Version=1, Params=params) - params['Entities'] = entities - params['Mode'] = mode - reply = await self.rpc(msg) - return reply - - -class KeyUpdater(Type): - name = 'KeyUpdater' - version = 1 - schema = {'definitions': {'Entities': {'additionalProperties': False, - 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'}, + 'BundleChangesChange': {'additionalProperties': False, + 'properties': {'args': {'items': {'additionalProperties': True, + 'type': 'object'}, + 'type': 'array'}, + 'id': {'type': 'string'}, + 'method': {'type': 'string'}, + 'requires': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'required': ['id', + 'method', + 'args', + 'requires'], + 'type': 'object'}, + 'ConfigValue': {'additionalProperties': False, + 'properties': {'source': {'type': 'string'}, + 'value': {'additionalProperties': True, + 'type': 'object'}}, + 'required': ['value', 'source'], + 'type': 'object'}, + 'Constraints': {'additionalProperties': False, + 'properties': {'Count': {'type': 'integer'}, + 'Pool': {'type': 'string'}, + 'Size': {'type': 'integer'}}, + 'required': ['Pool', 'Size', 'Count'], + 'type': 'object'}, + 'DestroyMachines': {'additionalProperties': False, + 'properties': {'force': {'type': 'boolean'}, + 'machine-names': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'required': ['machine-names', 'force'], + 'type': 'object'}, + 'DetailedStatus': {'additionalProperties': False, + 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True, + 'type': 'object'}}, + 'type': 'object'}, + 'err': {'additionalProperties': True, + 'type': 'object'}, + 'info': {'type': 'string'}, + 'kind': {'type': 'string'}, + 'life': {'type': 'string'}, + 'since': {'format': 'date-time', + 'type': 'string'}, + 'status': {'type': 'string'}, + 'version': {'type': 'string'}}, + 'required': ['status', + 'info', + 'data', + 'since', + 'kind', + 'version', + 'life'], + 'type': 'object'}, + 'EndpointStatus': {'additionalProperties': False, + 'properties': {'application': {'type': 'string'}, + 'name': {'type': 'string'}, + 'role': {'type': 'string'}, + 'subordinate': {'type': 'boolean'}}, + 'required': ['application', + 'name', + 'role', + 'subordinate'], + 'type': 'object'}, + 'Entities': {'additionalProperties': False, + 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, 'type': 'array'}}, - 'required': ['Entities'], + 'required': ['entities'], 'type': 'object'}, 'Entity': {'additionalProperties': False, - 'properties': {'Tag': {'type': 'string'}}, - 'required': ['Tag'], + 'properties': {'tag': {'type': 'string'}}, + 'required': ['tag'], 'type': 'object'}, + 'EntityStatus': {'additionalProperties': False, + 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True, + 'type': 'object'}}, + 'type': 'object'}, + 'info': {'type': 'string'}, + 'since': {'format': 'date-time', + 'type': 'string'}, + 'status': {'type': 'string'}}, + 'required': ['status', 'info', 'since'], + 'type': 'object'}, 'Error': {'additionalProperties': False, - 'properties': {'Code': {'type': 'string'}, - 'Info': {'$ref': '#/definitions/ErrorInfo'}, - 'Message': {'type': 'string'}}, - 'required': ['Message', 'Code'], + 'properties': {'code': {'type': 'string'}, + 'info': {'$ref': '#/definitions/ErrorInfo'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], 'type': 'object'}, 'ErrorInfo': {'additionalProperties': False, - 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'}, - 'MacaroonPath': {'type': 'string'}}, + 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'macaroon-path': {'type': 'string'}}, 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, - 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'}, - 'type': 'array'}, - 'data': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'id': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'sig': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['data', - 'location', - 'id', - 'caveats', - 'sig'], + 'ErrorResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}}, + 'type': 'object'}, + 'ErrorResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'FindToolsParams': {'additionalProperties': False, + 'properties': {'arch': {'type': 'string'}, + 'major': {'type': 'integer'}, + 'minor': {'type': 'integer'}, + 'number': {'$ref': '#/definitions/Number'}, + 'series': {'type': 'string'}}, + 'required': ['number', + 'major', + 'minor', + 'arch', + 'series'], + 'type': 'object'}, + 'FindToolsResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'list': {'items': {'$ref': '#/definitions/Tools'}, + 'type': 'array'}}, + 'required': ['list'], + 'type': 'object'}, + 'FullStatus': {'additionalProperties': False, + 'properties': {'applications': {'patternProperties': {'.*': {'$ref': '#/definitions/ApplicationStatus'}}, + 'type': 'object'}, + 'machines': {'patternProperties': {'.*': {'$ref': '#/definitions/MachineStatus'}}, + 'type': 'object'}, + 'model': {'$ref': '#/definitions/ModelStatusInfo'}, + 'relations': {'items': {'$ref': '#/definitions/RelationStatus'}, + 'type': 'array'}}, + 'required': ['model', + 'machines', + 'applications', + 'relations'], + 'type': 'object'}, + 'GetBundleChangesParams': {'additionalProperties': False, + 'properties': {'yaml': {'type': 'string'}}, + 'required': ['yaml'], + 'type': 'object'}, + 'GetBundleChangesResults': {'additionalProperties': False, + 'properties': {'changes': {'items': {'$ref': '#/definitions/BundleChangesChange'}, + 'type': 'array'}, + 'errors': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'type': 'object'}, + 'GetConstraintsResults': {'additionalProperties': False, + 'properties': {'constraints': {'$ref': '#/definitions/Value'}}, + 'required': ['constraints'], + 'type': 'object'}, + 'HardwareCharacteristics': {'additionalProperties': False, + 'properties': {'arch': {'type': 'string'}, + 'availability-zone': {'type': 'string'}, + 'cpu-cores': {'type': 'integer'}, + 'cpu-power': {'type': 'integer'}, + 'mem': {'type': 'integer'}, + 'root-disk': {'type': 'integer'}, + 'tags': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'type': 'object'}, + 'History': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'statuses': {'items': {'$ref': '#/definitions/DetailedStatus'}, + 'type': 'array'}}, + 'required': ['statuses'], + 'type': 'object'}, + 'HostPort': {'additionalProperties': False, + 'properties': {'Address': {'$ref': '#/definitions/Address'}, + 'port': {'type': 'integer'}}, + 'required': ['Address', 'port'], 'type': 'object'}, - 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'NotifyWatcherId': {'type': 'string'}}, - 'required': ['NotifyWatcherId', 'Error'], - 'type': 'object'}, - 'NotifyWatchResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, - 'type': 'array'}}, - 'required': ['Results'], + 'Macaroon': {'additionalProperties': False, 'type': 'object'}, + 'MachineStatus': {'additionalProperties': False, + 'properties': {'agent-status': {'$ref': '#/definitions/DetailedStatus'}, + 'containers': {'patternProperties': {'.*': {'$ref': '#/definitions/MachineStatus'}}, + 'type': 'object'}, + 'dns-name': {'type': 'string'}, + 'hardware': {'type': 'string'}, + 'has-vote': {'type': 'boolean'}, + 'id': {'type': 'string'}, + 'instance-id': {'type': 'string'}, + 'instance-status': {'$ref': '#/definitions/DetailedStatus'}, + 'jobs': {'items': {'type': 'string'}, + 'type': 'array'}, + 'series': {'type': 'string'}, + 'wants-vote': {'type': 'boolean'}}, + 'required': ['agent-status', + 'instance-status', + 'dns-name', + 'instance-id', + 'series', + 'id', + 'containers', + 'hardware', + 'jobs', + 'has-vote', + 'wants-vote'], + 'type': 'object'}, + 'MeterStatus': {'additionalProperties': False, + 'properties': {'color': {'type': 'string'}, + 'message': {'type': 'string'}}, + 'required': ['color', 'message'], + 'type': 'object'}, + 'ModelConfigResults': {'additionalProperties': False, + 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ConfigValue'}}, + 'type': 'object'}}, + 'required': ['config'], 'type': 'object'}, - 'StringsResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Result': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['Error', 'Result'], + 'ModelDefaultValues': {'additionalProperties': False, + 'properties': {'cloud-region': {'type': 'string'}, + 'cloud-tag': {'type': 'string'}, + 'config': {'patternProperties': {'.*': {'additionalProperties': True, + 'type': 'object'}}, + 'type': 'object'}}, + 'required': ['config'], + 'type': 'object'}, + 'ModelDefaults': {'additionalProperties': False, + 'properties': {'controller': {'additionalProperties': True, + 'type': 'object'}, + 'default': {'additionalProperties': True, + 'type': 'object'}, + 'regions': {'items': {'$ref': '#/definitions/RegionDefaults'}, + 'type': 'array'}}, 'type': 'object'}, - 'StringsResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsResult'}, - 'type': 'array'}}, - 'required': ['Results'], + 'ModelDefaultsResult': {'additionalProperties': False, + 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ModelDefaults'}}, + 'type': 'object'}}, + 'required': ['config'], + 'type': 'object'}, + 'ModelInfo': {'additionalProperties': False, + 'properties': {'cloud': {'type': 'string'}, + 'cloud-credential-tag': {'type': 'string'}, + 'cloud-region': {'type': 'string'}, + 'controller-uuid': {'type': 'string'}, + 'default-series': {'type': 'string'}, + 'life': {'type': 'string'}, + 'name': {'type': 'string'}, + 'owner-tag': {'type': 'string'}, + 'provider-type': {'type': 'string'}, + 'status': {'$ref': '#/definitions/EntityStatus'}, + 'users': {'items': {'$ref': '#/definitions/ModelUserInfo'}, + 'type': 'array'}, + 'uuid': {'type': 'string'}}, + 'required': ['name', + 'uuid', + 'controller-uuid', + 'provider-type', + 'default-series', + 'cloud', + 'owner-tag', + 'life', + 'status', + 'users'], + 'type': 'object'}, + 'ModelSet': {'additionalProperties': False, + 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True, + 'type': 'object'}}, + 'type': 'object'}}, + 'required': ['config'], + 'type': 'object'}, + 'ModelStatusInfo': {'additionalProperties': False, + 'properties': {'available-version': {'type': 'string'}, + 'cloud': {'type': 'string'}, + 'migration': {'type': 'string'}, + 'name': {'type': 'string'}, + 'region': {'type': 'string'}, + 'version': {'type': 'string'}}, + 'required': ['name', + 'cloud', + 'version', + 'available-version'], + 'type': 'object'}, + 'ModelUnset': {'additionalProperties': False, + 'properties': {'keys': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'required': ['keys'], + 'type': 'object'}, + 'ModelUnsetKeys': {'additionalProperties': False, + 'properties': {'cloud-region': {'type': 'string'}, + 'cloud-tag': {'type': 'string'}, + 'keys': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'required': ['keys'], 'type': 'object'}, - 'caveat': {'additionalProperties': False, - 'properties': {'caveatId': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'verificationId': {'$ref': '#/definitions/packet'}}, - 'required': ['location', - 'caveatId', - 'verificationId'], + 'ModelUserInfo': {'additionalProperties': False, + 'properties': {'access': {'type': 'string'}, + 'display-name': {'type': 'string'}, + 'last-connection': {'format': 'date-time', + 'type': 'string'}, + 'user': {'type': 'string'}}, + 'required': ['user', + 'display-name', + 'last-connection', + 'access'], + 'type': 'object'}, + 'ModelUserInfoResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'$ref': '#/definitions/ModelUserInfo'}}, + 'type': 'object'}, + 'ModelUserInfoResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/ModelUserInfoResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'Number': {'additionalProperties': False, + 'properties': {'Build': {'type': 'integer'}, + 'Major': {'type': 'integer'}, + 'Minor': {'type': 'integer'}, + 'Patch': {'type': 'integer'}, + 'Tag': {'type': 'string'}}, + 'required': ['Major', + 'Minor', + 'Tag', + 'Patch', + 'Build'], 'type': 'object'}, - 'packet': {'additionalProperties': False, - 'properties': {'headerLen': {'type': 'integer'}, - 'start': {'type': 'integer'}, - 'totalLen': {'type': 'integer'}}, - 'required': ['start', 'totalLen', 'headerLen'], - 'type': 'object'}}, - 'properties': {'AuthorisedKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringsResults'}}, + 'Placement': {'additionalProperties': False, + 'properties': {'directive': {'type': 'string'}, + 'scope': {'type': 'string'}}, + 'required': ['scope', 'directive'], + 'type': 'object'}, + 'PrivateAddress': {'additionalProperties': False, + 'properties': {'target': {'type': 'string'}}, + 'required': ['target'], + 'type': 'object'}, + 'PrivateAddressResults': {'additionalProperties': False, + 'properties': {'private-address': {'type': 'string'}}, + 'required': ['private-address'], + 'type': 'object'}, + 'ProvisioningScriptParams': {'additionalProperties': False, + 'properties': {'data-dir': {'type': 'string'}, + 'disable-package-commands': {'type': 'boolean'}, + 'machine-id': {'type': 'string'}, + 'nonce': {'type': 'string'}}, + 'required': ['machine-id', + 'nonce', + 'data-dir', + 'disable-package-commands'], + 'type': 'object'}, + 'ProvisioningScriptResult': {'additionalProperties': False, + 'properties': {'script': {'type': 'string'}}, + 'required': ['script'], + 'type': 'object'}, + 'PublicAddress': {'additionalProperties': False, + 'properties': {'target': {'type': 'string'}}, + 'required': ['target'], 'type': 'object'}, - 'WatchAuthorisedKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, - 'type': 'object'}}, + 'PublicAddressResults': {'additionalProperties': False, + 'properties': {'public-address': {'type': 'string'}}, + 'required': ['public-address'], + 'type': 'object'}, + 'RegionDefaults': {'additionalProperties': False, + 'properties': {'region-name': {'type': 'string'}, + 'value': {'additionalProperties': True, + 'type': 'object'}}, + 'required': ['region-name', 'value'], + 'type': 'object'}, + 'RelationStatus': {'additionalProperties': False, + 'properties': {'endpoints': {'items': {'$ref': '#/definitions/EndpointStatus'}, + 'type': 'array'}, + 'id': {'type': 'integer'}, + 'interface': {'type': 'string'}, + 'key': {'type': 'string'}, + 'scope': {'type': 'string'}}, + 'required': ['id', + 'key', + 'interface', + 'scope', + 'endpoints'], + 'type': 'object'}, + 'ResolveCharmResult': {'additionalProperties': False, + 'properties': {'error': {'type': 'string'}, + 'url': {'type': 'string'}}, + 'type': 'object'}, + 'ResolveCharmResults': {'additionalProperties': False, + 'properties': {'urls': {'items': {'$ref': '#/definitions/ResolveCharmResult'}, + 'type': 'array'}}, + 'required': ['urls'], + 'type': 'object'}, + 'ResolveCharms': {'additionalProperties': False, + 'properties': {'references': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'required': ['references'], + 'type': 'object'}, + 'Resolved': {'additionalProperties': False, + 'properties': {'retry': {'type': 'boolean'}, + 'unit-name': {'type': 'string'}}, + 'required': ['unit-name', 'retry'], + 'type': 'object'}, + 'SetConstraints': {'additionalProperties': False, + 'properties': {'application': {'type': 'string'}, + 'constraints': {'$ref': '#/definitions/Value'}}, + 'required': ['application', 'constraints'], + 'type': 'object'}, + 'SetModelAgentVersion': {'additionalProperties': False, + 'properties': {'version': {'$ref': '#/definitions/Number'}}, + 'required': ['version'], + 'type': 'object'}, + 'SetModelDefaults': {'additionalProperties': False, + 'properties': {'config': {'items': {'$ref': '#/definitions/ModelDefaultValues'}, + 'type': 'array'}}, + 'required': ['config'], + 'type': 'object'}, + 'StatusHistoryFilter': {'additionalProperties': False, + 'properties': {'date': {'format': 'date-time', + 'type': 'string'}, + 'delta': {'type': 'integer'}, + 'size': {'type': 'integer'}}, + 'required': ['size', 'date', 'delta'], + 'type': 'object'}, + 'StatusHistoryRequest': {'additionalProperties': False, + 'properties': {'filter': {'$ref': '#/definitions/StatusHistoryFilter'}, + 'historyKind': {'type': 'string'}, + 'size': {'type': 'integer'}, + 'tag': {'type': 'string'}}, + 'required': ['historyKind', + 'size', + 'filter', + 'tag'], + 'type': 'object'}, + 'StatusHistoryRequests': {'additionalProperties': False, + 'properties': {'requests': {'items': {'$ref': '#/definitions/StatusHistoryRequest'}, + 'type': 'array'}}, + 'required': ['requests'], + 'type': 'object'}, + 'StatusHistoryResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'history': {'$ref': '#/definitions/History'}}, + 'required': ['history'], + 'type': 'object'}, + 'StatusHistoryResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/StatusHistoryResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'StatusParams': {'additionalProperties': False, + 'properties': {'patterns': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'required': ['patterns'], + 'type': 'object'}, + 'Tools': {'additionalProperties': False, + 'properties': {'sha256': {'type': 'string'}, + 'size': {'type': 'integer'}, + 'url': {'type': 'string'}, + 'version': {'$ref': '#/definitions/Binary'}}, + 'required': ['version', 'url', 'size'], + 'type': 'object'}, + 'UnitStatus': {'additionalProperties': False, + 'properties': {'agent-status': {'$ref': '#/definitions/DetailedStatus'}, + 'charm': {'type': 'string'}, + 'machine': {'type': 'string'}, + 'opened-ports': {'items': {'type': 'string'}, + 'type': 'array'}, + 'public-address': {'type': 'string'}, + 'subordinates': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitStatus'}}, + 'type': 'object'}, + 'workload-status': {'$ref': '#/definitions/DetailedStatus'}, + 'workload-version': {'type': 'string'}}, + 'required': ['agent-status', + 'workload-status', + 'workload-version', + 'machine', + 'opened-ports', + 'public-address', + 'charm', + 'subordinates'], + 'type': 'object'}, + 'UnsetModelDefaults': {'additionalProperties': False, + 'properties': {'keys': {'items': {'$ref': '#/definitions/ModelUnsetKeys'}, + 'type': 'array'}}, + 'required': ['keys'], + 'type': 'object'}, + 'Value': {'additionalProperties': False, + 'properties': {'arch': {'type': 'string'}, + 'container': {'type': 'string'}, + 'cpu-cores': {'type': 'integer'}, + 'cpu-power': {'type': 'integer'}, + 'instance-type': {'type': 'string'}, + 'mem': {'type': 'integer'}, + 'root-disk': {'type': 'integer'}, + 'spaces': {'items': {'type': 'string'}, + 'type': 'array'}, + 'tags': {'items': {'type': 'string'}, + 'type': 'array'}, + 'virt-type': {'type': 'string'}}, + 'type': 'object'}}, + 'properties': {'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}}, + 'type': 'object'}, + 'AbortCurrentUpgrade': {'type': 'object'}, + 'AddCharm': {'properties': {'Params': {'$ref': '#/definitions/AddCharm'}}, + 'type': 'object'}, + 'AddCharmWithAuthorization': {'properties': {'Params': {'$ref': '#/definitions/AddCharmWithAuthorization'}}, + 'type': 'object'}, + 'AddMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'}, + 'Result': {'$ref': '#/definitions/AddMachinesResults'}}, + 'type': 'object'}, + 'AddMachinesV2': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'}, + 'Result': {'$ref': '#/definitions/AddMachinesResults'}}, + 'type': 'object'}, + 'AgentVersion': {'properties': {'Result': {'$ref': '#/definitions/AgentVersionResult'}}, + 'type': 'object'}, + 'DestroyMachines': {'properties': {'Params': {'$ref': '#/definitions/DestroyMachines'}}, + 'type': 'object'}, + 'FindTools': {'properties': {'Params': {'$ref': '#/definitions/FindToolsParams'}, + 'Result': {'$ref': '#/definitions/FindToolsResult'}}, + 'type': 'object'}, + 'FullStatus': {'properties': {'Params': {'$ref': '#/definitions/StatusParams'}, + 'Result': {'$ref': '#/definitions/FullStatus'}}, + 'type': 'object'}, + 'GetBundleChanges': {'properties': {'Params': {'$ref': '#/definitions/GetBundleChangesParams'}, + 'Result': {'$ref': '#/definitions/GetBundleChangesResults'}}, + 'type': 'object'}, + 'GetModelConstraints': {'properties': {'Result': {'$ref': '#/definitions/GetConstraintsResults'}}, + 'type': 'object'}, + 'InjectMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'}, + 'Result': {'$ref': '#/definitions/AddMachinesResults'}}, + 'type': 'object'}, + 'ModelDefaults': {'properties': {'Result': {'$ref': '#/definitions/ModelDefaultsResult'}}, + 'type': 'object'}, + 'ModelGet': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}}, + 'type': 'object'}, + 'ModelInfo': {'properties': {'Result': {'$ref': '#/definitions/ModelInfo'}}, + 'type': 'object'}, + 'ModelSet': {'properties': {'Params': {'$ref': '#/definitions/ModelSet'}}, + 'type': 'object'}, + 'ModelUnset': {'properties': {'Params': {'$ref': '#/definitions/ModelUnset'}}, + 'type': 'object'}, + 'ModelUserInfo': {'properties': {'Result': {'$ref': '#/definitions/ModelUserInfoResults'}}, + 'type': 'object'}, + 'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/PrivateAddress'}, + 'Result': {'$ref': '#/definitions/PrivateAddressResults'}}, + 'type': 'object'}, + 'ProvisioningScript': {'properties': {'Params': {'$ref': '#/definitions/ProvisioningScriptParams'}, + 'Result': {'$ref': '#/definitions/ProvisioningScriptResult'}}, + 'type': 'object'}, + 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/PublicAddress'}, + 'Result': {'$ref': '#/definitions/PublicAddressResults'}}, + 'type': 'object'}, + 'ResolveCharms': {'properties': {'Params': {'$ref': '#/definitions/ResolveCharms'}, + 'Result': {'$ref': '#/definitions/ResolveCharmResults'}}, + 'type': 'object'}, + 'Resolved': {'properties': {'Params': {'$ref': '#/definitions/Resolved'}}, + 'type': 'object'}, + 'RetryProvisioning': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'SetModelAgentVersion': {'properties': {'Params': {'$ref': '#/definitions/SetModelAgentVersion'}}, + 'type': 'object'}, + 'SetModelConstraints': {'properties': {'Params': {'$ref': '#/definitions/SetConstraints'}}, + 'type': 'object'}, + 'SetModelDefaults': {'properties': {'Params': {'$ref': '#/definitions/SetModelDefaults'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'StatusHistory': {'properties': {'Params': {'$ref': '#/definitions/StatusHistoryRequests'}, + 'Result': {'$ref': '#/definitions/StatusHistoryResults'}}, + 'type': 'object'}, + 'UnsetModelDefaults': {'properties': {'Params': {'$ref': '#/definitions/UnsetModelDefaults'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'WatchAll': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherId'}}, + 'type': 'object'}}, 'type': 'object'} - @ReturnMapping(StringsResults) - async def AuthorisedKeys(self, entities): + @ReturnMapping(APIHostPortsResult) + async def APIHostPorts(self): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~StringsResult] + + Returns -> typing.Sequence<+T_co>[~HostPort]<~HostPort> ''' # map input types to rpc msg params = dict() - msg = dict(Type='KeyUpdater', Request='AuthorisedKeys', Version=1, Params=params) - params['Entities'] = entities + msg = dict(type='Client', request='APIHostPorts', version=1, params=params) + reply = await self.rpc(msg) return reply - @ReturnMapping(NotifyWatchResults) - async def WatchAuthorisedKeys(self, entities): + @ReturnMapping(None) + async def AbortCurrentUpgrade(self): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~NotifyWatchResult] + + Returns -> None ''' # map input types to rpc msg params = dict() - msg = dict(Type='KeyUpdater', Request='WatchAuthorisedKeys', Version=1, Params=params) - params['Entities'] = entities + msg = dict(type='Client', request='AbortCurrentUpgrade', version=1, params=params) + reply = await self.rpc(msg) return reply -class LeadershipService(Type): - name = 'LeadershipService' - version = 2 - schema = {'definitions': {'ClaimLeadershipBulkParams': {'additionalProperties': False, - 'properties': {'Params': {'items': {'$ref': '#/definitions/ClaimLeadershipParams'}, - 'type': 'array'}}, - 'required': ['Params'], - 'type': 'object'}, - 'ClaimLeadershipBulkResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'ClaimLeadershipParams': {'additionalProperties': False, - 'properties': {'DurationSeconds': {'type': 'number'}, - 'ServiceTag': {'type': 'string'}, - 'UnitTag': {'type': 'string'}}, - 'required': ['ServiceTag', - 'UnitTag', - 'DurationSeconds'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'Code': {'type': 'string'}, - 'Info': {'$ref': '#/definitions/ErrorInfo'}, - 'Message': {'type': 'string'}}, - 'required': ['Message', 'Code'], - 'type': 'object'}, - 'ErrorInfo': {'additionalProperties': False, - 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'}, - 'MacaroonPath': {'type': 'string'}}, - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}}, - 'required': ['Error'], - 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, - 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'}, - 'type': 'array'}, - 'data': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'id': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'sig': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['data', - 'location', - 'id', - 'caveats', - 'sig'], - 'type': 'object'}, - 'ServiceTag': {'additionalProperties': False, - 'properties': {'Name': {'type': 'string'}}, - 'required': ['Name'], - 'type': 'object'}, - 'caveat': {'additionalProperties': False, - 'properties': {'caveatId': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'verificationId': {'$ref': '#/definitions/packet'}}, - 'required': ['location', - 'caveatId', - 'verificationId'], - 'type': 'object'}, - 'packet': {'additionalProperties': False, - 'properties': {'headerLen': {'type': 'integer'}, - 'start': {'type': 'integer'}, - 'totalLen': {'type': 'integer'}}, - 'required': ['start', 'totalLen', 'headerLen'], - 'type': 'object'}}, - 'properties': {'BlockUntilLeadershipReleased': {'properties': {'Params': {'$ref': '#/definitions/ServiceTag'}, - 'Result': {'$ref': '#/definitions/ErrorResult'}}, - 'type': 'object'}, - 'ClaimLeadership': {'properties': {'Params': {'$ref': '#/definitions/ClaimLeadershipBulkParams'}, - 'Result': {'$ref': '#/definitions/ClaimLeadershipBulkResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - @ReturnMapping(ErrorResult) - async def BlockUntilLeadershipReleased(self, name): + @ReturnMapping(None) + async def AddCharm(self, channel, url): ''' - name : str - Returns -> Error + channel : str + url : str + Returns -> None ''' # map input types to rpc msg params = dict() - msg = dict(Type='LeadershipService', Request='BlockUntilLeadershipReleased', Version=2, Params=params) - params['Name'] = name + msg = dict(type='Client', request='AddCharm', version=1, params=params) + params['channel'] = channel + params['url'] = url reply = await self.rpc(msg) return reply - @ReturnMapping(ClaimLeadershipBulkResults) - async def ClaimLeadership(self, params): + @ReturnMapping(None) + async def AddCharmWithAuthorization(self, channel, macaroon, url): ''' - params : typing.Sequence[~ClaimLeadershipParams] - Returns -> typing.Sequence[~ErrorResult] + channel : str + macaroon : Macaroon + url : str + Returns -> None ''' # map input types to rpc msg params = dict() - msg = dict(Type='LeadershipService', Request='ClaimLeadership', Version=2, Params=params) - params['Params'] = params + msg = dict(type='Client', request='AddCharmWithAuthorization', version=1, params=params) + params['channel'] = channel + params['macaroon'] = macaroon + params['url'] = url reply = await self.rpc(msg) return reply -class LifeFlag(Type): - name = 'LifeFlag' - version = 1 - schema = {'definitions': {'Entities': {'additionalProperties': False, - 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'}, - 'type': 'array'}}, - 'required': ['Entities'], - 'type': 'object'}, - 'Entity': {'additionalProperties': False, - 'properties': {'Tag': {'type': 'string'}}, - 'required': ['Tag'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'Code': {'type': 'string'}, - 'Info': {'$ref': '#/definitions/ErrorInfo'}, - 'Message': {'type': 'string'}}, - 'required': ['Message', 'Code'], - 'type': 'object'}, - 'ErrorInfo': {'additionalProperties': False, - 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'}, - 'MacaroonPath': {'type': 'string'}}, - 'type': 'object'}, - 'LifeResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Life': {'type': 'string'}}, - 'required': ['Life', 'Error'], - 'type': 'object'}, - 'LifeResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/LifeResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, - 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'}, - 'type': 'array'}, - 'data': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'id': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'sig': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['data', - 'location', - 'id', - 'caveats', - 'sig'], - 'type': 'object'}, - 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'NotifyWatcherId': {'type': 'string'}}, - 'required': ['NotifyWatcherId', 'Error'], - 'type': 'object'}, - 'NotifyWatchResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'caveat': {'additionalProperties': False, - 'properties': {'caveatId': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'verificationId': {'$ref': '#/definitions/packet'}}, - 'required': ['location', - 'caveatId', - 'verificationId'], - 'type': 'object'}, - 'packet': {'additionalProperties': False, - 'properties': {'headerLen': {'type': 'integer'}, - 'start': {'type': 'integer'}, - 'totalLen': {'type': 'integer'}}, - 'required': ['start', 'totalLen', 'headerLen'], - 'type': 'object'}}, - 'properties': {'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/LifeResults'}}, - 'type': 'object'}, - 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - @ReturnMapping(LifeResults) - async def Life(self, entities): + @ReturnMapping(AddMachinesResults) + async def AddMachines(self, params): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~LifeResult] + params : typing.Sequence<+T_co>[~AddMachineParams]<~AddMachineParams> + Returns -> typing.Sequence<+T_co>[~AddMachinesResult]<~AddMachinesResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='LifeFlag', Request='Life', Version=1, Params=params) - params['Entities'] = entities + msg = dict(type='Client', request='AddMachines', version=1, params=params) + params['params'] = params reply = await self.rpc(msg) return reply - @ReturnMapping(NotifyWatchResults) - async def Watch(self, entities): + @ReturnMapping(AddMachinesResults) + async def AddMachinesV2(self, params): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~NotifyWatchResult] + params : typing.Sequence<+T_co>[~AddMachineParams]<~AddMachineParams> + Returns -> typing.Sequence<+T_co>[~AddMachinesResult]<~AddMachinesResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='LifeFlag', Request='Watch', Version=1, Params=params) - params['Entities'] = entities + msg = dict(type='Client', request='AddMachinesV2', version=1, params=params) + params['params'] = params reply = await self.rpc(msg) return reply -class Logger(Type): - name = 'Logger' - version = 1 - schema = {'definitions': {'Entities': {'additionalProperties': False, - 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'}, - 'type': 'array'}}, - 'required': ['Entities'], - 'type': 'object'}, - 'Entity': {'additionalProperties': False, - 'properties': {'Tag': {'type': 'string'}}, - 'required': ['Tag'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'Code': {'type': 'string'}, - 'Info': {'$ref': '#/definitions/ErrorInfo'}, - 'Message': {'type': 'string'}}, - 'required': ['Message', 'Code'], - 'type': 'object'}, - 'ErrorInfo': {'additionalProperties': False, - 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'}, - 'MacaroonPath': {'type': 'string'}}, - 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, - 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'}, - 'type': 'array'}, - 'data': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'id': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'sig': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['data', - 'location', - 'id', - 'caveats', - 'sig'], - 'type': 'object'}, - 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'NotifyWatcherId': {'type': 'string'}}, - 'required': ['NotifyWatcherId', 'Error'], - 'type': 'object'}, - 'NotifyWatchResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'StringResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Result': {'type': 'string'}}, - 'required': ['Error', 'Result'], - 'type': 'object'}, - 'StringResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/StringResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'caveat': {'additionalProperties': False, - 'properties': {'caveatId': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'verificationId': {'$ref': '#/definitions/packet'}}, - 'required': ['location', - 'caveatId', - 'verificationId'], - 'type': 'object'}, - 'packet': {'additionalProperties': False, - 'properties': {'headerLen': {'type': 'integer'}, - 'start': {'type': 'integer'}, - 'totalLen': {'type': 'integer'}}, - 'required': ['start', 'totalLen', 'headerLen'], - 'type': 'object'}}, - 'properties': {'LoggingConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringResults'}}, - 'type': 'object'}, - 'WatchLoggingConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - @ReturnMapping(StringResults) - async def LoggingConfig(self, entities): + @ReturnMapping(AgentVersionResult) + async def AgentVersion(self): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~StringResult] + + Returns -> Number ''' # map input types to rpc msg params = dict() - msg = dict(Type='Logger', Request='LoggingConfig', Version=1, Params=params) - params['Entities'] = entities + msg = dict(type='Client', request='AgentVersion', version=1, params=params) + reply = await self.rpc(msg) return reply - @ReturnMapping(NotifyWatchResults) - async def WatchLoggingConfig(self, entities): + @ReturnMapping(None) + async def DestroyMachines(self, force, machine_names): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~NotifyWatchResult] + force : bool + machine_names : typing.Sequence<+T_co>[str] + Returns -> None ''' # map input types to rpc msg params = dict() - msg = dict(Type='Logger', Request='WatchLoggingConfig', Version=1, Params=params) - params['Entities'] = entities + msg = dict(type='Client', request='DestroyMachines', version=1, params=params) + params['force'] = force + params['machine-names'] = machine_names reply = await self.rpc(msg) return reply -class MachineActions(Type): - name = 'MachineActions' - version = 1 - schema = {'definitions': {'Action': {'additionalProperties': False, - 'properties': {'name': {'type': 'string'}, - 'parameters': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'receiver': {'type': 'string'}, - 'tag': {'type': 'string'}}, - 'required': ['tag', 'receiver', 'name'], - 'type': 'object'}, - 'ActionExecutionResult': {'additionalProperties': False, - 'properties': {'actiontag': {'type': 'string'}, - 'message': {'type': 'string'}, - 'results': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'status': {'type': 'string'}}, - 'required': ['actiontag', 'status'], - 'type': 'object'}, - 'ActionExecutionResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ActionExecutionResult'}, - 'type': 'array'}}, - 'type': 'object'}, - 'ActionResult': {'additionalProperties': False, - 'properties': {'action': {'$ref': '#/definitions/Action'}, - 'completed': {'format': 'date-time', - 'type': 'string'}, - 'enqueued': {'format': 'date-time', - 'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}, - 'message': {'type': 'string'}, - 'output': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'started': {'format': 'date-time', - 'type': 'string'}, - 'status': {'type': 'string'}}, - 'type': 'object'}, - 'ActionResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'}, - 'type': 'array'}}, - 'type': 'object'}, - 'ActionsByReceiver': {'additionalProperties': False, - 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'}, - 'type': 'array'}, - 'error': {'$ref': '#/definitions/Error'}, - 'receiver': {'type': 'string'}}, - 'type': 'object'}, - 'ActionsByReceivers': {'additionalProperties': False, - 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByReceiver'}, - 'type': 'array'}}, - 'type': 'object'}, - 'Entities': {'additionalProperties': False, - 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'}, - 'type': 'array'}}, - 'required': ['Entities'], - 'type': 'object'}, - 'Entity': {'additionalProperties': False, - 'properties': {'Tag': {'type': 'string'}}, - 'required': ['Tag'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'Code': {'type': 'string'}, - 'Info': {'$ref': '#/definitions/ErrorInfo'}, - 'Message': {'type': 'string'}}, - 'required': ['Message', 'Code'], - 'type': 'object'}, - 'ErrorInfo': {'additionalProperties': False, - 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'}, - 'MacaroonPath': {'type': 'string'}}, - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}}, - 'required': ['Error'], - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, - 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'}, - 'type': 'array'}, - 'data': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'id': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'sig': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['data', - 'location', - 'id', - 'caveats', - 'sig'], - 'type': 'object'}, - 'StringsWatchResult': {'additionalProperties': False, - 'properties': {'Changes': {'items': {'type': 'string'}, - 'type': 'array'}, - 'Error': {'$ref': '#/definitions/Error'}, - 'StringsWatcherId': {'type': 'string'}}, - 'required': ['StringsWatcherId', - 'Changes', - 'Error'], - 'type': 'object'}, - 'StringsWatchResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsWatchResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'caveat': {'additionalProperties': False, - 'properties': {'caveatId': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'verificationId': {'$ref': '#/definitions/packet'}}, - 'required': ['location', - 'caveatId', - 'verificationId'], - 'type': 'object'}, - 'packet': {'additionalProperties': False, - 'properties': {'headerLen': {'type': 'integer'}, - 'start': {'type': 'integer'}, - 'totalLen': {'type': 'integer'}}, - 'required': ['start', 'totalLen', 'headerLen'], - 'type': 'object'}}, - 'properties': {'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ActionResults'}}, - 'type': 'object'}, - 'BeginActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'FinishActions': {'properties': {'Params': {'$ref': '#/definitions/ActionExecutionResults'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'RunningActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ActionsByReceivers'}}, - 'type': 'object'}, - 'WatchActionNotifications': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - @ReturnMapping(ActionResults) - async def Actions(self, entities): + @ReturnMapping(FindToolsResult) + async def FindTools(self, arch, major, minor, number, series): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ActionResult] + arch : str + major : int + minor : int + number : Number + series : str + Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[~Tools]<~Tools>] ''' # map input types to rpc msg params = dict() - msg = dict(Type='MachineActions', Request='Actions', Version=1, Params=params) - params['Entities'] = entities + msg = dict(type='Client', request='FindTools', version=1, params=params) + params['arch'] = arch + params['major'] = major + params['minor'] = minor + params['number'] = number + params['series'] = series reply = await self.rpc(msg) return reply - @ReturnMapping(ErrorResults) - async def BeginActions(self, entities): + @ReturnMapping(FullStatus) + async def FullStatus(self, patterns): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ErrorResult] + patterns : typing.Sequence<+T_co>[str] + Returns -> typing.Union[typing.Mapping<~KT, +VT_co>[str, ~MachineStatus]<~MachineStatus>, _ForwardRef('ModelStatusInfo'), typing.Sequence<+T_co>[~RelationStatus]<~RelationStatus>] ''' # map input types to rpc msg params = dict() - msg = dict(Type='MachineActions', Request='BeginActions', Version=1, Params=params) - params['Entities'] = entities + msg = dict(type='Client', request='FullStatus', version=1, params=params) + params['patterns'] = patterns reply = await self.rpc(msg) return reply - @ReturnMapping(ErrorResults) - async def FinishActions(self, results): + @ReturnMapping(GetBundleChangesResults) + async def GetBundleChanges(self, yaml): ''' - results : typing.Sequence[~ActionExecutionResult] - Returns -> typing.Sequence[~ErrorResult] + yaml : str + Returns -> typing.Sequence<+T_co>[~BundleChangesChange]<~BundleChangesChange> ''' # map input types to rpc msg params = dict() - msg = dict(Type='MachineActions', Request='FinishActions', Version=1, Params=params) - params['results'] = results + msg = dict(type='Client', request='GetBundleChanges', version=1, params=params) + params['yaml'] = yaml reply = await self.rpc(msg) return reply - @ReturnMapping(ActionsByReceivers) - async def RunningActions(self, entities): + @ReturnMapping(GetConstraintsResults) + async def GetModelConstraints(self): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ActionsByReceiver] + + Returns -> Value ''' # map input types to rpc msg params = dict() - msg = dict(Type='MachineActions', Request='RunningActions', Version=1, Params=params) - params['Entities'] = entities + msg = dict(type='Client', request='GetModelConstraints', version=1, params=params) + reply = await self.rpc(msg) return reply - @ReturnMapping(StringsWatchResults) - async def WatchActionNotifications(self, entities): + @ReturnMapping(AddMachinesResults) + async def InjectMachines(self, params): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~StringsWatchResult] + params : typing.Sequence<+T_co>[~AddMachineParams]<~AddMachineParams> + Returns -> typing.Sequence<+T_co>[~AddMachinesResult]<~AddMachinesResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='MachineActions', Request='WatchActionNotifications', Version=1, Params=params) - params['Entities'] = entities + msg = dict(type='Client', request='InjectMachines', version=1, params=params) + params['params'] = params reply = await self.rpc(msg) return reply -class MachineManager(Type): - name = 'MachineManager' - version = 2 - schema = {'definitions': {'AddMachineParams': {'additionalProperties': False, - 'properties': {'Addrs': {'items': {'$ref': '#/definitions/Address'}, - 'type': 'array'}, - 'Constraints': {'$ref': '#/definitions/Value'}, - 'ContainerType': {'type': 'string'}, - 'Disks': {'items': {'$ref': '#/definitions/Constraints'}, - 'type': 'array'}, - 'HardwareCharacteristics': {'$ref': '#/definitions/HardwareCharacteristics'}, - 'InstanceId': {'type': 'string'}, - 'Jobs': {'items': {'type': 'string'}, - 'type': 'array'}, - 'Nonce': {'type': 'string'}, - 'ParentId': {'type': 'string'}, - 'Placement': {'$ref': '#/definitions/Placement'}, - 'Series': {'type': 'string'}}, - 'required': ['Series', - 'Constraints', - 'Jobs', - 'Disks', - 'Placement', - 'ParentId', - 'ContainerType', - 'InstanceId', - 'Nonce', - 'HardwareCharacteristics', - 'Addrs'], - 'type': 'object'}, - 'AddMachines': {'additionalProperties': False, - 'properties': {'MachineParams': {'items': {'$ref': '#/definitions/AddMachineParams'}, - 'type': 'array'}}, - 'required': ['MachineParams'], - 'type': 'object'}, - 'AddMachinesResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Machine': {'type': 'string'}}, - 'required': ['Machine', 'Error'], - 'type': 'object'}, - 'AddMachinesResults': {'additionalProperties': False, - 'properties': {'Machines': {'items': {'$ref': '#/definitions/AddMachinesResult'}, - 'type': 'array'}}, - 'required': ['Machines'], - 'type': 'object'}, - 'Address': {'additionalProperties': False, - 'properties': {'Scope': {'type': 'string'}, - 'SpaceName': {'type': 'string'}, - 'Type': {'type': 'string'}, - 'Value': {'type': 'string'}}, - 'required': ['Value', 'Type', 'Scope'], - 'type': 'object'}, - 'Constraints': {'additionalProperties': False, - 'properties': {'Count': {'type': 'integer'}, - 'Pool': {'type': 'string'}, - 'Size': {'type': 'integer'}}, - 'required': ['Pool', 'Size', 'Count'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'Code': {'type': 'string'}, - 'Info': {'$ref': '#/definitions/ErrorInfo'}, - 'Message': {'type': 'string'}}, - 'required': ['Message', 'Code'], - 'type': 'object'}, - 'ErrorInfo': {'additionalProperties': False, - 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'}, - 'MacaroonPath': {'type': 'string'}}, - 'type': 'object'}, - 'HardwareCharacteristics': {'additionalProperties': False, - 'properties': {'Arch': {'type': 'string'}, - 'AvailabilityZone': {'type': 'string'}, - 'CpuCores': {'type': 'integer'}, - 'CpuPower': {'type': 'integer'}, - 'Mem': {'type': 'integer'}, - 'RootDisk': {'type': 'integer'}, - 'Tags': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, - 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'}, - 'type': 'array'}, - 'data': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'id': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'sig': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['data', - 'location', - 'id', - 'caveats', - 'sig'], - 'type': 'object'}, - 'Placement': {'additionalProperties': False, - 'properties': {'Directive': {'type': 'string'}, - 'Scope': {'type': 'string'}}, - 'required': ['Scope', 'Directive'], - 'type': 'object'}, - 'Value': {'additionalProperties': False, - 'properties': {'arch': {'type': 'string'}, - 'container': {'type': 'string'}, - 'cpu-cores': {'type': 'integer'}, - 'cpu-power': {'type': 'integer'}, - 'instance-type': {'type': 'string'}, - 'mem': {'type': 'integer'}, - 'root-disk': {'type': 'integer'}, - 'spaces': {'items': {'type': 'string'}, - 'type': 'array'}, - 'tags': {'items': {'type': 'string'}, - 'type': 'array'}, - 'virt-type': {'type': 'string'}}, - 'type': 'object'}, - 'caveat': {'additionalProperties': False, - 'properties': {'caveatId': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'verificationId': {'$ref': '#/definitions/packet'}}, - 'required': ['location', - 'caveatId', - 'verificationId'], - 'type': 'object'}, - 'packet': {'additionalProperties': False, - 'properties': {'headerLen': {'type': 'integer'}, - 'start': {'type': 'integer'}, - 'totalLen': {'type': 'integer'}}, - 'required': ['start', 'totalLen', 'headerLen'], - 'type': 'object'}}, - 'properties': {'AddMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'}, - 'Result': {'$ref': '#/definitions/AddMachinesResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - @ReturnMapping(AddMachinesResults) - async def AddMachines(self, machineparams): + @ReturnMapping(ModelDefaultsResult) + async def ModelDefaults(self): ''' - machineparams : typing.Sequence[~AddMachineParams] - Returns -> typing.Sequence[~AddMachinesResult] + + Returns -> typing.Mapping<~KT, +VT_co>[str, ~ModelDefaults]<~ModelDefaults> ''' # map input types to rpc msg params = dict() - msg = dict(Type='MachineManager', Request='AddMachines', Version=2, Params=params) - params['MachineParams'] = machineparams + msg = dict(type='Client', request='ModelDefaults', version=1, params=params) + reply = await self.rpc(msg) return reply -class Machiner(Type): - name = 'Machiner' - version = 1 - schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False, - 'properties': {'Servers': {'items': {'items': {'$ref': '#/definitions/HostPort'}, - 'type': 'array'}, - 'type': 'array'}}, - 'required': ['Servers'], - 'type': 'object'}, - 'Address': {'additionalProperties': False, - 'properties': {'Scope': {'type': 'string'}, - 'SpaceName': {'type': 'string'}, - 'Type': {'type': 'string'}, - 'Value': {'type': 'string'}}, - 'required': ['Value', 'Type', 'Scope'], - 'type': 'object'}, - 'BytesResult': {'additionalProperties': False, - 'properties': {'Result': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['Result'], - 'type': 'object'}, - 'Entities': {'additionalProperties': False, - 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'}, - 'type': 'array'}}, - 'required': ['Entities'], - 'type': 'object'}, - 'Entity': {'additionalProperties': False, - 'properties': {'Tag': {'type': 'string'}}, - 'required': ['Tag'], - 'type': 'object'}, - 'EntityStatusArgs': {'additionalProperties': False, - 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'Info': {'type': 'string'}, - 'Status': {'type': 'string'}, - 'Tag': {'type': 'string'}}, - 'required': ['Tag', - 'Status', - 'Info', - 'Data'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'Code': {'type': 'string'}, - 'Info': {'$ref': '#/definitions/ErrorInfo'}, - 'Message': {'type': 'string'}}, - 'required': ['Message', 'Code'], - 'type': 'object'}, - 'ErrorInfo': {'additionalProperties': False, - 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'}, - 'MacaroonPath': {'type': 'string'}}, - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}}, - 'required': ['Error'], - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'HostPort': {'additionalProperties': False, - 'properties': {'Address': {'$ref': '#/definitions/Address'}, - 'Port': {'type': 'integer'}}, - 'required': ['Address', 'Port'], - 'type': 'object'}, - 'JobsResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Jobs': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['Jobs', 'Error'], - 'type': 'object'}, - 'JobsResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/JobsResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'LifeResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Life': {'type': 'string'}}, - 'required': ['Life', 'Error'], - 'type': 'object'}, - 'LifeResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/LifeResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, - 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'}, - 'type': 'array'}, - 'data': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'id': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'sig': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['data', - 'location', - 'id', - 'caveats', - 'sig'], - 'type': 'object'}, - 'MachineAddresses': {'additionalProperties': False, - 'properties': {'Addresses': {'items': {'$ref': '#/definitions/Address'}, - 'type': 'array'}, - 'Tag': {'type': 'string'}}, - 'required': ['Tag', 'Addresses'], - 'type': 'object'}, - 'NetworkConfig': {'additionalProperties': False, - 'properties': {'Address': {'type': 'string'}, - 'CIDR': {'type': 'string'}, - 'ConfigType': {'type': 'string'}, - 'DNSSearchDomains': {'items': {'type': 'string'}, - 'type': 'array'}, - 'DNSServers': {'items': {'type': 'string'}, - 'type': 'array'}, - 'DeviceIndex': {'type': 'integer'}, - 'Disabled': {'type': 'boolean'}, - 'GatewayAddress': {'type': 'string'}, - 'InterfaceName': {'type': 'string'}, - 'InterfaceType': {'type': 'string'}, - 'MACAddress': {'type': 'string'}, - 'MTU': {'type': 'integer'}, - 'NoAutoStart': {'type': 'boolean'}, - 'ParentInterfaceName': {'type': 'string'}, - 'ProviderAddressId': {'type': 'string'}, - 'ProviderId': {'type': 'string'}, - 'ProviderSpaceId': {'type': 'string'}, - 'ProviderSubnetId': {'type': 'string'}, - 'ProviderVLANId': {'type': 'string'}, - 'VLANTag': {'type': 'integer'}}, - 'required': ['DeviceIndex', - 'MACAddress', - 'CIDR', - 'MTU', - 'ProviderId', - 'ProviderSubnetId', - 'ProviderSpaceId', - 'ProviderAddressId', - 'ProviderVLANId', - 'VLANTag', - 'InterfaceName', - 'ParentInterfaceName', - 'InterfaceType', - 'Disabled'], - 'type': 'object'}, - 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'NotifyWatcherId': {'type': 'string'}}, - 'required': ['NotifyWatcherId', 'Error'], - 'type': 'object'}, - 'NotifyWatchResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'SetMachineNetworkConfig': {'additionalProperties': False, - 'properties': {'Config': {'items': {'$ref': '#/definitions/NetworkConfig'}, - 'type': 'array'}, - 'Tag': {'type': 'string'}}, - 'required': ['Tag', 'Config'], - 'type': 'object'}, - 'SetMachinesAddresses': {'additionalProperties': False, - 'properties': {'MachineAddresses': {'items': {'$ref': '#/definitions/MachineAddresses'}, - 'type': 'array'}}, - 'required': ['MachineAddresses'], - 'type': 'object'}, - 'SetStatus': {'additionalProperties': False, - 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'}, - 'type': 'array'}}, - 'required': ['Entities'], - 'type': 'object'}, - 'StringResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Result': {'type': 'string'}}, - 'required': ['Error', 'Result'], - 'type': 'object'}, - 'StringsResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Result': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['Error', 'Result'], - 'type': 'object'}, - 'caveat': {'additionalProperties': False, - 'properties': {'caveatId': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'verificationId': {'$ref': '#/definitions/packet'}}, - 'required': ['location', - 'caveatId', - 'verificationId'], - 'type': 'object'}, - 'packet': {'additionalProperties': False, - 'properties': {'headerLen': {'type': 'integer'}, - 'start': {'type': 'integer'}, - 'totalLen': {'type': 'integer'}}, - 'required': ['start', 'totalLen', 'headerLen'], - 'type': 'object'}}, - 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}}, - 'type': 'object'}, - 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}}, - 'type': 'object'}, - 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}}, - 'type': 'object'}, - 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'Jobs': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/JobsResults'}}, - 'type': 'object'}, - 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/LifeResults'}}, - 'type': 'object'}, - 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}}, - 'type': 'object'}, - 'SetMachineAddresses': {'properties': {'Params': {'$ref': '#/definitions/SetMachinesAddresses'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetObservedNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/SetMachineNetworkConfig'}}, - 'type': 'object'}, - 'SetProviderNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, - 'type': 'object'}, - 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, - 'type': 'object'}}, - 'type': 'object'} - - @ReturnMapping(StringsResult) - async def APIAddresses(self): + @ReturnMapping(ModelConfigResults) + async def ModelGet(self): ''' - Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[str]] + Returns -> typing.Mapping<~KT, +VT_co>[str, ~ConfigValue]<~ConfigValue> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Machiner', Request='APIAddresses', Version=1, Params=params) + msg = dict(type='Client', request='ModelGet', version=1, params=params) reply = await self.rpc(msg) return reply - @ReturnMapping(APIHostPortsResult) - async def APIHostPorts(self): + @ReturnMapping(ModelInfo) + async def ModelInfo(self): ''' - Returns -> typing.Sequence[~HostPort] + Returns -> typing.Union[_ForwardRef('EntityStatus'), typing.Sequence<+T_co>[~ModelUserInfo]<~ModelUserInfo>] ''' # map input types to rpc msg params = dict() - msg = dict(Type='Machiner', Request='APIHostPorts', Version=1, Params=params) + msg = dict(type='Client', request='ModelInfo', version=1, params=params) reply = await self.rpc(msg) return reply - @ReturnMapping(BytesResult) - async def CACert(self): + @ReturnMapping(None) + async def ModelSet(self, config): ''' - - Returns -> typing.Sequence[int] + config : typing.Mapping<~KT, +VT_co>[str, typing.Any] + Returns -> None ''' # map input types to rpc msg params = dict() - msg = dict(Type='Machiner', Request='CACert', Version=1, Params=params) + msg = dict(type='Client', request='ModelSet', version=1, params=params) + params['config'] = config + reply = await self.rpc(msg) + return reply + + + @ReturnMapping(None) + async def ModelUnset(self, keys): + ''' + keys : typing.Sequence<+T_co>[str] + Returns -> None + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='Client', request='ModelUnset', version=1, params=params) + params['keys'] = keys reply = await self.rpc(msg) return reply - @ReturnMapping(ErrorResults) - async def EnsureDead(self, entities): + @ReturnMapping(ModelUserInfoResults) + async def ModelUserInfo(self): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ErrorResult] + + Returns -> typing.Sequence<+T_co>[~ModelUserInfoResult]<~ModelUserInfoResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Machiner', Request='EnsureDead', Version=1, Params=params) - params['Entities'] = entities + msg = dict(type='Client', request='ModelUserInfo', version=1, params=params) + reply = await self.rpc(msg) return reply - @ReturnMapping(JobsResults) - async def Jobs(self, entities): + @ReturnMapping(PrivateAddressResults) + async def PrivateAddress(self, target): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~JobsResult] + target : str + Returns -> str ''' # map input types to rpc msg params = dict() - msg = dict(Type='Machiner', Request='Jobs', Version=1, Params=params) - params['Entities'] = entities + msg = dict(type='Client', request='PrivateAddress', version=1, params=params) + params['target'] = target reply = await self.rpc(msg) return reply - @ReturnMapping(LifeResults) - async def Life(self, entities): + @ReturnMapping(ProvisioningScriptResult) + async def ProvisioningScript(self, data_dir, disable_package_commands, machine_id, nonce): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~LifeResult] + data_dir : str + disable_package_commands : bool + machine_id : str + nonce : str + Returns -> str ''' # map input types to rpc msg params = dict() - msg = dict(Type='Machiner', Request='Life', Version=1, Params=params) - params['Entities'] = entities + msg = dict(type='Client', request='ProvisioningScript', version=1, params=params) + params['data-dir'] = data_dir + params['disable-package-commands'] = disable_package_commands + params['machine-id'] = machine_id + params['nonce'] = nonce reply = await self.rpc(msg) return reply - @ReturnMapping(StringResult) - async def ModelUUID(self): + @ReturnMapping(PublicAddressResults) + async def PublicAddress(self, target): ''' + target : str + Returns -> str + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='Client', request='PublicAddress', version=1, params=params) + params['target'] = target + reply = await self.rpc(msg) + return reply - Returns -> typing.Union[_ForwardRef('Error'), str] + + + @ReturnMapping(ResolveCharmResults) + async def ResolveCharms(self, references): + ''' + references : typing.Sequence<+T_co>[str] + Returns -> typing.Sequence<+T_co>[~ResolveCharmResult]<~ResolveCharmResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Machiner', Request='ModelUUID', Version=1, Params=params) + msg = dict(type='Client', request='ResolveCharms', version=1, params=params) + params['references'] = references + reply = await self.rpc(msg) + return reply + + + @ReturnMapping(None) + async def Resolved(self, retry, unit_name): + ''' + retry : bool + unit_name : str + Returns -> None + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='Client', request='Resolved', version=1, params=params) + params['retry'] = retry + params['unit-name'] = unit_name reply = await self.rpc(msg) return reply @ReturnMapping(ErrorResults) - async def SetMachineAddresses(self, machineaddresses): + async def RetryProvisioning(self, entities): ''' - machineaddresses : typing.Sequence[~MachineAddresses] - Returns -> typing.Sequence[~ErrorResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Machiner', Request='SetMachineAddresses', Version=1, Params=params) - params['MachineAddresses'] = machineaddresses + msg = dict(type='Client', request='RetryProvisioning', version=1, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @ReturnMapping(None) - async def SetObservedNetworkConfig(self, config, tag): + async def SetModelAgentVersion(self, build, major, minor, patch, tag): ''' - config : typing.Sequence[~NetworkConfig] + build : int + major : int + minor : int + patch : int tag : str Returns -> None ''' # map input types to rpc msg params = dict() - msg = dict(Type='Machiner', Request='SetObservedNetworkConfig', Version=1, Params=params) - params['Config'] = config + msg = dict(type='Client', request='SetModelAgentVersion', version=1, params=params) + params['Build'] = build + params['Major'] = major + params['Minor'] = minor + params['Patch'] = patch params['Tag'] = tag reply = await self.rpc(msg) return reply - @ReturnMapping(ErrorResults) - async def SetProviderNetworkConfig(self, entities): + @ReturnMapping(None) + async def SetModelConstraints(self, application, constraints): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ErrorResult] + application : str + constraints : Value + Returns -> None ''' # map input types to rpc msg params = dict() - msg = dict(Type='Machiner', Request='SetProviderNetworkConfig', Version=1, Params=params) - params['Entities'] = entities + msg = dict(type='Client', request='SetModelConstraints', version=1, params=params) + params['application'] = application + params['constraints'] = constraints reply = await self.rpc(msg) return reply @ReturnMapping(ErrorResults) - async def SetStatus(self, entities): + async def SetModelDefaults(self, config): ''' - entities : typing.Sequence[~EntityStatusArgs] - Returns -> typing.Sequence[~ErrorResult] + config : typing.Sequence<+T_co>[~ModelDefaultValues]<~ModelDefaultValues> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Machiner', Request='SetStatus', Version=1, Params=params) - params['Entities'] = entities + msg = dict(type='Client', request='SetModelDefaults', version=1, params=params) + params['config'] = config reply = await self.rpc(msg) return reply - @ReturnMapping(ErrorResults) - async def UpdateStatus(self, entities): + @ReturnMapping(StatusHistoryResults) + async def StatusHistory(self, requests): ''' - entities : typing.Sequence[~EntityStatusArgs] - Returns -> typing.Sequence[~ErrorResult] + requests : typing.Sequence<+T_co>[~StatusHistoryRequest]<~StatusHistoryRequest> + Returns -> typing.Sequence<+T_co>[~StatusHistoryResult]<~StatusHistoryResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Machiner', Request='UpdateStatus', Version=1, Params=params) - params['Entities'] = entities + msg = dict(type='Client', request='StatusHistory', version=1, params=params) + params['requests'] = requests reply = await self.rpc(msg) return reply - @ReturnMapping(NotifyWatchResults) - async def Watch(self, entities): + @ReturnMapping(ErrorResults) + async def UnsetModelDefaults(self, keys): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~NotifyWatchResult] + keys : typing.Sequence<+T_co>[~ModelUnsetKeys]<~ModelUnsetKeys> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Machiner', Request='Watch', Version=1, Params=params) - params['Entities'] = entities + msg = dict(type='Client', request='UnsetModelDefaults', version=1, params=params) + params['keys'] = keys reply = await self.rpc(msg) return reply - @ReturnMapping(NotifyWatchResult) - async def WatchAPIHostPorts(self): + @ReturnMapping(AllWatcherId) + async def WatchAll(self): ''' - Returns -> typing.Union[_ForwardRef('Error'), str] + Returns -> str ''' # map input types to rpc msg params = dict() - msg = dict(Type='Machiner', Request='WatchAPIHostPorts', Version=1, Params=params) + msg = dict(type='Client', request='WatchAll', version=1, params=params) reply = await self.rpc(msg) return reply -class MeterStatus(Type): - name = 'MeterStatus' +class CloudFacade(Type): + name = 'Cloud' version = 1 - schema = {'definitions': {'Entities': {'additionalProperties': False, - 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'}, + schema = {'definitions': {'Cloud': {'additionalProperties': False, + 'properties': {'auth-types': {'items': {'type': 'string'}, + 'type': 'array'}, + 'endpoint': {'type': 'string'}, + 'identity-endpoint': {'type': 'string'}, + 'regions': {'items': {'$ref': '#/definitions/CloudRegion'}, + 'type': 'array'}, + 'storage-endpoint': {'type': 'string'}, + 'type': {'type': 'string'}}, + 'required': ['type'], + 'type': 'object'}, + 'CloudCredential': {'additionalProperties': False, + 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}}, + 'type': 'object'}, + 'auth-type': {'type': 'string'}, + 'redacted': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'required': ['auth-type'], + 'type': 'object'}, + 'CloudCredentialResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'$ref': '#/definitions/CloudCredential'}}, + 'type': 'object'}, + 'CloudCredentialResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/CloudCredentialResult'}, + 'type': 'array'}}, + 'type': 'object'}, + 'CloudRegion': {'additionalProperties': False, + 'properties': {'endpoint': {'type': 'string'}, + 'identity-endpoint': {'type': 'string'}, + 'name': {'type': 'string'}, + 'storage-endpoint': {'type': 'string'}}, + 'required': ['name'], + 'type': 'object'}, + 'CloudResult': {'additionalProperties': False, + 'properties': {'cloud': {'$ref': '#/definitions/Cloud'}, + 'error': {'$ref': '#/definitions/Error'}}, + 'type': 'object'}, + 'CloudResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/CloudResult'}, + 'type': 'array'}}, + 'type': 'object'}, + 'CloudsResult': {'additionalProperties': False, + 'properties': {'clouds': {'patternProperties': {'.*': {'$ref': '#/definitions/Cloud'}}, + 'type': 'object'}}, + 'type': 'object'}, + 'Entities': {'additionalProperties': False, + 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, 'type': 'array'}}, - 'required': ['Entities'], + 'required': ['entities'], 'type': 'object'}, 'Entity': {'additionalProperties': False, - 'properties': {'Tag': {'type': 'string'}}, - 'required': ['Tag'], + 'properties': {'tag': {'type': 'string'}}, + 'required': ['tag'], 'type': 'object'}, 'Error': {'additionalProperties': False, - 'properties': {'Code': {'type': 'string'}, - 'Info': {'$ref': '#/definitions/ErrorInfo'}, - 'Message': {'type': 'string'}}, - 'required': ['Message', 'Code'], + 'properties': {'code': {'type': 'string'}, + 'info': {'$ref': '#/definitions/ErrorInfo'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], 'type': 'object'}, 'ErrorInfo': {'additionalProperties': False, - 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'}, - 'MacaroonPath': {'type': 'string'}}, + 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'macaroon-path': {'type': 'string'}}, 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, - 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'}, - 'type': 'array'}, - 'data': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'id': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'sig': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['data', - 'location', - 'id', - 'caveats', - 'sig'], - 'type': 'object'}, - 'MeterStatusResult': {'additionalProperties': False, - 'properties': {'Code': {'type': 'string'}, - 'Error': {'$ref': '#/definitions/Error'}, - 'Info': {'type': 'string'}}, - 'required': ['Code', 'Info', 'Error'], - 'type': 'object'}, - 'MeterStatusResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/MeterStatusResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'NotifyWatcherId': {'type': 'string'}}, - 'required': ['NotifyWatcherId', 'Error'], - 'type': 'object'}, - 'NotifyWatchResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'caveat': {'additionalProperties': False, - 'properties': {'caveatId': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'verificationId': {'$ref': '#/definitions/packet'}}, - 'required': ['location', - 'caveatId', - 'verificationId'], - 'type': 'object'}, - 'packet': {'additionalProperties': False, - 'properties': {'headerLen': {'type': 'integer'}, - 'start': {'type': 'integer'}, - 'totalLen': {'type': 'integer'}}, - 'required': ['start', 'totalLen', 'headerLen'], - 'type': 'object'}}, - 'properties': {'GetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/MeterStatusResults'}}, + 'ErrorResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}}, + 'type': 'object'}, + 'ErrorResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'Macaroon': {'additionalProperties': False, 'type': 'object'}, + 'StringResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'type': 'string'}}, + 'required': ['result'], + 'type': 'object'}, + 'StringsResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'items': {'type': 'string'}, + 'type': 'array'}}, 'type': 'object'}, - 'WatchMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, - 'type': 'object'}}, + 'StringsResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'UpdateCloudCredential': {'additionalProperties': False, + 'properties': {'credential': {'$ref': '#/definitions/CloudCredential'}, + 'tag': {'type': 'string'}}, + 'required': ['tag', 'credential'], + 'type': 'object'}, + 'UpdateCloudCredentials': {'additionalProperties': False, + 'properties': {'credentials': {'items': {'$ref': '#/definitions/UpdateCloudCredential'}, + 'type': 'array'}}, + 'type': 'object'}, + 'UserCloud': {'additionalProperties': False, + 'properties': {'cloud-tag': {'type': 'string'}, + 'user-tag': {'type': 'string'}}, + 'required': ['user-tag', 'cloud-tag'], + 'type': 'object'}, + 'UserClouds': {'additionalProperties': False, + 'properties': {'user-clouds': {'items': {'$ref': '#/definitions/UserCloud'}, + 'type': 'array'}}, + 'type': 'object'}}, + 'properties': {'Cloud': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/CloudResults'}}, + 'type': 'object'}, + 'Clouds': {'properties': {'Result': {'$ref': '#/definitions/CloudsResult'}}, + 'type': 'object'}, + 'Credential': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/CloudCredentialResults'}}, + 'type': 'object'}, + 'DefaultCloud': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}}, + 'type': 'object'}, + 'RevokeCredentials': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'UpdateCredentials': {'properties': {'Params': {'$ref': '#/definitions/UpdateCloudCredentials'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'UserCredentials': {'properties': {'Params': {'$ref': '#/definitions/UserClouds'}, + 'Result': {'$ref': '#/definitions/StringsResults'}}, + 'type': 'object'}}, 'type': 'object'} - @ReturnMapping(MeterStatusResults) - async def GetMeterStatus(self, entities): + @ReturnMapping(CloudResults) + async def Cloud(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~MeterStatusResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~CloudResult]<~CloudResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='MeterStatus', Request='GetMeterStatus', Version=1, Params=params) - params['Entities'] = entities + msg = dict(type='Cloud', request='Cloud', version=1, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply - @ReturnMapping(NotifyWatchResults) - async def WatchMeterStatus(self, entities): + @ReturnMapping(CloudsResult) + async def Clouds(self): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~NotifyWatchResult] + + Returns -> typing.Mapping<~KT, +VT_co>[str, ~Cloud]<~Cloud> ''' # map input types to rpc msg params = dict() - msg = dict(Type='MeterStatus', Request='WatchMeterStatus', Version=1, Params=params) - params['Entities'] = entities + msg = dict(type='Cloud', request='Clouds', version=1, params=params) + reply = await self.rpc(msg) return reply -class MetricsAdder(Type): - name = 'MetricsAdder' - version = 2 - schema = {'definitions': {'Error': {'additionalProperties': False, - 'properties': {'Code': {'type': 'string'}, - 'Info': {'$ref': '#/definitions/ErrorInfo'}, - 'Message': {'type': 'string'}}, - 'required': ['Message', 'Code'], - 'type': 'object'}, - 'ErrorInfo': {'additionalProperties': False, - 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'}, - 'MacaroonPath': {'type': 'string'}}, - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}}, - 'required': ['Error'], - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, - 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'}, - 'type': 'array'}, - 'data': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'id': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'sig': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['data', - 'location', - 'id', - 'caveats', - 'sig'], - 'type': 'object'}, - 'Metric': {'additionalProperties': False, - 'properties': {'Key': {'type': 'string'}, - 'Time': {'format': 'date-time', - 'type': 'string'}, - 'Value': {'type': 'string'}}, - 'required': ['Key', 'Value', 'Time'], - 'type': 'object'}, - 'MetricBatch': {'additionalProperties': False, - 'properties': {'CharmURL': {'type': 'string'}, - 'Created': {'format': 'date-time', - 'type': 'string'}, - 'Metrics': {'items': {'$ref': '#/definitions/Metric'}, - 'type': 'array'}, - 'UUID': {'type': 'string'}}, - 'required': ['UUID', - 'CharmURL', - 'Created', - 'Metrics'], - 'type': 'object'}, - 'MetricBatchParam': {'additionalProperties': False, - 'properties': {'Batch': {'$ref': '#/definitions/MetricBatch'}, - 'Tag': {'type': 'string'}}, - 'required': ['Tag', 'Batch'], - 'type': 'object'}, - 'MetricBatchParams': {'additionalProperties': False, - 'properties': {'Batches': {'items': {'$ref': '#/definitions/MetricBatchParam'}, - 'type': 'array'}}, - 'required': ['Batches'], - 'type': 'object'}, - 'caveat': {'additionalProperties': False, - 'properties': {'caveatId': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'verificationId': {'$ref': '#/definitions/packet'}}, - 'required': ['location', - 'caveatId', - 'verificationId'], - 'type': 'object'}, - 'packet': {'additionalProperties': False, - 'properties': {'headerLen': {'type': 'integer'}, - 'start': {'type': 'integer'}, - 'totalLen': {'type': 'integer'}}, - 'required': ['start', 'totalLen', 'headerLen'], - 'type': 'object'}}, - 'properties': {'AddMetricBatches': {'properties': {'Params': {'$ref': '#/definitions/MetricBatchParams'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - @ReturnMapping(ErrorResults) - async def AddMetricBatches(self, batches): + @ReturnMapping(CloudCredentialResults) + async def Credential(self, entities): ''' - batches : typing.Sequence[~MetricBatchParam] - Returns -> typing.Sequence[~ErrorResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~CloudCredentialResult]<~CloudCredentialResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='MetricsAdder', Request='AddMetricBatches', Version=2, Params=params) - params['Batches'] = batches + msg = dict(type='Cloud', request='Credential', version=1, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply -class MetricsDebug(Type): - name = 'MetricsDebug' - version = 1 - schema = {'definitions': {'Entities': {'additionalProperties': False, - 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'}, - 'type': 'array'}}, - 'required': ['Entities'], - 'type': 'object'}, - 'Entity': {'additionalProperties': False, - 'properties': {'Tag': {'type': 'string'}}, - 'required': ['Tag'], - 'type': 'object'}, - 'EntityMetrics': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'metrics': {'items': {'$ref': '#/definitions/MetricResult'}, - 'type': 'array'}}, - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'Code': {'type': 'string'}, - 'Info': {'$ref': '#/definitions/ErrorInfo'}, - 'Message': {'type': 'string'}}, - 'required': ['Message', 'Code'], - 'type': 'object'}, - 'ErrorInfo': {'additionalProperties': False, - 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'}, - 'MacaroonPath': {'type': 'string'}}, - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}}, - 'required': ['Error'], - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, - 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'}, - 'type': 'array'}, - 'data': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'id': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'sig': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['data', - 'location', - 'id', - 'caveats', - 'sig'], - 'type': 'object'}, - 'MeterStatusParam': {'additionalProperties': False, - 'properties': {'code': {'type': 'string'}, - 'info': {'type': 'string'}, - 'tag': {'type': 'string'}}, - 'required': ['tag', 'code', 'info'], - 'type': 'object'}, - 'MeterStatusParams': {'additionalProperties': False, - 'properties': {'statues': {'items': {'$ref': '#/definitions/MeterStatusParam'}, - 'type': 'array'}}, - 'required': ['statues'], - 'type': 'object'}, - 'MetricResult': {'additionalProperties': False, - 'properties': {'key': {'type': 'string'}, - 'time': {'format': 'date-time', - 'type': 'string'}, - 'value': {'type': 'string'}}, - 'required': ['time', 'key', 'value'], - 'type': 'object'}, - 'MetricResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/EntityMetrics'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'caveat': {'additionalProperties': False, - 'properties': {'caveatId': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'verificationId': {'$ref': '#/definitions/packet'}}, - 'required': ['location', - 'caveatId', - 'verificationId'], - 'type': 'object'}, - 'packet': {'additionalProperties': False, - 'properties': {'headerLen': {'type': 'integer'}, - 'start': {'type': 'integer'}, - 'totalLen': {'type': 'integer'}}, - 'required': ['start', 'totalLen', 'headerLen'], - 'type': 'object'}}, - 'properties': {'GetMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/MetricResults'}}, - 'type': 'object'}, - 'SetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/MeterStatusParams'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - @ReturnMapping(MetricResults) - async def GetMetrics(self, entities): + @ReturnMapping(StringResult) + async def DefaultCloud(self): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~EntityMetrics] + + Returns -> typing.Union[_ForwardRef('Error'), str] ''' # map input types to rpc msg params = dict() - msg = dict(Type='MetricsDebug', Request='GetMetrics', Version=1, Params=params) - params['Entities'] = entities + msg = dict(type='Cloud', request='DefaultCloud', version=1, params=params) + reply = await self.rpc(msg) return reply @ReturnMapping(ErrorResults) - async def SetMeterStatus(self, statues): + async def RevokeCredentials(self, entities): ''' - statues : typing.Sequence[~MeterStatusParam] - Returns -> typing.Sequence[~ErrorResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='MetricsDebug', Request='SetMeterStatus', Version=1, Params=params) - params['statues'] = statues + msg = dict(type='Cloud', request='RevokeCredentials', version=1, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply -class MetricsManager(Type): - name = 'MetricsManager' - version = 1 - schema = {'definitions': {'Entities': {'additionalProperties': False, - 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'}, + + @ReturnMapping(ErrorResults) + async def UpdateCredentials(self, credentials): + ''' + credentials : typing.Sequence<+T_co>[~UpdateCloudCredential]<~UpdateCloudCredential> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='Cloud', request='UpdateCredentials', version=1, params=params) + params['credentials'] = credentials + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(StringsResults) + async def UserCredentials(self, user_clouds): + ''' + user_clouds : typing.Sequence<+T_co>[~UserCloud]<~UserCloud> + Returns -> typing.Sequence<+T_co>[~StringsResult]<~StringsResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='Cloud', request='UserCredentials', version=1, params=params) + params['user-clouds'] = user_clouds + reply = await self.rpc(msg) + return reply + + +class ControllerFacade(Type): + name = 'Controller' + version = 3 + schema = {'definitions': {'AllWatcherId': {'additionalProperties': False, + 'properties': {'watcher-id': {'type': 'string'}}, + 'required': ['watcher-id'], + 'type': 'object'}, + 'CloudCredential': {'additionalProperties': False, + 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}}, + 'type': 'object'}, + 'auth-type': {'type': 'string'}, + 'redacted': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'required': ['auth-type'], + 'type': 'object'}, + 'CloudSpec': {'additionalProperties': False, + 'properties': {'credential': {'$ref': '#/definitions/CloudCredential'}, + 'endpoint': {'type': 'string'}, + 'identity-endpoint': {'type': 'string'}, + 'name': {'type': 'string'}, + 'region': {'type': 'string'}, + 'storage-endpoint': {'type': 'string'}, + 'type': {'type': 'string'}}, + 'required': ['type', 'name'], + 'type': 'object'}, + 'CloudSpecResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'$ref': '#/definitions/CloudSpec'}}, + 'type': 'object'}, + 'CloudSpecResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/CloudSpecResult'}, + 'type': 'array'}}, + 'type': 'object'}, + 'ConfigValue': {'additionalProperties': False, + 'properties': {'source': {'type': 'string'}, + 'value': {'additionalProperties': True, + 'type': 'object'}}, + 'required': ['value', 'source'], + 'type': 'object'}, + 'ControllerConfigResult': {'additionalProperties': False, + 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True, + 'type': 'object'}}, + 'type': 'object'}}, + 'required': ['config'], + 'type': 'object'}, + 'DestroyControllerArgs': {'additionalProperties': False, + 'properties': {'destroy-models': {'type': 'boolean'}}, + 'required': ['destroy-models'], + 'type': 'object'}, + 'Entities': {'additionalProperties': False, + 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, 'type': 'array'}}, - 'required': ['Entities'], + 'required': ['entities'], 'type': 'object'}, 'Entity': {'additionalProperties': False, - 'properties': {'Tag': {'type': 'string'}}, - 'required': ['Tag'], + 'properties': {'tag': {'type': 'string'}}, + 'required': ['tag'], 'type': 'object'}, 'Error': {'additionalProperties': False, - 'properties': {'Code': {'type': 'string'}, - 'Info': {'$ref': '#/definitions/ErrorInfo'}, - 'Message': {'type': 'string'}}, - 'required': ['Message', 'Code'], + 'properties': {'code': {'type': 'string'}, + 'info': {'$ref': '#/definitions/ErrorInfo'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], 'type': 'object'}, 'ErrorInfo': {'additionalProperties': False, - 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'}, - 'MacaroonPath': {'type': 'string'}}, + 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'macaroon-path': {'type': 'string'}}, 'type': 'object'}, 'ErrorResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}}, - 'required': ['Error'], + 'properties': {'error': {'$ref': '#/definitions/Error'}}, 'type': 'object'}, 'ErrorResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'}, + 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, 'type': 'array'}}, - 'required': ['Results'], + 'required': ['results'], 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, - 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'}, - 'type': 'array'}, - 'data': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'id': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'sig': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['data', - 'location', - 'id', - 'caveats', - 'sig'], + 'InitiateMigrationArgs': {'additionalProperties': False, + 'properties': {'specs': {'items': {'$ref': '#/definitions/MigrationSpec'}, + 'type': 'array'}}, + 'required': ['specs'], + 'type': 'object'}, + 'InitiateMigrationResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'migration-id': {'type': 'string'}, + 'model-tag': {'type': 'string'}}, + 'required': ['model-tag', + 'migration-id'], + 'type': 'object'}, + 'InitiateMigrationResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/InitiateMigrationResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'Macaroon': {'additionalProperties': False, 'type': 'object'}, + 'MigrationSpec': {'additionalProperties': False, + 'properties': {'model-tag': {'type': 'string'}, + 'target-info': {'$ref': '#/definitions/MigrationTargetInfo'}}, + 'required': ['model-tag', 'target-info'], + 'type': 'object'}, + 'MigrationTargetInfo': {'additionalProperties': False, + 'properties': {'addrs': {'items': {'type': 'string'}, + 'type': 'array'}, + 'auth-tag': {'type': 'string'}, + 'ca-cert': {'type': 'string'}, + 'controller-tag': {'type': 'string'}, + 'macaroon': {'type': 'string'}, + 'password': {'type': 'string'}}, + 'required': ['controller-tag', + 'addrs', + 'ca-cert', + 'auth-tag'], + 'type': 'object'}, + 'Model': {'additionalProperties': False, + 'properties': {'name': {'type': 'string'}, + 'owner-tag': {'type': 'string'}, + 'uuid': {'type': 'string'}}, + 'required': ['name', 'uuid', 'owner-tag'], + 'type': 'object'}, + 'ModelBlockInfo': {'additionalProperties': False, + 'properties': {'blocks': {'items': {'type': 'string'}, + 'type': 'array'}, + 'model-uuid': {'type': 'string'}, + 'name': {'type': 'string'}, + 'owner-tag': {'type': 'string'}}, + 'required': ['name', + 'model-uuid', + 'owner-tag', + 'blocks'], + 'type': 'object'}, + 'ModelBlockInfoList': {'additionalProperties': False, + 'properties': {'models': {'items': {'$ref': '#/definitions/ModelBlockInfo'}, + 'type': 'array'}}, + 'type': 'object'}, + 'ModelConfigResults': {'additionalProperties': False, + 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ConfigValue'}}, + 'type': 'object'}}, + 'required': ['config'], + 'type': 'object'}, + 'ModelStatus': {'additionalProperties': False, + 'properties': {'application-count': {'type': 'integer'}, + 'hosted-machine-count': {'type': 'integer'}, + 'life': {'type': 'string'}, + 'model-tag': {'type': 'string'}, + 'owner-tag': {'type': 'string'}}, + 'required': ['model-tag', + 'life', + 'hosted-machine-count', + 'application-count', + 'owner-tag'], + 'type': 'object'}, + 'ModelStatusResults': {'additionalProperties': False, + 'properties': {'models': {'items': {'$ref': '#/definitions/ModelStatus'}, + 'type': 'array'}}, + 'required': ['models'], + 'type': 'object'}, + 'ModifyControllerAccess': {'additionalProperties': False, + 'properties': {'access': {'type': 'string'}, + 'action': {'type': 'string'}, + 'user-tag': {'type': 'string'}}, + 'required': ['user-tag', + 'action', + 'access'], + 'type': 'object'}, + 'ModifyControllerAccessRequest': {'additionalProperties': False, + 'properties': {'changes': {'items': {'$ref': '#/definitions/ModifyControllerAccess'}, + 'type': 'array'}}, + 'required': ['changes'], + 'type': 'object'}, + 'RemoveBlocksArgs': {'additionalProperties': False, + 'properties': {'all': {'type': 'boolean'}}, + 'required': ['all'], + 'type': 'object'}, + 'UserAccess': {'additionalProperties': False, + 'properties': {'access': {'type': 'string'}, + 'user-tag': {'type': 'string'}}, + 'required': ['user-tag', 'access'], + 'type': 'object'}, + 'UserAccessResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'$ref': '#/definitions/UserAccess'}}, + 'type': 'object'}, + 'UserAccessResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/UserAccessResult'}, + 'type': 'array'}}, + 'type': 'object'}, + 'UserModel': {'additionalProperties': False, + 'properties': {'last-connection': {'format': 'date-time', + 'type': 'string'}, + 'model': {'$ref': '#/definitions/Model'}}, + 'required': ['model', 'last-connection'], + 'type': 'object'}, + 'UserModelList': {'additionalProperties': False, + 'properties': {'user-models': {'items': {'$ref': '#/definitions/UserModel'}, + 'type': 'array'}}, + 'required': ['user-models'], + 'type': 'object'}}, + 'properties': {'AllModels': {'properties': {'Result': {'$ref': '#/definitions/UserModelList'}}, 'type': 'object'}, - 'caveat': {'additionalProperties': False, - 'properties': {'caveatId': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'verificationId': {'$ref': '#/definitions/packet'}}, - 'required': ['location', - 'caveatId', - 'verificationId'], - 'type': 'object'}, - 'packet': {'additionalProperties': False, - 'properties': {'headerLen': {'type': 'integer'}, - 'start': {'type': 'integer'}, - 'totalLen': {'type': 'integer'}}, - 'required': ['start', 'totalLen', 'headerLen'], - 'type': 'object'}}, - 'properties': {'CleanupOldMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'CloudSpec': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/CloudSpecResults'}}, + 'type': 'object'}, + 'ControllerConfig': {'properties': {'Result': {'$ref': '#/definitions/ControllerConfigResult'}}, + 'type': 'object'}, + 'DestroyController': {'properties': {'Params': {'$ref': '#/definitions/DestroyControllerArgs'}}, 'type': 'object'}, - 'SendMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}}, + 'GetControllerAccess': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/UserAccessResults'}}, + 'type': 'object'}, + 'InitiateMigration': {'properties': {'Params': {'$ref': '#/definitions/InitiateMigrationArgs'}, + 'Result': {'$ref': '#/definitions/InitiateMigrationResults'}}, + 'type': 'object'}, + 'ListBlockedModels': {'properties': {'Result': {'$ref': '#/definitions/ModelBlockInfoList'}}, + 'type': 'object'}, + 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}}, + 'type': 'object'}, + 'ModelStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/ModelStatusResults'}}, + 'type': 'object'}, + 'ModifyControllerAccess': {'properties': {'Params': {'$ref': '#/definitions/ModifyControllerAccessRequest'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'RemoveBlocks': {'properties': {'Params': {'$ref': '#/definitions/RemoveBlocksArgs'}}, + 'type': 'object'}, + 'WatchAllModels': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherId'}}, + 'type': 'object'}}, 'type': 'object'} - @ReturnMapping(ErrorResults) - async def CleanupOldMetrics(self, entities): + @ReturnMapping(UserModelList) + async def AllModels(self): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ErrorResult] + + Returns -> typing.Sequence<+T_co>[~UserModel]<~UserModel> ''' # map input types to rpc msg params = dict() - msg = dict(Type='MetricsManager', Request='CleanupOldMetrics', Version=1, Params=params) - params['Entities'] = entities + msg = dict(type='Controller', request='AllModels', version=3, params=params) + reply = await self.rpc(msg) return reply - @ReturnMapping(ErrorResults) - async def SendMetrics(self, entities): + @ReturnMapping(CloudSpecResults) + async def CloudSpec(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ErrorResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~CloudSpecResult]<~CloudSpecResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='MetricsManager', Request='SendMetrics', Version=1, Params=params) - params['Entities'] = entities + msg = dict(type='Controller', request='CloudSpec', version=3, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply -class MigrationFlag(Type): - name = 'MigrationFlag' - version = 1 - schema = {'definitions': {'Entities': {'additionalProperties': False, - 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'}, - 'type': 'array'}}, - 'required': ['Entities'], - 'type': 'object'}, - 'Entity': {'additionalProperties': False, - 'properties': {'Tag': {'type': 'string'}}, - 'required': ['Tag'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'Code': {'type': 'string'}, - 'Info': {'$ref': '#/definitions/ErrorInfo'}, - 'Message': {'type': 'string'}}, - 'required': ['Message', 'Code'], - 'type': 'object'}, - 'ErrorInfo': {'additionalProperties': False, - 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'}, - 'MacaroonPath': {'type': 'string'}}, - 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, - 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'}, - 'type': 'array'}, - 'data': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'id': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'sig': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['data', - 'location', - 'id', - 'caveats', - 'sig'], - 'type': 'object'}, - 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'NotifyWatcherId': {'type': 'string'}}, - 'required': ['NotifyWatcherId', 'Error'], - 'type': 'object'}, - 'NotifyWatchResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'PhaseResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'phase': {'type': 'string'}}, - 'required': ['phase', 'Error'], - 'type': 'object'}, - 'PhaseResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/PhaseResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'caveat': {'additionalProperties': False, - 'properties': {'caveatId': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'verificationId': {'$ref': '#/definitions/packet'}}, - 'required': ['location', - 'caveatId', - 'verificationId'], - 'type': 'object'}, - 'packet': {'additionalProperties': False, - 'properties': {'headerLen': {'type': 'integer'}, - 'start': {'type': 'integer'}, - 'totalLen': {'type': 'integer'}}, - 'required': ['start', 'totalLen', 'headerLen'], - 'type': 'object'}}, - 'properties': {'Phase': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/PhaseResults'}}, - 'type': 'object'}, - 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(PhaseResults) - async def Phase(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~PhaseResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='MigrationFlag', Request='Phase', Version=1, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResults) - async def Watch(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~NotifyWatchResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='MigrationFlag', Request='Watch', Version=1, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - -class MigrationMaster(Type): - name = 'MigrationMaster' - version = 1 - schema = {'definitions': {'Error': {'additionalProperties': False, - 'properties': {'Code': {'type': 'string'}, - 'Info': {'$ref': '#/definitions/ErrorInfo'}, - 'Message': {'type': 'string'}}, - 'required': ['Message', 'Code'], - 'type': 'object'}, - 'ErrorInfo': {'additionalProperties': False, - 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'}, - 'MacaroonPath': {'type': 'string'}}, - 'type': 'object'}, - 'FullMigrationStatus': {'additionalProperties': False, - 'properties': {'attempt': {'type': 'integer'}, - 'phase': {'type': 'string'}, - 'spec': {'$ref': '#/definitions/ModelMigrationSpec'}}, - 'required': ['spec', - 'attempt', - 'phase'], - 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, - 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'}, - 'type': 'array'}, - 'data': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'id': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'sig': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['data', - 'location', - 'id', - 'caveats', - 'sig'], - 'type': 'object'}, - 'ModelMigrationSpec': {'additionalProperties': False, - 'properties': {'model-tag': {'type': 'string'}, - 'target-info': {'$ref': '#/definitions/ModelMigrationTargetInfo'}}, - 'required': ['model-tag', - 'target-info'], - 'type': 'object'}, - 'ModelMigrationTargetInfo': {'additionalProperties': False, - 'properties': {'addrs': {'items': {'type': 'string'}, - 'type': 'array'}, - 'auth-tag': {'type': 'string'}, - 'ca-cert': {'type': 'string'}, - 'controller-tag': {'type': 'string'}, - 'password': {'type': 'string'}}, - 'required': ['controller-tag', - 'addrs', - 'ca-cert', - 'auth-tag', - 'password'], - 'type': 'object'}, - 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'NotifyWatcherId': {'type': 'string'}}, - 'required': ['NotifyWatcherId', 'Error'], - 'type': 'object'}, - 'SerializedModel': {'additionalProperties': False, - 'properties': {'bytes': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['bytes'], - 'type': 'object'}, - 'SetMigrationPhaseArgs': {'additionalProperties': False, - 'properties': {'phase': {'type': 'string'}}, - 'required': ['phase'], - 'type': 'object'}, - 'caveat': {'additionalProperties': False, - 'properties': {'caveatId': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'verificationId': {'$ref': '#/definitions/packet'}}, - 'required': ['location', - 'caveatId', - 'verificationId'], - 'type': 'object'}, - 'packet': {'additionalProperties': False, - 'properties': {'headerLen': {'type': 'integer'}, - 'start': {'type': 'integer'}, - 'totalLen': {'type': 'integer'}}, - 'required': ['start', 'totalLen', 'headerLen'], - 'type': 'object'}}, - 'properties': {'Export': {'properties': {'Result': {'$ref': '#/definitions/SerializedModel'}}, - 'type': 'object'}, - 'GetMigrationStatus': {'properties': {'Result': {'$ref': '#/definitions/FullMigrationStatus'}}, - 'type': 'object'}, - 'SetPhase': {'properties': {'Params': {'$ref': '#/definitions/SetMigrationPhaseArgs'}}, - 'type': 'object'}, - 'Watch': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, - 'type': 'object'}}, - 'type': 'object'} - - @ReturnMapping(SerializedModel) - async def Export(self): + @ReturnMapping(ControllerConfigResult) + async def ControllerConfig(self): ''' - Returns -> typing.Sequence[int] + Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any] ''' # map input types to rpc msg params = dict() - msg = dict(Type='MigrationMaster', Request='Export', Version=1, Params=params) + msg = dict(type='Controller', request='ControllerConfig', version=3, params=params) reply = await self.rpc(msg) return reply - @ReturnMapping(FullMigrationStatus) - async def GetMigrationStatus(self): + @ReturnMapping(None) + async def DestroyController(self, destroy_models): ''' - - Returns -> typing.Union[int, str, _ForwardRef('ModelMigrationSpec')] + destroy_models : bool + Returns -> None ''' # map input types to rpc msg params = dict() - msg = dict(Type='MigrationMaster', Request='GetMigrationStatus', Version=1, Params=params) - + msg = dict(type='Controller', request='DestroyController', version=3, params=params) + params['destroy-models'] = destroy_models reply = await self.rpc(msg) return reply - @ReturnMapping(None) - async def SetPhase(self, phase): + @ReturnMapping(UserAccessResults) + async def GetControllerAccess(self, entities): ''' - phase : str - Returns -> None + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~UserAccessResult]<~UserAccessResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='MigrationMaster', Request='SetPhase', Version=1, Params=params) - params['phase'] = phase + msg = dict(type='Controller', request='GetControllerAccess', version=3, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply - @ReturnMapping(NotifyWatchResult) - async def Watch(self): + @ReturnMapping(InitiateMigrationResults) + async def InitiateMigration(self, specs): ''' - - Returns -> typing.Union[_ForwardRef('Error'), str] + specs : typing.Sequence<+T_co>[~MigrationSpec]<~MigrationSpec> + Returns -> typing.Sequence<+T_co>[~InitiateMigrationResult]<~InitiateMigrationResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='MigrationMaster', Request='Watch', Version=1, Params=params) - + msg = dict(type='Controller', request='InitiateMigration', version=3, params=params) + params['specs'] = specs reply = await self.rpc(msg) return reply -class MigrationMinion(Type): - name = 'MigrationMinion' - version = 1 - schema = {'definitions': {'Error': {'additionalProperties': False, - 'properties': {'Code': {'type': 'string'}, - 'Info': {'$ref': '#/definitions/ErrorInfo'}, - 'Message': {'type': 'string'}}, - 'required': ['Message', 'Code'], - 'type': 'object'}, - 'ErrorInfo': {'additionalProperties': False, - 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'}, - 'MacaroonPath': {'type': 'string'}}, - 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, - 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'}, - 'type': 'array'}, - 'data': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'id': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'sig': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['data', - 'location', - 'id', - 'caveats', - 'sig'], - 'type': 'object'}, - 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'NotifyWatcherId': {'type': 'string'}}, - 'required': ['NotifyWatcherId', 'Error'], - 'type': 'object'}, - 'caveat': {'additionalProperties': False, - 'properties': {'caveatId': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'verificationId': {'$ref': '#/definitions/packet'}}, - 'required': ['location', - 'caveatId', - 'verificationId'], - 'type': 'object'}, - 'packet': {'additionalProperties': False, - 'properties': {'headerLen': {'type': 'integer'}, - 'start': {'type': 'integer'}, - 'totalLen': {'type': 'integer'}}, - 'required': ['start', 'totalLen', 'headerLen'], - 'type': 'object'}}, - 'properties': {'Watch': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, - 'type': 'object'}}, - 'type': 'object'} - - @ReturnMapping(NotifyWatchResult) - async def Watch(self): + @ReturnMapping(ModelBlockInfoList) + async def ListBlockedModels(self): ''' - Returns -> typing.Union[_ForwardRef('Error'), str] + Returns -> typing.Sequence<+T_co>[~ModelBlockInfo]<~ModelBlockInfo> ''' # map input types to rpc msg params = dict() - msg = dict(Type='MigrationMinion', Request='Watch', Version=1, Params=params) + msg = dict(type='Controller', request='ListBlockedModels', version=3, params=params) reply = await self.rpc(msg) return reply -class MigrationStatusWatcher(Type): - name = 'MigrationStatusWatcher' - version = 1 - schema = {'definitions': {'MigrationStatus': {'additionalProperties': False, - 'properties': {'attempt': {'type': 'integer'}, - 'phase': {'type': 'string'}, - 'source-api-addrs': {'items': {'type': 'string'}, - 'type': 'array'}, - 'source-ca-cert': {'type': 'string'}, - 'target-api-addrs': {'items': {'type': 'string'}, - 'type': 'array'}, - 'target-ca-cert': {'type': 'string'}}, - 'required': ['attempt', - 'phase', - 'source-api-addrs', - 'source-ca-cert', - 'target-api-addrs', - 'target-ca-cert'], - 'type': 'object'}}, - 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MigrationStatus'}}, - 'type': 'object'}, - 'Stop': {'type': 'object'}}, - 'type': 'object'} - - @ReturnMapping(MigrationStatus) - async def Next(self): + @ReturnMapping(ModelConfigResults) + async def ModelConfig(self): ''' - Returns -> typing.Union[int, typing.Sequence[str]] + Returns -> typing.Mapping<~KT, +VT_co>[str, ~ConfigValue]<~ConfigValue> ''' # map input types to rpc msg params = dict() - msg = dict(Type='MigrationStatusWatcher', Request='Next', Version=1, Params=params) + msg = dict(type='Controller', request='ModelConfig', version=3, params=params) reply = await self.rpc(msg) return reply - @ReturnMapping(None) - async def Stop(self): + @ReturnMapping(ModelStatusResults) + async def ModelStatus(self, entities): ''' - - Returns -> None + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~ModelStatus]<~ModelStatus> ''' # map input types to rpc msg params = dict() - msg = dict(Type='MigrationStatusWatcher', Request='Stop', Version=1, Params=params) - + msg = dict(type='Controller', request='ModelStatus', version=3, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply -class MigrationTarget(Type): - name = 'MigrationTarget' - version = 1 - schema = {'definitions': {'ModelArgs': {'additionalProperties': False, - 'properties': {'model-tag': {'type': 'string'}}, - 'required': ['model-tag'], - 'type': 'object'}, - 'SerializedModel': {'additionalProperties': False, - 'properties': {'bytes': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['bytes'], - 'type': 'object'}}, - 'properties': {'Abort': {'properties': {'Params': {'$ref': '#/definitions/ModelArgs'}}, - 'type': 'object'}, - 'Activate': {'properties': {'Params': {'$ref': '#/definitions/ModelArgs'}}, - 'type': 'object'}, - 'Import': {'properties': {'Params': {'$ref': '#/definitions/SerializedModel'}}, - 'type': 'object'}}, - 'type': 'object'} - - @ReturnMapping(None) - async def Abort(self, model_tag): + @ReturnMapping(ErrorResults) + async def ModifyControllerAccess(self, changes): ''' - model_tag : str - Returns -> None + changes : typing.Sequence<+T_co>[~ModifyControllerAccess]<~ModifyControllerAccess> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='MigrationTarget', Request='Abort', Version=1, Params=params) - params['model-tag'] = model_tag + msg = dict(type='Controller', request='ModifyControllerAccess', version=3, params=params) + params['changes'] = changes reply = await self.rpc(msg) return reply @ReturnMapping(None) - async def Activate(self, model_tag): + async def RemoveBlocks(self, all_): ''' - model_tag : str + all_ : bool Returns -> None ''' # map input types to rpc msg params = dict() - msg = dict(Type='MigrationTarget', Request='Activate', Version=1, Params=params) - params['model-tag'] = model_tag + msg = dict(type='Controller', request='RemoveBlocks', version=3, params=params) + params['all'] = all_ reply = await self.rpc(msg) return reply - @ReturnMapping(None) - async def Import(self, bytes_): + @ReturnMapping(AllWatcherId) + async def WatchAllModels(self): ''' - bytes_ : typing.Sequence[int] - Returns -> None + + Returns -> str ''' # map input types to rpc msg params = dict() - msg = dict(Type='MigrationTarget', Request='Import', Version=1, Params=params) - params['bytes'] = bytes_ + msg = dict(type='Controller', request='WatchAllModels', version=3, params=params) + reply = await self.rpc(msg) return reply -class ModelManager(Type): - name = 'ModelManager' - version = 2 - schema = {'definitions': {'Entities': {'additionalProperties': False, - 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'}, +class DeployerFacade(Type): + name = 'Deployer' + version = 1 + schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False, + 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'}, + 'type': 'array'}, + 'type': 'array'}}, + 'required': ['servers'], + 'type': 'object'}, + 'Address': {'additionalProperties': False, + 'properties': {'scope': {'type': 'string'}, + 'space-name': {'type': 'string'}, + 'type': {'type': 'string'}, + 'value': {'type': 'string'}}, + 'required': ['value', 'type', 'scope'], + 'type': 'object'}, + 'BytesResult': {'additionalProperties': False, + 'properties': {'result': {'items': {'type': 'integer'}, + 'type': 'array'}}, + 'required': ['result'], + 'type': 'object'}, + 'DeployerConnectionValues': {'additionalProperties': False, + 'properties': {'api-addresses': {'items': {'type': 'string'}, + 'type': 'array'}, + 'state-addresses': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'required': ['state-addresses', + 'api-addresses'], + 'type': 'object'}, + 'Entities': {'additionalProperties': False, + 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, 'type': 'array'}}, - 'required': ['Entities'], + 'required': ['entities'], 'type': 'object'}, 'Entity': {'additionalProperties': False, - 'properties': {'Tag': {'type': 'string'}}, - 'required': ['Tag'], + 'properties': {'tag': {'type': 'string'}}, + 'required': ['tag'], 'type': 'object'}, - 'EntityStatus': {'additionalProperties': False, - 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'Info': {'type': 'string'}, - 'Since': {'format': 'date-time', - 'type': 'string'}, - 'Status': {'type': 'string'}}, - 'required': ['Status', - 'Info', - 'Data', - 'Since'], - 'type': 'object'}, + 'EntityPassword': {'additionalProperties': False, + 'properties': {'password': {'type': 'string'}, + 'tag': {'type': 'string'}}, + 'required': ['tag', 'password'], + 'type': 'object'}, + 'EntityPasswords': {'additionalProperties': False, + 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'}, + 'type': 'array'}}, + 'required': ['changes'], + 'type': 'object'}, 'Error': {'additionalProperties': False, - 'properties': {'Code': {'type': 'string'}, - 'Info': {'$ref': '#/definitions/ErrorInfo'}, - 'Message': {'type': 'string'}}, - 'required': ['Message', 'Code'], + 'properties': {'code': {'type': 'string'}, + 'info': {'$ref': '#/definitions/ErrorInfo'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], 'type': 'object'}, 'ErrorInfo': {'additionalProperties': False, - 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'}, - 'MacaroonPath': {'type': 'string'}}, + 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'macaroon-path': {'type': 'string'}}, 'type': 'object'}, 'ErrorResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}}, - 'required': ['Error'], + 'properties': {'error': {'$ref': '#/definitions/Error'}}, 'type': 'object'}, 'ErrorResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'}, + 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, 'type': 'array'}}, - 'required': ['Results'], + 'required': ['results'], 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, - 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'}, - 'type': 'array'}, - 'data': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'id': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'sig': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['data', - 'location', - 'id', - 'caveats', - 'sig'], + 'HostPort': {'additionalProperties': False, + 'properties': {'Address': {'$ref': '#/definitions/Address'}, + 'port': {'type': 'integer'}}, + 'required': ['Address', 'port'], 'type': 'object'}, - 'Model': {'additionalProperties': False, - 'properties': {'Name': {'type': 'string'}, - 'OwnerTag': {'type': 'string'}, - 'UUID': {'type': 'string'}}, - 'required': ['Name', 'UUID', 'OwnerTag'], - 'type': 'object'}, - 'ModelConfigResult': {'additionalProperties': False, - 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}}, - 'required': ['Config'], + 'LifeResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'life': {'type': 'string'}}, + 'required': ['life'], + 'type': 'object'}, + 'LifeResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'Macaroon': {'additionalProperties': False, 'type': 'object'}, + 'NotifyWatchResult': {'additionalProperties': False, + 'properties': {'NotifyWatcherId': {'type': 'string'}, + 'error': {'$ref': '#/definitions/Error'}}, + 'required': ['NotifyWatcherId'], 'type': 'object'}, - 'ModelCreateArgs': {'additionalProperties': False, - 'properties': {'Account': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'Config': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'OwnerTag': {'type': 'string'}}, - 'required': ['OwnerTag', - 'Account', - 'Config'], - 'type': 'object'}, - 'ModelInfo': {'additionalProperties': False, - 'properties': {'DefaultSeries': {'type': 'string'}, - 'Life': {'type': 'string'}, - 'Name': {'type': 'string'}, - 'OwnerTag': {'type': 'string'}, - 'ProviderType': {'type': 'string'}, - 'ServerUUID': {'type': 'string'}, - 'Status': {'$ref': '#/definitions/EntityStatus'}, - 'UUID': {'type': 'string'}, - 'Users': {'items': {'$ref': '#/definitions/ModelUserInfo'}, - 'type': 'array'}}, - 'required': ['Name', - 'UUID', - 'ServerUUID', - 'ProviderType', - 'DefaultSeries', - 'OwnerTag', - 'Life', - 'Status', - 'Users'], - 'type': 'object'}, - 'ModelInfoResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'$ref': '#/definitions/ModelInfo'}}, - 'type': 'object'}, - 'ModelInfoResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/ModelInfoResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'ModelSkeletonConfigArgs': {'additionalProperties': False, - 'properties': {'Provider': {'type': 'string'}, - 'Region': {'type': 'string'}}, - 'required': ['Provider', 'Region'], - 'type': 'object'}, - 'ModelUserInfo': {'additionalProperties': False, - 'properties': {'access': {'type': 'string'}, - 'displayname': {'type': 'string'}, - 'lastconnection': {'format': 'date-time', - 'type': 'string'}, - 'user': {'type': 'string'}}, - 'required': ['user', - 'displayname', - 'lastconnection', - 'access'], - 'type': 'object'}, - 'ModifyModelAccess': {'additionalProperties': False, - 'properties': {'access': {'type': 'string'}, - 'action': {'type': 'string'}, - 'model-tag': {'type': 'string'}, - 'user-tag': {'type': 'string'}}, - 'required': ['user-tag', - 'action', - 'access', - 'model-tag'], - 'type': 'object'}, - 'ModifyModelAccessRequest': {'additionalProperties': False, - 'properties': {'changes': {'items': {'$ref': '#/definitions/ModifyModelAccess'}, - 'type': 'array'}}, - 'required': ['changes'], - 'type': 'object'}, - 'UserModel': {'additionalProperties': False, - 'properties': {'LastConnection': {'format': 'date-time', - 'type': 'string'}, - 'Model': {'$ref': '#/definitions/Model'}}, - 'required': ['Model', 'LastConnection'], - 'type': 'object'}, - 'UserModelList': {'additionalProperties': False, - 'properties': {'UserModels': {'items': {'$ref': '#/definitions/UserModel'}, - 'type': 'array'}}, - 'required': ['UserModels'], + 'StringResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'type': 'string'}}, + 'required': ['result'], + 'type': 'object'}, + 'StringsResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'items': {'type': 'string'}, + 'type': 'array'}}, 'type': 'object'}, - 'caveat': {'additionalProperties': False, - 'properties': {'caveatId': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'verificationId': {'$ref': '#/definitions/packet'}}, - 'required': ['location', - 'caveatId', - 'verificationId'], - 'type': 'object'}, - 'packet': {'additionalProperties': False, - 'properties': {'headerLen': {'type': 'integer'}, - 'start': {'type': 'integer'}, - 'totalLen': {'type': 'integer'}}, - 'required': ['start', 'totalLen', 'headerLen'], - 'type': 'object'}}, - 'properties': {'ConfigSkeleton': {'properties': {'Params': {'$ref': '#/definitions/ModelSkeletonConfigArgs'}, - 'Result': {'$ref': '#/definitions/ModelConfigResult'}}, + 'StringsWatchResult': {'additionalProperties': False, + 'properties': {'changes': {'items': {'type': 'string'}, + 'type': 'array'}, + 'error': {'$ref': '#/definitions/Error'}, + 'watcher-id': {'type': 'string'}}, + 'required': ['watcher-id'], + 'type': 'object'}, + 'StringsWatchResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}}, + 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}}, + 'type': 'object'}, + 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}}, + 'type': 'object'}, + 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}}, + 'type': 'object'}, + 'ConnectionInfo': {'properties': {'Result': {'$ref': '#/definitions/DeployerConnectionValues'}}, 'type': 'object'}, - 'CreateModel': {'properties': {'Params': {'$ref': '#/definitions/ModelCreateArgs'}, - 'Result': {'$ref': '#/definitions/Model'}}, - 'type': 'object'}, - 'ListModels': {'properties': {'Params': {'$ref': '#/definitions/Entity'}, - 'Result': {'$ref': '#/definitions/UserModelList'}}, - 'type': 'object'}, - 'ModelInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ModelInfoResults'}}, + 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/LifeResults'}}, + 'type': 'object'}, + 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}}, 'type': 'object'}, - 'ModifyModelAccess': {'properties': {'Params': {'$ref': '#/definitions/ModifyModelAccessRequest'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}}, + 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'StateAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}}, + 'type': 'object'}, + 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, + 'type': 'object'}, + 'WatchUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, + 'type': 'object'}}, 'type': 'object'} - @ReturnMapping(ModelConfigResult) - async def ConfigSkeleton(self, provider, region): + @ReturnMapping(StringsResult) + async def APIAddresses(self): ''' - provider : str - region : str - Returns -> typing.Mapping[str, typing.Any] + + Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[str]] ''' # map input types to rpc msg params = dict() - msg = dict(Type='ModelManager', Request='ConfigSkeleton', Version=2, Params=params) - params['Provider'] = provider - params['Region'] = region + msg = dict(type='Deployer', request='APIAddresses', version=1, params=params) + reply = await self.rpc(msg) return reply - @ReturnMapping(Model) - async def CreateModel(self, account, config, ownertag): + @ReturnMapping(APIHostPortsResult) + async def APIHostPorts(self): ''' - account : typing.Mapping[str, typing.Any] - config : typing.Mapping[str, typing.Any] - ownertag : str - Returns -> + + Returns -> typing.Sequence<+T_co>[~HostPort]<~HostPort> ''' # map input types to rpc msg params = dict() - msg = dict(Type='ModelManager', Request='CreateModel', Version=2, Params=params) - params['Account'] = account - params['Config'] = config - params['OwnerTag'] = ownertag + msg = dict(type='Deployer', request='APIHostPorts', version=1, params=params) + reply = await self.rpc(msg) return reply - @ReturnMapping(UserModelList) - async def ListModels(self, tag): + @ReturnMapping(BytesResult) + async def CACert(self): ''' - tag : str - Returns -> typing.Sequence[~UserModel] + + Returns -> typing.Sequence<+T_co>[int] ''' # map input types to rpc msg params = dict() - msg = dict(Type='ModelManager', Request='ListModels', Version=2, Params=params) - params['Tag'] = tag + msg = dict(type='Deployer', request='CACert', version=1, params=params) + reply = await self.rpc(msg) return reply - @ReturnMapping(ModelInfoResults) - async def ModelInfo(self, entities): + @ReturnMapping(DeployerConnectionValues) + async def ConnectionInfo(self): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ModelInfoResult] + + Returns -> typing.Sequence<+T_co>[str] ''' # map input types to rpc msg params = dict() - msg = dict(Type='ModelManager', Request='ModelInfo', Version=2, Params=params) - params['Entities'] = entities + msg = dict(type='Deployer', request='ConnectionInfo', version=1, params=params) + reply = await self.rpc(msg) return reply - @ReturnMapping(ErrorResults) - async def ModifyModelAccess(self, changes): + @ReturnMapping(LifeResults) + async def Life(self, entities): ''' - changes : typing.Sequence[~ModifyModelAccess] - Returns -> typing.Sequence[~ErrorResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='ModelManager', Request='ModifyModelAccess', Version=2, Params=params) - params['changes'] = changes + msg = dict(type='Deployer', request='Life', version=1, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply -class NotifyWatcher(Type): - name = 'NotifyWatcher' - version = 1 - schema = {'properties': {'Next': {'type': 'object'}, 'Stop': {'type': 'object'}}, - 'type': 'object'} - - @ReturnMapping(None) - async def Next(self): + @ReturnMapping(StringResult) + async def ModelUUID(self): ''' - Returns -> None + Returns -> typing.Union[_ForwardRef('Error'), str] ''' # map input types to rpc msg params = dict() - msg = dict(Type='NotifyWatcher', Request='Next', Version=1, Params=params) + msg = dict(type='Deployer', request='ModelUUID', version=1, params=params) reply = await self.rpc(msg) return reply - @ReturnMapping(None) - async def Stop(self): + @ReturnMapping(ErrorResults) + async def Remove(self, entities): ''' - - Returns -> None + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='NotifyWatcher', Request='Stop', Version=1, Params=params) + msg = dict(type='Deployer', request='Remove', version=1, params=params) + params['entities'] = entities + reply = await self.rpc(msg) + return reply + + + @ReturnMapping(ErrorResults) + async def SetPasswords(self, changes): + ''' + changes : typing.Sequence<+T_co>[~EntityPassword]<~EntityPassword> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='Deployer', request='SetPasswords', version=1, params=params) + params['changes'] = changes reply = await self.rpc(msg) return reply -class Pinger(Type): - name = 'Pinger' - version = 1 - schema = {'properties': {'Ping': {'type': 'object'}, 'Stop': {'type': 'object'}}, - 'type': 'object'} - - @ReturnMapping(None) - async def Ping(self): + @ReturnMapping(StringsResult) + async def StateAddresses(self): ''' - Returns -> None + Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[str]] ''' # map input types to rpc msg params = dict() - msg = dict(Type='Pinger', Request='Ping', Version=1, Params=params) + msg = dict(type='Deployer', request='StateAddresses', version=1, params=params) reply = await self.rpc(msg) return reply - @ReturnMapping(None) - async def Stop(self): + @ReturnMapping(NotifyWatchResult) + async def WatchAPIHostPorts(self): ''' - Returns -> None + Returns -> typing.Union[str, _ForwardRef('Error')] ''' # map input types to rpc msg params = dict() - msg = dict(Type='Pinger', Request='Stop', Version=1, Params=params) + msg = dict(type='Deployer', request='WatchAPIHostPorts', version=1, params=params) reply = await self.rpc(msg) return reply -class Provisioner(Type): - name = 'Provisioner' + + @ReturnMapping(StringsWatchResults) + async def WatchUnits(self, entities): + ''' + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='Deployer', request='WatchUnits', version=1, params=params) + params['entities'] = entities + reply = await self.rpc(msg) + return reply + + +class DiscoverSpacesFacade(Type): + name = 'DiscoverSpaces' version = 2 - schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False, - 'properties': {'Servers': {'items': {'items': {'$ref': '#/definitions/HostPort'}, - 'type': 'array'}, - 'type': 'array'}}, - 'required': ['Servers'], - 'type': 'object'}, - 'Address': {'additionalProperties': False, - 'properties': {'Scope': {'type': 'string'}, - 'SpaceName': {'type': 'string'}, - 'Type': {'type': 'string'}, - 'Value': {'type': 'string'}}, - 'required': ['Value', 'Type', 'Scope'], - 'type': 'object'}, - 'Binary': {'additionalProperties': False, - 'properties': {'Arch': {'type': 'string'}, - 'Number': {'$ref': '#/definitions/Number'}, - 'Series': {'type': 'string'}}, - 'required': ['Number', 'Series', 'Arch'], - 'type': 'object'}, - 'BytesResult': {'additionalProperties': False, - 'properties': {'Result': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['Result'], - 'type': 'object'}, - 'CloudImageMetadata': {'additionalProperties': False, - 'properties': {'arch': {'type': 'string'}, - 'image_id': {'type': 'string'}, - 'priority': {'type': 'integer'}, - 'region': {'type': 'string'}, - 'root_storage_size': {'type': 'integer'}, - 'root_storage_type': {'type': 'string'}, - 'series': {'type': 'string'}, - 'source': {'type': 'string'}, - 'stream': {'type': 'string'}, - 'version': {'type': 'string'}, - 'virt_type': {'type': 'string'}}, - 'required': ['image_id', - 'region', - 'version', - 'series', - 'arch', - 'source', - 'priority'], - 'type': 'object'}, - 'ConstraintsResult': {'additionalProperties': False, - 'properties': {'Constraints': {'$ref': '#/definitions/Value'}, - 'Error': {'$ref': '#/definitions/Error'}}, - 'required': ['Error', 'Constraints'], - 'type': 'object'}, - 'ConstraintsResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/ConstraintsResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'ContainerConfig': {'additionalProperties': False, - 'properties': {'AllowLXCLoopMounts': {'type': 'boolean'}, - 'AptMirror': {'type': 'string'}, - 'AptProxy': {'$ref': '#/definitions/Settings'}, - 'AuthorizedKeys': {'type': 'string'}, - 'PreferIPv6': {'type': 'boolean'}, - 'ProviderType': {'type': 'string'}, - 'Proxy': {'$ref': '#/definitions/Settings'}, - 'SSLHostnameVerification': {'type': 'boolean'}, - 'UpdateBehavior': {'$ref': '#/definitions/UpdateBehavior'}}, - 'required': ['ProviderType', - 'AuthorizedKeys', - 'SSLHostnameVerification', - 'Proxy', - 'AptProxy', - 'AptMirror', - 'PreferIPv6', - 'AllowLXCLoopMounts', - 'UpdateBehavior'], - 'type': 'object'}, - 'ContainerManagerConfig': {'additionalProperties': False, - 'properties': {'ManagerConfig': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}}, - 'required': ['ManagerConfig'], - 'type': 'object'}, - 'ContainerManagerConfigParams': {'additionalProperties': False, - 'properties': {'Type': {'type': 'string'}}, - 'required': ['Type'], - 'type': 'object'}, - 'DistributionGroupResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Result': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['Error', 'Result'], - 'type': 'object'}, - 'DistributionGroupResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/DistributionGroupResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'Entities': {'additionalProperties': False, - 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'}, - 'type': 'array'}}, - 'required': ['Entities'], - 'type': 'object'}, - 'Entity': {'additionalProperties': False, - 'properties': {'Tag': {'type': 'string'}}, - 'required': ['Tag'], - 'type': 'object'}, - 'EntityPassword': {'additionalProperties': False, - 'properties': {'Password': {'type': 'string'}, - 'Tag': {'type': 'string'}}, - 'required': ['Tag', 'Password'], - 'type': 'object'}, - 'EntityPasswords': {'additionalProperties': False, - 'properties': {'Changes': {'items': {'$ref': '#/definitions/EntityPassword'}, - 'type': 'array'}}, - 'required': ['Changes'], + schema = {'definitions': {'AddSubnetParams': {'additionalProperties': False, + 'properties': {'space-tag': {'type': 'string'}, + 'subnet-provider-id': {'type': 'string'}, + 'subnet-tag': {'type': 'string'}, + 'zones': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'required': ['space-tag'], 'type': 'object'}, - 'EntityStatusArgs': {'additionalProperties': False, - 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'Info': {'type': 'string'}, - 'Status': {'type': 'string'}, - 'Tag': {'type': 'string'}}, - 'required': ['Tag', - 'Status', - 'Info', - 'Data'], + 'AddSubnetsParams': {'additionalProperties': False, + 'properties': {'subnets': {'items': {'$ref': '#/definitions/AddSubnetParams'}, + 'type': 'array'}}, + 'required': ['subnets'], 'type': 'object'}, + 'CreateSpaceParams': {'additionalProperties': False, + 'properties': {'provider-id': {'type': 'string'}, + 'public': {'type': 'boolean'}, + 'space-tag': {'type': 'string'}, + 'subnet-tags': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'required': ['subnet-tags', + 'space-tag', + 'public'], + 'type': 'object'}, + 'CreateSpacesParams': {'additionalProperties': False, + 'properties': {'spaces': {'items': {'$ref': '#/definitions/CreateSpaceParams'}, + 'type': 'array'}}, + 'required': ['spaces'], + 'type': 'object'}, + 'DiscoverSpacesResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/ProviderSpace'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, 'Error': {'additionalProperties': False, - 'properties': {'Code': {'type': 'string'}, - 'Info': {'$ref': '#/definitions/ErrorInfo'}, - 'Message': {'type': 'string'}}, - 'required': ['Message', 'Code'], + 'properties': {'code': {'type': 'string'}, + 'info': {'$ref': '#/definitions/ErrorInfo'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], 'type': 'object'}, 'ErrorInfo': {'additionalProperties': False, - 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'}, - 'MacaroonPath': {'type': 'string'}}, + 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'macaroon-path': {'type': 'string'}}, 'type': 'object'}, 'ErrorResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}}, - 'required': ['Error'], + 'properties': {'error': {'$ref': '#/definitions/Error'}}, 'type': 'object'}, 'ErrorResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'}, + 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, 'type': 'array'}}, - 'required': ['Results'], + 'required': ['results'], 'type': 'object'}, - 'FindToolsParams': {'additionalProperties': False, - 'properties': {'Arch': {'type': 'string'}, - 'MajorVersion': {'type': 'integer'}, - 'MinorVersion': {'type': 'integer'}, - 'Number': {'$ref': '#/definitions/Number'}, - 'Series': {'type': 'string'}}, - 'required': ['Number', - 'MajorVersion', - 'MinorVersion', - 'Arch', - 'Series'], - 'type': 'object'}, - 'FindToolsResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'List': {'items': {'$ref': '#/definitions/Tools'}, - 'type': 'array'}}, - 'required': ['List', 'Error'], - 'type': 'object'}, - 'HardwareCharacteristics': {'additionalProperties': False, - 'properties': {'Arch': {'type': 'string'}, - 'AvailabilityZone': {'type': 'string'}, - 'CpuCores': {'type': 'integer'}, - 'CpuPower': {'type': 'integer'}, - 'Mem': {'type': 'integer'}, - 'RootDisk': {'type': 'integer'}, - 'Tags': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'type': 'object'}, - 'HostPort': {'additionalProperties': False, - 'properties': {'Address': {'$ref': '#/definitions/Address'}, - 'Port': {'type': 'integer'}}, - 'required': ['Address', 'Port'], - 'type': 'object'}, - 'InstanceInfo': {'additionalProperties': False, - 'properties': {'Characteristics': {'$ref': '#/definitions/HardwareCharacteristics'}, - 'InstanceId': {'type': 'string'}, - 'NetworkConfig': {'items': {'$ref': '#/definitions/NetworkConfig'}, - 'type': 'array'}, - 'Nonce': {'type': 'string'}, - 'Tag': {'type': 'string'}, - 'VolumeAttachments': {'patternProperties': {'.*': {'$ref': '#/definitions/VolumeAttachmentInfo'}}, - 'type': 'object'}, - 'Volumes': {'items': {'$ref': '#/definitions/Volume'}, - 'type': 'array'}}, - 'required': ['Tag', - 'InstanceId', - 'Nonce', - 'Characteristics', - 'Volumes', - 'VolumeAttachments', - 'NetworkConfig'], - 'type': 'object'}, - 'InstancesInfo': {'additionalProperties': False, - 'properties': {'Machines': {'items': {'$ref': '#/definitions/InstanceInfo'}, - 'type': 'array'}}, - 'required': ['Machines'], - 'type': 'object'}, - 'LifeResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Life': {'type': 'string'}}, - 'required': ['Life', 'Error'], - 'type': 'object'}, - 'LifeResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/LifeResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, - 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'}, - 'type': 'array'}, - 'data': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'id': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'sig': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['data', - 'location', - 'id', - 'caveats', - 'sig'], - 'type': 'object'}, - 'MachineContainers': {'additionalProperties': False, - 'properties': {'ContainerTypes': {'items': {'type': 'string'}, - 'type': 'array'}, - 'MachineTag': {'type': 'string'}}, - 'required': ['MachineTag', - 'ContainerTypes'], - 'type': 'object'}, - 'MachineContainersParams': {'additionalProperties': False, - 'properties': {'Params': {'items': {'$ref': '#/definitions/MachineContainers'}, - 'type': 'array'}}, - 'required': ['Params'], - 'type': 'object'}, - 'MachineNetworkConfigResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Info': {'items': {'$ref': '#/definitions/NetworkConfig'}, - 'type': 'array'}}, - 'required': ['Error', 'Info'], - 'type': 'object'}, - 'MachineNetworkConfigResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/MachineNetworkConfigResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, + 'ListSubnetsResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/Subnet'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'Macaroon': {'additionalProperties': False, 'type': 'object'}, 'ModelConfigResult': {'additionalProperties': False, - 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True, + 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True, 'type': 'object'}}, 'type': 'object'}}, - 'required': ['Config'], + 'required': ['config'], 'type': 'object'}, - 'NetworkConfig': {'additionalProperties': False, - 'properties': {'Address': {'type': 'string'}, - 'CIDR': {'type': 'string'}, - 'ConfigType': {'type': 'string'}, - 'DNSSearchDomains': {'items': {'type': 'string'}, - 'type': 'array'}, - 'DNSServers': {'items': {'type': 'string'}, - 'type': 'array'}, - 'DeviceIndex': {'type': 'integer'}, - 'Disabled': {'type': 'boolean'}, - 'GatewayAddress': {'type': 'string'}, - 'InterfaceName': {'type': 'string'}, - 'InterfaceType': {'type': 'string'}, - 'MACAddress': {'type': 'string'}, - 'MTU': {'type': 'integer'}, - 'NoAutoStart': {'type': 'boolean'}, - 'ParentInterfaceName': {'type': 'string'}, - 'ProviderAddressId': {'type': 'string'}, - 'ProviderId': {'type': 'string'}, - 'ProviderSpaceId': {'type': 'string'}, - 'ProviderSubnetId': {'type': 'string'}, - 'ProviderVLANId': {'type': 'string'}, - 'VLANTag': {'type': 'integer'}}, - 'required': ['DeviceIndex', - 'MACAddress', - 'CIDR', - 'MTU', - 'ProviderId', - 'ProviderSubnetId', - 'ProviderSpaceId', - 'ProviderAddressId', - 'ProviderVLANId', - 'VLANTag', - 'InterfaceName', - 'ParentInterfaceName', - 'InterfaceType', - 'Disabled'], + 'ProviderSpace': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'name': {'type': 'string'}, + 'provider-id': {'type': 'string'}, + 'subnets': {'items': {'$ref': '#/definitions/Subnet'}, + 'type': 'array'}}, + 'required': ['name', + 'provider-id', + 'subnets'], 'type': 'object'}, - 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'NotifyWatcherId': {'type': 'string'}}, - 'required': ['NotifyWatcherId', 'Error'], - 'type': 'object'}, - 'Number': {'additionalProperties': False, - 'properties': {'Build': {'type': 'integer'}, - 'Major': {'type': 'integer'}, - 'Minor': {'type': 'integer'}, - 'Patch': {'type': 'integer'}, - 'Tag': {'type': 'string'}}, - 'required': ['Major', - 'Minor', - 'Tag', - 'Patch', - 'Build'], + 'Subnet': {'additionalProperties': False, + 'properties': {'cidr': {'type': 'string'}, + 'life': {'type': 'string'}, + 'provider-id': {'type': 'string'}, + 'space-tag': {'type': 'string'}, + 'status': {'type': 'string'}, + 'vlan-tag': {'type': 'integer'}, + 'zones': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'required': ['cidr', + 'vlan-tag', + 'life', + 'space-tag', + 'zones'], 'type': 'object'}, - 'ProvisioningInfo': {'additionalProperties': False, - 'properties': {'Constraints': {'$ref': '#/definitions/Value'}, - 'EndpointBindings': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'ImageMetadata': {'items': {'$ref': '#/definitions/CloudImageMetadata'}, - 'type': 'array'}, - 'Jobs': {'items': {'type': 'string'}, - 'type': 'array'}, - 'Placement': {'type': 'string'}, - 'Series': {'type': 'string'}, - 'SubnetsToZones': {'patternProperties': {'.*': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'type': 'object'}, - 'Tags': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'Volumes': {'items': {'$ref': '#/definitions/VolumeParams'}, - 'type': 'array'}}, - 'required': ['Constraints', - 'Series', - 'Placement', - 'Jobs', - 'Volumes', - 'Tags', - 'SubnetsToZones', - 'ImageMetadata', - 'EndpointBindings'], - 'type': 'object'}, - 'ProvisioningInfoResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Result': {'$ref': '#/definitions/ProvisioningInfo'}}, - 'required': ['Error', 'Result'], - 'type': 'object'}, - 'ProvisioningInfoResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/ProvisioningInfoResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'SetStatus': {'additionalProperties': False, - 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'}, - 'type': 'array'}}, - 'required': ['Entities'], + 'SubnetsFilters': {'additionalProperties': False, + 'properties': {'space-tag': {'type': 'string'}, + 'zone': {'type': 'string'}}, + 'type': 'object'}}, + 'properties': {'AddSubnets': {'properties': {'Params': {'$ref': '#/definitions/AddSubnetsParams'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, 'type': 'object'}, - 'Settings': {'additionalProperties': False, - 'properties': {'Ftp': {'type': 'string'}, - 'Http': {'type': 'string'}, - 'Https': {'type': 'string'}, - 'NoProxy': {'type': 'string'}}, - 'required': ['Http', 'Https', 'Ftp', 'NoProxy'], - 'type': 'object'}, - 'StatusResult': {'additionalProperties': False, - 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'Error': {'$ref': '#/definitions/Error'}, - 'Id': {'type': 'string'}, - 'Info': {'type': 'string'}, - 'Life': {'type': 'string'}, - 'Since': {'format': 'date-time', - 'type': 'string'}, - 'Status': {'type': 'string'}}, - 'required': ['Error', - 'Id', - 'Life', - 'Status', - 'Info', - 'Data', - 'Since'], - 'type': 'object'}, - 'StatusResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/StatusResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'StringResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Result': {'type': 'string'}}, - 'required': ['Error', 'Result'], - 'type': 'object'}, - 'StringResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/StringResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'StringsResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Result': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['Error', 'Result'], - 'type': 'object'}, - 'StringsWatchResult': {'additionalProperties': False, - 'properties': {'Changes': {'items': {'type': 'string'}, - 'type': 'array'}, - 'Error': {'$ref': '#/definitions/Error'}, - 'StringsWatcherId': {'type': 'string'}}, - 'required': ['StringsWatcherId', - 'Changes', - 'Error'], - 'type': 'object'}, - 'StringsWatchResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsWatchResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'Tools': {'additionalProperties': False, - 'properties': {'sha256': {'type': 'string'}, - 'size': {'type': 'integer'}, - 'url': {'type': 'string'}, - 'version': {'$ref': '#/definitions/Binary'}}, - 'required': ['version', 'url', 'size'], + 'CreateSpaces': {'properties': {'Params': {'$ref': '#/definitions/CreateSpacesParams'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'ListSpaces': {'properties': {'Result': {'$ref': '#/definitions/DiscoverSpacesResults'}}, + 'type': 'object'}, + 'ListSubnets': {'properties': {'Params': {'$ref': '#/definitions/SubnetsFilters'}, + 'Result': {'$ref': '#/definitions/ListSubnetsResults'}}, + 'type': 'object'}, + 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}}, + 'type': 'object'}}, + 'type': 'object'} + + + @ReturnMapping(ErrorResults) + async def AddSubnets(self, subnets): + ''' + subnets : typing.Sequence<+T_co>[~AddSubnetParams]<~AddSubnetParams> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='DiscoverSpaces', request='AddSubnets', version=2, params=params) + params['subnets'] = subnets + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def CreateSpaces(self, spaces): + ''' + spaces : typing.Sequence<+T_co>[~CreateSpaceParams]<~CreateSpaceParams> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='DiscoverSpaces', request='CreateSpaces', version=2, params=params) + params['spaces'] = spaces + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(DiscoverSpacesResults) + async def ListSpaces(self): + ''' + + Returns -> typing.Sequence<+T_co>[~ProviderSpace]<~ProviderSpace> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='DiscoverSpaces', request='ListSpaces', version=2, params=params) + + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ListSubnetsResults) + async def ListSubnets(self, space_tag, zone): + ''' + space_tag : str + zone : str + Returns -> typing.Sequence<+T_co>[~Subnet]<~Subnet> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='DiscoverSpaces', request='ListSubnets', version=2, params=params) + params['space-tag'] = space_tag + params['zone'] = zone + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ModelConfigResult) + async def ModelConfig(self): + ''' + + Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any] + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='DiscoverSpaces', request='ModelConfig', version=2, params=params) + + reply = await self.rpc(msg) + return reply + + +class DiskManagerFacade(Type): + name = 'DiskManager' + version = 2 + schema = {'definitions': {'BlockDevice': {'additionalProperties': False, + 'properties': {'BusAddress': {'type': 'string'}, + 'DeviceLinks': {'items': {'type': 'string'}, + 'type': 'array'}, + 'DeviceName': {'type': 'string'}, + 'FilesystemType': {'type': 'string'}, + 'HardwareId': {'type': 'string'}, + 'InUse': {'type': 'boolean'}, + 'Label': {'type': 'string'}, + 'MountPoint': {'type': 'string'}, + 'Size': {'type': 'integer'}, + 'UUID': {'type': 'string'}}, + 'required': ['DeviceName', + 'DeviceLinks', + 'Label', + 'UUID', + 'HardwareId', + 'BusAddress', + 'Size', + 'FilesystemType', + 'InUse', + 'MountPoint'], + 'type': 'object'}, + 'Error': {'additionalProperties': False, + 'properties': {'code': {'type': 'string'}, + 'info': {'$ref': '#/definitions/ErrorInfo'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], 'type': 'object'}, - 'ToolsResult': {'additionalProperties': False, - 'properties': {'DisableSSLHostnameVerification': {'type': 'boolean'}, - 'Error': {'$ref': '#/definitions/Error'}, - 'ToolsList': {'items': {'$ref': '#/definitions/Tools'}, - 'type': 'array'}}, - 'required': ['ToolsList', - 'DisableSSLHostnameVerification', - 'Error'], + 'ErrorInfo': {'additionalProperties': False, + 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'macaroon-path': {'type': 'string'}}, + 'type': 'object'}, + 'ErrorResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}}, 'type': 'object'}, - 'ToolsResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/ToolsResult'}, + 'ErrorResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, 'type': 'array'}}, - 'required': ['Results'], + 'required': ['results'], 'type': 'object'}, - 'UpdateBehavior': {'additionalProperties': False, - 'properties': {'EnableOSRefreshUpdate': {'type': 'boolean'}, - 'EnableOSUpgrade': {'type': 'boolean'}}, - 'required': ['EnableOSRefreshUpdate', - 'EnableOSUpgrade'], - 'type': 'object'}, - 'Value': {'additionalProperties': False, - 'properties': {'arch': {'type': 'string'}, - 'container': {'type': 'string'}, - 'cpu-cores': {'type': 'integer'}, - 'cpu-power': {'type': 'integer'}, - 'instance-type': {'type': 'string'}, - 'mem': {'type': 'integer'}, - 'root-disk': {'type': 'integer'}, - 'spaces': {'items': {'type': 'string'}, - 'type': 'array'}, - 'tags': {'items': {'type': 'string'}, - 'type': 'array'}, - 'virt-type': {'type': 'string'}}, + 'Macaroon': {'additionalProperties': False, 'type': 'object'}, + 'MachineBlockDevices': {'additionalProperties': False, + 'properties': {'block-devices': {'items': {'$ref': '#/definitions/BlockDevice'}, + 'type': 'array'}, + 'machine': {'type': 'string'}}, + 'required': ['machine'], + 'type': 'object'}, + 'SetMachineBlockDevices': {'additionalProperties': False, + 'properties': {'machine-block-devices': {'items': {'$ref': '#/definitions/MachineBlockDevices'}, + 'type': 'array'}}, + 'required': ['machine-block-devices'], + 'type': 'object'}}, + 'properties': {'SetMachineBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/SetMachineBlockDevices'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}}, + 'type': 'object'} + + + @ReturnMapping(ErrorResults) + async def SetMachineBlockDevices(self, machine_block_devices): + ''' + machine_block_devices : typing.Sequence<+T_co>[~MachineBlockDevices]<~MachineBlockDevices> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='DiskManager', request='SetMachineBlockDevices', version=2, params=params) + params['machine-block-devices'] = machine_block_devices + reply = await self.rpc(msg) + return reply + + +class EntityWatcherFacade(Type): + name = 'EntityWatcher' + version = 2 + schema = {'definitions': {'EntitiesWatchResult': {'additionalProperties': False, + 'properties': {'changes': {'items': {'type': 'string'}, + 'type': 'array'}, + 'error': {'$ref': '#/definitions/Error'}, + 'watcher-id': {'type': 'string'}}, + 'required': ['watcher-id'], + 'type': 'object'}, + 'Error': {'additionalProperties': False, + 'properties': {'code': {'type': 'string'}, + 'info': {'$ref': '#/definitions/ErrorInfo'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], 'type': 'object'}, - 'Volume': {'additionalProperties': False, - 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'}, - 'volumetag': {'type': 'string'}}, - 'required': ['volumetag', 'info'], - 'type': 'object'}, - 'VolumeAttachmentInfo': {'additionalProperties': False, - 'properties': {'busaddress': {'type': 'string'}, - 'devicelink': {'type': 'string'}, - 'devicename': {'type': 'string'}, - 'read-only': {'type': 'boolean'}}, - 'type': 'object'}, - 'VolumeAttachmentParams': {'additionalProperties': False, - 'properties': {'instanceid': {'type': 'string'}, - 'machinetag': {'type': 'string'}, - 'provider': {'type': 'string'}, - 'read-only': {'type': 'boolean'}, - 'volumeid': {'type': 'string'}, - 'volumetag': {'type': 'string'}}, - 'required': ['volumetag', - 'machinetag', - 'provider'], - 'type': 'object'}, - 'VolumeInfo': {'additionalProperties': False, - 'properties': {'hardwareid': {'type': 'string'}, - 'persistent': {'type': 'boolean'}, - 'size': {'type': 'integer'}, - 'volumeid': {'type': 'string'}}, - 'required': ['volumeid', 'size', 'persistent'], - 'type': 'object'}, - 'VolumeParams': {'additionalProperties': False, - 'properties': {'attachment': {'$ref': '#/definitions/VolumeAttachmentParams'}, - 'attributes': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'provider': {'type': 'string'}, - 'size': {'type': 'integer'}, - 'tags': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'volumetag': {'type': 'string'}}, - 'required': ['volumetag', 'size', 'provider'], - 'type': 'object'}, - 'WatchContainer': {'additionalProperties': False, - 'properties': {'ContainerType': {'type': 'string'}, - 'MachineTag': {'type': 'string'}}, - 'required': ['MachineTag', 'ContainerType'], - 'type': 'object'}, - 'WatchContainers': {'additionalProperties': False, - 'properties': {'Params': {'items': {'$ref': '#/definitions/WatchContainer'}, - 'type': 'array'}}, - 'required': ['Params'], - 'type': 'object'}, - 'caveat': {'additionalProperties': False, - 'properties': {'caveatId': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'verificationId': {'$ref': '#/definitions/packet'}}, - 'required': ['location', - 'caveatId', - 'verificationId'], - 'type': 'object'}, - 'packet': {'additionalProperties': False, - 'properties': {'headerLen': {'type': 'integer'}, - 'start': {'type': 'integer'}, - 'totalLen': {'type': 'integer'}}, - 'required': ['start', 'totalLen', 'headerLen'], - 'type': 'object'}}, - 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}}, - 'type': 'object'}, - 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}}, - 'type': 'object'}, - 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}}, - 'type': 'object'}, - 'Constraints': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ConstraintsResults'}}, - 'type': 'object'}, - 'ContainerConfig': {'properties': {'Result': {'$ref': '#/definitions/ContainerConfig'}}, - 'type': 'object'}, - 'ContainerManagerConfig': {'properties': {'Params': {'$ref': '#/definitions/ContainerManagerConfigParams'}, - 'Result': {'$ref': '#/definitions/ContainerManagerConfig'}}, - 'type': 'object'}, - 'DistributionGroup': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/DistributionGroupResults'}}, - 'type': 'object'}, - 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'FindTools': {'properties': {'Params': {'$ref': '#/definitions/FindToolsParams'}, - 'Result': {'$ref': '#/definitions/FindToolsResult'}}, - 'type': 'object'}, - 'GetContainerInterfaceInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/MachineNetworkConfigResults'}}, - 'type': 'object'}, - 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringResults'}}, + 'ErrorInfo': {'additionalProperties': False, + 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'macaroon-path': {'type': 'string'}}, 'type': 'object'}, - 'InstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StatusResults'}}, - 'type': 'object'}, - 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/LifeResults'}}, + 'Macaroon': {'additionalProperties': False, 'type': 'object'}}, + 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/EntitiesWatchResult'}}, 'type': 'object'}, - 'MachinesWithTransientErrors': {'properties': {'Result': {'$ref': '#/definitions/StatusResults'}}, - 'type': 'object'}, - 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}}, - 'type': 'object'}, - 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}}, - 'type': 'object'}, - 'PrepareContainerInterfaceInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/MachineNetworkConfigResults'}}, - 'type': 'object'}, - 'ProvisioningInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ProvisioningInfoResults'}}, - 'type': 'object'}, - 'ReleaseContainerAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'Series': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringResults'}}, - 'type': 'object'}, - 'SetInstanceInfo': {'properties': {'Params': {'$ref': '#/definitions/InstancesInfo'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetInstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetSupportedContainers': {'properties': {'Params': {'$ref': '#/definitions/MachineContainersParams'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'StateAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}}, - 'type': 'object'}, - 'Status': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StatusResults'}}, - 'type': 'object'}, - 'Tools': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ToolsResults'}}, - 'type': 'object'}, - 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, - 'type': 'object'}, - 'WatchAllContainers': {'properties': {'Params': {'$ref': '#/definitions/WatchContainers'}, - 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, - 'type': 'object'}, - 'WatchContainers': {'properties': {'Params': {'$ref': '#/definitions/WatchContainers'}, - 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, - 'type': 'object'}, - 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, - 'type': 'object'}, - 'WatchMachineErrorRetry': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, - 'type': 'object'}, - 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}}, - 'type': 'object'}}, + 'Stop': {'type': 'object'}}, 'type': 'object'} - @ReturnMapping(StringsResult) - async def APIAddresses(self): - ''' - - Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[str]] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Provisioner', Request='APIAddresses', Version=2, Params=params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(APIHostPortsResult) - async def APIHostPorts(self): - ''' - - Returns -> typing.Sequence[~HostPort] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Provisioner', Request='APIHostPorts', Version=2, Params=params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(BytesResult) - async def CACert(self): + @ReturnMapping(EntitiesWatchResult) + async def Next(self): ''' - Returns -> typing.Sequence[int] + Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')] ''' # map input types to rpc msg params = dict() - msg = dict(Type='Provisioner', Request='CACert', Version=2, Params=params) - - reply = await self.rpc(msg) - return reply - + msg = dict(type='EntityWatcher', request='Next', version=2, params=params) - - @ReturnMapping(ConstraintsResults) - async def Constraints(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ConstraintsResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Provisioner', Request='Constraints', Version=2, Params=params) - params['Entities'] = entities reply = await self.rpc(msg) return reply - @ReturnMapping(ContainerConfig) - async def ContainerConfig(self): + @ReturnMapping(None) + async def Stop(self): ''' - Returns -> typing.Union[bool, str, _ForwardRef('Settings'), _ForwardRef('Settings'), _ForwardRef('UpdateBehavior')] + Returns -> None ''' # map input types to rpc msg params = dict() - msg = dict(Type='Provisioner', Request='ContainerConfig', Version=2, Params=params) - - reply = await self.rpc(msg) - return reply - + msg = dict(type='EntityWatcher', request='Stop', version=2, params=params) - - @ReturnMapping(ContainerManagerConfig) - async def ContainerManagerConfig(self, type_): - ''' - type_ : str - Returns -> typing.Mapping[str, str] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Provisioner', Request='ContainerManagerConfig', Version=2, Params=params) - params['Type'] = type_ reply = await self.rpc(msg) return reply +class FilesystemAttachmentsWatcherFacade(Type): + name = 'FilesystemAttachmentsWatcher' + version = 2 + schema = {'definitions': {'Error': {'additionalProperties': False, + 'properties': {'code': {'type': 'string'}, + 'info': {'$ref': '#/definitions/ErrorInfo'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], + 'type': 'object'}, + 'ErrorInfo': {'additionalProperties': False, + 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'macaroon-path': {'type': 'string'}}, + 'type': 'object'}, + 'Macaroon': {'additionalProperties': False, 'type': 'object'}, + 'MachineStorageId': {'additionalProperties': False, + 'properties': {'attachment-tag': {'type': 'string'}, + 'machine-tag': {'type': 'string'}}, + 'required': ['machine-tag', + 'attachment-tag'], + 'type': 'object'}, + 'MachineStorageIdsWatchResult': {'additionalProperties': False, + 'properties': {'changes': {'items': {'$ref': '#/definitions/MachineStorageId'}, + 'type': 'array'}, + 'error': {'$ref': '#/definitions/Error'}, + 'watcher-id': {'type': 'string'}}, + 'required': ['watcher-id', + 'changes'], + 'type': 'object'}}, + 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResult'}}, + 'type': 'object'}, + 'Stop': {'type': 'object'}}, + 'type': 'object'} + - @ReturnMapping(DistributionGroupResults) - async def DistributionGroup(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~DistributionGroupResult] + @ReturnMapping(MachineStorageIdsWatchResult) + async def Next(self): ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Provisioner', Request='DistributionGroup', Version=2, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - @ReturnMapping(ErrorResults) - async def EnsureDead(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ErrorResult] + Returns -> typing.Union[typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>, _ForwardRef('Error')] ''' # map input types to rpc msg params = dict() - msg = dict(Type='Provisioner', Request='EnsureDead', Version=2, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - + msg = dict(type='FilesystemAttachmentsWatcher', request='Next', version=2, params=params) - - @ReturnMapping(FindToolsResult) - async def FindTools(self, arch, majorversion, minorversion, number, series): - ''' - arch : str - majorversion : int - minorversion : int - number : Number - series : str - Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[~Tools]] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Provisioner', Request='FindTools', Version=2, Params=params) - params['Arch'] = arch - params['MajorVersion'] = majorversion - params['MinorVersion'] = minorversion - params['Number'] = number - params['Series'] = series reply = await self.rpc(msg) return reply - @ReturnMapping(MachineNetworkConfigResults) - async def GetContainerInterfaceInfo(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~MachineNetworkConfigResult] + @ReturnMapping(None) + async def Stop(self): ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Provisioner', Request='GetContainerInterfaceInfo', Version=2, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - @ReturnMapping(StringResults) - async def InstanceId(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~StringResult] + Returns -> None ''' # map input types to rpc msg params = dict() - msg = dict(Type='Provisioner', Request='InstanceId', Version=2, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply + msg = dict(type='FilesystemAttachmentsWatcher', request='Stop', version=2, params=params) - - - @ReturnMapping(StatusResults) - async def InstanceStatus(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~StatusResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Provisioner', Request='InstanceStatus', Version=2, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(LifeResults) - async def Life(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~LifeResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Provisioner', Request='Life', Version=2, Params=params) - params['Entities'] = entities reply = await self.rpc(msg) return reply +class FirewallerFacade(Type): + name = 'Firewaller' + version = 3 + schema = {'definitions': {'BoolResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'type': 'boolean'}}, + 'required': ['result'], + 'type': 'object'}, + 'BoolResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/BoolResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'CloudCredential': {'additionalProperties': False, + 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}}, + 'type': 'object'}, + 'auth-type': {'type': 'string'}, + 'redacted': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'required': ['auth-type'], + 'type': 'object'}, + 'CloudSpec': {'additionalProperties': False, + 'properties': {'credential': {'$ref': '#/definitions/CloudCredential'}, + 'endpoint': {'type': 'string'}, + 'identity-endpoint': {'type': 'string'}, + 'name': {'type': 'string'}, + 'region': {'type': 'string'}, + 'storage-endpoint': {'type': 'string'}, + 'type': {'type': 'string'}}, + 'required': ['type', 'name'], + 'type': 'object'}, + 'CloudSpecResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'$ref': '#/definitions/CloudSpec'}}, + 'type': 'object'}, + 'CloudSpecResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/CloudSpecResult'}, + 'type': 'array'}}, + 'type': 'object'}, + 'Entities': {'additionalProperties': False, + 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, + 'type': 'array'}}, + 'required': ['entities'], + 'type': 'object'}, + 'Entity': {'additionalProperties': False, + 'properties': {'tag': {'type': 'string'}}, + 'required': ['tag'], + 'type': 'object'}, + 'Error': {'additionalProperties': False, + 'properties': {'code': {'type': 'string'}, + 'info': {'$ref': '#/definitions/ErrorInfo'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], + 'type': 'object'}, + 'ErrorInfo': {'additionalProperties': False, + 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'macaroon-path': {'type': 'string'}}, + 'type': 'object'}, + 'LifeResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'life': {'type': 'string'}}, + 'required': ['life'], + 'type': 'object'}, + 'LifeResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'Macaroon': {'additionalProperties': False, 'type': 'object'}, + 'MachinePortRange': {'additionalProperties': False, + 'properties': {'port-range': {'$ref': '#/definitions/PortRange'}, + 'relation-tag': {'type': 'string'}, + 'unit-tag': {'type': 'string'}}, + 'required': ['unit-tag', + 'relation-tag', + 'port-range'], + 'type': 'object'}, + 'MachinePorts': {'additionalProperties': False, + 'properties': {'machine-tag': {'type': 'string'}, + 'subnet-tag': {'type': 'string'}}, + 'required': ['machine-tag', 'subnet-tag'], + 'type': 'object'}, + 'MachinePortsParams': {'additionalProperties': False, + 'properties': {'params': {'items': {'$ref': '#/definitions/MachinePorts'}, + 'type': 'array'}}, + 'required': ['params'], + 'type': 'object'}, + 'MachinePortsResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'ports': {'items': {'$ref': '#/definitions/MachinePortRange'}, + 'type': 'array'}}, + 'required': ['ports'], + 'type': 'object'}, + 'MachinePortsResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/MachinePortsResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'ModelConfigResult': {'additionalProperties': False, + 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True, + 'type': 'object'}}, + 'type': 'object'}}, + 'required': ['config'], + 'type': 'object'}, + 'NotifyWatchResult': {'additionalProperties': False, + 'properties': {'NotifyWatcherId': {'type': 'string'}, + 'error': {'$ref': '#/definitions/Error'}}, + 'required': ['NotifyWatcherId'], + 'type': 'object'}, + 'NotifyWatchResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'PortRange': {'additionalProperties': False, + 'properties': {'from-port': {'type': 'integer'}, + 'protocol': {'type': 'string'}, + 'to-port': {'type': 'integer'}}, + 'required': ['from-port', 'to-port', 'protocol'], + 'type': 'object'}, + 'StringResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'type': 'string'}}, + 'required': ['result'], + 'type': 'object'}, + 'StringResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'StringsResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'type': 'object'}, + 'StringsResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'StringsWatchResult': {'additionalProperties': False, + 'properties': {'changes': {'items': {'type': 'string'}, + 'type': 'array'}, + 'error': {'$ref': '#/definitions/Error'}, + 'watcher-id': {'type': 'string'}}, + 'required': ['watcher-id'], + 'type': 'object'}, + 'StringsWatchResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}}, + 'properties': {'CloudSpec': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/CloudSpecResults'}}, + 'type': 'object'}, + 'GetAssignedMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/StringResults'}}, + 'type': 'object'}, + 'GetExposed': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/BoolResults'}}, + 'type': 'object'}, + 'GetMachineActiveSubnets': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/StringsResults'}}, + 'type': 'object'}, + 'GetMachinePorts': {'properties': {'Params': {'$ref': '#/definitions/MachinePortsParams'}, + 'Result': {'$ref': '#/definitions/MachinePortsResults'}}, + 'type': 'object'}, + 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/StringResults'}}, + 'type': 'object'}, + 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/LifeResults'}}, + 'type': 'object'}, + 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}}, + 'type': 'object'}, + 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, + 'type': 'object'}, + 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, + 'type': 'object'}, + 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}}, + 'type': 'object'}, + 'WatchOpenedPorts': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, + 'type': 'object'}, + 'WatchUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, + 'type': 'object'}}, + 'type': 'object'} + - @ReturnMapping(StatusResults) - async def MachinesWithTransientErrors(self): + @ReturnMapping(CloudSpecResults) + async def CloudSpec(self, entities): ''' - - Returns -> typing.Sequence[~StatusResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~CloudSpecResult]<~CloudSpecResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Provisioner', Request='MachinesWithTransientErrors', Version=2, Params=params) - + msg = dict(type='Firewaller', request='CloudSpec', version=3, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply - @ReturnMapping(ModelConfigResult) - async def ModelConfig(self): + @ReturnMapping(StringResults) + async def GetAssignedMachine(self, entities): ''' - - Returns -> typing.Mapping[str, typing.Any] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Provisioner', Request='ModelConfig', Version=2, Params=params) - + msg = dict(type='Firewaller', request='GetAssignedMachine', version=3, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply - @ReturnMapping(StringResult) - async def ModelUUID(self): + @ReturnMapping(BoolResults) + async def GetExposed(self, entities): ''' - - Returns -> typing.Union[_ForwardRef('Error'), str] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~BoolResult]<~BoolResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Provisioner', Request='ModelUUID', Version=2, Params=params) - + msg = dict(type='Firewaller', request='GetExposed', version=3, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply - @ReturnMapping(MachineNetworkConfigResults) - async def PrepareContainerInterfaceInfo(self, entities): + @ReturnMapping(StringsResults) + async def GetMachineActiveSubnets(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~MachineNetworkConfigResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~StringsResult]<~StringsResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Provisioner', Request='PrepareContainerInterfaceInfo', Version=2, Params=params) - params['Entities'] = entities + msg = dict(type='Firewaller', request='GetMachineActiveSubnets', version=3, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply - @ReturnMapping(ProvisioningInfoResults) - async def ProvisioningInfo(self, entities): + @ReturnMapping(MachinePortsResults) + async def GetMachinePorts(self, params): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ProvisioningInfoResult] + params : typing.Sequence<+T_co>[~MachinePorts]<~MachinePorts> + Returns -> typing.Sequence<+T_co>[~MachinePortsResult]<~MachinePortsResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Provisioner', Request='ProvisioningInfo', Version=2, Params=params) - params['Entities'] = entities + msg = dict(type='Firewaller', request='GetMachinePorts', version=3, params=params) + params['params'] = params reply = await self.rpc(msg) return reply - @ReturnMapping(ErrorResults) - async def ReleaseContainerAddresses(self, entities): + @ReturnMapping(StringResults) + async def InstanceId(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ErrorResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Provisioner', Request='ReleaseContainerAddresses', Version=2, Params=params) - params['Entities'] = entities + msg = dict(type='Firewaller', request='InstanceId', version=3, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply - @ReturnMapping(ErrorResults) - async def Remove(self, entities): + @ReturnMapping(LifeResults) + async def Life(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ErrorResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Provisioner', Request='Remove', Version=2, Params=params) - params['Entities'] = entities + msg = dict(type='Firewaller', request='Life', version=3, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply - @ReturnMapping(StringResults) - async def Series(self, entities): + @ReturnMapping(ModelConfigResult) + async def ModelConfig(self): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~StringResult] + + Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any] ''' # map input types to rpc msg params = dict() - msg = dict(Type='Provisioner', Request='Series', Version=2, Params=params) - params['Entities'] = entities + msg = dict(type='Firewaller', request='ModelConfig', version=3, params=params) + reply = await self.rpc(msg) return reply - @ReturnMapping(ErrorResults) - async def SetInstanceInfo(self, machines): + @ReturnMapping(NotifyWatchResults) + async def Watch(self, entities): ''' - machines : typing.Sequence[~InstanceInfo] - Returns -> typing.Sequence[~ErrorResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Provisioner', Request='SetInstanceInfo', Version=2, Params=params) - params['Machines'] = machines + msg = dict(type='Firewaller', request='Watch', version=3, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply - @ReturnMapping(ErrorResults) - async def SetInstanceStatus(self, entities): + @ReturnMapping(NotifyWatchResult) + async def WatchForModelConfigChanges(self): ''' - entities : typing.Sequence[~EntityStatusArgs] - Returns -> typing.Sequence[~ErrorResult] + + Returns -> typing.Union[str, _ForwardRef('Error')] ''' # map input types to rpc msg params = dict() - msg = dict(Type='Provisioner', Request='SetInstanceStatus', Version=2, Params=params) - params['Entities'] = entities + msg = dict(type='Firewaller', request='WatchForModelConfigChanges', version=3, params=params) + reply = await self.rpc(msg) return reply - @ReturnMapping(ErrorResults) - async def SetPasswords(self, changes): + @ReturnMapping(StringsWatchResult) + async def WatchModelMachines(self): ''' - changes : typing.Sequence[~EntityPassword] - Returns -> typing.Sequence[~ErrorResult] + + Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')] ''' # map input types to rpc msg params = dict() - msg = dict(Type='Provisioner', Request='SetPasswords', Version=2, Params=params) - params['Changes'] = changes + msg = dict(type='Firewaller', request='WatchModelMachines', version=3, params=params) + reply = await self.rpc(msg) return reply - @ReturnMapping(ErrorResults) - async def SetStatus(self, entities): + @ReturnMapping(StringsWatchResults) + async def WatchOpenedPorts(self, entities): ''' - entities : typing.Sequence[~EntityStatusArgs] - Returns -> typing.Sequence[~ErrorResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Provisioner', Request='SetStatus', Version=2, Params=params) - params['Entities'] = entities + msg = dict(type='Firewaller', request='WatchOpenedPorts', version=3, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply - @ReturnMapping(ErrorResults) - async def SetSupportedContainers(self, params): + @ReturnMapping(StringsWatchResults) + async def WatchUnits(self, entities): ''' - params : typing.Sequence[~MachineContainers] - Returns -> typing.Sequence[~ErrorResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Provisioner', Request='SetSupportedContainers', Version=2, Params=params) - params['Params'] = params + msg = dict(type='Firewaller', request='WatchUnits', version=3, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply +class HighAvailabilityFacade(Type): + name = 'HighAvailability' + version = 2 + schema = {'definitions': {'Address': {'additionalProperties': False, + 'properties': {'Scope': {'type': 'string'}, + 'SpaceName': {'type': 'string'}, + 'SpaceProviderId': {'type': 'string'}, + 'Type': {'type': 'string'}, + 'Value': {'type': 'string'}}, + 'required': ['Value', + 'Type', + 'Scope', + 'SpaceName', + 'SpaceProviderId'], + 'type': 'object'}, + 'ControllersChangeResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'$ref': '#/definitions/ControllersChanges'}}, + 'required': ['result'], + 'type': 'object'}, + 'ControllersChangeResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/ControllersChangeResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'ControllersChanges': {'additionalProperties': False, + 'properties': {'added': {'items': {'type': 'string'}, + 'type': 'array'}, + 'converted': {'items': {'type': 'string'}, + 'type': 'array'}, + 'demoted': {'items': {'type': 'string'}, + 'type': 'array'}, + 'maintained': {'items': {'type': 'string'}, + 'type': 'array'}, + 'promoted': {'items': {'type': 'string'}, + 'type': 'array'}, + 'removed': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'type': 'object'}, + 'ControllersSpec': {'additionalProperties': False, + 'properties': {'constraints': {'$ref': '#/definitions/Value'}, + 'model-tag': {'type': 'string'}, + 'num-controllers': {'type': 'integer'}, + 'placement': {'items': {'type': 'string'}, + 'type': 'array'}, + 'series': {'type': 'string'}}, + 'required': ['model-tag', + 'num-controllers'], + 'type': 'object'}, + 'ControllersSpecs': {'additionalProperties': False, + 'properties': {'specs': {'items': {'$ref': '#/definitions/ControllersSpec'}, + 'type': 'array'}}, + 'required': ['specs'], + 'type': 'object'}, + 'Error': {'additionalProperties': False, + 'properties': {'code': {'type': 'string'}, + 'info': {'$ref': '#/definitions/ErrorInfo'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], + 'type': 'object'}, + 'ErrorInfo': {'additionalProperties': False, + 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'macaroon-path': {'type': 'string'}}, + 'type': 'object'}, + 'HAMember': {'additionalProperties': False, + 'properties': {'public-address': {'$ref': '#/definitions/Address'}, + 'series': {'type': 'string'}, + 'tag': {'type': 'string'}}, + 'required': ['tag', 'public-address', 'series'], + 'type': 'object'}, + 'Macaroon': {'additionalProperties': False, 'type': 'object'}, + 'Member': {'additionalProperties': False, + 'properties': {'Address': {'type': 'string'}, + 'Arbiter': {'type': 'boolean'}, + 'BuildIndexes': {'type': 'boolean'}, + 'Hidden': {'type': 'boolean'}, + 'Id': {'type': 'integer'}, + 'Priority': {'type': 'number'}, + 'SlaveDelay': {'type': 'integer'}, + 'Tags': {'patternProperties': {'.*': {'type': 'string'}}, + 'type': 'object'}, + 'Votes': {'type': 'integer'}}, + 'required': ['Id', + 'Address', + 'Arbiter', + 'BuildIndexes', + 'Hidden', + 'Priority', + 'Tags', + 'SlaveDelay', + 'Votes'], + 'type': 'object'}, + 'MongoUpgradeResults': {'additionalProperties': False, + 'properties': {'ha-members': {'items': {'$ref': '#/definitions/HAMember'}, + 'type': 'array'}, + 'master': {'$ref': '#/definitions/HAMember'}, + 'rs-members': {'items': {'$ref': '#/definitions/Member'}, + 'type': 'array'}}, + 'required': ['rs-members', + 'master', + 'ha-members'], + 'type': 'object'}, + 'ResumeReplicationParams': {'additionalProperties': False, + 'properties': {'members': {'items': {'$ref': '#/definitions/Member'}, + 'type': 'array'}}, + 'required': ['members'], + 'type': 'object'}, + 'UpgradeMongoParams': {'additionalProperties': False, + 'properties': {'target': {'$ref': '#/definitions/Version'}}, + 'required': ['target'], + 'type': 'object'}, + 'Value': {'additionalProperties': False, + 'properties': {'arch': {'type': 'string'}, + 'container': {'type': 'string'}, + 'cpu-cores': {'type': 'integer'}, + 'cpu-power': {'type': 'integer'}, + 'instance-type': {'type': 'string'}, + 'mem': {'type': 'integer'}, + 'root-disk': {'type': 'integer'}, + 'spaces': {'items': {'type': 'string'}, + 'type': 'array'}, + 'tags': {'items': {'type': 'string'}, + 'type': 'array'}, + 'virt-type': {'type': 'string'}}, + 'type': 'object'}, + 'Version': {'additionalProperties': False, + 'properties': {'Major': {'type': 'integer'}, + 'Minor': {'type': 'integer'}, + 'Patch': {'type': 'string'}, + 'StorageEngine': {'type': 'string'}}, + 'required': ['Major', + 'Minor', + 'Patch', + 'StorageEngine'], + 'type': 'object'}}, + 'properties': {'EnableHA': {'properties': {'Params': {'$ref': '#/definitions/ControllersSpecs'}, + 'Result': {'$ref': '#/definitions/ControllersChangeResults'}}, + 'type': 'object'}, + 'ResumeHAReplicationAfterUpgrade': {'properties': {'Params': {'$ref': '#/definitions/ResumeReplicationParams'}}, + 'type': 'object'}, + 'StopHAReplicationForUpgrade': {'properties': {'Params': {'$ref': '#/definitions/UpgradeMongoParams'}, + 'Result': {'$ref': '#/definitions/MongoUpgradeResults'}}, + 'type': 'object'}}, + 'type': 'object'} + + + @ReturnMapping(ControllersChangeResults) + async def EnableHA(self, specs): + ''' + specs : typing.Sequence<+T_co>[~ControllersSpec]<~ControllersSpec> + Returns -> typing.Sequence<+T_co>[~ControllersChangeResult]<~ControllersChangeResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='HighAvailability', request='EnableHA', version=2, params=params) + params['specs'] = specs + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(None) + async def ResumeHAReplicationAfterUpgrade(self, members): + ''' + members : typing.Sequence<+T_co>[~Member]<~Member> + Returns -> None + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='HighAvailability', request='ResumeHAReplicationAfterUpgrade', version=2, params=params) + params['members'] = members + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(MongoUpgradeResults) + async def StopHAReplicationForUpgrade(self, major, minor, patch, storageengine): + ''' + major : int + minor : int + patch : str + storageengine : str + Returns -> typing.Union[_ForwardRef('HAMember'), typing.Sequence<+T_co>[~Member]<~Member>] + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='HighAvailability', request='StopHAReplicationForUpgrade', version=2, params=params) + params['Major'] = major + params['Minor'] = minor + params['Patch'] = patch + params['StorageEngine'] = storageengine + reply = await self.rpc(msg) + return reply + + +class HostKeyReporterFacade(Type): + name = 'HostKeyReporter' + version = 1 + schema = {'definitions': {'Error': {'additionalProperties': False, + 'properties': {'code': {'type': 'string'}, + 'info': {'$ref': '#/definitions/ErrorInfo'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], + 'type': 'object'}, + 'ErrorInfo': {'additionalProperties': False, + 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'macaroon-path': {'type': 'string'}}, + 'type': 'object'}, + 'ErrorResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}}, + 'type': 'object'}, + 'ErrorResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'Macaroon': {'additionalProperties': False, 'type': 'object'}, + 'SSHHostKeySet': {'additionalProperties': False, + 'properties': {'entity-keys': {'items': {'$ref': '#/definitions/SSHHostKeys'}, + 'type': 'array'}}, + 'required': ['entity-keys'], + 'type': 'object'}, + 'SSHHostKeys': {'additionalProperties': False, + 'properties': {'public-keys': {'items': {'type': 'string'}, + 'type': 'array'}, + 'tag': {'type': 'string'}}, + 'required': ['tag', 'public-keys'], + 'type': 'object'}}, + 'properties': {'ReportKeys': {'properties': {'Params': {'$ref': '#/definitions/SSHHostKeySet'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}}, + 'type': 'object'} + + + @ReturnMapping(ErrorResults) + async def ReportKeys(self, entity_keys): + ''' + entity_keys : typing.Sequence<+T_co>[~SSHHostKeys]<~SSHHostKeys> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='HostKeyReporter', request='ReportKeys', version=1, params=params) + params['entity-keys'] = entity_keys + reply = await self.rpc(msg) + return reply + + +class ImageManagerFacade(Type): + name = 'ImageManager' + version = 2 + schema = {'definitions': {'Error': {'additionalProperties': False, + 'properties': {'code': {'type': 'string'}, + 'info': {'$ref': '#/definitions/ErrorInfo'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], + 'type': 'object'}, + 'ErrorInfo': {'additionalProperties': False, + 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'macaroon-path': {'type': 'string'}}, + 'type': 'object'}, + 'ErrorResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}}, + 'type': 'object'}, + 'ErrorResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'ImageFilterParams': {'additionalProperties': False, + 'properties': {'images': {'items': {'$ref': '#/definitions/ImageSpec'}, + 'type': 'array'}}, + 'required': ['images'], + 'type': 'object'}, + 'ImageMetadata': {'additionalProperties': False, + 'properties': {'arch': {'type': 'string'}, + 'created': {'format': 'date-time', + 'type': 'string'}, + 'kind': {'type': 'string'}, + 'series': {'type': 'string'}, + 'url': {'type': 'string'}}, + 'required': ['kind', + 'arch', + 'series', + 'url', + 'created'], + 'type': 'object'}, + 'ImageSpec': {'additionalProperties': False, + 'properties': {'arch': {'type': 'string'}, + 'kind': {'type': 'string'}, + 'series': {'type': 'string'}}, + 'required': ['kind', 'arch', 'series'], + 'type': 'object'}, + 'ListImageResult': {'additionalProperties': False, + 'properties': {'result': {'items': {'$ref': '#/definitions/ImageMetadata'}, + 'type': 'array'}}, + 'required': ['result'], + 'type': 'object'}, + 'Macaroon': {'additionalProperties': False, 'type': 'object'}}, + 'properties': {'DeleteImages': {'properties': {'Params': {'$ref': '#/definitions/ImageFilterParams'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'ListImages': {'properties': {'Params': {'$ref': '#/definitions/ImageFilterParams'}, + 'Result': {'$ref': '#/definitions/ListImageResult'}}, + 'type': 'object'}}, + 'type': 'object'} + + + @ReturnMapping(ErrorResults) + async def DeleteImages(self, images): + ''' + images : typing.Sequence<+T_co>[~ImageSpec]<~ImageSpec> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='ImageManager', request='DeleteImages', version=2, params=params) + params['images'] = images + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ListImageResult) + async def ListImages(self, images): + ''' + images : typing.Sequence<+T_co>[~ImageSpec]<~ImageSpec> + Returns -> typing.Sequence<+T_co>[~ImageMetadata]<~ImageMetadata> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='ImageManager', request='ListImages', version=2, params=params) + params['images'] = images + reply = await self.rpc(msg) + return reply + + +class ImageMetadataFacade(Type): + name = 'ImageMetadata' + version = 2 + schema = {'definitions': {'CloudImageMetadata': {'additionalProperties': False, + 'properties': {'arch': {'type': 'string'}, + 'image-id': {'type': 'string'}, + 'priority': {'type': 'integer'}, + 'region': {'type': 'string'}, + 'root-storage-size': {'type': 'integer'}, + 'root-storage-type': {'type': 'string'}, + 'series': {'type': 'string'}, + 'source': {'type': 'string'}, + 'stream': {'type': 'string'}, + 'version': {'type': 'string'}, + 'virt-type': {'type': 'string'}}, + 'required': ['image-id', + 'region', + 'version', + 'series', + 'arch', + 'source', + 'priority'], + 'type': 'object'}, + 'CloudImageMetadataList': {'additionalProperties': False, + 'properties': {'metadata': {'items': {'$ref': '#/definitions/CloudImageMetadata'}, + 'type': 'array'}}, + 'type': 'object'}, + 'Error': {'additionalProperties': False, + 'properties': {'code': {'type': 'string'}, + 'info': {'$ref': '#/definitions/ErrorInfo'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], + 'type': 'object'}, + 'ErrorInfo': {'additionalProperties': False, + 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'macaroon-path': {'type': 'string'}}, + 'type': 'object'}, + 'ErrorResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}}, + 'type': 'object'}, + 'ErrorResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'ImageMetadataFilter': {'additionalProperties': False, + 'properties': {'arches': {'items': {'type': 'string'}, + 'type': 'array'}, + 'region': {'type': 'string'}, + 'root-storage-type': {'type': 'string'}, + 'series': {'items': {'type': 'string'}, + 'type': 'array'}, + 'stream': {'type': 'string'}, + 'virt-type': {'type': 'string'}}, + 'type': 'object'}, + 'ListCloudImageMetadataResult': {'additionalProperties': False, + 'properties': {'result': {'items': {'$ref': '#/definitions/CloudImageMetadata'}, + 'type': 'array'}}, + 'required': ['result'], + 'type': 'object'}, + 'Macaroon': {'additionalProperties': False, 'type': 'object'}, + 'MetadataImageIds': {'additionalProperties': False, + 'properties': {'image-ids': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'required': ['image-ids'], + 'type': 'object'}, + 'MetadataSaveParams': {'additionalProperties': False, + 'properties': {'metadata': {'items': {'$ref': '#/definitions/CloudImageMetadataList'}, + 'type': 'array'}}, + 'type': 'object'}}, + 'properties': {'Delete': {'properties': {'Params': {'$ref': '#/definitions/MetadataImageIds'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'List': {'properties': {'Params': {'$ref': '#/definitions/ImageMetadataFilter'}, + 'Result': {'$ref': '#/definitions/ListCloudImageMetadataResult'}}, + 'type': 'object'}, + 'Save': {'properties': {'Params': {'$ref': '#/definitions/MetadataSaveParams'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'UpdateFromPublishedImages': {'type': 'object'}}, + 'type': 'object'} + + + @ReturnMapping(ErrorResults) + async def Delete(self, image_ids): + ''' + image_ids : typing.Sequence<+T_co>[str] + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='ImageMetadata', request='Delete', version=2, params=params) + params['image-ids'] = image_ids + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ListCloudImageMetadataResult) + async def List(self, arches, region, root_storage_type, series, stream, virt_type): + ''' + arches : typing.Sequence<+T_co>[str] + region : str + root_storage_type : str + series : typing.Sequence<+T_co>[str] + stream : str + virt_type : str + Returns -> typing.Sequence<+T_co>[~CloudImageMetadata]<~CloudImageMetadata> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='ImageMetadata', request='List', version=2, params=params) + params['arches'] = arches + params['region'] = region + params['root-storage-type'] = root_storage_type + params['series'] = series + params['stream'] = stream + params['virt-type'] = virt_type + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def Save(self, metadata): + ''' + metadata : typing.Sequence<+T_co>[~CloudImageMetadataList]<~CloudImageMetadataList> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='ImageMetadata', request='Save', version=2, params=params) + params['metadata'] = metadata + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(None) + async def UpdateFromPublishedImages(self): + ''' + + Returns -> None + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='ImageMetadata', request='UpdateFromPublishedImages', version=2, params=params) + + reply = await self.rpc(msg) + return reply + + +class InstancePollerFacade(Type): + name = 'InstancePoller' + version = 3 + schema = {'definitions': {'Address': {'additionalProperties': False, + 'properties': {'scope': {'type': 'string'}, + 'space-name': {'type': 'string'}, + 'type': {'type': 'string'}, + 'value': {'type': 'string'}}, + 'required': ['value', 'type', 'scope'], + 'type': 'object'}, + 'BoolResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'type': 'boolean'}}, + 'required': ['result'], + 'type': 'object'}, + 'BoolResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/BoolResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'Entities': {'additionalProperties': False, + 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, + 'type': 'array'}}, + 'required': ['entities'], + 'type': 'object'}, + 'Entity': {'additionalProperties': False, + 'properties': {'tag': {'type': 'string'}}, + 'required': ['tag'], + 'type': 'object'}, + 'EntityStatusArgs': {'additionalProperties': False, + 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True, + 'type': 'object'}}, + 'type': 'object'}, + 'info': {'type': 'string'}, + 'status': {'type': 'string'}, + 'tag': {'type': 'string'}}, + 'required': ['tag', + 'status', + 'info', + 'data'], + 'type': 'object'}, + 'Error': {'additionalProperties': False, + 'properties': {'code': {'type': 'string'}, + 'info': {'$ref': '#/definitions/ErrorInfo'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], + 'type': 'object'}, + 'ErrorInfo': {'additionalProperties': False, + 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'macaroon-path': {'type': 'string'}}, + 'type': 'object'}, + 'ErrorResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}}, + 'type': 'object'}, + 'ErrorResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'LifeResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'life': {'type': 'string'}}, + 'required': ['life'], + 'type': 'object'}, + 'LifeResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'Macaroon': {'additionalProperties': False, 'type': 'object'}, + 'MachineAddresses': {'additionalProperties': False, + 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'}, + 'type': 'array'}, + 'tag': {'type': 'string'}}, + 'required': ['tag', 'addresses'], + 'type': 'object'}, + 'MachineAddressesResult': {'additionalProperties': False, + 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'}, + 'type': 'array'}, + 'error': {'$ref': '#/definitions/Error'}}, + 'required': ['addresses'], + 'type': 'object'}, + 'MachineAddressesResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/MachineAddressesResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'ModelConfigResult': {'additionalProperties': False, + 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True, + 'type': 'object'}}, + 'type': 'object'}}, + 'required': ['config'], + 'type': 'object'}, + 'NotifyWatchResult': {'additionalProperties': False, + 'properties': {'NotifyWatcherId': {'type': 'string'}, + 'error': {'$ref': '#/definitions/Error'}}, + 'required': ['NotifyWatcherId'], + 'type': 'object'}, + 'SetMachinesAddresses': {'additionalProperties': False, + 'properties': {'machine-addresses': {'items': {'$ref': '#/definitions/MachineAddresses'}, + 'type': 'array'}}, + 'required': ['machine-addresses'], + 'type': 'object'}, + 'SetStatus': {'additionalProperties': False, + 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'}, + 'type': 'array'}}, + 'required': ['entities'], + 'type': 'object'}, + 'StatusResult': {'additionalProperties': False, + 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True, + 'type': 'object'}}, + 'type': 'object'}, + 'error': {'$ref': '#/definitions/Error'}, + 'id': {'type': 'string'}, + 'info': {'type': 'string'}, + 'life': {'type': 'string'}, + 'since': {'format': 'date-time', + 'type': 'string'}, + 'status': {'type': 'string'}}, + 'required': ['id', + 'life', + 'status', + 'info', + 'data', + 'since'], + 'type': 'object'}, + 'StatusResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/StatusResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'StringResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'type': 'string'}}, + 'required': ['result'], + 'type': 'object'}, + 'StringResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'StringsWatchResult': {'additionalProperties': False, + 'properties': {'changes': {'items': {'type': 'string'}, + 'type': 'array'}, + 'error': {'$ref': '#/definitions/Error'}, + 'watcher-id': {'type': 'string'}}, + 'required': ['watcher-id'], + 'type': 'object'}}, + 'properties': {'AreManuallyProvisioned': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/BoolResults'}}, + 'type': 'object'}, + 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/StringResults'}}, + 'type': 'object'}, + 'InstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/StatusResults'}}, + 'type': 'object'}, + 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/LifeResults'}}, + 'type': 'object'}, + 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}}, + 'type': 'object'}, + 'ProviderAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/MachineAddressesResults'}}, + 'type': 'object'}, + 'SetInstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'SetProviderAddresses': {'properties': {'Params': {'$ref': '#/definitions/SetMachinesAddresses'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'Status': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/StatusResults'}}, + 'type': 'object'}, + 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, + 'type': 'object'}, + 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}}, + 'type': 'object'}}, + 'type': 'object'} + + + @ReturnMapping(BoolResults) + async def AreManuallyProvisioned(self, entities): + ''' + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~BoolResult]<~BoolResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='InstancePoller', request='AreManuallyProvisioned', version=3, params=params) + params['entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(StringResults) + async def InstanceId(self, entities): + ''' + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='InstancePoller', request='InstanceId', version=3, params=params) + params['entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(StatusResults) + async def InstanceStatus(self, entities): + ''' + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~StatusResult]<~StatusResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='InstancePoller', request='InstanceStatus', version=3, params=params) + params['entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(LifeResults) + async def Life(self, entities): + ''' + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='InstancePoller', request='Life', version=3, params=params) + params['entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ModelConfigResult) + async def ModelConfig(self): + ''' + + Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any] + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='InstancePoller', request='ModelConfig', version=3, params=params) + + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(MachineAddressesResults) + async def ProviderAddresses(self, entities): + ''' + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~MachineAddressesResult]<~MachineAddressesResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='InstancePoller', request='ProviderAddresses', version=3, params=params) + params['entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def SetInstanceStatus(self, entities): + ''' + entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='InstancePoller', request='SetInstanceStatus', version=3, params=params) + params['entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def SetProviderAddresses(self, machine_addresses): + ''' + machine_addresses : typing.Sequence<+T_co>[~MachineAddresses]<~MachineAddresses> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='InstancePoller', request='SetProviderAddresses', version=3, params=params) + params['machine-addresses'] = machine_addresses + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(StatusResults) + async def Status(self, entities): + ''' + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~StatusResult]<~StatusResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='InstancePoller', request='Status', version=3, params=params) + params['entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(NotifyWatchResult) + async def WatchForModelConfigChanges(self): + ''' + + Returns -> typing.Union[str, _ForwardRef('Error')] + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='InstancePoller', request='WatchForModelConfigChanges', version=3, params=params) + + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(StringsWatchResult) + async def WatchModelMachines(self): + ''' + + Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')] + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='InstancePoller', request='WatchModelMachines', version=3, params=params) + + reply = await self.rpc(msg) + return reply + + +class KeyManagerFacade(Type): + name = 'KeyManager' + version = 1 + schema = {'definitions': {'Entities': {'additionalProperties': False, + 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, + 'type': 'array'}}, + 'required': ['entities'], + 'type': 'object'}, + 'Entity': {'additionalProperties': False, + 'properties': {'tag': {'type': 'string'}}, + 'required': ['tag'], + 'type': 'object'}, + 'Error': {'additionalProperties': False, + 'properties': {'code': {'type': 'string'}, + 'info': {'$ref': '#/definitions/ErrorInfo'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], + 'type': 'object'}, + 'ErrorInfo': {'additionalProperties': False, + 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'macaroon-path': {'type': 'string'}}, + 'type': 'object'}, + 'ErrorResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}}, + 'type': 'object'}, + 'ErrorResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'ListSSHKeys': {'additionalProperties': False, + 'properties': {'entities': {'$ref': '#/definitions/Entities'}, + 'mode': {'type': 'boolean'}}, + 'required': ['entities', 'mode'], + 'type': 'object'}, + 'Macaroon': {'additionalProperties': False, 'type': 'object'}, + 'ModifyUserSSHKeys': {'additionalProperties': False, + 'properties': {'ssh-keys': {'items': {'type': 'string'}, + 'type': 'array'}, + 'user': {'type': 'string'}}, + 'required': ['user', 'ssh-keys'], + 'type': 'object'}, + 'StringsResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'type': 'object'}, + 'StringsResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}}, + 'properties': {'AddKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'DeleteKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'ImportKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'ListKeys': {'properties': {'Params': {'$ref': '#/definitions/ListSSHKeys'}, + 'Result': {'$ref': '#/definitions/StringsResults'}}, + 'type': 'object'}}, + 'type': 'object'} + + + @ReturnMapping(ErrorResults) + async def AddKeys(self, ssh_keys, user): + ''' + ssh_keys : typing.Sequence<+T_co>[str] + user : str + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='KeyManager', request='AddKeys', version=1, params=params) + params['ssh-keys'] = ssh_keys + params['user'] = user + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def DeleteKeys(self, ssh_keys, user): + ''' + ssh_keys : typing.Sequence<+T_co>[str] + user : str + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='KeyManager', request='DeleteKeys', version=1, params=params) + params['ssh-keys'] = ssh_keys + params['user'] = user + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def ImportKeys(self, ssh_keys, user): + ''' + ssh_keys : typing.Sequence<+T_co>[str] + user : str + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='KeyManager', request='ImportKeys', version=1, params=params) + params['ssh-keys'] = ssh_keys + params['user'] = user + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(StringsResults) + async def ListKeys(self, entities, mode): + ''' + entities : Entities + mode : bool + Returns -> typing.Sequence<+T_co>[~StringsResult]<~StringsResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='KeyManager', request='ListKeys', version=1, params=params) + params['entities'] = entities + params['mode'] = mode + reply = await self.rpc(msg) + return reply + + +class KeyUpdaterFacade(Type): + name = 'KeyUpdater' + version = 1 + schema = {'definitions': {'Entities': {'additionalProperties': False, + 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, + 'type': 'array'}}, + 'required': ['entities'], + 'type': 'object'}, + 'Entity': {'additionalProperties': False, + 'properties': {'tag': {'type': 'string'}}, + 'required': ['tag'], + 'type': 'object'}, + 'Error': {'additionalProperties': False, + 'properties': {'code': {'type': 'string'}, + 'info': {'$ref': '#/definitions/ErrorInfo'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], + 'type': 'object'}, + 'ErrorInfo': {'additionalProperties': False, + 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'macaroon-path': {'type': 'string'}}, + 'type': 'object'}, + 'Macaroon': {'additionalProperties': False, 'type': 'object'}, + 'NotifyWatchResult': {'additionalProperties': False, + 'properties': {'NotifyWatcherId': {'type': 'string'}, + 'error': {'$ref': '#/definitions/Error'}}, + 'required': ['NotifyWatcherId'], + 'type': 'object'}, + 'NotifyWatchResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'StringsResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'type': 'object'}, + 'StringsResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}}, + 'properties': {'AuthorisedKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/StringsResults'}}, + 'type': 'object'}, + 'WatchAuthorisedKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, + 'type': 'object'}}, + 'type': 'object'} + + + @ReturnMapping(StringsResults) + async def AuthorisedKeys(self, entities): + ''' + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~StringsResult]<~StringsResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='KeyUpdater', request='AuthorisedKeys', version=1, params=params) + params['entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(NotifyWatchResults) + async def WatchAuthorisedKeys(self, entities): + ''' + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='KeyUpdater', request='WatchAuthorisedKeys', version=1, params=params) + params['entities'] = entities + reply = await self.rpc(msg) + return reply + + +class LeadershipServiceFacade(Type): + name = 'LeadershipService' + version = 2 + schema = {'definitions': {'ApplicationTag': {'additionalProperties': False, + 'properties': {'Name': {'type': 'string'}}, + 'required': ['Name'], + 'type': 'object'}, + 'ClaimLeadershipBulkParams': {'additionalProperties': False, + 'properties': {'params': {'items': {'$ref': '#/definitions/ClaimLeadershipParams'}, + 'type': 'array'}}, + 'required': ['params'], + 'type': 'object'}, + 'ClaimLeadershipBulkResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'ClaimLeadershipParams': {'additionalProperties': False, + 'properties': {'application-tag': {'type': 'string'}, + 'duration': {'type': 'number'}, + 'unit-tag': {'type': 'string'}}, + 'required': ['application-tag', + 'unit-tag', + 'duration'], + 'type': 'object'}, + 'Error': {'additionalProperties': False, + 'properties': {'code': {'type': 'string'}, + 'info': {'$ref': '#/definitions/ErrorInfo'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], + 'type': 'object'}, + 'ErrorInfo': {'additionalProperties': False, + 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'macaroon-path': {'type': 'string'}}, + 'type': 'object'}, + 'ErrorResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}}, + 'type': 'object'}, + 'Macaroon': {'additionalProperties': False, 'type': 'object'}}, + 'properties': {'BlockUntilLeadershipReleased': {'properties': {'Params': {'$ref': '#/definitions/ApplicationTag'}, + 'Result': {'$ref': '#/definitions/ErrorResult'}}, + 'type': 'object'}, + 'ClaimLeadership': {'properties': {'Params': {'$ref': '#/definitions/ClaimLeadershipBulkParams'}, + 'Result': {'$ref': '#/definitions/ClaimLeadershipBulkResults'}}, + 'type': 'object'}}, + 'type': 'object'} + + + @ReturnMapping(ErrorResult) + async def BlockUntilLeadershipReleased(self, name): + ''' + name : str + Returns -> Error + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='LeadershipService', request='BlockUntilLeadershipReleased', version=2, params=params) + params['Name'] = name + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ClaimLeadershipBulkResults) + async def ClaimLeadership(self, params): + ''' + params : typing.Sequence<+T_co>[~ClaimLeadershipParams]<~ClaimLeadershipParams> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='LeadershipService', request='ClaimLeadership', version=2, params=params) + params['params'] = params + reply = await self.rpc(msg) + return reply + + +class LifeFlagFacade(Type): + name = 'LifeFlag' + version = 1 + schema = {'definitions': {'Entities': {'additionalProperties': False, + 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, + 'type': 'array'}}, + 'required': ['entities'], + 'type': 'object'}, + 'Entity': {'additionalProperties': False, + 'properties': {'tag': {'type': 'string'}}, + 'required': ['tag'], + 'type': 'object'}, + 'Error': {'additionalProperties': False, + 'properties': {'code': {'type': 'string'}, + 'info': {'$ref': '#/definitions/ErrorInfo'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], + 'type': 'object'}, + 'ErrorInfo': {'additionalProperties': False, + 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'macaroon-path': {'type': 'string'}}, + 'type': 'object'}, + 'LifeResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'life': {'type': 'string'}}, + 'required': ['life'], + 'type': 'object'}, + 'LifeResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'Macaroon': {'additionalProperties': False, 'type': 'object'}, + 'NotifyWatchResult': {'additionalProperties': False, + 'properties': {'NotifyWatcherId': {'type': 'string'}, + 'error': {'$ref': '#/definitions/Error'}}, + 'required': ['NotifyWatcherId'], + 'type': 'object'}, + 'NotifyWatchResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}}, + 'properties': {'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/LifeResults'}}, + 'type': 'object'}, + 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, + 'type': 'object'}}, + 'type': 'object'} + + + @ReturnMapping(LifeResults) + async def Life(self, entities): + ''' + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='LifeFlag', request='Life', version=1, params=params) + params['entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(NotifyWatchResults) + async def Watch(self, entities): + ''' + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='LifeFlag', request='Watch', version=1, params=params) + params['entities'] = entities + reply = await self.rpc(msg) + return reply + + +class LogForwardingFacade(Type): + name = 'LogForwarding' + version = 1 + schema = {'definitions': {'Error': {'additionalProperties': False, + 'properties': {'code': {'type': 'string'}, + 'info': {'$ref': '#/definitions/ErrorInfo'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], + 'type': 'object'}, + 'ErrorInfo': {'additionalProperties': False, + 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'macaroon-path': {'type': 'string'}}, + 'type': 'object'}, + 'ErrorResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}}, + 'type': 'object'}, + 'ErrorResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'LogForwardingGetLastSentParams': {'additionalProperties': False, + 'properties': {'ids': {'items': {'$ref': '#/definitions/LogForwardingID'}, + 'type': 'array'}}, + 'required': ['ids'], + 'type': 'object'}, + 'LogForwardingGetLastSentResult': {'additionalProperties': False, + 'properties': {'err': {'$ref': '#/definitions/Error'}, + 'record-id': {'type': 'integer'}, + 'record-timestamp': {'type': 'integer'}}, + 'required': ['record-id', + 'record-timestamp', + 'err'], + 'type': 'object'}, + 'LogForwardingGetLastSentResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/LogForwardingGetLastSentResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'LogForwardingID': {'additionalProperties': False, + 'properties': {'model': {'type': 'string'}, + 'sink': {'type': 'string'}}, + 'required': ['model', 'sink'], + 'type': 'object'}, + 'LogForwardingSetLastSentParam': {'additionalProperties': False, + 'properties': {'LogForwardingID': {'$ref': '#/definitions/LogForwardingID'}, + 'record-id': {'type': 'integer'}, + 'record-timestamp': {'type': 'integer'}}, + 'required': ['LogForwardingID', + 'record-id', + 'record-timestamp'], + 'type': 'object'}, + 'LogForwardingSetLastSentParams': {'additionalProperties': False, + 'properties': {'params': {'items': {'$ref': '#/definitions/LogForwardingSetLastSentParam'}, + 'type': 'array'}}, + 'required': ['params'], + 'type': 'object'}, + 'Macaroon': {'additionalProperties': False, 'type': 'object'}}, + 'properties': {'GetLastSent': {'properties': {'Params': {'$ref': '#/definitions/LogForwardingGetLastSentParams'}, + 'Result': {'$ref': '#/definitions/LogForwardingGetLastSentResults'}}, + 'type': 'object'}, + 'SetLastSent': {'properties': {'Params': {'$ref': '#/definitions/LogForwardingSetLastSentParams'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}}, + 'type': 'object'} + + + @ReturnMapping(LogForwardingGetLastSentResults) + async def GetLastSent(self, ids): + ''' + ids : typing.Sequence<+T_co>[~LogForwardingID]<~LogForwardingID> + Returns -> typing.Sequence<+T_co>[~LogForwardingGetLastSentResult]<~LogForwardingGetLastSentResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='LogForwarding', request='GetLastSent', version=1, params=params) + params['ids'] = ids + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def SetLastSent(self, params): + ''' + params : typing.Sequence<+T_co>[~LogForwardingSetLastSentParam]<~LogForwardingSetLastSentParam> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='LogForwarding', request='SetLastSent', version=1, params=params) + params['params'] = params + reply = await self.rpc(msg) + return reply + + +class LoggerFacade(Type): + name = 'Logger' + version = 1 + schema = {'definitions': {'Entities': {'additionalProperties': False, + 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, + 'type': 'array'}}, + 'required': ['entities'], + 'type': 'object'}, + 'Entity': {'additionalProperties': False, + 'properties': {'tag': {'type': 'string'}}, + 'required': ['tag'], + 'type': 'object'}, + 'Error': {'additionalProperties': False, + 'properties': {'code': {'type': 'string'}, + 'info': {'$ref': '#/definitions/ErrorInfo'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], + 'type': 'object'}, + 'ErrorInfo': {'additionalProperties': False, + 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'macaroon-path': {'type': 'string'}}, + 'type': 'object'}, + 'Macaroon': {'additionalProperties': False, 'type': 'object'}, + 'NotifyWatchResult': {'additionalProperties': False, + 'properties': {'NotifyWatcherId': {'type': 'string'}, + 'error': {'$ref': '#/definitions/Error'}}, + 'required': ['NotifyWatcherId'], + 'type': 'object'}, + 'NotifyWatchResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'StringResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'type': 'string'}}, + 'required': ['result'], + 'type': 'object'}, + 'StringResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}}, + 'properties': {'LoggingConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/StringResults'}}, + 'type': 'object'}, + 'WatchLoggingConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, + 'type': 'object'}}, + 'type': 'object'} + + + @ReturnMapping(StringResults) + async def LoggingConfig(self, entities): + ''' + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='Logger', request='LoggingConfig', version=1, params=params) + params['entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(NotifyWatchResults) + async def WatchLoggingConfig(self, entities): + ''' + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='Logger', request='WatchLoggingConfig', version=1, params=params) + params['entities'] = entities + reply = await self.rpc(msg) + return reply + + +class MachineActionsFacade(Type): + name = 'MachineActions' + version = 1 + schema = {'definitions': {'Action': {'additionalProperties': False, + 'properties': {'name': {'type': 'string'}, + 'parameters': {'patternProperties': {'.*': {'additionalProperties': True, + 'type': 'object'}}, + 'type': 'object'}, + 'receiver': {'type': 'string'}, + 'tag': {'type': 'string'}}, + 'required': ['tag', 'receiver', 'name'], + 'type': 'object'}, + 'ActionExecutionResult': {'additionalProperties': False, + 'properties': {'action-tag': {'type': 'string'}, + 'message': {'type': 'string'}, + 'results': {'patternProperties': {'.*': {'additionalProperties': True, + 'type': 'object'}}, + 'type': 'object'}, + 'status': {'type': 'string'}}, + 'required': ['action-tag', 'status'], + 'type': 'object'}, + 'ActionExecutionResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/ActionExecutionResult'}, + 'type': 'array'}}, + 'type': 'object'}, + 'ActionResult': {'additionalProperties': False, + 'properties': {'action': {'$ref': '#/definitions/Action'}, + 'completed': {'format': 'date-time', + 'type': 'string'}, + 'enqueued': {'format': 'date-time', + 'type': 'string'}, + 'error': {'$ref': '#/definitions/Error'}, + 'message': {'type': 'string'}, + 'output': {'patternProperties': {'.*': {'additionalProperties': True, + 'type': 'object'}}, + 'type': 'object'}, + 'started': {'format': 'date-time', + 'type': 'string'}, + 'status': {'type': 'string'}}, + 'type': 'object'}, + 'ActionResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'}, + 'type': 'array'}}, + 'type': 'object'}, + 'ActionsByReceiver': {'additionalProperties': False, + 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'}, + 'type': 'array'}, + 'error': {'$ref': '#/definitions/Error'}, + 'receiver': {'type': 'string'}}, + 'type': 'object'}, + 'ActionsByReceivers': {'additionalProperties': False, + 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByReceiver'}, + 'type': 'array'}}, + 'type': 'object'}, + 'Entities': {'additionalProperties': False, + 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, + 'type': 'array'}}, + 'required': ['entities'], + 'type': 'object'}, + 'Entity': {'additionalProperties': False, + 'properties': {'tag': {'type': 'string'}}, + 'required': ['tag'], + 'type': 'object'}, + 'Error': {'additionalProperties': False, + 'properties': {'code': {'type': 'string'}, + 'info': {'$ref': '#/definitions/ErrorInfo'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], + 'type': 'object'}, + 'ErrorInfo': {'additionalProperties': False, + 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'macaroon-path': {'type': 'string'}}, + 'type': 'object'}, + 'ErrorResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}}, + 'type': 'object'}, + 'ErrorResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'Macaroon': {'additionalProperties': False, 'type': 'object'}, + 'StringsWatchResult': {'additionalProperties': False, + 'properties': {'changes': {'items': {'type': 'string'}, + 'type': 'array'}, + 'error': {'$ref': '#/definitions/Error'}, + 'watcher-id': {'type': 'string'}}, + 'required': ['watcher-id'], + 'type': 'object'}, + 'StringsWatchResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}}, + 'properties': {'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/ActionResults'}}, + 'type': 'object'}, + 'BeginActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'FinishActions': {'properties': {'Params': {'$ref': '#/definitions/ActionExecutionResults'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'RunningActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/ActionsByReceivers'}}, + 'type': 'object'}, + 'WatchActionNotifications': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, + 'type': 'object'}}, + 'type': 'object'} + + + @ReturnMapping(ActionResults) + async def Actions(self, entities): + ''' + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~ActionResult]<~ActionResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='MachineActions', request='Actions', version=1, params=params) + params['entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def BeginActions(self, entities): + ''' + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='MachineActions', request='BeginActions', version=1, params=params) + params['entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def FinishActions(self, results): + ''' + results : typing.Sequence<+T_co>[~ActionExecutionResult]<~ActionExecutionResult> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='MachineActions', request='FinishActions', version=1, params=params) + params['results'] = results + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ActionsByReceivers) + async def RunningActions(self, entities): + ''' + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~ActionsByReceiver]<~ActionsByReceiver> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='MachineActions', request='RunningActions', version=1, params=params) + params['entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(StringsWatchResults) + async def WatchActionNotifications(self, entities): + ''' + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='MachineActions', request='WatchActionNotifications', version=1, params=params) + params['entities'] = entities + reply = await self.rpc(msg) + return reply + + +class MachineManagerFacade(Type): + name = 'MachineManager' + version = 2 + schema = {'definitions': {'AddMachineParams': {'additionalProperties': False, + 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'}, + 'type': 'array'}, + 'constraints': {'$ref': '#/definitions/Value'}, + 'container-type': {'type': 'string'}, + 'disks': {'items': {'$ref': '#/definitions/Constraints'}, + 'type': 'array'}, + 'hardware-characteristics': {'$ref': '#/definitions/HardwareCharacteristics'}, + 'instance-id': {'type': 'string'}, + 'jobs': {'items': {'type': 'string'}, + 'type': 'array'}, + 'nonce': {'type': 'string'}, + 'parent-id': {'type': 'string'}, + 'placement': {'$ref': '#/definitions/Placement'}, + 'series': {'type': 'string'}}, + 'required': ['series', + 'constraints', + 'jobs', + 'parent-id', + 'container-type', + 'instance-id', + 'nonce', + 'hardware-characteristics', + 'addresses'], + 'type': 'object'}, + 'AddMachines': {'additionalProperties': False, + 'properties': {'params': {'items': {'$ref': '#/definitions/AddMachineParams'}, + 'type': 'array'}}, + 'required': ['params'], + 'type': 'object'}, + 'AddMachinesResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'machine': {'type': 'string'}}, + 'required': ['machine'], + 'type': 'object'}, + 'AddMachinesResults': {'additionalProperties': False, + 'properties': {'machines': {'items': {'$ref': '#/definitions/AddMachinesResult'}, + 'type': 'array'}}, + 'required': ['machines'], + 'type': 'object'}, + 'Address': {'additionalProperties': False, + 'properties': {'scope': {'type': 'string'}, + 'space-name': {'type': 'string'}, + 'type': {'type': 'string'}, + 'value': {'type': 'string'}}, + 'required': ['value', 'type', 'scope'], + 'type': 'object'}, + 'Constraints': {'additionalProperties': False, + 'properties': {'Count': {'type': 'integer'}, + 'Pool': {'type': 'string'}, + 'Size': {'type': 'integer'}}, + 'required': ['Pool', 'Size', 'Count'], + 'type': 'object'}, + 'Error': {'additionalProperties': False, + 'properties': {'code': {'type': 'string'}, + 'info': {'$ref': '#/definitions/ErrorInfo'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], + 'type': 'object'}, + 'ErrorInfo': {'additionalProperties': False, + 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'macaroon-path': {'type': 'string'}}, + 'type': 'object'}, + 'HardwareCharacteristics': {'additionalProperties': False, + 'properties': {'arch': {'type': 'string'}, + 'availability-zone': {'type': 'string'}, + 'cpu-cores': {'type': 'integer'}, + 'cpu-power': {'type': 'integer'}, + 'mem': {'type': 'integer'}, + 'root-disk': {'type': 'integer'}, + 'tags': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'type': 'object'}, + 'Macaroon': {'additionalProperties': False, 'type': 'object'}, + 'Placement': {'additionalProperties': False, + 'properties': {'directive': {'type': 'string'}, + 'scope': {'type': 'string'}}, + 'required': ['scope', 'directive'], + 'type': 'object'}, + 'Value': {'additionalProperties': False, + 'properties': {'arch': {'type': 'string'}, + 'container': {'type': 'string'}, + 'cpu-cores': {'type': 'integer'}, + 'cpu-power': {'type': 'integer'}, + 'instance-type': {'type': 'string'}, + 'mem': {'type': 'integer'}, + 'root-disk': {'type': 'integer'}, + 'spaces': {'items': {'type': 'string'}, + 'type': 'array'}, + 'tags': {'items': {'type': 'string'}, + 'type': 'array'}, + 'virt-type': {'type': 'string'}}, + 'type': 'object'}}, + 'properties': {'AddMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'}, + 'Result': {'$ref': '#/definitions/AddMachinesResults'}}, + 'type': 'object'}}, + 'type': 'object'} + + + @ReturnMapping(AddMachinesResults) + async def AddMachines(self, params): + ''' + params : typing.Sequence<+T_co>[~AddMachineParams]<~AddMachineParams> + Returns -> typing.Sequence<+T_co>[~AddMachinesResult]<~AddMachinesResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='MachineManager', request='AddMachines', version=2, params=params) + params['params'] = params + reply = await self.rpc(msg) + return reply + + +class MachineUndertakerFacade(Type): + name = 'MachineUndertaker' + version = 1 + schema = {'definitions': {'Entities': {'additionalProperties': False, + 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, + 'type': 'array'}}, + 'required': ['entities'], + 'type': 'object'}, + 'EntitiesResult': {'additionalProperties': False, + 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, + 'type': 'array'}, + 'error': {'$ref': '#/definitions/Error'}}, + 'required': ['entities'], + 'type': 'object'}, + 'EntitiesResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/EntitiesResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'Entity': {'additionalProperties': False, + 'properties': {'tag': {'type': 'string'}}, + 'required': ['tag'], + 'type': 'object'}, + 'Error': {'additionalProperties': False, + 'properties': {'code': {'type': 'string'}, + 'info': {'$ref': '#/definitions/ErrorInfo'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], + 'type': 'object'}, + 'ErrorInfo': {'additionalProperties': False, + 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'macaroon-path': {'type': 'string'}}, + 'type': 'object'}, + 'Macaroon': {'additionalProperties': False, 'type': 'object'}, + 'NotifyWatchResult': {'additionalProperties': False, + 'properties': {'NotifyWatcherId': {'type': 'string'}, + 'error': {'$ref': '#/definitions/Error'}}, + 'required': ['NotifyWatcherId'], + 'type': 'object'}, + 'NotifyWatchResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'ProviderInterfaceInfo': {'additionalProperties': False, + 'properties': {'interface-name': {'type': 'string'}, + 'mac-address': {'type': 'string'}, + 'provider-id': {'type': 'string'}}, + 'required': ['interface-name', + 'mac-address', + 'provider-id'], + 'type': 'object'}, + 'ProviderInterfaceInfoResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'interfaces': {'items': {'$ref': '#/definitions/ProviderInterfaceInfo'}, + 'type': 'array'}, + 'machine-tag': {'type': 'string'}}, + 'required': ['machine-tag', + 'interfaces'], + 'type': 'object'}, + 'ProviderInterfaceInfoResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/ProviderInterfaceInfoResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}}, + 'properties': {'AllMachineRemovals': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/EntitiesResults'}}, + 'type': 'object'}, + 'CompleteMachineRemovals': {'properties': {'Params': {'$ref': '#/definitions/Entities'}}, + 'type': 'object'}, + 'GetMachineProviderInterfaceInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/ProviderInterfaceInfoResults'}}, + 'type': 'object'}, + 'WatchMachineRemovals': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, + 'type': 'object'}}, + 'type': 'object'} + + + @ReturnMapping(EntitiesResults) + async def AllMachineRemovals(self, entities): + ''' + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~EntitiesResult]<~EntitiesResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='MachineUndertaker', request='AllMachineRemovals', version=1, params=params) + params['entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(None) + async def CompleteMachineRemovals(self, entities): + ''' + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> None + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='MachineUndertaker', request='CompleteMachineRemovals', version=1, params=params) + params['entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ProviderInterfaceInfoResults) + async def GetMachineProviderInterfaceInfo(self, entities): + ''' + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~ProviderInterfaceInfoResult]<~ProviderInterfaceInfoResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='MachineUndertaker', request='GetMachineProviderInterfaceInfo', version=1, params=params) + params['entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(NotifyWatchResults) + async def WatchMachineRemovals(self, entities): + ''' + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='MachineUndertaker', request='WatchMachineRemovals', version=1, params=params) + params['entities'] = entities + reply = await self.rpc(msg) + return reply + + +class MachinerFacade(Type): + name = 'Machiner' + version = 1 + schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False, + 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'}, + 'type': 'array'}, + 'type': 'array'}}, + 'required': ['servers'], + 'type': 'object'}, + 'Address': {'additionalProperties': False, + 'properties': {'scope': {'type': 'string'}, + 'space-name': {'type': 'string'}, + 'type': {'type': 'string'}, + 'value': {'type': 'string'}}, + 'required': ['value', 'type', 'scope'], + 'type': 'object'}, + 'BytesResult': {'additionalProperties': False, + 'properties': {'result': {'items': {'type': 'integer'}, + 'type': 'array'}}, + 'required': ['result'], + 'type': 'object'}, + 'Entities': {'additionalProperties': False, + 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, + 'type': 'array'}}, + 'required': ['entities'], + 'type': 'object'}, + 'Entity': {'additionalProperties': False, + 'properties': {'tag': {'type': 'string'}}, + 'required': ['tag'], + 'type': 'object'}, + 'EntityStatusArgs': {'additionalProperties': False, + 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True, + 'type': 'object'}}, + 'type': 'object'}, + 'info': {'type': 'string'}, + 'status': {'type': 'string'}, + 'tag': {'type': 'string'}}, + 'required': ['tag', + 'status', + 'info', + 'data'], + 'type': 'object'}, + 'Error': {'additionalProperties': False, + 'properties': {'code': {'type': 'string'}, + 'info': {'$ref': '#/definitions/ErrorInfo'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], + 'type': 'object'}, + 'ErrorInfo': {'additionalProperties': False, + 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'macaroon-path': {'type': 'string'}}, + 'type': 'object'}, + 'ErrorResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}}, + 'type': 'object'}, + 'ErrorResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'HostPort': {'additionalProperties': False, + 'properties': {'Address': {'$ref': '#/definitions/Address'}, + 'port': {'type': 'integer'}}, + 'required': ['Address', 'port'], + 'type': 'object'}, + 'JobsResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'jobs': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'required': ['jobs'], + 'type': 'object'}, + 'JobsResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/JobsResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'LifeResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'life': {'type': 'string'}}, + 'required': ['life'], + 'type': 'object'}, + 'LifeResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'Macaroon': {'additionalProperties': False, 'type': 'object'}, + 'MachineAddresses': {'additionalProperties': False, + 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'}, + 'type': 'array'}, + 'tag': {'type': 'string'}}, + 'required': ['tag', 'addresses'], + 'type': 'object'}, + 'NetworkConfig': {'additionalProperties': False, + 'properties': {'address': {'type': 'string'}, + 'cidr': {'type': 'string'}, + 'config-type': {'type': 'string'}, + 'device-index': {'type': 'integer'}, + 'disabled': {'type': 'boolean'}, + 'dns-search-domains': {'items': {'type': 'string'}, + 'type': 'array'}, + 'dns-servers': {'items': {'type': 'string'}, + 'type': 'array'}, + 'gateway-address': {'type': 'string'}, + 'interface-name': {'type': 'string'}, + 'interface-type': {'type': 'string'}, + 'mac-address': {'type': 'string'}, + 'mtu': {'type': 'integer'}, + 'no-auto-start': {'type': 'boolean'}, + 'parent-interface-name': {'type': 'string'}, + 'provider-address-id': {'type': 'string'}, + 'provider-id': {'type': 'string'}, + 'provider-space-id': {'type': 'string'}, + 'provider-subnet-id': {'type': 'string'}, + 'provider-vlan-id': {'type': 'string'}, + 'vlan-tag': {'type': 'integer'}}, + 'required': ['device-index', + 'mac-address', + 'cidr', + 'mtu', + 'provider-id', + 'provider-subnet-id', + 'provider-space-id', + 'provider-address-id', + 'provider-vlan-id', + 'vlan-tag', + 'interface-name', + 'parent-interface-name', + 'interface-type', + 'disabled'], + 'type': 'object'}, + 'NotifyWatchResult': {'additionalProperties': False, + 'properties': {'NotifyWatcherId': {'type': 'string'}, + 'error': {'$ref': '#/definitions/Error'}}, + 'required': ['NotifyWatcherId'], + 'type': 'object'}, + 'NotifyWatchResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'SetMachineNetworkConfig': {'additionalProperties': False, + 'properties': {'config': {'items': {'$ref': '#/definitions/NetworkConfig'}, + 'type': 'array'}, + 'tag': {'type': 'string'}}, + 'required': ['tag', 'config'], + 'type': 'object'}, + 'SetMachinesAddresses': {'additionalProperties': False, + 'properties': {'machine-addresses': {'items': {'$ref': '#/definitions/MachineAddresses'}, + 'type': 'array'}}, + 'required': ['machine-addresses'], + 'type': 'object'}, + 'SetStatus': {'additionalProperties': False, + 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'}, + 'type': 'array'}}, + 'required': ['entities'], + 'type': 'object'}, + 'StringResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'type': 'string'}}, + 'required': ['result'], + 'type': 'object'}, + 'StringsResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'type': 'object'}}, + 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}}, + 'type': 'object'}, + 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}}, + 'type': 'object'}, + 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}}, + 'type': 'object'}, + 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'Jobs': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/JobsResults'}}, + 'type': 'object'}, + 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/LifeResults'}}, + 'type': 'object'}, + 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}}, + 'type': 'object'}, + 'SetMachineAddresses': {'properties': {'Params': {'$ref': '#/definitions/SetMachinesAddresses'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'SetObservedNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/SetMachineNetworkConfig'}}, + 'type': 'object'}, + 'SetProviderNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, + 'type': 'object'}, + 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, + 'type': 'object'}}, + 'type': 'object'} + + + @ReturnMapping(StringsResult) + async def APIAddresses(self): + ''' + + Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[str]] + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='Machiner', request='APIAddresses', version=1, params=params) + + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(APIHostPortsResult) + async def APIHostPorts(self): + ''' + + Returns -> typing.Sequence<+T_co>[~HostPort]<~HostPort> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='Machiner', request='APIHostPorts', version=1, params=params) + + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(BytesResult) + async def CACert(self): + ''' + + Returns -> typing.Sequence<+T_co>[int] + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='Machiner', request='CACert', version=1, params=params) + + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def EnsureDead(self, entities): + ''' + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='Machiner', request='EnsureDead', version=1, params=params) + params['entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(JobsResults) + async def Jobs(self, entities): + ''' + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~JobsResult]<~JobsResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='Machiner', request='Jobs', version=1, params=params) + params['entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(LifeResults) + async def Life(self, entities): + ''' + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='Machiner', request='Life', version=1, params=params) + params['entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(StringResult) + async def ModelUUID(self): + ''' + + Returns -> typing.Union[_ForwardRef('Error'), str] + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='Machiner', request='ModelUUID', version=1, params=params) + + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def SetMachineAddresses(self, machine_addresses): + ''' + machine_addresses : typing.Sequence<+T_co>[~MachineAddresses]<~MachineAddresses> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='Machiner', request='SetMachineAddresses', version=1, params=params) + params['machine-addresses'] = machine_addresses + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(None) + async def SetObservedNetworkConfig(self, config, tag): + ''' + config : typing.Sequence<+T_co>[~NetworkConfig]<~NetworkConfig> + tag : str + Returns -> None + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='Machiner', request='SetObservedNetworkConfig', version=1, params=params) + params['config'] = config + params['tag'] = tag + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def SetProviderNetworkConfig(self, entities): + ''' + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='Machiner', request='SetProviderNetworkConfig', version=1, params=params) + params['entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def SetStatus(self, entities): + ''' + entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='Machiner', request='SetStatus', version=1, params=params) + params['entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def UpdateStatus(self, entities): + ''' + entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='Machiner', request='UpdateStatus', version=1, params=params) + params['entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(NotifyWatchResults) + async def Watch(self, entities): + ''' + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='Machiner', request='Watch', version=1, params=params) + params['entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(NotifyWatchResult) + async def WatchAPIHostPorts(self): + ''' + + Returns -> typing.Union[str, _ForwardRef('Error')] + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='Machiner', request='WatchAPIHostPorts', version=1, params=params) + + reply = await self.rpc(msg) + return reply + + +class MeterStatusFacade(Type): + name = 'MeterStatus' + version = 1 + schema = {'definitions': {'Entities': {'additionalProperties': False, + 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, + 'type': 'array'}}, + 'required': ['entities'], + 'type': 'object'}, + 'Entity': {'additionalProperties': False, + 'properties': {'tag': {'type': 'string'}}, + 'required': ['tag'], + 'type': 'object'}, + 'Error': {'additionalProperties': False, + 'properties': {'code': {'type': 'string'}, + 'info': {'$ref': '#/definitions/ErrorInfo'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], + 'type': 'object'}, + 'ErrorInfo': {'additionalProperties': False, + 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'macaroon-path': {'type': 'string'}}, + 'type': 'object'}, + 'Macaroon': {'additionalProperties': False, 'type': 'object'}, + 'MeterStatusResult': {'additionalProperties': False, + 'properties': {'code': {'type': 'string'}, + 'error': {'$ref': '#/definitions/Error'}, + 'info': {'type': 'string'}}, + 'required': ['code', 'info'], + 'type': 'object'}, + 'MeterStatusResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/MeterStatusResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'NotifyWatchResult': {'additionalProperties': False, + 'properties': {'NotifyWatcherId': {'type': 'string'}, + 'error': {'$ref': '#/definitions/Error'}}, + 'required': ['NotifyWatcherId'], + 'type': 'object'}, + 'NotifyWatchResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}}, + 'properties': {'GetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/MeterStatusResults'}}, + 'type': 'object'}, + 'WatchMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, + 'type': 'object'}}, + 'type': 'object'} + + + @ReturnMapping(MeterStatusResults) + async def GetMeterStatus(self, entities): + ''' + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~MeterStatusResult]<~MeterStatusResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='MeterStatus', request='GetMeterStatus', version=1, params=params) + params['entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(NotifyWatchResults) + async def WatchMeterStatus(self, entities): + ''' + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='MeterStatus', request='WatchMeterStatus', version=1, params=params) + params['entities'] = entities + reply = await self.rpc(msg) + return reply + + +class MetricsAdderFacade(Type): + name = 'MetricsAdder' + version = 2 + schema = {'definitions': {'Error': {'additionalProperties': False, + 'properties': {'code': {'type': 'string'}, + 'info': {'$ref': '#/definitions/ErrorInfo'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], + 'type': 'object'}, + 'ErrorInfo': {'additionalProperties': False, + 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'macaroon-path': {'type': 'string'}}, + 'type': 'object'}, + 'ErrorResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}}, + 'type': 'object'}, + 'ErrorResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'Macaroon': {'additionalProperties': False, 'type': 'object'}, + 'Metric': {'additionalProperties': False, + 'properties': {'key': {'type': 'string'}, + 'time': {'format': 'date-time', + 'type': 'string'}, + 'value': {'type': 'string'}}, + 'required': ['key', 'value', 'time'], + 'type': 'object'}, + 'MetricBatch': {'additionalProperties': False, + 'properties': {'charm-url': {'type': 'string'}, + 'created': {'format': 'date-time', + 'type': 'string'}, + 'metrics': {'items': {'$ref': '#/definitions/Metric'}, + 'type': 'array'}, + 'uuid': {'type': 'string'}}, + 'required': ['uuid', + 'charm-url', + 'created', + 'metrics'], + 'type': 'object'}, + 'MetricBatchParam': {'additionalProperties': False, + 'properties': {'batch': {'$ref': '#/definitions/MetricBatch'}, + 'tag': {'type': 'string'}}, + 'required': ['tag', 'batch'], + 'type': 'object'}, + 'MetricBatchParams': {'additionalProperties': False, + 'properties': {'batches': {'items': {'$ref': '#/definitions/MetricBatchParam'}, + 'type': 'array'}}, + 'required': ['batches'], + 'type': 'object'}}, + 'properties': {'AddMetricBatches': {'properties': {'Params': {'$ref': '#/definitions/MetricBatchParams'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}}, + 'type': 'object'} + + + @ReturnMapping(ErrorResults) + async def AddMetricBatches(self, batches): + ''' + batches : typing.Sequence<+T_co>[~MetricBatchParam]<~MetricBatchParam> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='MetricsAdder', request='AddMetricBatches', version=2, params=params) + params['batches'] = batches + reply = await self.rpc(msg) + return reply + + +class MetricsDebugFacade(Type): + name = 'MetricsDebug' + version = 2 + schema = {'definitions': {'Entities': {'additionalProperties': False, + 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, + 'type': 'array'}}, + 'required': ['entities'], + 'type': 'object'}, + 'Entity': {'additionalProperties': False, + 'properties': {'tag': {'type': 'string'}}, + 'required': ['tag'], + 'type': 'object'}, + 'EntityMetrics': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'metrics': {'items': {'$ref': '#/definitions/MetricResult'}, + 'type': 'array'}}, + 'type': 'object'}, + 'Error': {'additionalProperties': False, + 'properties': {'code': {'type': 'string'}, + 'info': {'$ref': '#/definitions/ErrorInfo'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], + 'type': 'object'}, + 'ErrorInfo': {'additionalProperties': False, + 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'macaroon-path': {'type': 'string'}}, + 'type': 'object'}, + 'ErrorResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}}, + 'type': 'object'}, + 'ErrorResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'Macaroon': {'additionalProperties': False, 'type': 'object'}, + 'MeterStatusParam': {'additionalProperties': False, + 'properties': {'code': {'type': 'string'}, + 'info': {'type': 'string'}, + 'tag': {'type': 'string'}}, + 'required': ['tag', 'code', 'info'], + 'type': 'object'}, + 'MeterStatusParams': {'additionalProperties': False, + 'properties': {'statues': {'items': {'$ref': '#/definitions/MeterStatusParam'}, + 'type': 'array'}}, + 'required': ['statues'], + 'type': 'object'}, + 'MetricResult': {'additionalProperties': False, + 'properties': {'key': {'type': 'string'}, + 'time': {'format': 'date-time', + 'type': 'string'}, + 'value': {'type': 'string'}}, + 'required': ['time', 'key', 'value'], + 'type': 'object'}, + 'MetricResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/EntityMetrics'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}}, + 'properties': {'GetMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/MetricResults'}}, + 'type': 'object'}, + 'SetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/MeterStatusParams'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}}, + 'type': 'object'} + + + @ReturnMapping(MetricResults) + async def GetMetrics(self, entities): + ''' + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~EntityMetrics]<~EntityMetrics> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='MetricsDebug', request='GetMetrics', version=2, params=params) + params['entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def SetMeterStatus(self, statues): + ''' + statues : typing.Sequence<+T_co>[~MeterStatusParam]<~MeterStatusParam> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='MetricsDebug', request='SetMeterStatus', version=2, params=params) + params['statues'] = statues + reply = await self.rpc(msg) + return reply + + +class MetricsManagerFacade(Type): + name = 'MetricsManager' + version = 1 + schema = {'definitions': {'Entities': {'additionalProperties': False, + 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, + 'type': 'array'}}, + 'required': ['entities'], + 'type': 'object'}, + 'Entity': {'additionalProperties': False, + 'properties': {'tag': {'type': 'string'}}, + 'required': ['tag'], + 'type': 'object'}, + 'Error': {'additionalProperties': False, + 'properties': {'code': {'type': 'string'}, + 'info': {'$ref': '#/definitions/ErrorInfo'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], + 'type': 'object'}, + 'ErrorInfo': {'additionalProperties': False, + 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'macaroon-path': {'type': 'string'}}, + 'type': 'object'}, + 'ErrorResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}}, + 'type': 'object'}, + 'ErrorResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'Macaroon': {'additionalProperties': False, 'type': 'object'}}, + 'properties': {'CleanupOldMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'SendMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}}, + 'type': 'object'} + + + @ReturnMapping(ErrorResults) + async def CleanupOldMetrics(self, entities): + ''' + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='MetricsManager', request='CleanupOldMetrics', version=1, params=params) + params['entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def SendMetrics(self, entities): + ''' + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='MetricsManager', request='SendMetrics', version=1, params=params) + params['entities'] = entities + reply = await self.rpc(msg) + return reply + + +class MigrationFlagFacade(Type): + name = 'MigrationFlag' + version = 1 + schema = {'definitions': {'Entities': {'additionalProperties': False, + 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, + 'type': 'array'}}, + 'required': ['entities'], + 'type': 'object'}, + 'Entity': {'additionalProperties': False, + 'properties': {'tag': {'type': 'string'}}, + 'required': ['tag'], + 'type': 'object'}, + 'Error': {'additionalProperties': False, + 'properties': {'code': {'type': 'string'}, + 'info': {'$ref': '#/definitions/ErrorInfo'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], + 'type': 'object'}, + 'ErrorInfo': {'additionalProperties': False, + 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'macaroon-path': {'type': 'string'}}, + 'type': 'object'}, + 'Macaroon': {'additionalProperties': False, 'type': 'object'}, + 'NotifyWatchResult': {'additionalProperties': False, + 'properties': {'NotifyWatcherId': {'type': 'string'}, + 'error': {'$ref': '#/definitions/Error'}}, + 'required': ['NotifyWatcherId'], + 'type': 'object'}, + 'NotifyWatchResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'PhaseResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'phase': {'type': 'string'}}, + 'type': 'object'}, + 'PhaseResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/PhaseResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}}, + 'properties': {'Phase': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/PhaseResults'}}, + 'type': 'object'}, + 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, + 'type': 'object'}}, + 'type': 'object'} + + + @ReturnMapping(PhaseResults) + async def Phase(self, entities): + ''' + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~PhaseResult]<~PhaseResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='MigrationFlag', request='Phase', version=1, params=params) + params['entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(NotifyWatchResults) + async def Watch(self, entities): + ''' + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='MigrationFlag', request='Watch', version=1, params=params) + params['entities'] = entities + reply = await self.rpc(msg) + return reply + + +class MigrationMasterFacade(Type): + name = 'MigrationMaster' + version = 1 + schema = {'definitions': {'Error': {'additionalProperties': False, + 'properties': {'code': {'type': 'string'}, + 'info': {'$ref': '#/definitions/ErrorInfo'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], + 'type': 'object'}, + 'ErrorInfo': {'additionalProperties': False, + 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'macaroon-path': {'type': 'string'}}, + 'type': 'object'}, + 'Macaroon': {'additionalProperties': False, 'type': 'object'}, + 'MasterMigrationStatus': {'additionalProperties': False, + 'properties': {'migration-id': {'type': 'string'}, + 'phase': {'type': 'string'}, + 'phase-changed-time': {'format': 'date-time', + 'type': 'string'}, + 'spec': {'$ref': '#/definitions/MigrationSpec'}}, + 'required': ['spec', + 'migration-id', + 'phase', + 'phase-changed-time'], + 'type': 'object'}, + 'MigrationModelInfo': {'additionalProperties': False, + 'properties': {'agent-version': {'$ref': '#/definitions/Number'}, + 'name': {'type': 'string'}, + 'uuid': {'type': 'string'}}, + 'required': ['uuid', + 'name', + 'agent-version'], + 'type': 'object'}, + 'MigrationSpec': {'additionalProperties': False, + 'properties': {'model-tag': {'type': 'string'}, + 'target-info': {'$ref': '#/definitions/MigrationTargetInfo'}}, + 'required': ['model-tag', 'target-info'], + 'type': 'object'}, + 'MigrationTargetInfo': {'additionalProperties': False, + 'properties': {'addrs': {'items': {'type': 'string'}, + 'type': 'array'}, + 'auth-tag': {'type': 'string'}, + 'ca-cert': {'type': 'string'}, + 'controller-tag': {'type': 'string'}, + 'macaroon': {'type': 'string'}, + 'password': {'type': 'string'}}, + 'required': ['controller-tag', + 'addrs', + 'ca-cert', + 'auth-tag'], + 'type': 'object'}, + 'MinionReports': {'additionalProperties': False, + 'properties': {'failed': {'items': {'type': 'string'}, + 'type': 'array'}, + 'migration-id': {'type': 'string'}, + 'phase': {'type': 'string'}, + 'success-count': {'type': 'integer'}, + 'unknown-count': {'type': 'integer'}, + 'unknown-sample': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'required': ['migration-id', + 'phase', + 'success-count', + 'unknown-count', + 'unknown-sample', + 'failed'], + 'type': 'object'}, + 'NotifyWatchResult': {'additionalProperties': False, + 'properties': {'NotifyWatcherId': {'type': 'string'}, + 'error': {'$ref': '#/definitions/Error'}}, + 'required': ['NotifyWatcherId'], + 'type': 'object'}, + 'Number': {'additionalProperties': False, + 'properties': {'Build': {'type': 'integer'}, + 'Major': {'type': 'integer'}, + 'Minor': {'type': 'integer'}, + 'Patch': {'type': 'integer'}, + 'Tag': {'type': 'string'}}, + 'required': ['Major', + 'Minor', + 'Tag', + 'Patch', + 'Build'], + 'type': 'object'}, + 'SerializedModel': {'additionalProperties': False, + 'properties': {'bytes': {'items': {'type': 'integer'}, + 'type': 'array'}, + 'charms': {'items': {'type': 'string'}, + 'type': 'array'}, + 'tools': {'items': {'$ref': '#/definitions/SerializedModelTools'}, + 'type': 'array'}}, + 'required': ['bytes', 'charms', 'tools'], + 'type': 'object'}, + 'SerializedModelTools': {'additionalProperties': False, + 'properties': {'uri': {'type': 'string'}, + 'version': {'type': 'string'}}, + 'required': ['version', 'uri'], + 'type': 'object'}, + 'SetMigrationPhaseArgs': {'additionalProperties': False, + 'properties': {'phase': {'type': 'string'}}, + 'required': ['phase'], + 'type': 'object'}, + 'SetMigrationStatusMessageArgs': {'additionalProperties': False, + 'properties': {'message': {'type': 'string'}}, + 'required': ['message'], + 'type': 'object'}}, + 'properties': {'Export': {'properties': {'Result': {'$ref': '#/definitions/SerializedModel'}}, + 'type': 'object'}, + 'MigrationStatus': {'properties': {'Result': {'$ref': '#/definitions/MasterMigrationStatus'}}, + 'type': 'object'}, + 'MinionReports': {'properties': {'Result': {'$ref': '#/definitions/MinionReports'}}, + 'type': 'object'}, + 'ModelInfo': {'properties': {'Result': {'$ref': '#/definitions/MigrationModelInfo'}}, + 'type': 'object'}, + 'Prechecks': {'type': 'object'}, + 'Reap': {'type': 'object'}, + 'SetPhase': {'properties': {'Params': {'$ref': '#/definitions/SetMigrationPhaseArgs'}}, + 'type': 'object'}, + 'SetStatusMessage': {'properties': {'Params': {'$ref': '#/definitions/SetMigrationStatusMessageArgs'}}, + 'type': 'object'}, + 'Watch': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, + 'type': 'object'}, + 'WatchMinionReports': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, + 'type': 'object'}}, + 'type': 'object'} + + + @ReturnMapping(SerializedModel) + async def Export(self): + ''' + + Returns -> typing.Sequence<+T_co>[~SerializedModelTools]<~SerializedModelTools> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='MigrationMaster', request='Export', version=1, params=params) + + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(MasterMigrationStatus) + async def MigrationStatus(self): + ''' + + Returns -> typing.Union[str, _ForwardRef('MigrationSpec')] + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='MigrationMaster', request='MigrationStatus', version=1, params=params) + + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(MinionReports) + async def MinionReports(self): + ''' + + Returns -> typing.Union[typing.Sequence<+T_co>[str], int] + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='MigrationMaster', request='MinionReports', version=1, params=params) + + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(MigrationModelInfo) + async def ModelInfo(self): + ''' + + Returns -> typing.Union[_ForwardRef('Number'), str] + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='MigrationMaster', request='ModelInfo', version=1, params=params) + + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(None) + async def Prechecks(self): + ''' + + Returns -> None + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='MigrationMaster', request='Prechecks', version=1, params=params) + + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(None) + async def Reap(self): + ''' + + Returns -> None + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='MigrationMaster', request='Reap', version=1, params=params) + + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(None) + async def SetPhase(self, phase): + ''' + phase : str + Returns -> None + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='MigrationMaster', request='SetPhase', version=1, params=params) + params['phase'] = phase + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(None) + async def SetStatusMessage(self, message): + ''' + message : str + Returns -> None + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='MigrationMaster', request='SetStatusMessage', version=1, params=params) + params['message'] = message + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(NotifyWatchResult) + async def Watch(self): + ''' + + Returns -> typing.Union[str, _ForwardRef('Error')] + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='MigrationMaster', request='Watch', version=1, params=params) + + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(NotifyWatchResult) + async def WatchMinionReports(self): + ''' + + Returns -> typing.Union[str, _ForwardRef('Error')] + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='MigrationMaster', request='WatchMinionReports', version=1, params=params) + + reply = await self.rpc(msg) + return reply + + +class MigrationMinionFacade(Type): + name = 'MigrationMinion' + version = 1 + schema = {'definitions': {'Error': {'additionalProperties': False, + 'properties': {'code': {'type': 'string'}, + 'info': {'$ref': '#/definitions/ErrorInfo'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], + 'type': 'object'}, + 'ErrorInfo': {'additionalProperties': False, + 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'macaroon-path': {'type': 'string'}}, + 'type': 'object'}, + 'Macaroon': {'additionalProperties': False, 'type': 'object'}, + 'MinionReport': {'additionalProperties': False, + 'properties': {'migration-id': {'type': 'string'}, + 'phase': {'type': 'string'}, + 'success': {'type': 'boolean'}}, + 'required': ['migration-id', + 'phase', + 'success'], + 'type': 'object'}, + 'NotifyWatchResult': {'additionalProperties': False, + 'properties': {'NotifyWatcherId': {'type': 'string'}, + 'error': {'$ref': '#/definitions/Error'}}, + 'required': ['NotifyWatcherId'], + 'type': 'object'}}, + 'properties': {'Report': {'properties': {'Params': {'$ref': '#/definitions/MinionReport'}}, + 'type': 'object'}, + 'Watch': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, + 'type': 'object'}}, + 'type': 'object'} + + + @ReturnMapping(None) + async def Report(self, migration_id, phase, success): + ''' + migration_id : str + phase : str + success : bool + Returns -> None + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='MigrationMinion', request='Report', version=1, params=params) + params['migration-id'] = migration_id + params['phase'] = phase + params['success'] = success + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(NotifyWatchResult) + async def Watch(self): + ''' + + Returns -> typing.Union[str, _ForwardRef('Error')] + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='MigrationMinion', request='Watch', version=1, params=params) + + reply = await self.rpc(msg) + return reply + + +class MigrationStatusWatcherFacade(Type): + name = 'MigrationStatusWatcher' + version = 1 + schema = {'definitions': {'MigrationStatus': {'additionalProperties': False, + 'properties': {'attempt': {'type': 'integer'}, + 'migration-id': {'type': 'string'}, + 'phase': {'type': 'string'}, + 'source-api-addrs': {'items': {'type': 'string'}, + 'type': 'array'}, + 'source-ca-cert': {'type': 'string'}, + 'target-api-addrs': {'items': {'type': 'string'}, + 'type': 'array'}, + 'target-ca-cert': {'type': 'string'}}, + 'required': ['migration-id', + 'attempt', + 'phase', + 'source-api-addrs', + 'source-ca-cert', + 'target-api-addrs', + 'target-ca-cert'], + 'type': 'object'}}, + 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MigrationStatus'}}, + 'type': 'object'}, + 'Stop': {'type': 'object'}}, + 'type': 'object'} + + + @ReturnMapping(MigrationStatus) + async def Next(self): + ''' + + Returns -> typing.Union[int, typing.Sequence<+T_co>[str]] + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='MigrationStatusWatcher', request='Next', version=1, params=params) + + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(None) + async def Stop(self): + ''' + + Returns -> None + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='MigrationStatusWatcher', request='Stop', version=1, params=params) + + reply = await self.rpc(msg) + return reply + + +class MigrationTargetFacade(Type): + name = 'MigrationTarget' + version = 1 + schema = {'definitions': {'ModelArgs': {'additionalProperties': False, + 'properties': {'model-tag': {'type': 'string'}}, + 'required': ['model-tag'], + 'type': 'object'}, + 'Number': {'additionalProperties': False, + 'properties': {'Build': {'type': 'integer'}, + 'Major': {'type': 'integer'}, + 'Minor': {'type': 'integer'}, + 'Patch': {'type': 'integer'}, + 'Tag': {'type': 'string'}}, + 'required': ['Major', + 'Minor', + 'Tag', + 'Patch', + 'Build'], + 'type': 'object'}, + 'SerializedModel': {'additionalProperties': False, + 'properties': {'bytes': {'items': {'type': 'integer'}, + 'type': 'array'}, + 'charms': {'items': {'type': 'string'}, + 'type': 'array'}, + 'tools': {'items': {'$ref': '#/definitions/SerializedModelTools'}, + 'type': 'array'}}, + 'required': ['bytes', 'charms', 'tools'], + 'type': 'object'}, + 'SerializedModelTools': {'additionalProperties': False, + 'properties': {'uri': {'type': 'string'}, + 'version': {'type': 'string'}}, + 'required': ['version', 'uri'], + 'type': 'object'}, + 'TargetPrechecksArgs': {'additionalProperties': False, + 'properties': {'agent-version': {'$ref': '#/definitions/Number'}}, + 'required': ['agent-version'], + 'type': 'object'}}, + 'properties': {'Abort': {'properties': {'Params': {'$ref': '#/definitions/ModelArgs'}}, + 'type': 'object'}, + 'Activate': {'properties': {'Params': {'$ref': '#/definitions/ModelArgs'}}, + 'type': 'object'}, + 'Import': {'properties': {'Params': {'$ref': '#/definitions/SerializedModel'}}, + 'type': 'object'}, + 'Prechecks': {'properties': {'Params': {'$ref': '#/definitions/TargetPrechecksArgs'}}, + 'type': 'object'}}, + 'type': 'object'} + + + @ReturnMapping(None) + async def Abort(self, model_tag): + ''' + model_tag : str + Returns -> None + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='MigrationTarget', request='Abort', version=1, params=params) + params['model-tag'] = model_tag + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(None) + async def Activate(self, model_tag): + ''' + model_tag : str + Returns -> None + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='MigrationTarget', request='Activate', version=1, params=params) + params['model-tag'] = model_tag + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(None) + async def Import(self, bytes_, charms, tools): + ''' + bytes_ : typing.Sequence<+T_co>[int] + charms : typing.Sequence<+T_co>[str] + tools : typing.Sequence<+T_co>[~SerializedModelTools]<~SerializedModelTools> + Returns -> None + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='MigrationTarget', request='Import', version=1, params=params) + params['bytes'] = bytes_ + params['charms'] = charms + params['tools'] = tools + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(None) + async def Prechecks(self, build, major, minor, patch, tag): + ''' + build : int + major : int + minor : int + patch : int + tag : str + Returns -> None + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='MigrationTarget', request='Prechecks', version=1, params=params) + params['Build'] = build + params['Major'] = major + params['Minor'] = minor + params['Patch'] = patch + params['Tag'] = tag + reply = await self.rpc(msg) + return reply + + +class ModelConfigFacade(Type): + name = 'ModelConfig' + version = 1 + schema = {'definitions': {'ConfigValue': {'additionalProperties': False, + 'properties': {'source': {'type': 'string'}, + 'value': {'additionalProperties': True, + 'type': 'object'}}, + 'required': ['value', 'source'], + 'type': 'object'}, + 'Error': {'additionalProperties': False, + 'properties': {'code': {'type': 'string'}, + 'info': {'$ref': '#/definitions/ErrorInfo'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], + 'type': 'object'}, + 'ErrorInfo': {'additionalProperties': False, + 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'macaroon-path': {'type': 'string'}}, + 'type': 'object'}, + 'ErrorResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}}, + 'type': 'object'}, + 'ErrorResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'Macaroon': {'additionalProperties': False, 'type': 'object'}, + 'ModelConfigResults': {'additionalProperties': False, + 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ConfigValue'}}, + 'type': 'object'}}, + 'required': ['config'], + 'type': 'object'}, + 'ModelDefaultValues': {'additionalProperties': False, + 'properties': {'cloud-region': {'type': 'string'}, + 'cloud-tag': {'type': 'string'}, + 'config': {'patternProperties': {'.*': {'additionalProperties': True, + 'type': 'object'}}, + 'type': 'object'}}, + 'required': ['config'], + 'type': 'object'}, + 'ModelDefaults': {'additionalProperties': False, + 'properties': {'controller': {'additionalProperties': True, + 'type': 'object'}, + 'default': {'additionalProperties': True, + 'type': 'object'}, + 'regions': {'items': {'$ref': '#/definitions/RegionDefaults'}, + 'type': 'array'}}, + 'type': 'object'}, + 'ModelDefaultsResult': {'additionalProperties': False, + 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ModelDefaults'}}, + 'type': 'object'}}, + 'required': ['config'], + 'type': 'object'}, + 'ModelSet': {'additionalProperties': False, + 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True, + 'type': 'object'}}, + 'type': 'object'}}, + 'required': ['config'], + 'type': 'object'}, + 'ModelUnset': {'additionalProperties': False, + 'properties': {'keys': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'required': ['keys'], + 'type': 'object'}, + 'ModelUnsetKeys': {'additionalProperties': False, + 'properties': {'cloud-region': {'type': 'string'}, + 'cloud-tag': {'type': 'string'}, + 'keys': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'required': ['keys'], + 'type': 'object'}, + 'RegionDefaults': {'additionalProperties': False, + 'properties': {'region-name': {'type': 'string'}, + 'value': {'additionalProperties': True, + 'type': 'object'}}, + 'required': ['region-name', 'value'], + 'type': 'object'}, + 'SetModelDefaults': {'additionalProperties': False, + 'properties': {'config': {'items': {'$ref': '#/definitions/ModelDefaultValues'}, + 'type': 'array'}}, + 'required': ['config'], + 'type': 'object'}, + 'UnsetModelDefaults': {'additionalProperties': False, + 'properties': {'keys': {'items': {'$ref': '#/definitions/ModelUnsetKeys'}, + 'type': 'array'}}, + 'required': ['keys'], + 'type': 'object'}}, + 'properties': {'ModelDefaults': {'properties': {'Result': {'$ref': '#/definitions/ModelDefaultsResult'}}, + 'type': 'object'}, + 'ModelGet': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}}, + 'type': 'object'}, + 'ModelSet': {'properties': {'Params': {'$ref': '#/definitions/ModelSet'}}, + 'type': 'object'}, + 'ModelUnset': {'properties': {'Params': {'$ref': '#/definitions/ModelUnset'}}, + 'type': 'object'}, + 'SetModelDefaults': {'properties': {'Params': {'$ref': '#/definitions/SetModelDefaults'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'UnsetModelDefaults': {'properties': {'Params': {'$ref': '#/definitions/UnsetModelDefaults'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}}, + 'type': 'object'} + + + @ReturnMapping(ModelDefaultsResult) + async def ModelDefaults(self): + ''' + + Returns -> typing.Mapping<~KT, +VT_co>[str, ~ModelDefaults]<~ModelDefaults> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='ModelConfig', request='ModelDefaults', version=1, params=params) + + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ModelConfigResults) + async def ModelGet(self): + ''' + + Returns -> typing.Mapping<~KT, +VT_co>[str, ~ConfigValue]<~ConfigValue> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='ModelConfig', request='ModelGet', version=1, params=params) + + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(None) + async def ModelSet(self, config): + ''' + config : typing.Mapping<~KT, +VT_co>[str, typing.Any] + Returns -> None + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='ModelConfig', request='ModelSet', version=1, params=params) + params['config'] = config + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(None) + async def ModelUnset(self, keys): + ''' + keys : typing.Sequence<+T_co>[str] + Returns -> None + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='ModelConfig', request='ModelUnset', version=1, params=params) + params['keys'] = keys + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def SetModelDefaults(self, config): + ''' + config : typing.Sequence<+T_co>[~ModelDefaultValues]<~ModelDefaultValues> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='ModelConfig', request='SetModelDefaults', version=1, params=params) + params['config'] = config + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def UnsetModelDefaults(self, keys): + ''' + keys : typing.Sequence<+T_co>[~ModelUnsetKeys]<~ModelUnsetKeys> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='ModelConfig', request='UnsetModelDefaults', version=1, params=params) + params['keys'] = keys + reply = await self.rpc(msg) + return reply + + +class ModelManagerFacade(Type): + name = 'ModelManager' + version = 2 + schema = {'definitions': {'Entities': {'additionalProperties': False, + 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, + 'type': 'array'}}, + 'required': ['entities'], + 'type': 'object'}, + 'Entity': {'additionalProperties': False, + 'properties': {'tag': {'type': 'string'}}, + 'required': ['tag'], + 'type': 'object'}, + 'EntityStatus': {'additionalProperties': False, + 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True, + 'type': 'object'}}, + 'type': 'object'}, + 'info': {'type': 'string'}, + 'since': {'format': 'date-time', + 'type': 'string'}, + 'status': {'type': 'string'}}, + 'required': ['status', 'info', 'since'], + 'type': 'object'}, + 'Error': {'additionalProperties': False, + 'properties': {'code': {'type': 'string'}, + 'info': {'$ref': '#/definitions/ErrorInfo'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], + 'type': 'object'}, + 'ErrorInfo': {'additionalProperties': False, + 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'macaroon-path': {'type': 'string'}}, + 'type': 'object'}, + 'ErrorResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}}, + 'type': 'object'}, + 'ErrorResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'Macaroon': {'additionalProperties': False, 'type': 'object'}, + 'MapResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'patternProperties': {'.*': {'additionalProperties': True, + 'type': 'object'}}, + 'type': 'object'}}, + 'required': ['result'], + 'type': 'object'}, + 'MapResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/MapResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'Model': {'additionalProperties': False, + 'properties': {'name': {'type': 'string'}, + 'owner-tag': {'type': 'string'}, + 'uuid': {'type': 'string'}}, + 'required': ['name', 'uuid', 'owner-tag'], + 'type': 'object'}, + 'ModelCreateArgs': {'additionalProperties': False, + 'properties': {'cloud-tag': {'type': 'string'}, + 'config': {'patternProperties': {'.*': {'additionalProperties': True, + 'type': 'object'}}, + 'type': 'object'}, + 'credential': {'type': 'string'}, + 'name': {'type': 'string'}, + 'owner-tag': {'type': 'string'}, + 'region': {'type': 'string'}}, + 'required': ['name', 'owner-tag'], + 'type': 'object'}, + 'ModelInfo': {'additionalProperties': False, + 'properties': {'cloud': {'type': 'string'}, + 'cloud-credential-tag': {'type': 'string'}, + 'cloud-region': {'type': 'string'}, + 'controller-uuid': {'type': 'string'}, + 'default-series': {'type': 'string'}, + 'life': {'type': 'string'}, + 'name': {'type': 'string'}, + 'owner-tag': {'type': 'string'}, + 'provider-type': {'type': 'string'}, + 'status': {'$ref': '#/definitions/EntityStatus'}, + 'users': {'items': {'$ref': '#/definitions/ModelUserInfo'}, + 'type': 'array'}, + 'uuid': {'type': 'string'}}, + 'required': ['name', + 'uuid', + 'controller-uuid', + 'provider-type', + 'default-series', + 'cloud', + 'owner-tag', + 'life', + 'status', + 'users'], + 'type': 'object'}, + 'ModelInfoResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'$ref': '#/definitions/ModelInfo'}}, + 'type': 'object'}, + 'ModelInfoResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/ModelInfoResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'ModelUserInfo': {'additionalProperties': False, + 'properties': {'access': {'type': 'string'}, + 'display-name': {'type': 'string'}, + 'last-connection': {'format': 'date-time', + 'type': 'string'}, + 'user': {'type': 'string'}}, + 'required': ['user', + 'display-name', + 'last-connection', + 'access'], + 'type': 'object'}, + 'ModifyModelAccess': {'additionalProperties': False, + 'properties': {'access': {'type': 'string'}, + 'action': {'type': 'string'}, + 'model-tag': {'type': 'string'}, + 'user-tag': {'type': 'string'}}, + 'required': ['user-tag', + 'action', + 'access', + 'model-tag'], + 'type': 'object'}, + 'ModifyModelAccessRequest': {'additionalProperties': False, + 'properties': {'changes': {'items': {'$ref': '#/definitions/ModifyModelAccess'}, + 'type': 'array'}}, + 'required': ['changes'], + 'type': 'object'}, + 'UserModel': {'additionalProperties': False, + 'properties': {'last-connection': {'format': 'date-time', + 'type': 'string'}, + 'model': {'$ref': '#/definitions/Model'}}, + 'required': ['model', 'last-connection'], + 'type': 'object'}, + 'UserModelList': {'additionalProperties': False, + 'properties': {'user-models': {'items': {'$ref': '#/definitions/UserModel'}, + 'type': 'array'}}, + 'required': ['user-models'], + 'type': 'object'}}, + 'properties': {'CreateModel': {'properties': {'Params': {'$ref': '#/definitions/ModelCreateArgs'}, + 'Result': {'$ref': '#/definitions/ModelInfo'}}, + 'type': 'object'}, + 'DestroyModel': {'type': 'object'}, + 'DestroyModels': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'DumpModels': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/MapResults'}}, + 'type': 'object'}, + 'DumpModelsDB': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/MapResults'}}, + 'type': 'object'}, + 'ListModels': {'properties': {'Params': {'$ref': '#/definitions/Entity'}, + 'Result': {'$ref': '#/definitions/UserModelList'}}, + 'type': 'object'}, + 'ModelInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/ModelInfoResults'}}, + 'type': 'object'}, + 'ModifyModelAccess': {'properties': {'Params': {'$ref': '#/definitions/ModifyModelAccessRequest'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}}, + 'type': 'object'} + + + @ReturnMapping(ModelInfo) + async def CreateModel(self, cloud_tag, config, credential, name, owner_tag, region): + ''' + cloud_tag : str + config : typing.Mapping<~KT, +VT_co>[str, typing.Any] + credential : str + name : str + owner_tag : str + region : str + Returns -> typing.Union[_ForwardRef('EntityStatus'), typing.Sequence<+T_co>[~ModelUserInfo]<~ModelUserInfo>] + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='ModelManager', request='CreateModel', version=2, params=params) + params['cloud-tag'] = cloud_tag + params['config'] = config + params['credential'] = credential + params['name'] = name + params['owner-tag'] = owner_tag + params['region'] = region + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(None) + async def DestroyModel(self): + ''' + + Returns -> None + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='ModelManager', request='DestroyModel', version=2, params=params) + + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def DestroyModels(self, entities): + ''' + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='ModelManager', request='DestroyModels', version=2, params=params) + params['entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(MapResults) + async def DumpModels(self, entities): + ''' + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~MapResult]<~MapResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='ModelManager', request='DumpModels', version=2, params=params) + params['entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(MapResults) + async def DumpModelsDB(self, entities): + ''' + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~MapResult]<~MapResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='ModelManager', request='DumpModelsDB', version=2, params=params) + params['entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(UserModelList) + async def ListModels(self, tag): + ''' + tag : str + Returns -> typing.Sequence<+T_co>[~UserModel]<~UserModel> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='ModelManager', request='ListModels', version=2, params=params) + params['tag'] = tag + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ModelInfoResults) + async def ModelInfo(self, entities): + ''' + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~ModelInfoResult]<~ModelInfoResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='ModelManager', request='ModelInfo', version=2, params=params) + params['entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def ModifyModelAccess(self, changes): + ''' + changes : typing.Sequence<+T_co>[~ModifyModelAccess]<~ModifyModelAccess> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='ModelManager', request='ModifyModelAccess', version=2, params=params) + params['changes'] = changes + reply = await self.rpc(msg) + return reply + + +class NotifyWatcherFacade(Type): + name = 'NotifyWatcher' + version = 1 + schema = {'properties': {'Next': {'type': 'object'}, 'Stop': {'type': 'object'}}, + 'type': 'object'} + + + @ReturnMapping(None) + async def Next(self): + ''' + + Returns -> None + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='NotifyWatcher', request='Next', version=1, params=params) + + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(None) + async def Stop(self): + ''' + + Returns -> None + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='NotifyWatcher', request='Stop', version=1, params=params) + + reply = await self.rpc(msg) + return reply + + +class PingerFacade(Type): + name = 'Pinger' + version = 1 + schema = {'properties': {'Ping': {'type': 'object'}, 'Stop': {'type': 'object'}}, + 'type': 'object'} + + + @ReturnMapping(None) + async def Ping(self): + ''' + + Returns -> None + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='Pinger', request='Ping', version=1, params=params) + + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(None) + async def Stop(self): + ''' + + Returns -> None + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='Pinger', request='Stop', version=1, params=params) + + reply = await self.rpc(msg) + return reply + + +class ProvisionerFacade(Type): + name = 'Provisioner' + version = 3 + schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False, + 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'}, + 'type': 'array'}, + 'type': 'array'}}, + 'required': ['servers'], + 'type': 'object'}, + 'Address': {'additionalProperties': False, + 'properties': {'scope': {'type': 'string'}, + 'space-name': {'type': 'string'}, + 'type': {'type': 'string'}, + 'value': {'type': 'string'}}, + 'required': ['value', 'type', 'scope'], + 'type': 'object'}, + 'Binary': {'additionalProperties': False, + 'properties': {'Arch': {'type': 'string'}, + 'Number': {'$ref': '#/definitions/Number'}, + 'Series': {'type': 'string'}}, + 'required': ['Number', 'Series', 'Arch'], + 'type': 'object'}, + 'BytesResult': {'additionalProperties': False, + 'properties': {'result': {'items': {'type': 'integer'}, + 'type': 'array'}}, + 'required': ['result'], + 'type': 'object'}, + 'CloudImageMetadata': {'additionalProperties': False, + 'properties': {'arch': {'type': 'string'}, + 'image-id': {'type': 'string'}, + 'priority': {'type': 'integer'}, + 'region': {'type': 'string'}, + 'root-storage-size': {'type': 'integer'}, + 'root-storage-type': {'type': 'string'}, + 'series': {'type': 'string'}, + 'source': {'type': 'string'}, + 'stream': {'type': 'string'}, + 'version': {'type': 'string'}, + 'virt-type': {'type': 'string'}}, + 'required': ['image-id', + 'region', + 'version', + 'series', + 'arch', + 'source', + 'priority'], + 'type': 'object'}, + 'ConstraintsResult': {'additionalProperties': False, + 'properties': {'constraints': {'$ref': '#/definitions/Value'}, + 'error': {'$ref': '#/definitions/Error'}}, + 'required': ['constraints'], + 'type': 'object'}, + 'ConstraintsResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/ConstraintsResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'ContainerConfig': {'additionalProperties': False, + 'properties': {'UpdateBehavior': {'$ref': '#/definitions/UpdateBehavior'}, + 'apt-mirror': {'type': 'string'}, + 'apt-proxy': {'$ref': '#/definitions/Settings'}, + 'authorized-keys': {'type': 'string'}, + 'provider-type': {'type': 'string'}, + 'proxy': {'$ref': '#/definitions/Settings'}, + 'ssl-hostname-verification': {'type': 'boolean'}}, + 'required': ['provider-type', + 'authorized-keys', + 'ssl-hostname-verification', + 'proxy', + 'apt-proxy', + 'apt-mirror', + 'UpdateBehavior'], + 'type': 'object'}, + 'ContainerManagerConfig': {'additionalProperties': False, + 'properties': {'config': {'patternProperties': {'.*': {'type': 'string'}}, + 'type': 'object'}}, + 'required': ['config'], + 'type': 'object'}, + 'ContainerManagerConfigParams': {'additionalProperties': False, + 'properties': {'type': {'type': 'string'}}, + 'required': ['type'], + 'type': 'object'}, + 'ControllerConfigResult': {'additionalProperties': False, + 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True, + 'type': 'object'}}, + 'type': 'object'}}, + 'required': ['config'], + 'type': 'object'}, + 'DistributionGroupResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'required': ['result'], + 'type': 'object'}, + 'DistributionGroupResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/DistributionGroupResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'Entities': {'additionalProperties': False, + 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, + 'type': 'array'}}, + 'required': ['entities'], + 'type': 'object'}, + 'Entity': {'additionalProperties': False, + 'properties': {'tag': {'type': 'string'}}, + 'required': ['tag'], + 'type': 'object'}, + 'EntityPassword': {'additionalProperties': False, + 'properties': {'password': {'type': 'string'}, + 'tag': {'type': 'string'}}, + 'required': ['tag', 'password'], + 'type': 'object'}, + 'EntityPasswords': {'additionalProperties': False, + 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'}, + 'type': 'array'}}, + 'required': ['changes'], + 'type': 'object'}, + 'EntityStatusArgs': {'additionalProperties': False, + 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True, + 'type': 'object'}}, + 'type': 'object'}, + 'info': {'type': 'string'}, + 'status': {'type': 'string'}, + 'tag': {'type': 'string'}}, + 'required': ['tag', + 'status', + 'info', + 'data'], + 'type': 'object'}, + 'Error': {'additionalProperties': False, + 'properties': {'code': {'type': 'string'}, + 'info': {'$ref': '#/definitions/ErrorInfo'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], + 'type': 'object'}, + 'ErrorInfo': {'additionalProperties': False, + 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'macaroon-path': {'type': 'string'}}, + 'type': 'object'}, + 'ErrorResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}}, + 'type': 'object'}, + 'ErrorResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'FindToolsParams': {'additionalProperties': False, + 'properties': {'arch': {'type': 'string'}, + 'major': {'type': 'integer'}, + 'minor': {'type': 'integer'}, + 'number': {'$ref': '#/definitions/Number'}, + 'series': {'type': 'string'}}, + 'required': ['number', + 'major', + 'minor', + 'arch', + 'series'], + 'type': 'object'}, + 'FindToolsResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'list': {'items': {'$ref': '#/definitions/Tools'}, + 'type': 'array'}}, + 'required': ['list'], + 'type': 'object'}, + 'HardwareCharacteristics': {'additionalProperties': False, + 'properties': {'arch': {'type': 'string'}, + 'availability-zone': {'type': 'string'}, + 'cpu-cores': {'type': 'integer'}, + 'cpu-power': {'type': 'integer'}, + 'mem': {'type': 'integer'}, + 'root-disk': {'type': 'integer'}, + 'tags': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'type': 'object'}, + 'HostPort': {'additionalProperties': False, + 'properties': {'Address': {'$ref': '#/definitions/Address'}, + 'port': {'type': 'integer'}}, + 'required': ['Address', 'port'], + 'type': 'object'}, + 'InstanceInfo': {'additionalProperties': False, + 'properties': {'characteristics': {'$ref': '#/definitions/HardwareCharacteristics'}, + 'instance-id': {'type': 'string'}, + 'network-config': {'items': {'$ref': '#/definitions/NetworkConfig'}, + 'type': 'array'}, + 'nonce': {'type': 'string'}, + 'tag': {'type': 'string'}, + 'volume-attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/VolumeAttachmentInfo'}}, + 'type': 'object'}, + 'volumes': {'items': {'$ref': '#/definitions/Volume'}, + 'type': 'array'}}, + 'required': ['tag', + 'instance-id', + 'nonce', + 'characteristics', + 'volumes', + 'volume-attachments', + 'network-config'], + 'type': 'object'}, + 'InstancesInfo': {'additionalProperties': False, + 'properties': {'machines': {'items': {'$ref': '#/definitions/InstanceInfo'}, + 'type': 'array'}}, + 'required': ['machines'], + 'type': 'object'}, + 'LifeResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'life': {'type': 'string'}}, + 'required': ['life'], + 'type': 'object'}, + 'LifeResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'Macaroon': {'additionalProperties': False, 'type': 'object'}, + 'MachineContainers': {'additionalProperties': False, + 'properties': {'container-types': {'items': {'type': 'string'}, + 'type': 'array'}, + 'machine-tag': {'type': 'string'}}, + 'required': ['machine-tag', + 'container-types'], + 'type': 'object'}, + 'MachineContainersParams': {'additionalProperties': False, + 'properties': {'params': {'items': {'$ref': '#/definitions/MachineContainers'}, + 'type': 'array'}}, + 'required': ['params'], + 'type': 'object'}, + 'MachineNetworkConfigResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'info': {'items': {'$ref': '#/definitions/NetworkConfig'}, + 'type': 'array'}}, + 'required': ['info'], + 'type': 'object'}, + 'MachineNetworkConfigResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/MachineNetworkConfigResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'ModelConfigResult': {'additionalProperties': False, + 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True, + 'type': 'object'}}, + 'type': 'object'}}, + 'required': ['config'], + 'type': 'object'}, + 'NetworkConfig': {'additionalProperties': False, + 'properties': {'address': {'type': 'string'}, + 'cidr': {'type': 'string'}, + 'config-type': {'type': 'string'}, + 'device-index': {'type': 'integer'}, + 'disabled': {'type': 'boolean'}, + 'dns-search-domains': {'items': {'type': 'string'}, + 'type': 'array'}, + 'dns-servers': {'items': {'type': 'string'}, + 'type': 'array'}, + 'gateway-address': {'type': 'string'}, + 'interface-name': {'type': 'string'}, + 'interface-type': {'type': 'string'}, + 'mac-address': {'type': 'string'}, + 'mtu': {'type': 'integer'}, + 'no-auto-start': {'type': 'boolean'}, + 'parent-interface-name': {'type': 'string'}, + 'provider-address-id': {'type': 'string'}, + 'provider-id': {'type': 'string'}, + 'provider-space-id': {'type': 'string'}, + 'provider-subnet-id': {'type': 'string'}, + 'provider-vlan-id': {'type': 'string'}, + 'vlan-tag': {'type': 'integer'}}, + 'required': ['device-index', + 'mac-address', + 'cidr', + 'mtu', + 'provider-id', + 'provider-subnet-id', + 'provider-space-id', + 'provider-address-id', + 'provider-vlan-id', + 'vlan-tag', + 'interface-name', + 'parent-interface-name', + 'interface-type', + 'disabled'], + 'type': 'object'}, + 'NotifyWatchResult': {'additionalProperties': False, + 'properties': {'NotifyWatcherId': {'type': 'string'}, + 'error': {'$ref': '#/definitions/Error'}}, + 'required': ['NotifyWatcherId'], + 'type': 'object'}, + 'Number': {'additionalProperties': False, + 'properties': {'Build': {'type': 'integer'}, + 'Major': {'type': 'integer'}, + 'Minor': {'type': 'integer'}, + 'Patch': {'type': 'integer'}, + 'Tag': {'type': 'string'}}, + 'required': ['Major', + 'Minor', + 'Tag', + 'Patch', + 'Build'], + 'type': 'object'}, + 'ProvisioningInfo': {'additionalProperties': False, + 'properties': {'constraints': {'$ref': '#/definitions/Value'}, + 'controller-config': {'patternProperties': {'.*': {'additionalProperties': True, + 'type': 'object'}}, + 'type': 'object'}, + 'endpoint-bindings': {'patternProperties': {'.*': {'type': 'string'}}, + 'type': 'object'}, + 'image-metadata': {'items': {'$ref': '#/definitions/CloudImageMetadata'}, + 'type': 'array'}, + 'jobs': {'items': {'type': 'string'}, + 'type': 'array'}, + 'placement': {'type': 'string'}, + 'series': {'type': 'string'}, + 'subnets-to-zones': {'patternProperties': {'.*': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'type': 'object'}, + 'tags': {'patternProperties': {'.*': {'type': 'string'}}, + 'type': 'object'}, + 'volumes': {'items': {'$ref': '#/definitions/VolumeParams'}, + 'type': 'array'}}, + 'required': ['constraints', + 'series', + 'placement', + 'jobs'], + 'type': 'object'}, + 'ProvisioningInfoResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'$ref': '#/definitions/ProvisioningInfo'}}, + 'required': ['result'], + 'type': 'object'}, + 'ProvisioningInfoResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/ProvisioningInfoResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'SetStatus': {'additionalProperties': False, + 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'}, + 'type': 'array'}}, + 'required': ['entities'], + 'type': 'object'}, + 'Settings': {'additionalProperties': False, + 'properties': {'Ftp': {'type': 'string'}, + 'Http': {'type': 'string'}, + 'Https': {'type': 'string'}, + 'NoProxy': {'type': 'string'}}, + 'required': ['Http', 'Https', 'Ftp', 'NoProxy'], + 'type': 'object'}, + 'StatusResult': {'additionalProperties': False, + 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True, + 'type': 'object'}}, + 'type': 'object'}, + 'error': {'$ref': '#/definitions/Error'}, + 'id': {'type': 'string'}, + 'info': {'type': 'string'}, + 'life': {'type': 'string'}, + 'since': {'format': 'date-time', + 'type': 'string'}, + 'status': {'type': 'string'}}, + 'required': ['id', + 'life', + 'status', + 'info', + 'data', + 'since'], + 'type': 'object'}, + 'StatusResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/StatusResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'StringResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'type': 'string'}}, + 'required': ['result'], + 'type': 'object'}, + 'StringResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'StringsResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'type': 'object'}, + 'StringsWatchResult': {'additionalProperties': False, + 'properties': {'changes': {'items': {'type': 'string'}, + 'type': 'array'}, + 'error': {'$ref': '#/definitions/Error'}, + 'watcher-id': {'type': 'string'}}, + 'required': ['watcher-id'], + 'type': 'object'}, + 'StringsWatchResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'Tools': {'additionalProperties': False, + 'properties': {'sha256': {'type': 'string'}, + 'size': {'type': 'integer'}, + 'url': {'type': 'string'}, + 'version': {'$ref': '#/definitions/Binary'}}, + 'required': ['version', 'url', 'size'], + 'type': 'object'}, + 'ToolsResult': {'additionalProperties': False, + 'properties': {'disable-ssl-hostname-verification': {'type': 'boolean'}, + 'error': {'$ref': '#/definitions/Error'}, + 'tools': {'items': {'$ref': '#/definitions/Tools'}, + 'type': 'array'}}, + 'required': ['tools', + 'disable-ssl-hostname-verification'], + 'type': 'object'}, + 'ToolsResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/ToolsResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'UpdateBehavior': {'additionalProperties': False, + 'properties': {'enable-os-refresh-update': {'type': 'boolean'}, + 'enable-os-upgrade': {'type': 'boolean'}}, + 'required': ['enable-os-refresh-update', + 'enable-os-upgrade'], + 'type': 'object'}, + 'Value': {'additionalProperties': False, + 'properties': {'arch': {'type': 'string'}, + 'container': {'type': 'string'}, + 'cpu-cores': {'type': 'integer'}, + 'cpu-power': {'type': 'integer'}, + 'instance-type': {'type': 'string'}, + 'mem': {'type': 'integer'}, + 'root-disk': {'type': 'integer'}, + 'spaces': {'items': {'type': 'string'}, + 'type': 'array'}, + 'tags': {'items': {'type': 'string'}, + 'type': 'array'}, + 'virt-type': {'type': 'string'}}, + 'type': 'object'}, + 'Volume': {'additionalProperties': False, + 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'}, + 'volume-tag': {'type': 'string'}}, + 'required': ['volume-tag', 'info'], + 'type': 'object'}, + 'VolumeAttachmentInfo': {'additionalProperties': False, + 'properties': {'bus-address': {'type': 'string'}, + 'device-link': {'type': 'string'}, + 'device-name': {'type': 'string'}, + 'read-only': {'type': 'boolean'}}, + 'type': 'object'}, + 'VolumeAttachmentParams': {'additionalProperties': False, + 'properties': {'instance-id': {'type': 'string'}, + 'machine-tag': {'type': 'string'}, + 'provider': {'type': 'string'}, + 'read-only': {'type': 'boolean'}, + 'volume-id': {'type': 'string'}, + 'volume-tag': {'type': 'string'}}, + 'required': ['volume-tag', + 'machine-tag', + 'provider'], + 'type': 'object'}, + 'VolumeInfo': {'additionalProperties': False, + 'properties': {'hardware-id': {'type': 'string'}, + 'persistent': {'type': 'boolean'}, + 'size': {'type': 'integer'}, + 'volume-id': {'type': 'string'}}, + 'required': ['volume-id', 'size', 'persistent'], + 'type': 'object'}, + 'VolumeParams': {'additionalProperties': False, + 'properties': {'attachment': {'$ref': '#/definitions/VolumeAttachmentParams'}, + 'attributes': {'patternProperties': {'.*': {'additionalProperties': True, + 'type': 'object'}}, + 'type': 'object'}, + 'provider': {'type': 'string'}, + 'size': {'type': 'integer'}, + 'tags': {'patternProperties': {'.*': {'type': 'string'}}, + 'type': 'object'}, + 'volume-tag': {'type': 'string'}}, + 'required': ['volume-tag', + 'size', + 'provider'], + 'type': 'object'}, + 'WatchContainer': {'additionalProperties': False, + 'properties': {'container-type': {'type': 'string'}, + 'machine-tag': {'type': 'string'}}, + 'required': ['machine-tag', + 'container-type'], + 'type': 'object'}, + 'WatchContainers': {'additionalProperties': False, + 'properties': {'params': {'items': {'$ref': '#/definitions/WatchContainer'}, + 'type': 'array'}}, + 'required': ['params'], + 'type': 'object'}}, + 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}}, + 'type': 'object'}, + 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}}, + 'type': 'object'}, + 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}}, + 'type': 'object'}, + 'Constraints': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/ConstraintsResults'}}, + 'type': 'object'}, + 'ContainerConfig': {'properties': {'Result': {'$ref': '#/definitions/ContainerConfig'}}, + 'type': 'object'}, + 'ContainerManagerConfig': {'properties': {'Params': {'$ref': '#/definitions/ContainerManagerConfigParams'}, + 'Result': {'$ref': '#/definitions/ContainerManagerConfig'}}, + 'type': 'object'}, + 'ControllerConfig': {'properties': {'Result': {'$ref': '#/definitions/ControllerConfigResult'}}, + 'type': 'object'}, + 'DistributionGroup': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/DistributionGroupResults'}}, + 'type': 'object'}, + 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'FindTools': {'properties': {'Params': {'$ref': '#/definitions/FindToolsParams'}, + 'Result': {'$ref': '#/definitions/FindToolsResult'}}, + 'type': 'object'}, + 'GetContainerInterfaceInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/MachineNetworkConfigResults'}}, + 'type': 'object'}, + 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/StringResults'}}, + 'type': 'object'}, + 'InstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/StatusResults'}}, + 'type': 'object'}, + 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/LifeResults'}}, + 'type': 'object'}, + 'MachinesWithTransientErrors': {'properties': {'Result': {'$ref': '#/definitions/StatusResults'}}, + 'type': 'object'}, + 'MarkMachinesForRemoval': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}}, + 'type': 'object'}, + 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}}, + 'type': 'object'}, + 'PrepareContainerInterfaceInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/MachineNetworkConfigResults'}}, + 'type': 'object'}, + 'ProvisioningInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/ProvisioningInfoResults'}}, + 'type': 'object'}, + 'ReleaseContainerAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'Series': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/StringResults'}}, + 'type': 'object'}, + 'SetInstanceInfo': {'properties': {'Params': {'$ref': '#/definitions/InstancesInfo'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'SetInstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'SetSupportedContainers': {'properties': {'Params': {'$ref': '#/definitions/MachineContainersParams'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'StateAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}}, + 'type': 'object'}, + 'Status': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/StatusResults'}}, + 'type': 'object'}, + 'Tools': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/ToolsResults'}}, + 'type': 'object'}, + 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, + 'type': 'object'}, + 'WatchAllContainers': {'properties': {'Params': {'$ref': '#/definitions/WatchContainers'}, + 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, + 'type': 'object'}, + 'WatchContainers': {'properties': {'Params': {'$ref': '#/definitions/WatchContainers'}, + 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, + 'type': 'object'}, + 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, + 'type': 'object'}, + 'WatchMachineErrorRetry': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, + 'type': 'object'}, + 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}}, + 'type': 'object'}}, + 'type': 'object'} + @ReturnMapping(StringsResult) - async def StateAddresses(self): + async def APIAddresses(self): ''' - Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[str]] + Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[str]] ''' # map input types to rpc msg params = dict() - msg = dict(Type='Provisioner', Request='StateAddresses', Version=2, Params=params) + msg = dict(type='Provisioner', request='APIAddresses', version=3, params=params) reply = await self.rpc(msg) return reply - @ReturnMapping(StatusResults) - async def Status(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~StatusResult] + @ReturnMapping(APIHostPortsResult) + async def APIHostPorts(self): ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Provisioner', Request='Status', Version=2, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - @ReturnMapping(ToolsResults) - async def Tools(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ToolsResult] + Returns -> typing.Sequence<+T_co>[~HostPort]<~HostPort> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Provisioner', Request='Tools', Version=2, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - + msg = dict(type='Provisioner', request='APIHostPorts', version=3, params=params) - - @ReturnMapping(ErrorResults) - async def UpdateStatus(self, entities): - ''' - entities : typing.Sequence[~EntityStatusArgs] - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Provisioner', Request='UpdateStatus', Version=2, Params=params) - params['Entities'] = entities reply = await self.rpc(msg) return reply - @ReturnMapping(NotifyWatchResult) - async def WatchAPIHostPorts(self): + @ReturnMapping(BytesResult) + async def CACert(self): ''' - Returns -> typing.Union[_ForwardRef('Error'), str] + Returns -> typing.Sequence<+T_co>[int] ''' # map input types to rpc msg params = dict() - msg = dict(Type='Provisioner', Request='WatchAPIHostPorts', Version=2, Params=params) + msg = dict(type='Provisioner', request='CACert', version=3, params=params) reply = await self.rpc(msg) return reply - @ReturnMapping(StringsWatchResults) - async def WatchAllContainers(self, params): + @ReturnMapping(ConstraintsResults) + async def Constraints(self, entities): ''' - params : typing.Sequence[~WatchContainer] - Returns -> typing.Sequence[~StringsWatchResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~ConstraintsResult]<~ConstraintsResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Provisioner', Request='WatchAllContainers', Version=2, Params=params) - params['Params'] = params + msg = dict(type='Provisioner', request='Constraints', version=3, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply - @ReturnMapping(StringsWatchResults) - async def WatchContainers(self, params): + @ReturnMapping(ContainerConfig) + async def ContainerConfig(self): ''' - params : typing.Sequence[~WatchContainer] - Returns -> typing.Sequence[~StringsWatchResult] + + Returns -> typing.Union[_ForwardRef('UpdateBehavior'), str, _ForwardRef('Settings'), _ForwardRef('Settings'), bool] ''' # map input types to rpc msg params = dict() - msg = dict(Type='Provisioner', Request='WatchContainers', Version=2, Params=params) - params['Params'] = params + msg = dict(type='Provisioner', request='ContainerConfig', version=3, params=params) + reply = await self.rpc(msg) return reply - @ReturnMapping(NotifyWatchResult) - async def WatchForModelConfigChanges(self): + @ReturnMapping(ContainerManagerConfig) + async def ContainerManagerConfig(self, type_): ''' - - Returns -> typing.Union[_ForwardRef('Error'), str] + type_ : str + Returns -> typing.Mapping<~KT, +VT_co>[str, str] ''' # map input types to rpc msg params = dict() - msg = dict(Type='Provisioner', Request='WatchForModelConfigChanges', Version=2, Params=params) - + msg = dict(type='Provisioner', request='ContainerManagerConfig', version=3, params=params) + params['type'] = type_ reply = await self.rpc(msg) return reply - @ReturnMapping(NotifyWatchResult) - async def WatchMachineErrorRetry(self): + @ReturnMapping(ControllerConfigResult) + async def ControllerConfig(self): ''' - Returns -> typing.Union[_ForwardRef('Error'), str] + Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any] ''' # map input types to rpc msg params = dict() - msg = dict(Type='Provisioner', Request='WatchMachineErrorRetry', Version=2, Params=params) + msg = dict(type='Provisioner', request='ControllerConfig', version=3, params=params) reply = await self.rpc(msg) return reply - @ReturnMapping(StringsWatchResult) - async def WatchModelMachines(self): + @ReturnMapping(DistributionGroupResults) + async def DistributionGroup(self, entities): ''' - - Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~DistributionGroupResult]<~DistributionGroupResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Provisioner', Request='WatchModelMachines', Version=2, Params=params) - + msg = dict(type='Provisioner', request='DistributionGroup', version=3, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply -class ProxyUpdater(Type): - name = 'ProxyUpdater' - version = 1 - schema = {'definitions': {'Entities': {'additionalProperties': False, - 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'}, - 'type': 'array'}}, - 'required': ['Entities'], - 'type': 'object'}, - 'Entity': {'additionalProperties': False, - 'properties': {'Tag': {'type': 'string'}}, - 'required': ['Tag'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'Code': {'type': 'string'}, - 'Info': {'$ref': '#/definitions/ErrorInfo'}, - 'Message': {'type': 'string'}}, - 'required': ['Message', 'Code'], - 'type': 'object'}, - 'ErrorInfo': {'additionalProperties': False, - 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'}, - 'MacaroonPath': {'type': 'string'}}, - 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, - 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'}, - 'type': 'array'}, - 'data': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'id': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'sig': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['data', - 'location', - 'id', - 'caveats', - 'sig'], - 'type': 'object'}, - 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'NotifyWatcherId': {'type': 'string'}}, - 'required': ['NotifyWatcherId', 'Error'], - 'type': 'object'}, - 'NotifyWatchResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'ProxyConfig': {'additionalProperties': False, - 'properties': {'FTP': {'type': 'string'}, - 'HTTP': {'type': 'string'}, - 'HTTPS': {'type': 'string'}, - 'NoProxy': {'type': 'string'}}, - 'required': ['HTTP', - 'HTTPS', - 'FTP', - 'NoProxy'], - 'type': 'object'}, - 'ProxyConfigResult': {'additionalProperties': False, - 'properties': {'APTProxySettings': {'$ref': '#/definitions/ProxyConfig'}, - 'Error': {'$ref': '#/definitions/Error'}, - 'ProxySettings': {'$ref': '#/definitions/ProxyConfig'}}, - 'required': ['ProxySettings', - 'APTProxySettings'], - 'type': 'object'}, - 'ProxyConfigResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/ProxyConfigResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'caveat': {'additionalProperties': False, - 'properties': {'caveatId': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'verificationId': {'$ref': '#/definitions/packet'}}, - 'required': ['location', - 'caveatId', - 'verificationId'], - 'type': 'object'}, - 'packet': {'additionalProperties': False, - 'properties': {'headerLen': {'type': 'integer'}, - 'start': {'type': 'integer'}, - 'totalLen': {'type': 'integer'}}, - 'required': ['start', 'totalLen', 'headerLen'], - 'type': 'object'}}, - 'properties': {'ProxyConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ProxyConfigResults'}}, - 'type': 'object'}, - 'WatchForProxyConfigAndAPIHostPortChanges': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - @ReturnMapping(ProxyConfigResults) - async def ProxyConfig(self, entities): + @ReturnMapping(ErrorResults) + async def EnsureDead(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ProxyConfigResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='ProxyUpdater', Request='ProxyConfig', Version=1, Params=params) - params['Entities'] = entities + msg = dict(type='Provisioner', request='EnsureDead', version=3, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply - @ReturnMapping(NotifyWatchResults) - async def WatchForProxyConfigAndAPIHostPortChanges(self, entities): + @ReturnMapping(FindToolsResult) + async def FindTools(self, arch, major, minor, number, series): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~NotifyWatchResult] + arch : str + major : int + minor : int + number : Number + series : str + Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[~Tools]<~Tools>] ''' # map input types to rpc msg params = dict() - msg = dict(Type='ProxyUpdater', Request='WatchForProxyConfigAndAPIHostPortChanges', Version=1, Params=params) - params['Entities'] = entities + msg = dict(type='Provisioner', request='FindTools', version=3, params=params) + params['arch'] = arch + params['major'] = major + params['minor'] = minor + params['number'] = number + params['series'] = series reply = await self.rpc(msg) return reply -class Reboot(Type): - name = 'Reboot' - version = 2 - schema = {'definitions': {'Entities': {'additionalProperties': False, - 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'}, - 'type': 'array'}}, - 'required': ['Entities'], - 'type': 'object'}, - 'Entity': {'additionalProperties': False, - 'properties': {'Tag': {'type': 'string'}}, - 'required': ['Tag'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'Code': {'type': 'string'}, - 'Info': {'$ref': '#/definitions/ErrorInfo'}, - 'Message': {'type': 'string'}}, - 'required': ['Message', 'Code'], - 'type': 'object'}, - 'ErrorInfo': {'additionalProperties': False, - 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'}, - 'MacaroonPath': {'type': 'string'}}, - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}}, - 'required': ['Error'], - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, - 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'}, - 'type': 'array'}, - 'data': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'id': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'sig': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['data', - 'location', - 'id', - 'caveats', - 'sig'], - 'type': 'object'}, - 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'NotifyWatcherId': {'type': 'string'}}, - 'required': ['NotifyWatcherId', 'Error'], - 'type': 'object'}, - 'RebootActionResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'type': 'string'}}, - 'type': 'object'}, - 'RebootActionResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/RebootActionResult'}, - 'type': 'array'}}, - 'type': 'object'}, - 'caveat': {'additionalProperties': False, - 'properties': {'caveatId': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'verificationId': {'$ref': '#/definitions/packet'}}, - 'required': ['location', - 'caveatId', - 'verificationId'], - 'type': 'object'}, - 'packet': {'additionalProperties': False, - 'properties': {'headerLen': {'type': 'integer'}, - 'start': {'type': 'integer'}, - 'totalLen': {'type': 'integer'}}, - 'required': ['start', 'totalLen', 'headerLen'], - 'type': 'object'}}, - 'properties': {'ClearReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'GetRebootAction': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/RebootActionResults'}}, - 'type': 'object'}, - 'RequestReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'WatchForRebootEvent': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, - 'type': 'object'}}, - 'type': 'object'} - - @ReturnMapping(ErrorResults) - async def ClearReboot(self, entities): + @ReturnMapping(MachineNetworkConfigResults) + async def GetContainerInterfaceInfo(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ErrorResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~MachineNetworkConfigResult]<~MachineNetworkConfigResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Reboot', Request='ClearReboot', Version=2, Params=params) - params['Entities'] = entities + msg = dict(type='Provisioner', request='GetContainerInterfaceInfo', version=3, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply - @ReturnMapping(RebootActionResults) - async def GetRebootAction(self, entities): + @ReturnMapping(StringResults) + async def InstanceId(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~RebootActionResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Reboot', Request='GetRebootAction', Version=2, Params=params) - params['Entities'] = entities + msg = dict(type='Provisioner', request='InstanceId', version=3, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply - @ReturnMapping(ErrorResults) - async def RequestReboot(self, entities): + @ReturnMapping(StatusResults) + async def InstanceStatus(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ErrorResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~StatusResult]<~StatusResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Reboot', Request='RequestReboot', Version=2, Params=params) - params['Entities'] = entities + msg = dict(type='Provisioner', request='InstanceStatus', version=3, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply - @ReturnMapping(NotifyWatchResult) - async def WatchForRebootEvent(self): + @ReturnMapping(LifeResults) + async def Life(self, entities): ''' - - Returns -> typing.Union[_ForwardRef('Error'), str] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Reboot', Request='WatchForRebootEvent', Version=2, Params=params) - + msg = dict(type='Provisioner', request='Life', version=3, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply -class RelationUnitsWatcher(Type): - name = 'RelationUnitsWatcher' - version = 1 - schema = {'definitions': {'Error': {'additionalProperties': False, - 'properties': {'Code': {'type': 'string'}, - 'Info': {'$ref': '#/definitions/ErrorInfo'}, - 'Message': {'type': 'string'}}, - 'required': ['Message', 'Code'], - 'type': 'object'}, - 'ErrorInfo': {'additionalProperties': False, - 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'}, - 'MacaroonPath': {'type': 'string'}}, - 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, - 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'}, - 'type': 'array'}, - 'data': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'id': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'sig': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['data', - 'location', - 'id', - 'caveats', - 'sig'], - 'type': 'object'}, - 'RelationUnitsChange': {'additionalProperties': False, - 'properties': {'Changed': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitSettings'}}, - 'type': 'object'}, - 'Departed': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['Changed', 'Departed'], - 'type': 'object'}, - 'RelationUnitsWatchResult': {'additionalProperties': False, - 'properties': {'Changes': {'$ref': '#/definitions/RelationUnitsChange'}, - 'Error': {'$ref': '#/definitions/Error'}, - 'RelationUnitsWatcherId': {'type': 'string'}}, - 'required': ['RelationUnitsWatcherId', - 'Changes', - 'Error'], - 'type': 'object'}, - 'UnitSettings': {'additionalProperties': False, - 'properties': {'Version': {'type': 'integer'}}, - 'required': ['Version'], - 'type': 'object'}, - 'caveat': {'additionalProperties': False, - 'properties': {'caveatId': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'verificationId': {'$ref': '#/definitions/packet'}}, - 'required': ['location', - 'caveatId', - 'verificationId'], - 'type': 'object'}, - 'packet': {'additionalProperties': False, - 'properties': {'headerLen': {'type': 'integer'}, - 'start': {'type': 'integer'}, - 'totalLen': {'type': 'integer'}}, - 'required': ['start', 'totalLen', 'headerLen'], - 'type': 'object'}}, - 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/RelationUnitsWatchResult'}}, - 'type': 'object'}, - 'Stop': {'type': 'object'}}, - 'type': 'object'} - - @ReturnMapping(RelationUnitsWatchResult) - async def Next(self): + @ReturnMapping(StatusResults) + async def MachinesWithTransientErrors(self): ''' - Returns -> typing.Union[_ForwardRef('RelationUnitsChange'), _ForwardRef('Error'), str] + Returns -> typing.Sequence<+T_co>[~StatusResult]<~StatusResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='RelationUnitsWatcher', Request='Next', Version=1, Params=params) + msg = dict(type='Provisioner', request='MachinesWithTransientErrors', version=3, params=params) reply = await self.rpc(msg) return reply - - @ReturnMapping(None) - async def Stop(self): - ''' - - Returns -> None + + @ReturnMapping(ErrorResults) + async def MarkMachinesForRemoval(self, entities): + ''' + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='RelationUnitsWatcher', Request='Stop', Version=1, Params=params) - + msg = dict(type='Provisioner', request='MarkMachinesForRemoval', version=3, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply -class Resumer(Type): - name = 'Resumer' - version = 2 - schema = {'properties': {'ResumeTransactions': {'type': 'object'}}, 'type': 'object'} - - @ReturnMapping(None) - async def ResumeTransactions(self): + @ReturnMapping(ModelConfigResult) + async def ModelConfig(self): ''' - Returns -> None + Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any] ''' # map input types to rpc msg params = dict() - msg = dict(Type='Resumer', Request='ResumeTransactions', Version=2, Params=params) + msg = dict(type='Provisioner', request='ModelConfig', version=3, params=params) reply = await self.rpc(msg) return reply -class RetryStrategy(Type): - name = 'RetryStrategy' - version = 1 - schema = {'definitions': {'Entities': {'additionalProperties': False, - 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'}, - 'type': 'array'}}, - 'required': ['Entities'], - 'type': 'object'}, - 'Entity': {'additionalProperties': False, - 'properties': {'Tag': {'type': 'string'}}, - 'required': ['Tag'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'Code': {'type': 'string'}, - 'Info': {'$ref': '#/definitions/ErrorInfo'}, - 'Message': {'type': 'string'}}, - 'required': ['Message', 'Code'], - 'type': 'object'}, - 'ErrorInfo': {'additionalProperties': False, - 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'}, - 'MacaroonPath': {'type': 'string'}}, - 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, - 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'}, - 'type': 'array'}, - 'data': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'id': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'sig': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['data', - 'location', - 'id', - 'caveats', - 'sig'], - 'type': 'object'}, - 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'NotifyWatcherId': {'type': 'string'}}, - 'required': ['NotifyWatcherId', 'Error'], - 'type': 'object'}, - 'NotifyWatchResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'RetryStrategy': {'additionalProperties': False, - 'properties': {'JitterRetryTime': {'type': 'boolean'}, - 'MaxRetryTime': {'type': 'integer'}, - 'MinRetryTime': {'type': 'integer'}, - 'RetryTimeFactor': {'type': 'integer'}, - 'ShouldRetry': {'type': 'boolean'}}, - 'required': ['ShouldRetry', - 'MinRetryTime', - 'MaxRetryTime', - 'JitterRetryTime', - 'RetryTimeFactor'], - 'type': 'object'}, - 'RetryStrategyResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Result': {'$ref': '#/definitions/RetryStrategy'}}, - 'required': ['Error', 'Result'], - 'type': 'object'}, - 'RetryStrategyResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/RetryStrategyResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'caveat': {'additionalProperties': False, - 'properties': {'caveatId': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'verificationId': {'$ref': '#/definitions/packet'}}, - 'required': ['location', - 'caveatId', - 'verificationId'], - 'type': 'object'}, - 'packet': {'additionalProperties': False, - 'properties': {'headerLen': {'type': 'integer'}, - 'start': {'type': 'integer'}, - 'totalLen': {'type': 'integer'}}, - 'required': ['start', 'totalLen', 'headerLen'], - 'type': 'object'}}, - 'properties': {'RetryStrategy': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/RetryStrategyResults'}}, - 'type': 'object'}, - 'WatchRetryStrategy': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - @ReturnMapping(RetryStrategyResults) - async def RetryStrategy(self, entities): + @ReturnMapping(StringResult) + async def ModelUUID(self): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~RetryStrategyResult] + + Returns -> typing.Union[_ForwardRef('Error'), str] ''' # map input types to rpc msg params = dict() - msg = dict(Type='RetryStrategy', Request='RetryStrategy', Version=1, Params=params) - params['Entities'] = entities + msg = dict(type='Provisioner', request='ModelUUID', version=3, params=params) + reply = await self.rpc(msg) return reply - @ReturnMapping(NotifyWatchResults) - async def WatchRetryStrategy(self, entities): + @ReturnMapping(MachineNetworkConfigResults) + async def PrepareContainerInterfaceInfo(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~NotifyWatchResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~MachineNetworkConfigResult]<~MachineNetworkConfigResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='RetryStrategy', Request='WatchRetryStrategy', Version=1, Params=params) - params['Entities'] = entities + msg = dict(type='Provisioner', request='PrepareContainerInterfaceInfo', version=3, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply -class SSHClient(Type): - name = 'SSHClient' - version = 1 - schema = {'definitions': {'Entities': {'additionalProperties': False, - 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'}, - 'type': 'array'}}, - 'required': ['Entities'], - 'type': 'object'}, - 'Entity': {'additionalProperties': False, - 'properties': {'Tag': {'type': 'string'}}, - 'required': ['Tag'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'Code': {'type': 'string'}, - 'Info': {'$ref': '#/definitions/ErrorInfo'}, - 'Message': {'type': 'string'}}, - 'required': ['Message', 'Code'], - 'type': 'object'}, - 'ErrorInfo': {'additionalProperties': False, - 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'}, - 'MacaroonPath': {'type': 'string'}}, - 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, - 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'}, - 'type': 'array'}, - 'data': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'id': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'sig': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['data', - 'location', - 'id', - 'caveats', - 'sig'], - 'type': 'object'}, - 'SSHAddressResult': {'additionalProperties': False, - 'properties': {'address': {'type': 'string'}, - 'error': {'$ref': '#/definitions/Error'}}, - 'type': 'object'}, - 'SSHAddressResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/SSHAddressResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'SSHProxyResult': {'additionalProperties': False, - 'properties': {'use-proxy': {'type': 'boolean'}}, - 'required': ['use-proxy'], - 'type': 'object'}, - 'SSHPublicKeysResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'public-keys': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'type': 'object'}, - 'SSHPublicKeysResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/SSHPublicKeysResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'caveat': {'additionalProperties': False, - 'properties': {'caveatId': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'verificationId': {'$ref': '#/definitions/packet'}}, - 'required': ['location', - 'caveatId', - 'verificationId'], - 'type': 'object'}, - 'packet': {'additionalProperties': False, - 'properties': {'headerLen': {'type': 'integer'}, - 'start': {'type': 'integer'}, - 'totalLen': {'type': 'integer'}}, - 'required': ['start', 'totalLen', 'headerLen'], - 'type': 'object'}}, - 'properties': {'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/SSHAddressResults'}}, - 'type': 'object'}, - 'Proxy': {'properties': {'Result': {'$ref': '#/definitions/SSHProxyResult'}}, - 'type': 'object'}, - 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/SSHAddressResults'}}, - 'type': 'object'}, - 'PublicKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/SSHPublicKeysResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - @ReturnMapping(SSHAddressResults) - async def PrivateAddress(self, entities): + @ReturnMapping(ProvisioningInfoResults) + async def ProvisioningInfo(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~SSHAddressResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~ProvisioningInfoResult]<~ProvisioningInfoResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='SSHClient', Request='PrivateAddress', Version=1, Params=params) - params['Entities'] = entities + msg = dict(type='Provisioner', request='ProvisioningInfo', version=3, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply - @ReturnMapping(SSHProxyResult) - async def Proxy(self): + @ReturnMapping(ErrorResults) + async def ReleaseContainerAddresses(self, entities): ''' - - Returns -> bool + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='SSHClient', Request='Proxy', Version=1, Params=params) - + msg = dict(type='Provisioner', request='ReleaseContainerAddresses', version=3, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply - @ReturnMapping(SSHAddressResults) - async def PublicAddress(self, entities): + @ReturnMapping(ErrorResults) + async def Remove(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~SSHAddressResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='SSHClient', Request='PublicAddress', Version=1, Params=params) - params['Entities'] = entities + msg = dict(type='Provisioner', request='Remove', version=3, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply - @ReturnMapping(SSHPublicKeysResults) - async def PublicKeys(self, entities): + @ReturnMapping(StringResults) + async def Series(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~SSHPublicKeysResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='SSHClient', Request='PublicKeys', Version=1, Params=params) - params['Entities'] = entities + msg = dict(type='Provisioner', request='Series', version=3, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply -class Service(Type): - name = 'Service' - version = 3 - schema = {'definitions': {'AddRelation': {'additionalProperties': False, - 'properties': {'Endpoints': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['Endpoints'], - 'type': 'object'}, - 'AddRelationResults': {'additionalProperties': False, - 'properties': {'Endpoints': {'patternProperties': {'.*': {'$ref': '#/definitions/Relation'}}, - 'type': 'object'}}, - 'required': ['Endpoints'], - 'type': 'object'}, - 'AddServiceUnits': {'additionalProperties': False, - 'properties': {'NumUnits': {'type': 'integer'}, - 'Placement': {'items': {'$ref': '#/definitions/Placement'}, - 'type': 'array'}, - 'ServiceName': {'type': 'string'}}, - 'required': ['ServiceName', - 'NumUnits', - 'Placement'], - 'type': 'object'}, - 'AddServiceUnitsResults': {'additionalProperties': False, - 'properties': {'Units': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['Units'], - 'type': 'object'}, - 'Constraints': {'additionalProperties': False, - 'properties': {'Count': {'type': 'integer'}, - 'Pool': {'type': 'string'}, - 'Size': {'type': 'integer'}}, - 'required': ['Pool', 'Size', 'Count'], - 'type': 'object'}, - 'DestroyRelation': {'additionalProperties': False, - 'properties': {'Endpoints': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['Endpoints'], - 'type': 'object'}, - 'DestroyServiceUnits': {'additionalProperties': False, - 'properties': {'UnitNames': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['UnitNames'], - 'type': 'object'}, - 'Error': {'additionalProperties': False, - 'properties': {'Code': {'type': 'string'}, - 'Info': {'$ref': '#/definitions/ErrorInfo'}, - 'Message': {'type': 'string'}}, - 'required': ['Message', 'Code'], - 'type': 'object'}, - 'ErrorInfo': {'additionalProperties': False, - 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'}, - 'MacaroonPath': {'type': 'string'}}, - 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}}, - 'required': ['Error'], - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'GetConstraintsResults': {'additionalProperties': False, - 'properties': {'Constraints': {'$ref': '#/definitions/Value'}}, - 'required': ['Constraints'], - 'type': 'object'}, - 'GetServiceConstraints': {'additionalProperties': False, - 'properties': {'ServiceName': {'type': 'string'}}, - 'required': ['ServiceName'], - 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, - 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'}, - 'type': 'array'}, - 'data': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'id': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'sig': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['data', - 'location', - 'id', - 'caveats', - 'sig'], - 'type': 'object'}, - 'Placement': {'additionalProperties': False, - 'properties': {'Directive': {'type': 'string'}, - 'Scope': {'type': 'string'}}, - 'required': ['Scope', 'Directive'], - 'type': 'object'}, - 'Relation': {'additionalProperties': False, - 'properties': {'Interface': {'type': 'string'}, - 'Limit': {'type': 'integer'}, - 'Name': {'type': 'string'}, - 'Optional': {'type': 'boolean'}, - 'Role': {'type': 'string'}, - 'Scope': {'type': 'string'}}, - 'required': ['Name', - 'Role', - 'Interface', - 'Optional', - 'Limit', - 'Scope'], - 'type': 'object'}, - 'ServiceCharmRelations': {'additionalProperties': False, - 'properties': {'ServiceName': {'type': 'string'}}, - 'required': ['ServiceName'], - 'type': 'object'}, - 'ServiceCharmRelationsResults': {'additionalProperties': False, - 'properties': {'CharmRelations': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['CharmRelations'], - 'type': 'object'}, - 'ServiceDeploy': {'additionalProperties': False, - 'properties': {'Channel': {'type': 'string'}, - 'CharmUrl': {'type': 'string'}, - 'Config': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'ConfigYAML': {'type': 'string'}, - 'Constraints': {'$ref': '#/definitions/Value'}, - 'EndpointBindings': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'NumUnits': {'type': 'integer'}, - 'Placement': {'items': {'$ref': '#/definitions/Placement'}, - 'type': 'array'}, - 'Resources': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'Series': {'type': 'string'}, - 'ServiceName': {'type': 'string'}, - 'Storage': {'patternProperties': {'.*': {'$ref': '#/definitions/Constraints'}}, - 'type': 'object'}}, - 'required': ['ServiceName', - 'Series', - 'CharmUrl', - 'Channel', - 'NumUnits', - 'Config', - 'ConfigYAML', - 'Constraints', - 'Placement', - 'Storage', - 'EndpointBindings', - 'Resources'], - 'type': 'object'}, - 'ServiceDestroy': {'additionalProperties': False, - 'properties': {'ServiceName': {'type': 'string'}}, - 'required': ['ServiceName'], - 'type': 'object'}, - 'ServiceExpose': {'additionalProperties': False, - 'properties': {'ServiceName': {'type': 'string'}}, - 'required': ['ServiceName'], - 'type': 'object'}, - 'ServiceGet': {'additionalProperties': False, - 'properties': {'ServiceName': {'type': 'string'}}, - 'required': ['ServiceName'], - 'type': 'object'}, - 'ServiceGetResults': {'additionalProperties': False, - 'properties': {'Charm': {'type': 'string'}, - 'Config': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'Constraints': {'$ref': '#/definitions/Value'}, - 'Service': {'type': 'string'}}, - 'required': ['Service', - 'Charm', - 'Config', - 'Constraints'], - 'type': 'object'}, - 'ServiceMetricCredential': {'additionalProperties': False, - 'properties': {'MetricCredentials': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'ServiceName': {'type': 'string'}}, - 'required': ['ServiceName', - 'MetricCredentials'], - 'type': 'object'}, - 'ServiceMetricCredentials': {'additionalProperties': False, - 'properties': {'Creds': {'items': {'$ref': '#/definitions/ServiceMetricCredential'}, - 'type': 'array'}}, - 'required': ['Creds'], - 'type': 'object'}, - 'ServiceSet': {'additionalProperties': False, - 'properties': {'Options': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'ServiceName': {'type': 'string'}}, - 'required': ['ServiceName', 'Options'], - 'type': 'object'}, - 'ServiceSetCharm': {'additionalProperties': False, - 'properties': {'charmurl': {'type': 'string'}, - 'cs-channel': {'type': 'string'}, - 'forceseries': {'type': 'boolean'}, - 'forceunits': {'type': 'boolean'}, - 'resourceids': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'servicename': {'type': 'string'}}, - 'required': ['servicename', - 'charmurl', - 'cs-channel', - 'forceunits', - 'forceseries', - 'resourceids'], - 'type': 'object'}, - 'ServiceUnexpose': {'additionalProperties': False, - 'properties': {'ServiceName': {'type': 'string'}}, - 'required': ['ServiceName'], - 'type': 'object'}, - 'ServiceUnset': {'additionalProperties': False, - 'properties': {'Options': {'items': {'type': 'string'}, - 'type': 'array'}, - 'ServiceName': {'type': 'string'}}, - 'required': ['ServiceName', 'Options'], - 'type': 'object'}, - 'ServiceUpdate': {'additionalProperties': False, - 'properties': {'CharmUrl': {'type': 'string'}, - 'Constraints': {'$ref': '#/definitions/Value'}, - 'ForceCharmUrl': {'type': 'boolean'}, - 'ForceSeries': {'type': 'boolean'}, - 'MinUnits': {'type': 'integer'}, - 'ServiceName': {'type': 'string'}, - 'SettingsStrings': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'SettingsYAML': {'type': 'string'}}, - 'required': ['ServiceName', - 'CharmUrl', - 'ForceCharmUrl', - 'ForceSeries', - 'MinUnits', - 'SettingsStrings', - 'SettingsYAML', - 'Constraints'], - 'type': 'object'}, - 'ServicesDeploy': {'additionalProperties': False, - 'properties': {'Services': {'items': {'$ref': '#/definitions/ServiceDeploy'}, - 'type': 'array'}}, - 'required': ['Services'], - 'type': 'object'}, - 'SetConstraints': {'additionalProperties': False, - 'properties': {'Constraints': {'$ref': '#/definitions/Value'}, - 'ServiceName': {'type': 'string'}}, - 'required': ['ServiceName', 'Constraints'], - 'type': 'object'}, - 'StringResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Result': {'type': 'string'}}, - 'required': ['Error', 'Result'], - 'type': 'object'}, - 'Value': {'additionalProperties': False, - 'properties': {'arch': {'type': 'string'}, - 'container': {'type': 'string'}, - 'cpu-cores': {'type': 'integer'}, - 'cpu-power': {'type': 'integer'}, - 'instance-type': {'type': 'string'}, - 'mem': {'type': 'integer'}, - 'root-disk': {'type': 'integer'}, - 'spaces': {'items': {'type': 'string'}, - 'type': 'array'}, - 'tags': {'items': {'type': 'string'}, - 'type': 'array'}, - 'virt-type': {'type': 'string'}}, - 'type': 'object'}, - 'caveat': {'additionalProperties': False, - 'properties': {'caveatId': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'verificationId': {'$ref': '#/definitions/packet'}}, - 'required': ['location', - 'caveatId', - 'verificationId'], - 'type': 'object'}, - 'packet': {'additionalProperties': False, - 'properties': {'headerLen': {'type': 'integer'}, - 'start': {'type': 'integer'}, - 'totalLen': {'type': 'integer'}}, - 'required': ['start', 'totalLen', 'headerLen'], - 'type': 'object'}}, - 'properties': {'AddRelation': {'properties': {'Params': {'$ref': '#/definitions/AddRelation'}, - 'Result': {'$ref': '#/definitions/AddRelationResults'}}, - 'type': 'object'}, - 'AddUnits': {'properties': {'Params': {'$ref': '#/definitions/AddServiceUnits'}, - 'Result': {'$ref': '#/definitions/AddServiceUnitsResults'}}, - 'type': 'object'}, - 'CharmRelations': {'properties': {'Params': {'$ref': '#/definitions/ServiceCharmRelations'}, - 'Result': {'$ref': '#/definitions/ServiceCharmRelationsResults'}}, - 'type': 'object'}, - 'Deploy': {'properties': {'Params': {'$ref': '#/definitions/ServicesDeploy'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'Destroy': {'properties': {'Params': {'$ref': '#/definitions/ServiceDestroy'}}, - 'type': 'object'}, - 'DestroyRelation': {'properties': {'Params': {'$ref': '#/definitions/DestroyRelation'}}, - 'type': 'object'}, - 'DestroyUnits': {'properties': {'Params': {'$ref': '#/definitions/DestroyServiceUnits'}}, - 'type': 'object'}, - 'Expose': {'properties': {'Params': {'$ref': '#/definitions/ServiceExpose'}}, - 'type': 'object'}, - 'Get': {'properties': {'Params': {'$ref': '#/definitions/ServiceGet'}, - 'Result': {'$ref': '#/definitions/ServiceGetResults'}}, - 'type': 'object'}, - 'GetCharmURL': {'properties': {'Params': {'$ref': '#/definitions/ServiceGet'}, - 'Result': {'$ref': '#/definitions/StringResult'}}, - 'type': 'object'}, - 'GetConstraints': {'properties': {'Params': {'$ref': '#/definitions/GetServiceConstraints'}, - 'Result': {'$ref': '#/definitions/GetConstraintsResults'}}, - 'type': 'object'}, - 'Set': {'properties': {'Params': {'$ref': '#/definitions/ServiceSet'}}, - 'type': 'object'}, - 'SetCharm': {'properties': {'Params': {'$ref': '#/definitions/ServiceSetCharm'}}, - 'type': 'object'}, - 'SetConstraints': {'properties': {'Params': {'$ref': '#/definitions/SetConstraints'}}, - 'type': 'object'}, - 'SetMetricCredentials': {'properties': {'Params': {'$ref': '#/definitions/ServiceMetricCredentials'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'Unexpose': {'properties': {'Params': {'$ref': '#/definitions/ServiceUnexpose'}}, - 'type': 'object'}, - 'Unset': {'properties': {'Params': {'$ref': '#/definitions/ServiceUnset'}}, - 'type': 'object'}, - 'Update': {'properties': {'Params': {'$ref': '#/definitions/ServiceUpdate'}}, - 'type': 'object'}}, - 'type': 'object'} - - @ReturnMapping(AddRelationResults) - async def AddRelation(self, endpoints): + @ReturnMapping(ErrorResults) + async def SetInstanceInfo(self, machines): + ''' + machines : typing.Sequence<+T_co>[~InstanceInfo]<~InstanceInfo> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='Provisioner', request='SetInstanceInfo', version=3, params=params) + params['machines'] = machines + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def SetInstanceStatus(self, entities): ''' - endpoints : typing.Sequence[str] - Returns -> typing.Mapping[str, ~Relation] + entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Service', Request='AddRelation', Version=3, Params=params) - params['Endpoints'] = endpoints + msg = dict(type='Provisioner', request='SetInstanceStatus', version=3, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply - @ReturnMapping(AddServiceUnitsResults) - async def AddUnits(self, numunits, placement, servicename): + @ReturnMapping(ErrorResults) + async def SetPasswords(self, changes): ''' - numunits : int - placement : typing.Sequence[~Placement] - servicename : str - Returns -> typing.Sequence[str] + changes : typing.Sequence<+T_co>[~EntityPassword]<~EntityPassword> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Service', Request='AddUnits', Version=3, Params=params) - params['NumUnits'] = numunits - params['Placement'] = placement - params['ServiceName'] = servicename + msg = dict(type='Provisioner', request='SetPasswords', version=3, params=params) + params['changes'] = changes reply = await self.rpc(msg) return reply - @ReturnMapping(ServiceCharmRelationsResults) - async def CharmRelations(self, servicename): + @ReturnMapping(ErrorResults) + async def SetStatus(self, entities): ''' - servicename : str - Returns -> typing.Sequence[str] + entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Service', Request='CharmRelations', Version=3, Params=params) - params['ServiceName'] = servicename + msg = dict(type='Provisioner', request='SetStatus', version=3, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @ReturnMapping(ErrorResults) - async def Deploy(self, services): + async def SetSupportedContainers(self, params): ''' - services : typing.Sequence[~ServiceDeploy] - Returns -> typing.Sequence[~ErrorResult] + params : typing.Sequence<+T_co>[~MachineContainers]<~MachineContainers> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Service', Request='Deploy', Version=3, Params=params) - params['Services'] = services + msg = dict(type='Provisioner', request='SetSupportedContainers', version=3, params=params) + params['params'] = params reply = await self.rpc(msg) return reply - @ReturnMapping(None) - async def Destroy(self, servicename): + @ReturnMapping(StringsResult) + async def StateAddresses(self): ''' - servicename : str - Returns -> None + + Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[str]] ''' # map input types to rpc msg params = dict() - msg = dict(Type='Service', Request='Destroy', Version=3, Params=params) - params['ServiceName'] = servicename + msg = dict(type='Provisioner', request='StateAddresses', version=3, params=params) + reply = await self.rpc(msg) return reply - @ReturnMapping(None) - async def DestroyRelation(self, endpoints): + @ReturnMapping(StatusResults) + async def Status(self, entities): ''' - endpoints : typing.Sequence[str] - Returns -> None + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~StatusResult]<~StatusResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Service', Request='DestroyRelation', Version=3, Params=params) - params['Endpoints'] = endpoints + msg = dict(type='Provisioner', request='Status', version=3, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply - @ReturnMapping(None) - async def DestroyUnits(self, unitnames): + @ReturnMapping(ToolsResults) + async def Tools(self, entities): ''' - unitnames : typing.Sequence[str] - Returns -> None + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~ToolsResult]<~ToolsResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Service', Request='DestroyUnits', Version=3, Params=params) - params['UnitNames'] = unitnames + msg = dict(type='Provisioner', request='Tools', version=3, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply - @ReturnMapping(None) - async def Expose(self, servicename): + @ReturnMapping(ErrorResults) + async def UpdateStatus(self, entities): ''' - servicename : str - Returns -> None + entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Service', Request='Expose', Version=3, Params=params) - params['ServiceName'] = servicename + msg = dict(type='Provisioner', request='UpdateStatus', version=3, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply - @ReturnMapping(ServiceGetResults) - async def Get(self, servicename): + @ReturnMapping(NotifyWatchResult) + async def WatchAPIHostPorts(self): ''' - servicename : str - Returns -> typing.Union[str, typing.Mapping[str, typing.Any], _ForwardRef('Value')] + + Returns -> typing.Union[str, _ForwardRef('Error')] ''' # map input types to rpc msg params = dict() - msg = dict(Type='Service', Request='Get', Version=3, Params=params) - params['ServiceName'] = servicename + msg = dict(type='Provisioner', request='WatchAPIHostPorts', version=3, params=params) + reply = await self.rpc(msg) return reply - @ReturnMapping(StringResult) - async def GetCharmURL(self, servicename): + @ReturnMapping(StringsWatchResults) + async def WatchAllContainers(self, params): ''' - servicename : str - Returns -> typing.Union[_ForwardRef('Error'), str] + params : typing.Sequence<+T_co>[~WatchContainer]<~WatchContainer> + Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Service', Request='GetCharmURL', Version=3, Params=params) - params['ServiceName'] = servicename + msg = dict(type='Provisioner', request='WatchAllContainers', version=3, params=params) + params['params'] = params reply = await self.rpc(msg) return reply - @ReturnMapping(GetConstraintsResults) - async def GetConstraints(self, servicename): + @ReturnMapping(StringsWatchResults) + async def WatchContainers(self, params): ''' - servicename : str - Returns -> Value + params : typing.Sequence<+T_co>[~WatchContainer]<~WatchContainer> + Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Service', Request='GetConstraints', Version=3, Params=params) - params['ServiceName'] = servicename + msg = dict(type='Provisioner', request='WatchContainers', version=3, params=params) + params['params'] = params reply = await self.rpc(msg) return reply - @ReturnMapping(None) - async def Set(self, options, servicename): + @ReturnMapping(NotifyWatchResult) + async def WatchForModelConfigChanges(self): ''' - options : typing.Mapping[str, str] - servicename : str - Returns -> None + + Returns -> typing.Union[str, _ForwardRef('Error')] ''' # map input types to rpc msg params = dict() - msg = dict(Type='Service', Request='Set', Version=3, Params=params) - params['Options'] = options - params['ServiceName'] = servicename + msg = dict(type='Provisioner', request='WatchForModelConfigChanges', version=3, params=params) + reply = await self.rpc(msg) return reply - @ReturnMapping(None) - async def SetCharm(self, charmurl, cs_channel, forceseries, forceunits, resourceids, servicename): - ''' - charmurl : str - cs_channel : str - forceseries : bool - forceunits : bool - resourceids : typing.Mapping[str, str] - servicename : str - Returns -> None + @ReturnMapping(NotifyWatchResult) + async def WatchMachineErrorRetry(self): + ''' + + Returns -> typing.Union[str, _ForwardRef('Error')] ''' # map input types to rpc msg params = dict() - msg = dict(Type='Service', Request='SetCharm', Version=3, Params=params) - params['charmurl'] = charmurl - params['cs-channel'] = cs_channel - params['forceseries'] = forceseries - params['forceunits'] = forceunits - params['resourceids'] = resourceids - params['servicename'] = servicename + msg = dict(type='Provisioner', request='WatchMachineErrorRetry', version=3, params=params) + reply = await self.rpc(msg) return reply - @ReturnMapping(None) - async def SetConstraints(self, constraints, servicename): + @ReturnMapping(StringsWatchResult) + async def WatchModelMachines(self): ''' - constraints : Value - servicename : str - Returns -> None + + Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')] + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='Provisioner', request='WatchModelMachines', version=3, params=params) + + reply = await self.rpc(msg) + return reply + + +class ProxyUpdaterFacade(Type): + name = 'ProxyUpdater' + version = 1 + schema = {'definitions': {'Entities': {'additionalProperties': False, + 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, + 'type': 'array'}}, + 'required': ['entities'], + 'type': 'object'}, + 'Entity': {'additionalProperties': False, + 'properties': {'tag': {'type': 'string'}}, + 'required': ['tag'], + 'type': 'object'}, + 'Error': {'additionalProperties': False, + 'properties': {'code': {'type': 'string'}, + 'info': {'$ref': '#/definitions/ErrorInfo'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], + 'type': 'object'}, + 'ErrorInfo': {'additionalProperties': False, + 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'macaroon-path': {'type': 'string'}}, + 'type': 'object'}, + 'Macaroon': {'additionalProperties': False, 'type': 'object'}, + 'NotifyWatchResult': {'additionalProperties': False, + 'properties': {'NotifyWatcherId': {'type': 'string'}, + 'error': {'$ref': '#/definitions/Error'}}, + 'required': ['NotifyWatcherId'], + 'type': 'object'}, + 'NotifyWatchResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'ProxyConfig': {'additionalProperties': False, + 'properties': {'ftp': {'type': 'string'}, + 'http': {'type': 'string'}, + 'https': {'type': 'string'}, + 'no-proxy': {'type': 'string'}}, + 'required': ['http', + 'https', + 'ftp', + 'no-proxy'], + 'type': 'object'}, + 'ProxyConfigResult': {'additionalProperties': False, + 'properties': {'apt-proxy-settings': {'$ref': '#/definitions/ProxyConfig'}, + 'error': {'$ref': '#/definitions/Error'}, + 'proxy-settings': {'$ref': '#/definitions/ProxyConfig'}}, + 'required': ['proxy-settings', + 'apt-proxy-settings'], + 'type': 'object'}, + 'ProxyConfigResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/ProxyConfigResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}}, + 'properties': {'ProxyConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/ProxyConfigResults'}}, + 'type': 'object'}, + 'WatchForProxyConfigAndAPIHostPortChanges': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, + 'type': 'object'}}, + 'type': 'object'} + + + @ReturnMapping(ProxyConfigResults) + async def ProxyConfig(self, entities): + ''' + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~ProxyConfigResult]<~ProxyConfigResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='ProxyUpdater', request='ProxyConfig', version=1, params=params) + params['entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(NotifyWatchResults) + async def WatchForProxyConfigAndAPIHostPortChanges(self, entities): + ''' + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Service', Request='SetConstraints', Version=3, Params=params) - params['Constraints'] = constraints - params['ServiceName'] = servicename + msg = dict(type='ProxyUpdater', request='WatchForProxyConfigAndAPIHostPortChanges', version=1, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply +class RebootFacade(Type): + name = 'Reboot' + version = 2 + schema = {'definitions': {'Entities': {'additionalProperties': False, + 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, + 'type': 'array'}}, + 'required': ['entities'], + 'type': 'object'}, + 'Entity': {'additionalProperties': False, + 'properties': {'tag': {'type': 'string'}}, + 'required': ['tag'], + 'type': 'object'}, + 'Error': {'additionalProperties': False, + 'properties': {'code': {'type': 'string'}, + 'info': {'$ref': '#/definitions/ErrorInfo'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], + 'type': 'object'}, + 'ErrorInfo': {'additionalProperties': False, + 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'macaroon-path': {'type': 'string'}}, + 'type': 'object'}, + 'ErrorResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}}, + 'type': 'object'}, + 'ErrorResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'Macaroon': {'additionalProperties': False, 'type': 'object'}, + 'NotifyWatchResult': {'additionalProperties': False, + 'properties': {'NotifyWatcherId': {'type': 'string'}, + 'error': {'$ref': '#/definitions/Error'}}, + 'required': ['NotifyWatcherId'], + 'type': 'object'}, + 'RebootActionResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'type': 'string'}}, + 'type': 'object'}, + 'RebootActionResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/RebootActionResult'}, + 'type': 'array'}}, + 'type': 'object'}}, + 'properties': {'ClearReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'GetRebootAction': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/RebootActionResults'}}, + 'type': 'object'}, + 'RequestReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'WatchForRebootEvent': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, + 'type': 'object'}}, + 'type': 'object'} + @ReturnMapping(ErrorResults) - async def SetMetricCredentials(self, creds): + async def ClearReboot(self, entities): + ''' + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='Reboot', request='ClearReboot', version=2, params=params) + params['entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(RebootActionResults) + async def GetRebootAction(self, entities): + ''' + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~RebootActionResult]<~RebootActionResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='Reboot', request='GetRebootAction', version=2, params=params) + params['entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def RequestReboot(self, entities): + ''' + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='Reboot', request='RequestReboot', version=2, params=params) + params['entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(NotifyWatchResult) + async def WatchForRebootEvent(self): + ''' + + Returns -> typing.Union[str, _ForwardRef('Error')] + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='Reboot', request='WatchForRebootEvent', version=2, params=params) + + reply = await self.rpc(msg) + return reply + + +class RelationUnitsWatcherFacade(Type): + name = 'RelationUnitsWatcher' + version = 1 + schema = {'definitions': {'Error': {'additionalProperties': False, + 'properties': {'code': {'type': 'string'}, + 'info': {'$ref': '#/definitions/ErrorInfo'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], + 'type': 'object'}, + 'ErrorInfo': {'additionalProperties': False, + 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'macaroon-path': {'type': 'string'}}, + 'type': 'object'}, + 'Macaroon': {'additionalProperties': False, 'type': 'object'}, + 'RelationUnitsChange': {'additionalProperties': False, + 'properties': {'changed': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitSettings'}}, + 'type': 'object'}, + 'departed': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'required': ['changed'], + 'type': 'object'}, + 'RelationUnitsWatchResult': {'additionalProperties': False, + 'properties': {'changes': {'$ref': '#/definitions/RelationUnitsChange'}, + 'error': {'$ref': '#/definitions/Error'}, + 'watcher-id': {'type': 'string'}}, + 'required': ['watcher-id', + 'changes'], + 'type': 'object'}, + 'UnitSettings': {'additionalProperties': False, + 'properties': {'version': {'type': 'integer'}}, + 'required': ['version'], + 'type': 'object'}}, + 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/RelationUnitsWatchResult'}}, + 'type': 'object'}, + 'Stop': {'type': 'object'}}, + 'type': 'object'} + + + @ReturnMapping(RelationUnitsWatchResult) + async def Next(self): ''' - creds : typing.Sequence[~ServiceMetricCredential] - Returns -> typing.Sequence[~ErrorResult] + + Returns -> typing.Union[_ForwardRef('RelationUnitsChange'), _ForwardRef('Error'), str] + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='RelationUnitsWatcher', request='Next', version=1, params=params) + + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(None) + async def Stop(self): + ''' + + Returns -> None ''' # map input types to rpc msg params = dict() - msg = dict(Type='Service', Request='SetMetricCredentials', Version=3, Params=params) - params['Creds'] = creds + msg = dict(type='RelationUnitsWatcher', request='Stop', version=1, params=params) + reply = await self.rpc(msg) return reply +class ResumerFacade(Type): + name = 'Resumer' + version = 2 + schema = {'properties': {'ResumeTransactions': {'type': 'object'}}, 'type': 'object'} + @ReturnMapping(None) - async def Unexpose(self, servicename): + async def ResumeTransactions(self): ''' - servicename : str + Returns -> None ''' # map input types to rpc msg params = dict() - msg = dict(Type='Service', Request='Unexpose', Version=3, Params=params) - params['ServiceName'] = servicename + msg = dict(type='Resumer', request='ResumeTransactions', version=2, params=params) + reply = await self.rpc(msg) return reply +class RetryStrategyFacade(Type): + name = 'RetryStrategy' + version = 1 + schema = {'definitions': {'Entities': {'additionalProperties': False, + 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, + 'type': 'array'}}, + 'required': ['entities'], + 'type': 'object'}, + 'Entity': {'additionalProperties': False, + 'properties': {'tag': {'type': 'string'}}, + 'required': ['tag'], + 'type': 'object'}, + 'Error': {'additionalProperties': False, + 'properties': {'code': {'type': 'string'}, + 'info': {'$ref': '#/definitions/ErrorInfo'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], + 'type': 'object'}, + 'ErrorInfo': {'additionalProperties': False, + 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'macaroon-path': {'type': 'string'}}, + 'type': 'object'}, + 'Macaroon': {'additionalProperties': False, 'type': 'object'}, + 'NotifyWatchResult': {'additionalProperties': False, + 'properties': {'NotifyWatcherId': {'type': 'string'}, + 'error': {'$ref': '#/definitions/Error'}}, + 'required': ['NotifyWatcherId'], + 'type': 'object'}, + 'NotifyWatchResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'RetryStrategy': {'additionalProperties': False, + 'properties': {'jitter-retry-time': {'type': 'boolean'}, + 'max-retry-time': {'type': 'integer'}, + 'min-retry-time': {'type': 'integer'}, + 'retry-time-factor': {'type': 'integer'}, + 'should-retry': {'type': 'boolean'}}, + 'required': ['should-retry', + 'min-retry-time', + 'max-retry-time', + 'jitter-retry-time', + 'retry-time-factor'], + 'type': 'object'}, + 'RetryStrategyResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'$ref': '#/definitions/RetryStrategy'}}, + 'type': 'object'}, + 'RetryStrategyResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/RetryStrategyResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}}, + 'properties': {'RetryStrategy': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/RetryStrategyResults'}}, + 'type': 'object'}, + 'WatchRetryStrategy': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, + 'type': 'object'}}, + 'type': 'object'} + - @ReturnMapping(None) - async def Unset(self, options, servicename): + @ReturnMapping(RetryStrategyResults) + async def RetryStrategy(self, entities): ''' - options : typing.Sequence[str] - servicename : str - Returns -> None + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~RetryStrategyResult]<~RetryStrategyResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Service', Request='Unset', Version=3, Params=params) - params['Options'] = options - params['ServiceName'] = servicename + msg = dict(type='RetryStrategy', request='RetryStrategy', version=1, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply - @ReturnMapping(None) - async def Update(self, charmurl, constraints, forcecharmurl, forceseries, minunits, servicename, settingsstrings, settingsyaml): + @ReturnMapping(NotifyWatchResults) + async def WatchRetryStrategy(self, entities): ''' - charmurl : str - constraints : Value - forcecharmurl : bool - forceseries : bool - minunits : int - servicename : str - settingsstrings : typing.Mapping[str, str] - settingsyaml : str - Returns -> None + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Service', Request='Update', Version=3, Params=params) - params['CharmUrl'] = charmurl - params['Constraints'] = constraints - params['ForceCharmUrl'] = forcecharmurl - params['ForceSeries'] = forceseries - params['MinUnits'] = minunits - params['ServiceName'] = servicename - params['SettingsStrings'] = settingsstrings - params['SettingsYAML'] = settingsyaml + msg = dict(type='RetryStrategy', request='WatchRetryStrategy', version=1, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply -class ServiceScaler(Type): - name = 'ServiceScaler' +class SSHClientFacade(Type): + name = 'SSHClient' version = 1 schema = {'definitions': {'Entities': {'additionalProperties': False, - 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'}, + 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, 'type': 'array'}}, - 'required': ['Entities'], + 'required': ['entities'], 'type': 'object'}, 'Entity': {'additionalProperties': False, - 'properties': {'Tag': {'type': 'string'}}, - 'required': ['Tag'], + 'properties': {'tag': {'type': 'string'}}, + 'required': ['tag'], 'type': 'object'}, 'Error': {'additionalProperties': False, - 'properties': {'Code': {'type': 'string'}, - 'Info': {'$ref': '#/definitions/ErrorInfo'}, - 'Message': {'type': 'string'}}, - 'required': ['Message', 'Code'], + 'properties': {'code': {'type': 'string'}, + 'info': {'$ref': '#/definitions/ErrorInfo'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], 'type': 'object'}, 'ErrorInfo': {'additionalProperties': False, - 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'}, - 'MacaroonPath': {'type': 'string'}}, + 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'macaroon-path': {'type': 'string'}}, 'type': 'object'}, - 'ErrorResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}}, - 'required': ['Error'], - 'type': 'object'}, - 'ErrorResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'}, - 'type': 'array'}}, - 'required': ['Results'], + 'Macaroon': {'additionalProperties': False, 'type': 'object'}, + 'SSHAddressResult': {'additionalProperties': False, + 'properties': {'address': {'type': 'string'}, + 'error': {'$ref': '#/definitions/Error'}}, + 'type': 'object'}, + 'SSHAddressResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/SSHAddressResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'SSHProxyResult': {'additionalProperties': False, + 'properties': {'use-proxy': {'type': 'boolean'}}, + 'required': ['use-proxy'], + 'type': 'object'}, + 'SSHPublicKeysResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'public-keys': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'type': 'object'}, + 'SSHPublicKeysResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/SSHPublicKeysResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}}, + 'properties': {'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/SSHAddressResults'}}, + 'type': 'object'}, + 'Proxy': {'properties': {'Result': {'$ref': '#/definitions/SSHProxyResult'}}, + 'type': 'object'}, + 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/SSHAddressResults'}}, 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, - 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'}, - 'type': 'array'}, - 'data': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'id': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'sig': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['data', - 'location', - 'id', - 'caveats', - 'sig'], - 'type': 'object'}, - 'StringsWatchResult': {'additionalProperties': False, - 'properties': {'Changes': {'items': {'type': 'string'}, - 'type': 'array'}, - 'Error': {'$ref': '#/definitions/Error'}, - 'StringsWatcherId': {'type': 'string'}}, - 'required': ['StringsWatcherId', - 'Changes', - 'Error'], - 'type': 'object'}, - 'caveat': {'additionalProperties': False, - 'properties': {'caveatId': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'verificationId': {'$ref': '#/definitions/packet'}}, - 'required': ['location', - 'caveatId', - 'verificationId'], - 'type': 'object'}, - 'packet': {'additionalProperties': False, - 'properties': {'headerLen': {'type': 'integer'}, - 'start': {'type': 'integer'}, - 'totalLen': {'type': 'integer'}}, - 'required': ['start', 'totalLen', 'headerLen'], - 'type': 'object'}}, - 'properties': {'Rescale': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'Watch': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}}, - 'type': 'object'}}, + 'PublicKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/SSHPublicKeysResults'}}, + 'type': 'object'}}, 'type': 'object'} - @ReturnMapping(ErrorResults) - async def Rescale(self, entities): + @ReturnMapping(SSHAddressResults) + async def PrivateAddress(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ErrorResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~SSHAddressResult]<~SSHAddressResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='ServiceScaler', Request='Rescale', Version=1, Params=params) - params['Entities'] = entities + msg = dict(type='SSHClient', request='PrivateAddress', version=1, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply - @ReturnMapping(StringsWatchResult) - async def Watch(self): + @ReturnMapping(SSHProxyResult) + async def Proxy(self): + ''' + + Returns -> bool ''' + # map input types to rpc msg + params = dict() + msg = dict(type='SSHClient', request='Proxy', version=1, params=params) + + reply = await self.rpc(msg) + return reply + - Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')] + + @ReturnMapping(SSHAddressResults) + async def PublicAddress(self, entities): + ''' + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~SSHAddressResult]<~SSHAddressResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='ServiceScaler', Request='Watch', Version=1, Params=params) + msg = dict(type='SSHClient', request='PublicAddress', version=1, params=params) + params['entities'] = entities + reply = await self.rpc(msg) + return reply + + + @ReturnMapping(SSHPublicKeysResults) + async def PublicKeys(self, entities): + ''' + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~SSHPublicKeysResult]<~SSHPublicKeysResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='SSHClient', request='PublicKeys', version=1, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply -class Singular(Type): +class SingularFacade(Type): name = 'Singular' version = 1 schema = {'definitions': {'Entities': {'additionalProperties': False, - 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'}, + 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, 'type': 'array'}}, - 'required': ['Entities'], + 'required': ['entities'], 'type': 'object'}, 'Entity': {'additionalProperties': False, - 'properties': {'Tag': {'type': 'string'}}, - 'required': ['Tag'], + 'properties': {'tag': {'type': 'string'}}, + 'required': ['tag'], 'type': 'object'}, 'Error': {'additionalProperties': False, - 'properties': {'Code': {'type': 'string'}, - 'Info': {'$ref': '#/definitions/ErrorInfo'}, - 'Message': {'type': 'string'}}, - 'required': ['Message', 'Code'], + 'properties': {'code': {'type': 'string'}, + 'info': {'$ref': '#/definitions/ErrorInfo'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], 'type': 'object'}, 'ErrorInfo': {'additionalProperties': False, - 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'}, - 'MacaroonPath': {'type': 'string'}}, + 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'macaroon-path': {'type': 'string'}}, 'type': 'object'}, 'ErrorResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}}, - 'required': ['Error'], + 'properties': {'error': {'$ref': '#/definitions/Error'}}, 'type': 'object'}, 'ErrorResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'}, + 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, 'type': 'array'}}, - 'required': ['Results'], + 'required': ['results'], 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, - 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'}, - 'type': 'array'}, - 'data': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'id': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'sig': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['data', - 'location', - 'id', - 'caveats', - 'sig'], - 'type': 'object'}, + 'Macaroon': {'additionalProperties': False, 'type': 'object'}, 'SingularClaim': {'additionalProperties': False, - 'properties': {'ControllerTag': {'type': 'string'}, - 'Duration': {'type': 'integer'}, - 'ModelTag': {'type': 'string'}}, - 'required': ['ModelTag', - 'ControllerTag', - 'Duration'], + 'properties': {'controller-tag': {'type': 'string'}, + 'duration': {'type': 'integer'}, + 'model-tag': {'type': 'string'}}, + 'required': ['model-tag', + 'controller-tag', + 'duration'], 'type': 'object'}, 'SingularClaims': {'additionalProperties': False, - 'properties': {'Claims': {'items': {'$ref': '#/definitions/SingularClaim'}, + 'properties': {'claims': {'items': {'$ref': '#/definitions/SingularClaim'}, 'type': 'array'}}, - 'required': ['Claims'], - 'type': 'object'}, - 'caveat': {'additionalProperties': False, - 'properties': {'caveatId': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'verificationId': {'$ref': '#/definitions/packet'}}, - 'required': ['location', - 'caveatId', - 'verificationId'], - 'type': 'object'}, - 'packet': {'additionalProperties': False, - 'properties': {'headerLen': {'type': 'integer'}, - 'start': {'type': 'integer'}, - 'totalLen': {'type': 'integer'}}, - 'required': ['start', 'totalLen', 'headerLen'], - 'type': 'object'}}, + 'required': ['claims'], + 'type': 'object'}}, 'properties': {'Claim': {'properties': {'Params': {'$ref': '#/definitions/SingularClaims'}, 'Result': {'$ref': '#/definitions/ErrorResults'}}, 'type': 'object'}, @@ -15778,13 +16644,13 @@ class Singular(Type): @ReturnMapping(ErrorResults) async def Claim(self, claims): ''' - claims : typing.Sequence[~SingularClaim] - Returns -> typing.Sequence[~ErrorResult] + claims : typing.Sequence<+T_co>[~SingularClaim]<~SingularClaim> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Singular', Request='Claim', Version=1, Params=params) - params['Claims'] = claims + msg = dict(type='Singular', request='Claim', version=1, params=params) + params['claims'] = claims reply = await self.rpc(msg) return reply @@ -15793,113 +16659,80 @@ class Singular(Type): @ReturnMapping(ErrorResults) async def Wait(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ErrorResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Singular', Request='Wait', Version=1, Params=params) - params['Entities'] = entities + msg = dict(type='Singular', request='Wait', version=1, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply -class Spaces(Type): +class SpacesFacade(Type): name = 'Spaces' version = 2 schema = {'definitions': {'CreateSpaceParams': {'additionalProperties': False, - 'properties': {'ProviderId': {'type': 'string'}, - 'Public': {'type': 'boolean'}, - 'SpaceTag': {'type': 'string'}, - 'SubnetTags': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['SubnetTags', - 'SpaceTag', - 'Public'], + 'properties': {'provider-id': {'type': 'string'}, + 'public': {'type': 'boolean'}, + 'space-tag': {'type': 'string'}, + 'subnet-tags': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'required': ['subnet-tags', + 'space-tag', + 'public'], 'type': 'object'}, 'CreateSpacesParams': {'additionalProperties': False, - 'properties': {'Spaces': {'items': {'$ref': '#/definitions/CreateSpaceParams'}, + 'properties': {'spaces': {'items': {'$ref': '#/definitions/CreateSpaceParams'}, 'type': 'array'}}, - 'required': ['Spaces'], + 'required': ['spaces'], 'type': 'object'}, 'Error': {'additionalProperties': False, - 'properties': {'Code': {'type': 'string'}, - 'Info': {'$ref': '#/definitions/ErrorInfo'}, - 'Message': {'type': 'string'}}, - 'required': ['Message', 'Code'], + 'properties': {'code': {'type': 'string'}, + 'info': {'$ref': '#/definitions/ErrorInfo'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], 'type': 'object'}, 'ErrorInfo': {'additionalProperties': False, - 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'}, - 'MacaroonPath': {'type': 'string'}}, + 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'macaroon-path': {'type': 'string'}}, 'type': 'object'}, 'ErrorResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}}, - 'required': ['Error'], + 'properties': {'error': {'$ref': '#/definitions/Error'}}, 'type': 'object'}, 'ErrorResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'}, + 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, 'type': 'array'}}, - 'required': ['Results'], + 'required': ['results'], 'type': 'object'}, 'ListSpacesResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/Space'}, + 'properties': {'results': {'items': {'$ref': '#/definitions/Space'}, 'type': 'array'}}, - 'required': ['Results'], + 'required': ['results'], 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, - 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'}, - 'type': 'array'}, - 'data': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'id': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'sig': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['data', - 'location', - 'id', - 'caveats', - 'sig'], - 'type': 'object'}, + 'Macaroon': {'additionalProperties': False, 'type': 'object'}, 'Space': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Name': {'type': 'string'}, - 'Subnets': {'items': {'$ref': '#/definitions/Subnet'}, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'name': {'type': 'string'}, + 'subnets': {'items': {'$ref': '#/definitions/Subnet'}, 'type': 'array'}}, - 'required': ['Name', 'Subnets'], + 'required': ['name', 'subnets'], 'type': 'object'}, 'Subnet': {'additionalProperties': False, - 'properties': {'CIDR': {'type': 'string'}, - 'Life': {'type': 'string'}, - 'ProviderId': {'type': 'string'}, - 'SpaceTag': {'type': 'string'}, - 'StaticRangeHighIP': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'StaticRangeLowIP': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'Status': {'type': 'string'}, - 'VLANTag': {'type': 'integer'}, - 'Zones': {'items': {'type': 'string'}, + 'properties': {'cidr': {'type': 'string'}, + 'life': {'type': 'string'}, + 'provider-id': {'type': 'string'}, + 'space-tag': {'type': 'string'}, + 'status': {'type': 'string'}, + 'vlan-tag': {'type': 'integer'}, + 'zones': {'items': {'type': 'string'}, 'type': 'array'}}, - 'required': ['CIDR', - 'VLANTag', - 'Life', - 'SpaceTag', - 'Zones'], - 'type': 'object'}, - 'caveat': {'additionalProperties': False, - 'properties': {'caveatId': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'verificationId': {'$ref': '#/definitions/packet'}}, - 'required': ['location', - 'caveatId', - 'verificationId'], - 'type': 'object'}, - 'packet': {'additionalProperties': False, - 'properties': {'headerLen': {'type': 'integer'}, - 'start': {'type': 'integer'}, - 'totalLen': {'type': 'integer'}}, - 'required': ['start', 'totalLen', 'headerLen'], + 'required': ['cidr', + 'vlan-tag', + 'life', + 'space-tag', + 'zones'], 'type': 'object'}}, 'properties': {'CreateSpaces': {'properties': {'Params': {'$ref': '#/definitions/CreateSpacesParams'}, 'Result': {'$ref': '#/definitions/ErrorResults'}}, @@ -15912,13 +16745,13 @@ class Spaces(Type): @ReturnMapping(ErrorResults) async def CreateSpaces(self, spaces): ''' - spaces : typing.Sequence[~CreateSpaceParams] - Returns -> typing.Sequence[~ErrorResult] + spaces : typing.Sequence<+T_co>[~CreateSpaceParams]<~CreateSpaceParams> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Spaces', Request='CreateSpaces', Version=2, Params=params) - params['Spaces'] = spaces + msg = dict(type='Spaces', request='CreateSpaces', version=2, params=params) + params['spaces'] = spaces reply = await self.rpc(msg) return reply @@ -15928,22 +16761,24 @@ class Spaces(Type): async def ListSpaces(self): ''' - Returns -> typing.Sequence[~Space] + Returns -> typing.Sequence<+T_co>[~Space]<~Space> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Spaces', Request='ListSpaces', Version=2, Params=params) + msg = dict(type='Spaces', request='ListSpaces', version=2, params=params) reply = await self.rpc(msg) return reply -class StatusHistory(Type): +class StatusHistoryFacade(Type): name = 'StatusHistory' version = 2 schema = {'definitions': {'StatusHistoryPruneArgs': {'additionalProperties': False, - 'properties': {'MaxLogsPerEntity': {'type': 'integer'}}, - 'required': ['MaxLogsPerEntity'], + 'properties': {'max-history-mb': {'type': 'integer'}, + 'max-history-time': {'type': 'integer'}}, + 'required': ['max-history-time', + 'max-history-mb'], 'type': 'object'}}, 'properties': {'Prune': {'properties': {'Params': {'$ref': '#/definitions/StatusHistoryPruneArgs'}}, 'type': 'object'}}, @@ -15951,76 +16786,74 @@ class StatusHistory(Type): @ReturnMapping(None) - async def Prune(self, maxlogsperentity): + async def Prune(self, max_history_mb, max_history_time): ''' - maxlogsperentity : int + max_history_mb : int + max_history_time : int Returns -> None ''' # map input types to rpc msg params = dict() - msg = dict(Type='StatusHistory', Request='Prune', Version=2, Params=params) - params['MaxLogsPerEntity'] = maxlogsperentity + msg = dict(type='StatusHistory', request='Prune', version=2, params=params) + params['max-history-mb'] = max_history_mb + params['max-history-time'] = max_history_time reply = await self.rpc(msg) return reply -class Storage(Type): +class StorageFacade(Type): name = 'Storage' - version = 2 + version = 3 schema = {'definitions': {'Entities': {'additionalProperties': False, - 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'}, + 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, 'type': 'array'}}, - 'required': ['Entities'], + 'required': ['entities'], 'type': 'object'}, 'Entity': {'additionalProperties': False, - 'properties': {'Tag': {'type': 'string'}}, - 'required': ['Tag'], + 'properties': {'tag': {'type': 'string'}}, + 'required': ['tag'], 'type': 'object'}, 'EntityStatus': {'additionalProperties': False, - 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True, + 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True, 'type': 'object'}}, 'type': 'object'}, - 'Info': {'type': 'string'}, - 'Since': {'format': 'date-time', + 'info': {'type': 'string'}, + 'since': {'format': 'date-time', 'type': 'string'}, - 'Status': {'type': 'string'}}, - 'required': ['Status', - 'Info', - 'Data', - 'Since'], + 'status': {'type': 'string'}}, + 'required': ['status', 'info', 'since'], 'type': 'object'}, 'Error': {'additionalProperties': False, - 'properties': {'Code': {'type': 'string'}, - 'Info': {'$ref': '#/definitions/ErrorInfo'}, - 'Message': {'type': 'string'}}, - 'required': ['Message', 'Code'], + 'properties': {'code': {'type': 'string'}, + 'info': {'$ref': '#/definitions/ErrorInfo'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], 'type': 'object'}, 'ErrorInfo': {'additionalProperties': False, - 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'}, - 'MacaroonPath': {'type': 'string'}}, + 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'macaroon-path': {'type': 'string'}}, 'type': 'object'}, 'ErrorResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}}, - 'required': ['Error'], + 'properties': {'error': {'$ref': '#/definitions/Error'}}, 'type': 'object'}, 'ErrorResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'}, + 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, 'type': 'array'}}, - 'required': ['Results'], + 'required': ['results'], 'type': 'object'}, 'FilesystemAttachmentInfo': {'additionalProperties': False, - 'properties': {'mountpoint': {'type': 'string'}, + 'properties': {'mount-point': {'type': 'string'}, 'read-only': {'type': 'boolean'}}, 'type': 'object'}, 'FilesystemDetails': {'additionalProperties': False, - 'properties': {'filesystemtag': {'type': 'string'}, + 'properties': {'filesystem-tag': {'type': 'string'}, 'info': {'$ref': '#/definitions/FilesystemInfo'}, - 'machineattachments': {'patternProperties': {'.*': {'$ref': '#/definitions/FilesystemAttachmentInfo'}}, - 'type': 'object'}, + 'machine-attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/FilesystemAttachmentInfo'}}, + 'type': 'object'}, 'status': {'$ref': '#/definitions/EntityStatus'}, 'storage': {'$ref': '#/definitions/StorageDetails'}, - 'volumetag': {'type': 'string'}}, - 'required': ['filesystemtag', + 'volume-tag': {'type': 'string'}}, + 'required': ['filesystem-tag', 'info', 'status'], 'type': 'object'}, @@ -16042,61 +16875,44 @@ class Storage(Type): 'type': 'array'}}, 'type': 'object'}, 'FilesystemInfo': {'additionalProperties': False, - 'properties': {'filesystemid': {'type': 'string'}, + 'properties': {'filesystem-id': {'type': 'string'}, 'size': {'type': 'integer'}}, - 'required': ['filesystemid', 'size'], + 'required': ['filesystem-id', 'size'], 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, - 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'}, - 'type': 'array'}, - 'data': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'id': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'sig': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['data', - 'location', - 'id', - 'caveats', - 'sig'], - 'type': 'object'}, + 'Macaroon': {'additionalProperties': False, 'type': 'object'}, 'StorageAddParams': {'additionalProperties': False, - 'properties': {'StorageName': {'type': 'string'}, + 'properties': {'name': {'type': 'string'}, 'storage': {'$ref': '#/definitions/StorageConstraints'}, 'unit': {'type': 'string'}}, - 'required': ['unit', - 'StorageName', - 'storage'], + 'required': ['unit', 'name', 'storage'], 'type': 'object'}, 'StorageAttachmentDetails': {'additionalProperties': False, 'properties': {'location': {'type': 'string'}, - 'machinetag': {'type': 'string'}, - 'storagetag': {'type': 'string'}, - 'unittag': {'type': 'string'}}, - 'required': ['storagetag', - 'unittag', - 'machinetag'], + 'machine-tag': {'type': 'string'}, + 'storage-tag': {'type': 'string'}, + 'unit-tag': {'type': 'string'}}, + 'required': ['storage-tag', + 'unit-tag', + 'machine-tag'], 'type': 'object'}, 'StorageConstraints': {'additionalProperties': False, - 'properties': {'Count': {'type': 'integer'}, - 'Pool': {'type': 'string'}, - 'Size': {'type': 'integer'}}, - 'required': ['Pool', 'Size', 'Count'], + 'properties': {'count': {'type': 'integer'}, + 'pool': {'type': 'string'}, + 'size': {'type': 'integer'}}, 'type': 'object'}, 'StorageDetails': {'additionalProperties': False, - 'properties': {'Persistent': {'type': 'boolean'}, - 'attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/StorageAttachmentDetails'}}, + 'properties': {'attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/StorageAttachmentDetails'}}, 'type': 'object'}, 'kind': {'type': 'integer'}, - 'ownertag': {'type': 'string'}, + 'owner-tag': {'type': 'string'}, + 'persistent': {'type': 'boolean'}, 'status': {'$ref': '#/definitions/EntityStatus'}, - 'storagetag': {'type': 'string'}}, - 'required': ['storagetag', - 'ownertag', + 'storage-tag': {'type': 'string'}}, + 'required': ['storage-tag', + 'owner-tag', 'kind', 'status', - 'Persistent'], + 'persistent'], 'type': 'object'}, 'StorageDetailsListResult': {'additionalProperties': False, 'properties': {'error': {'$ref': '#/definitions/Error'}, @@ -16141,8 +16957,8 @@ class Storage(Type): 'type': 'object'}, 'StoragePoolsResult': {'additionalProperties': False, 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'storagepools': {'items': {'$ref': '#/definitions/StoragePool'}, - 'type': 'array'}}, + 'storage-pools': {'items': {'$ref': '#/definitions/StoragePool'}, + 'type': 'array'}}, 'type': 'object'}, 'StoragePoolsResults': {'additionalProperties': False, 'properties': {'results': {'items': {'$ref': '#/definitions/StoragePoolsResult'}, @@ -16154,19 +16970,19 @@ class Storage(Type): 'required': ['storages'], 'type': 'object'}, 'VolumeAttachmentInfo': {'additionalProperties': False, - 'properties': {'busaddress': {'type': 'string'}, - 'devicelink': {'type': 'string'}, - 'devicename': {'type': 'string'}, + 'properties': {'bus-address': {'type': 'string'}, + 'device-link': {'type': 'string'}, + 'device-name': {'type': 'string'}, 'read-only': {'type': 'boolean'}}, 'type': 'object'}, 'VolumeDetails': {'additionalProperties': False, 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'}, - 'machineattachments': {'patternProperties': {'.*': {'$ref': '#/definitions/VolumeAttachmentInfo'}}, - 'type': 'object'}, + 'machine-attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/VolumeAttachmentInfo'}}, + 'type': 'object'}, 'status': {'$ref': '#/definitions/EntityStatus'}, 'storage': {'$ref': '#/definitions/StorageDetails'}, - 'volumetag': {'type': 'string'}}, - 'required': ['volumetag', 'info', 'status'], + 'volume-tag': {'type': 'string'}}, + 'required': ['volume-tag', 'info', 'status'], 'type': 'object'}, 'VolumeDetailsListResult': {'additionalProperties': False, 'properties': {'error': {'$ref': '#/definitions/Error'}, @@ -16186,26 +17002,12 @@ class Storage(Type): 'type': 'array'}}, 'type': 'object'}, 'VolumeInfo': {'additionalProperties': False, - 'properties': {'hardwareid': {'type': 'string'}, + 'properties': {'hardware-id': {'type': 'string'}, 'persistent': {'type': 'boolean'}, 'size': {'type': 'integer'}, - 'volumeid': {'type': 'string'}}, - 'required': ['volumeid', 'size', 'persistent'], - 'type': 'object'}, - 'caveat': {'additionalProperties': False, - 'properties': {'caveatId': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'verificationId': {'$ref': '#/definitions/packet'}}, - 'required': ['location', - 'caveatId', - 'verificationId'], - 'type': 'object'}, - 'packet': {'additionalProperties': False, - 'properties': {'headerLen': {'type': 'integer'}, - 'start': {'type': 'integer'}, - 'totalLen': {'type': 'integer'}}, - 'required': ['start', 'totalLen', 'headerLen'], - 'type': 'object'}}, + 'volume-id': {'type': 'string'}}, + 'required': ['volume-id', 'size', 'persistent'], + 'type': 'object'}}, 'properties': {'AddToUnit': {'properties': {'Params': {'$ref': '#/definitions/StoragesAddParams'}, 'Result': {'$ref': '#/definitions/ErrorResults'}}, 'type': 'object'}, @@ -16232,12 +17034,12 @@ class Storage(Type): @ReturnMapping(ErrorResults) async def AddToUnit(self, storages): ''' - storages : typing.Sequence[~StorageAddParams] - Returns -> typing.Sequence[~ErrorResult] + storages : typing.Sequence<+T_co>[~StorageAddParams]<~StorageAddParams> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Storage', Request='AddToUnit', Version=2, Params=params) + msg = dict(type='Storage', request='AddToUnit', version=3, params=params) params['storages'] = storages reply = await self.rpc(msg) return reply @@ -16247,14 +17049,14 @@ class Storage(Type): @ReturnMapping(None) async def CreatePool(self, attrs, name, provider): ''' - attrs : typing.Mapping[str, typing.Any] + attrs : typing.Mapping<~KT, +VT_co>[str, typing.Any] name : str provider : str Returns -> None ''' # map input types to rpc msg params = dict() - msg = dict(Type='Storage', Request='CreatePool', Version=2, Params=params) + msg = dict(type='Storage', request='CreatePool', version=3, params=params) params['attrs'] = attrs params['name'] = name params['provider'] = provider @@ -16266,12 +17068,12 @@ class Storage(Type): @ReturnMapping(FilesystemDetailsListResults) async def ListFilesystems(self, filters): ''' - filters : typing.Sequence[~FilesystemFilter] - Returns -> typing.Sequence[~FilesystemDetailsListResult] + filters : typing.Sequence<+T_co>[~FilesystemFilter]<~FilesystemFilter> + Returns -> typing.Sequence<+T_co>[~FilesystemDetailsListResult]<~FilesystemDetailsListResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Storage', Request='ListFilesystems', Version=2, Params=params) + msg = dict(type='Storage', request='ListFilesystems', version=3, params=params) params['filters'] = filters reply = await self.rpc(msg) return reply @@ -16281,12 +17083,12 @@ class Storage(Type): @ReturnMapping(StoragePoolsResults) async def ListPools(self, filters): ''' - filters : typing.Sequence[~StoragePoolFilter] - Returns -> typing.Sequence[~StoragePoolsResult] + filters : typing.Sequence<+T_co>[~StoragePoolFilter]<~StoragePoolFilter> + Returns -> typing.Sequence<+T_co>[~StoragePoolsResult]<~StoragePoolsResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Storage', Request='ListPools', Version=2, Params=params) + msg = dict(type='Storage', request='ListPools', version=3, params=params) params['filters'] = filters reply = await self.rpc(msg) return reply @@ -16296,12 +17098,12 @@ class Storage(Type): @ReturnMapping(StorageDetailsListResults) async def ListStorageDetails(self, filters): ''' - filters : typing.Sequence[~StorageFilter] - Returns -> typing.Sequence[~StorageDetailsListResult] + filters : typing.Sequence<+T_co>[~StorageFilter]<~StorageFilter> + Returns -> typing.Sequence<+T_co>[~StorageDetailsListResult]<~StorageDetailsListResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Storage', Request='ListStorageDetails', Version=2, Params=params) + msg = dict(type='Storage', request='ListStorageDetails', version=3, params=params) params['filters'] = filters reply = await self.rpc(msg) return reply @@ -16311,12 +17113,12 @@ class Storage(Type): @ReturnMapping(VolumeDetailsListResults) async def ListVolumes(self, filters): ''' - filters : typing.Sequence[~VolumeFilter] - Returns -> typing.Sequence[~VolumeDetailsListResult] + filters : typing.Sequence<+T_co>[~VolumeFilter]<~VolumeFilter> + Returns -> typing.Sequence<+T_co>[~VolumeDetailsListResult]<~VolumeDetailsListResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Storage', Request='ListVolumes', Version=2, Params=params) + msg = dict(type='Storage', request='ListVolumes', version=3, params=params) params['filters'] = filters reply = await self.rpc(msg) return reply @@ -16326,20 +17128,20 @@ class Storage(Type): @ReturnMapping(StorageDetailsResults) async def StorageDetails(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~StorageDetailsResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~StorageDetailsResult]<~StorageDetailsResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Storage', Request='StorageDetails', Version=2, Params=params) - params['Entities'] = entities + msg = dict(type='Storage', request='StorageDetails', version=3, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply -class StorageProvisioner(Type): +class StorageProvisionerFacade(Type): name = 'StorageProvisioner' - version = 2 + version = 3 schema = {'definitions': {'BlockDevice': {'additionalProperties': False, 'properties': {'BusAddress': {'type': 'string'}, 'DeviceLinks': {'items': {'type': 'string'}, @@ -16373,73 +17175,72 @@ class StorageProvisioner(Type): 'type': 'array'}}, 'type': 'object'}, 'Entities': {'additionalProperties': False, - 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'}, + 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, 'type': 'array'}}, - 'required': ['Entities'], + 'required': ['entities'], 'type': 'object'}, 'Entity': {'additionalProperties': False, - 'properties': {'Tag': {'type': 'string'}}, - 'required': ['Tag'], + 'properties': {'tag': {'type': 'string'}}, + 'required': ['tag'], 'type': 'object'}, 'EntityStatusArgs': {'additionalProperties': False, - 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True, + 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True, 'type': 'object'}}, 'type': 'object'}, - 'Info': {'type': 'string'}, - 'Status': {'type': 'string'}, - 'Tag': {'type': 'string'}}, - 'required': ['Tag', - 'Status', - 'Info', - 'Data'], + 'info': {'type': 'string'}, + 'status': {'type': 'string'}, + 'tag': {'type': 'string'}}, + 'required': ['tag', + 'status', + 'info', + 'data'], 'type': 'object'}, 'Error': {'additionalProperties': False, - 'properties': {'Code': {'type': 'string'}, - 'Info': {'$ref': '#/definitions/ErrorInfo'}, - 'Message': {'type': 'string'}}, - 'required': ['Message', 'Code'], + 'properties': {'code': {'type': 'string'}, + 'info': {'$ref': '#/definitions/ErrorInfo'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], 'type': 'object'}, 'ErrorInfo': {'additionalProperties': False, - 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'}, - 'MacaroonPath': {'type': 'string'}}, + 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'macaroon-path': {'type': 'string'}}, 'type': 'object'}, 'ErrorResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}}, - 'required': ['Error'], + 'properties': {'error': {'$ref': '#/definitions/Error'}}, 'type': 'object'}, 'ErrorResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'}, + 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, 'type': 'array'}}, - 'required': ['Results'], + 'required': ['results'], 'type': 'object'}, 'Filesystem': {'additionalProperties': False, - 'properties': {'filesystemtag': {'type': 'string'}, + 'properties': {'filesystem-tag': {'type': 'string'}, 'info': {'$ref': '#/definitions/FilesystemInfo'}, - 'volumetag': {'type': 'string'}}, - 'required': ['filesystemtag', 'info'], + 'volume-tag': {'type': 'string'}}, + 'required': ['filesystem-tag', 'info'], 'type': 'object'}, 'FilesystemAttachment': {'additionalProperties': False, - 'properties': {'filesystemtag': {'type': 'string'}, + 'properties': {'filesystem-tag': {'type': 'string'}, 'info': {'$ref': '#/definitions/FilesystemAttachmentInfo'}, - 'machinetag': {'type': 'string'}}, - 'required': ['filesystemtag', - 'machinetag', + 'machine-tag': {'type': 'string'}}, + 'required': ['filesystem-tag', + 'machine-tag', 'info'], 'type': 'object'}, 'FilesystemAttachmentInfo': {'additionalProperties': False, - 'properties': {'mountpoint': {'type': 'string'}, + 'properties': {'mount-point': {'type': 'string'}, 'read-only': {'type': 'boolean'}}, 'type': 'object'}, 'FilesystemAttachmentParams': {'additionalProperties': False, - 'properties': {'filesystemid': {'type': 'string'}, - 'filesystemtag': {'type': 'string'}, - 'instanceid': {'type': 'string'}, - 'machinetag': {'type': 'string'}, - 'mountpoint': {'type': 'string'}, + 'properties': {'filesystem-id': {'type': 'string'}, + 'filesystem-tag': {'type': 'string'}, + 'instance-id': {'type': 'string'}, + 'machine-tag': {'type': 'string'}, + 'mount-point': {'type': 'string'}, 'provider': {'type': 'string'}, 'read-only': {'type': 'boolean'}}, - 'required': ['filesystemtag', - 'machinetag', + 'required': ['filesystem-tag', + 'machine-tag', 'provider'], 'type': 'object'}, 'FilesystemAttachmentParamsResult': {'additionalProperties': False, @@ -16461,27 +17262,27 @@ class StorageProvisioner(Type): 'type': 'array'}}, 'type': 'object'}, 'FilesystemAttachments': {'additionalProperties': False, - 'properties': {'filesystemattachments': {'items': {'$ref': '#/definitions/FilesystemAttachment'}, - 'type': 'array'}}, - 'required': ['filesystemattachments'], + 'properties': {'filesystem-attachments': {'items': {'$ref': '#/definitions/FilesystemAttachment'}, + 'type': 'array'}}, + 'required': ['filesystem-attachments'], 'type': 'object'}, 'FilesystemInfo': {'additionalProperties': False, - 'properties': {'filesystemid': {'type': 'string'}, + 'properties': {'filesystem-id': {'type': 'string'}, 'size': {'type': 'integer'}}, - 'required': ['filesystemid', 'size'], + 'required': ['filesystem-id', 'size'], 'type': 'object'}, 'FilesystemParams': {'additionalProperties': False, 'properties': {'attachment': {'$ref': '#/definitions/FilesystemAttachmentParams'}, 'attributes': {'patternProperties': {'.*': {'additionalProperties': True, 'type': 'object'}}, 'type': 'object'}, - 'filesystemtag': {'type': 'string'}, + 'filesystem-tag': {'type': 'string'}, 'provider': {'type': 'string'}, 'size': {'type': 'integer'}, 'tags': {'patternProperties': {'.*': {'type': 'string'}}, 'type': 'object'}, - 'volumetag': {'type': 'string'}}, - 'required': ['filesystemtag', + 'volume-tag': {'type': 'string'}}, + 'required': ['filesystem-tag', 'size', 'provider'], 'type': 'object'}, @@ -16509,35 +17310,21 @@ class StorageProvisioner(Type): 'required': ['filesystems'], 'type': 'object'}, 'LifeResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Life': {'type': 'string'}}, - 'required': ['Life', 'Error'], + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'life': {'type': 'string'}}, + 'required': ['life'], 'type': 'object'}, 'LifeResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/LifeResult'}, + 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'}, 'type': 'array'}}, - 'required': ['Results'], + 'required': ['results'], 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, - 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'}, - 'type': 'array'}, - 'data': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'id': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'sig': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['data', - 'location', - 'id', - 'caveats', - 'sig'], - 'type': 'object'}, + 'Macaroon': {'additionalProperties': False, 'type': 'object'}, 'MachineStorageId': {'additionalProperties': False, - 'properties': {'attachmenttag': {'type': 'string'}, - 'machinetag': {'type': 'string'}}, - 'required': ['machinetag', - 'attachmenttag'], + 'properties': {'attachment-tag': {'type': 'string'}, + 'machine-tag': {'type': 'string'}}, + 'required': ['machine-tag', + 'attachment-tag'], 'type': 'object'}, 'MachineStorageIds': {'additionalProperties': False, 'properties': {'ids': {'items': {'$ref': '#/definitions/MachineStorageId'}, @@ -16545,92 +17332,83 @@ class StorageProvisioner(Type): 'required': ['ids'], 'type': 'object'}, 'MachineStorageIdsWatchResult': {'additionalProperties': False, - 'properties': {'Changes': {'items': {'$ref': '#/definitions/MachineStorageId'}, + 'properties': {'changes': {'items': {'$ref': '#/definitions/MachineStorageId'}, 'type': 'array'}, - 'Error': {'$ref': '#/definitions/Error'}, - 'MachineStorageIdsWatcherId': {'type': 'string'}}, - 'required': ['MachineStorageIdsWatcherId', - 'Changes', - 'Error'], + 'error': {'$ref': '#/definitions/Error'}, + 'watcher-id': {'type': 'string'}}, + 'required': ['watcher-id', + 'changes'], 'type': 'object'}, 'MachineStorageIdsWatchResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/MachineStorageIdsWatchResult'}, + 'properties': {'results': {'items': {'$ref': '#/definitions/MachineStorageIdsWatchResult'}, 'type': 'array'}}, - 'required': ['Results'], + 'required': ['results'], 'type': 'object'}, - 'ModelConfigResult': {'additionalProperties': False, - 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}}, - 'required': ['Config'], - 'type': 'object'}, 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'NotifyWatcherId': {'type': 'string'}}, - 'required': ['NotifyWatcherId', 'Error'], + 'properties': {'NotifyWatcherId': {'type': 'string'}, + 'error': {'$ref': '#/definitions/Error'}}, + 'required': ['NotifyWatcherId'], 'type': 'object'}, 'NotifyWatchResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, + 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, 'type': 'array'}}, - 'required': ['Results'], + 'required': ['results'], 'type': 'object'}, 'SetStatus': {'additionalProperties': False, - 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'}, + 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'}, 'type': 'array'}}, - 'required': ['Entities'], + 'required': ['entities'], 'type': 'object'}, 'StringResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Result': {'type': 'string'}}, - 'required': ['Error', 'Result'], + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'type': 'string'}}, + 'required': ['result'], 'type': 'object'}, 'StringResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/StringResult'}, + 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'}, 'type': 'array'}}, - 'required': ['Results'], + 'required': ['results'], 'type': 'object'}, 'StringsWatchResult': {'additionalProperties': False, - 'properties': {'Changes': {'items': {'type': 'string'}, + 'properties': {'changes': {'items': {'type': 'string'}, 'type': 'array'}, - 'Error': {'$ref': '#/definitions/Error'}, - 'StringsWatcherId': {'type': 'string'}}, - 'required': ['StringsWatcherId', - 'Changes', - 'Error'], + 'error': {'$ref': '#/definitions/Error'}, + 'watcher-id': {'type': 'string'}}, + 'required': ['watcher-id'], 'type': 'object'}, 'StringsWatchResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsWatchResult'}, + 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'}, 'type': 'array'}}, - 'required': ['Results'], + 'required': ['results'], 'type': 'object'}, 'Volume': {'additionalProperties': False, 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'}, - 'volumetag': {'type': 'string'}}, - 'required': ['volumetag', 'info'], + 'volume-tag': {'type': 'string'}}, + 'required': ['volume-tag', 'info'], 'type': 'object'}, 'VolumeAttachment': {'additionalProperties': False, 'properties': {'info': {'$ref': '#/definitions/VolumeAttachmentInfo'}, - 'machinetag': {'type': 'string'}, - 'volumetag': {'type': 'string'}}, - 'required': ['volumetag', - 'machinetag', + 'machine-tag': {'type': 'string'}, + 'volume-tag': {'type': 'string'}}, + 'required': ['volume-tag', + 'machine-tag', 'info'], 'type': 'object'}, 'VolumeAttachmentInfo': {'additionalProperties': False, - 'properties': {'busaddress': {'type': 'string'}, - 'devicelink': {'type': 'string'}, - 'devicename': {'type': 'string'}, + 'properties': {'bus-address': {'type': 'string'}, + 'device-link': {'type': 'string'}, + 'device-name': {'type': 'string'}, 'read-only': {'type': 'boolean'}}, 'type': 'object'}, 'VolumeAttachmentParams': {'additionalProperties': False, - 'properties': {'instanceid': {'type': 'string'}, - 'machinetag': {'type': 'string'}, + 'properties': {'instance-id': {'type': 'string'}, + 'machine-tag': {'type': 'string'}, 'provider': {'type': 'string'}, 'read-only': {'type': 'boolean'}, - 'volumeid': {'type': 'string'}, - 'volumetag': {'type': 'string'}}, - 'required': ['volumetag', - 'machinetag', + 'volume-id': {'type': 'string'}, + 'volume-tag': {'type': 'string'}}, + 'required': ['volume-tag', + 'machine-tag', 'provider'], 'type': 'object'}, 'VolumeAttachmentParamsResult': {'additionalProperties': False, @@ -16652,16 +17430,16 @@ class StorageProvisioner(Type): 'type': 'array'}}, 'type': 'object'}, 'VolumeAttachments': {'additionalProperties': False, - 'properties': {'volumeattachments': {'items': {'$ref': '#/definitions/VolumeAttachment'}, - 'type': 'array'}}, - 'required': ['volumeattachments'], + 'properties': {'volume-attachments': {'items': {'$ref': '#/definitions/VolumeAttachment'}, + 'type': 'array'}}, + 'required': ['volume-attachments'], 'type': 'object'}, 'VolumeInfo': {'additionalProperties': False, - 'properties': {'hardwareid': {'type': 'string'}, + 'properties': {'hardware-id': {'type': 'string'}, 'persistent': {'type': 'boolean'}, 'size': {'type': 'integer'}, - 'volumeid': {'type': 'string'}}, - 'required': ['volumeid', 'size', 'persistent'], + 'volume-id': {'type': 'string'}}, + 'required': ['volume-id', 'size', 'persistent'], 'type': 'object'}, 'VolumeParams': {'additionalProperties': False, 'properties': {'attachment': {'$ref': '#/definitions/VolumeAttachmentParams'}, @@ -16672,8 +17450,10 @@ class StorageProvisioner(Type): 'size': {'type': 'integer'}, 'tags': {'patternProperties': {'.*': {'type': 'string'}}, 'type': 'object'}, - 'volumetag': {'type': 'string'}}, - 'required': ['volumetag', 'size', 'provider'], + 'volume-tag': {'type': 'string'}}, + 'required': ['volume-tag', + 'size', + 'provider'], 'type': 'object'}, 'VolumeParamsResult': {'additionalProperties': False, 'properties': {'error': {'$ref': '#/definitions/Error'}, @@ -16697,21 +17477,7 @@ class StorageProvisioner(Type): 'properties': {'volumes': {'items': {'$ref': '#/definitions/Volume'}, 'type': 'array'}}, 'required': ['volumes'], - 'type': 'object'}, - 'caveat': {'additionalProperties': False, - 'properties': {'caveatId': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'verificationId': {'$ref': '#/definitions/packet'}}, - 'required': ['location', - 'caveatId', - 'verificationId'], - 'type': 'object'}, - 'packet': {'additionalProperties': False, - 'properties': {'headerLen': {'type': 'integer'}, - 'start': {'type': 'integer'}, - 'totalLen': {'type': 'integer'}}, - 'required': ['start', 'totalLen', 'headerLen'], - 'type': 'object'}}, + 'type': 'object'}}, 'properties': {'AttachmentLife': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'}, 'Result': {'$ref': '#/definitions/LifeResults'}}, 'type': 'object'}, @@ -16736,8 +17502,6 @@ class StorageProvisioner(Type): 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, 'Result': {'$ref': '#/definitions/LifeResults'}}, 'type': 'object'}, - 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}}, - 'type': 'object'}, 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, 'Result': {'$ref': '#/definitions/ErrorResults'}}, 'type': 'object'}, @@ -16786,8 +17550,6 @@ class StorageProvisioner(Type): 'WatchFilesystems': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, 'type': 'object'}, - 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, - 'type': 'object'}, 'WatchMachines': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, 'type': 'object'}, @@ -16803,12 +17565,12 @@ class StorageProvisioner(Type): @ReturnMapping(LifeResults) async def AttachmentLife(self, ids): ''' - ids : typing.Sequence[~MachineStorageId] - Returns -> typing.Sequence[~LifeResult] + ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId> + Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='StorageProvisioner', Request='AttachmentLife', Version=2, Params=params) + msg = dict(type='StorageProvisioner', request='AttachmentLife', version=3, params=params) params['ids'] = ids reply = await self.rpc(msg) return reply @@ -16818,13 +17580,13 @@ class StorageProvisioner(Type): @ReturnMapping(ErrorResults) async def EnsureDead(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ErrorResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='StorageProvisioner', Request='EnsureDead', Version=2, Params=params) - params['Entities'] = entities + msg = dict(type='StorageProvisioner', request='EnsureDead', version=3, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @@ -16833,12 +17595,12 @@ class StorageProvisioner(Type): @ReturnMapping(FilesystemAttachmentParamsResults) async def FilesystemAttachmentParams(self, ids): ''' - ids : typing.Sequence[~MachineStorageId] - Returns -> typing.Sequence[~FilesystemAttachmentParamsResult] + ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId> + Returns -> typing.Sequence<+T_co>[~FilesystemAttachmentParamsResult]<~FilesystemAttachmentParamsResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='StorageProvisioner', Request='FilesystemAttachmentParams', Version=2, Params=params) + msg = dict(type='StorageProvisioner', request='FilesystemAttachmentParams', version=3, params=params) params['ids'] = ids reply = await self.rpc(msg) return reply @@ -16848,12 +17610,12 @@ class StorageProvisioner(Type): @ReturnMapping(FilesystemAttachmentResults) async def FilesystemAttachments(self, ids): ''' - ids : typing.Sequence[~MachineStorageId] - Returns -> typing.Sequence[~FilesystemAttachmentResult] + ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId> + Returns -> typing.Sequence<+T_co>[~FilesystemAttachmentResult]<~FilesystemAttachmentResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='StorageProvisioner', Request='FilesystemAttachments', Version=2, Params=params) + msg = dict(type='StorageProvisioner', request='FilesystemAttachments', version=3, params=params) params['ids'] = ids reply = await self.rpc(msg) return reply @@ -16863,13 +17625,13 @@ class StorageProvisioner(Type): @ReturnMapping(FilesystemParamsResults) async def FilesystemParams(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~FilesystemParamsResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~FilesystemParamsResult]<~FilesystemParamsResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='StorageProvisioner', Request='FilesystemParams', Version=2, Params=params) - params['Entities'] = entities + msg = dict(type='StorageProvisioner', request='FilesystemParams', version=3, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @@ -16878,13 +17640,13 @@ class StorageProvisioner(Type): @ReturnMapping(FilesystemResults) async def Filesystems(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~FilesystemResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~FilesystemResult]<~FilesystemResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='StorageProvisioner', Request='Filesystems', Version=2, Params=params) - params['Entities'] = entities + msg = dict(type='StorageProvisioner', request='Filesystems', version=3, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @@ -16893,13 +17655,13 @@ class StorageProvisioner(Type): @ReturnMapping(StringResults) async def InstanceId(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~StringResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='StorageProvisioner', Request='InstanceId', Version=2, Params=params) - params['Entities'] = entities + msg = dict(type='StorageProvisioner', request='InstanceId', version=3, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @@ -16908,28 +17670,13 @@ class StorageProvisioner(Type): @ReturnMapping(LifeResults) async def Life(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~LifeResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='StorageProvisioner', Request='Life', Version=2, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ModelConfigResult) - async def ModelConfig(self): - ''' - - Returns -> typing.Mapping[str, typing.Any] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='StorageProvisioner', Request='ModelConfig', Version=2, Params=params) - + msg = dict(type='StorageProvisioner', request='Life', version=3, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @@ -16938,13 +17685,13 @@ class StorageProvisioner(Type): @ReturnMapping(ErrorResults) async def Remove(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ErrorResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='StorageProvisioner', Request='Remove', Version=2, Params=params) - params['Entities'] = entities + msg = dict(type='StorageProvisioner', request='Remove', version=3, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @@ -16953,12 +17700,12 @@ class StorageProvisioner(Type): @ReturnMapping(ErrorResults) async def RemoveAttachment(self, ids): ''' - ids : typing.Sequence[~MachineStorageId] - Returns -> typing.Sequence[~ErrorResult] + ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='StorageProvisioner', Request='RemoveAttachment', Version=2, Params=params) + msg = dict(type='StorageProvisioner', request='RemoveAttachment', version=3, params=params) params['ids'] = ids reply = await self.rpc(msg) return reply @@ -16966,15 +17713,15 @@ class StorageProvisioner(Type): @ReturnMapping(ErrorResults) - async def SetFilesystemAttachmentInfo(self, filesystemattachments): + async def SetFilesystemAttachmentInfo(self, filesystem_attachments): ''' - filesystemattachments : typing.Sequence[~FilesystemAttachment] - Returns -> typing.Sequence[~ErrorResult] + filesystem_attachments : typing.Sequence<+T_co>[~FilesystemAttachment]<~FilesystemAttachment> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='StorageProvisioner', Request='SetFilesystemAttachmentInfo', Version=2, Params=params) - params['filesystemattachments'] = filesystemattachments + msg = dict(type='StorageProvisioner', request='SetFilesystemAttachmentInfo', version=3, params=params) + params['filesystem-attachments'] = filesystem_attachments reply = await self.rpc(msg) return reply @@ -16983,12 +17730,12 @@ class StorageProvisioner(Type): @ReturnMapping(ErrorResults) async def SetFilesystemInfo(self, filesystems): ''' - filesystems : typing.Sequence[~Filesystem] - Returns -> typing.Sequence[~ErrorResult] + filesystems : typing.Sequence<+T_co>[~Filesystem]<~Filesystem> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='StorageProvisioner', Request='SetFilesystemInfo', Version=2, Params=params) + msg = dict(type='StorageProvisioner', request='SetFilesystemInfo', version=3, params=params) params['filesystems'] = filesystems reply = await self.rpc(msg) return reply @@ -16998,28 +17745,28 @@ class StorageProvisioner(Type): @ReturnMapping(ErrorResults) async def SetStatus(self, entities): ''' - entities : typing.Sequence[~EntityStatusArgs] - Returns -> typing.Sequence[~ErrorResult] + entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='StorageProvisioner', Request='SetStatus', Version=2, Params=params) - params['Entities'] = entities + msg = dict(type='StorageProvisioner', request='SetStatus', version=3, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @ReturnMapping(ErrorResults) - async def SetVolumeAttachmentInfo(self, volumeattachments): + async def SetVolumeAttachmentInfo(self, volume_attachments): ''' - volumeattachments : typing.Sequence[~VolumeAttachment] - Returns -> typing.Sequence[~ErrorResult] + volume_attachments : typing.Sequence<+T_co>[~VolumeAttachment]<~VolumeAttachment> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='StorageProvisioner', Request='SetVolumeAttachmentInfo', Version=2, Params=params) - params['volumeattachments'] = volumeattachments + msg = dict(type='StorageProvisioner', request='SetVolumeAttachmentInfo', version=3, params=params) + params['volume-attachments'] = volume_attachments reply = await self.rpc(msg) return reply @@ -17028,12 +17775,12 @@ class StorageProvisioner(Type): @ReturnMapping(ErrorResults) async def SetVolumeInfo(self, volumes): ''' - volumes : typing.Sequence[~Volume] - Returns -> typing.Sequence[~ErrorResult] + volumes : typing.Sequence<+T_co>[~Volume]<~Volume> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='StorageProvisioner', Request='SetVolumeInfo', Version=2, Params=params) + msg = dict(type='StorageProvisioner', request='SetVolumeInfo', version=3, params=params) params['volumes'] = volumes reply = await self.rpc(msg) return reply @@ -17043,13 +17790,13 @@ class StorageProvisioner(Type): @ReturnMapping(ErrorResults) async def UpdateStatus(self, entities): ''' - entities : typing.Sequence[~EntityStatusArgs] - Returns -> typing.Sequence[~ErrorResult] + entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='StorageProvisioner', Request='UpdateStatus', Version=2, Params=params) - params['Entities'] = entities + msg = dict(type='StorageProvisioner', request='UpdateStatus', version=3, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @@ -17058,12 +17805,12 @@ class StorageProvisioner(Type): @ReturnMapping(VolumeAttachmentParamsResults) async def VolumeAttachmentParams(self, ids): ''' - ids : typing.Sequence[~MachineStorageId] - Returns -> typing.Sequence[~VolumeAttachmentParamsResult] + ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId> + Returns -> typing.Sequence<+T_co>[~VolumeAttachmentParamsResult]<~VolumeAttachmentParamsResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='StorageProvisioner', Request='VolumeAttachmentParams', Version=2, Params=params) + msg = dict(type='StorageProvisioner', request='VolumeAttachmentParams', version=3, params=params) params['ids'] = ids reply = await self.rpc(msg) return reply @@ -17073,12 +17820,12 @@ class StorageProvisioner(Type): @ReturnMapping(VolumeAttachmentResults) async def VolumeAttachments(self, ids): ''' - ids : typing.Sequence[~MachineStorageId] - Returns -> typing.Sequence[~VolumeAttachmentResult] + ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId> + Returns -> typing.Sequence<+T_co>[~VolumeAttachmentResult]<~VolumeAttachmentResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='StorageProvisioner', Request='VolumeAttachments', Version=2, Params=params) + msg = dict(type='StorageProvisioner', request='VolumeAttachments', version=3, params=params) params['ids'] = ids reply = await self.rpc(msg) return reply @@ -17088,12 +17835,12 @@ class StorageProvisioner(Type): @ReturnMapping(BlockDeviceResults) async def VolumeBlockDevices(self, ids): ''' - ids : typing.Sequence[~MachineStorageId] - Returns -> typing.Sequence[~BlockDeviceResult] + ids : typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId> + Returns -> typing.Sequence<+T_co>[~BlockDeviceResult]<~BlockDeviceResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='StorageProvisioner', Request='VolumeBlockDevices', Version=2, Params=params) + msg = dict(type='StorageProvisioner', request='VolumeBlockDevices', version=3, params=params) params['ids'] = ids reply = await self.rpc(msg) return reply @@ -17103,13 +17850,13 @@ class StorageProvisioner(Type): @ReturnMapping(VolumeParamsResults) async def VolumeParams(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~VolumeParamsResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~VolumeParamsResult]<~VolumeParamsResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='StorageProvisioner', Request='VolumeParams', Version=2, Params=params) - params['Entities'] = entities + msg = dict(type='StorageProvisioner', request='VolumeParams', version=3, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @@ -17118,13 +17865,13 @@ class StorageProvisioner(Type): @ReturnMapping(VolumeResults) async def Volumes(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~VolumeResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~VolumeResult]<~VolumeResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='StorageProvisioner', Request='Volumes', Version=2, Params=params) - params['Entities'] = entities + msg = dict(type='StorageProvisioner', request='Volumes', version=3, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @@ -17133,13 +17880,13 @@ class StorageProvisioner(Type): @ReturnMapping(NotifyWatchResults) async def WatchBlockDevices(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~NotifyWatchResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='StorageProvisioner', Request='WatchBlockDevices', Version=2, Params=params) - params['Entities'] = entities + msg = dict(type='StorageProvisioner', request='WatchBlockDevices', version=3, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @@ -17148,13 +17895,13 @@ class StorageProvisioner(Type): @ReturnMapping(MachineStorageIdsWatchResults) async def WatchFilesystemAttachments(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~MachineStorageIdsWatchResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~MachineStorageIdsWatchResult]<~MachineStorageIdsWatchResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='StorageProvisioner', Request='WatchFilesystemAttachments', Version=2, Params=params) - params['Entities'] = entities + msg = dict(type='StorageProvisioner', request='WatchFilesystemAttachments', version=3, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @@ -17163,28 +17910,13 @@ class StorageProvisioner(Type): @ReturnMapping(StringsWatchResults) async def WatchFilesystems(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~StringsWatchResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='StorageProvisioner', Request='WatchFilesystems', Version=2, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResult) - async def WatchForModelConfigChanges(self): - ''' - - Returns -> typing.Union[_ForwardRef('Error'), str] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='StorageProvisioner', Request='WatchForModelConfigChanges', Version=2, Params=params) - + msg = dict(type='StorageProvisioner', request='WatchFilesystems', version=3, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @@ -17193,13 +17925,13 @@ class StorageProvisioner(Type): @ReturnMapping(NotifyWatchResults) async def WatchMachines(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~NotifyWatchResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='StorageProvisioner', Request='WatchMachines', Version=2, Params=params) - params['Entities'] = entities + msg = dict(type='StorageProvisioner', request='WatchMachines', version=3, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @@ -17208,13 +17940,13 @@ class StorageProvisioner(Type): @ReturnMapping(MachineStorageIdsWatchResults) async def WatchVolumeAttachments(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~MachineStorageIdsWatchResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~MachineStorageIdsWatchResult]<~MachineStorageIdsWatchResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='StorageProvisioner', Request='WatchVolumeAttachments', Version=2, Params=params) - params['Entities'] = entities + msg = dict(type='StorageProvisioner', request='WatchVolumeAttachments', version=3, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @@ -17223,68 +17955,38 @@ class StorageProvisioner(Type): @ReturnMapping(StringsWatchResults) async def WatchVolumes(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~StringsWatchResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='StorageProvisioner', Request='WatchVolumes', Version=2, Params=params) - params['Entities'] = entities + msg = dict(type='StorageProvisioner', request='WatchVolumes', version=3, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply -class StringsWatcher(Type): +class StringsWatcherFacade(Type): name = 'StringsWatcher' version = 1 schema = {'definitions': {'Error': {'additionalProperties': False, - 'properties': {'Code': {'type': 'string'}, - 'Info': {'$ref': '#/definitions/ErrorInfo'}, - 'Message': {'type': 'string'}}, - 'required': ['Message', 'Code'], + 'properties': {'code': {'type': 'string'}, + 'info': {'$ref': '#/definitions/ErrorInfo'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], 'type': 'object'}, 'ErrorInfo': {'additionalProperties': False, - 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'}, - 'MacaroonPath': {'type': 'string'}}, + 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'macaroon-path': {'type': 'string'}}, 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, - 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'}, - 'type': 'array'}, - 'data': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'id': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'sig': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['data', - 'location', - 'id', - 'caveats', - 'sig'], - 'type': 'object'}, + 'Macaroon': {'additionalProperties': False, 'type': 'object'}, 'StringsWatchResult': {'additionalProperties': False, - 'properties': {'Changes': {'items': {'type': 'string'}, + 'properties': {'changes': {'items': {'type': 'string'}, 'type': 'array'}, - 'Error': {'$ref': '#/definitions/Error'}, - 'StringsWatcherId': {'type': 'string'}}, - 'required': ['StringsWatcherId', - 'Changes', - 'Error'], - 'type': 'object'}, - 'caveat': {'additionalProperties': False, - 'properties': {'caveatId': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'verificationId': {'$ref': '#/definitions/packet'}}, - 'required': ['location', - 'caveatId', - 'verificationId'], - 'type': 'object'}, - 'packet': {'additionalProperties': False, - 'properties': {'headerLen': {'type': 'integer'}, - 'start': {'type': 'integer'}, - 'totalLen': {'type': 'integer'}}, - 'required': ['start', 'totalLen', 'headerLen'], - 'type': 'object'}}, + 'error': {'$ref': '#/definitions/Error'}, + 'watcher-id': {'type': 'string'}}, + 'required': ['watcher-id'], + 'type': 'object'}}, 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}}, 'type': 'object'}, 'Stop': {'type': 'object'}}, @@ -17295,11 +17997,11 @@ class StringsWatcher(Type): async def Next(self): ''' - Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')] + Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')] ''' # map input types to rpc msg params = dict() - msg = dict(Type='StringsWatcher', Request='Next', Version=1, Params=params) + msg = dict(type='StringsWatcher', request='Next', version=1, params=params) reply = await self.rpc(msg) return reply @@ -17314,125 +18016,92 @@ class StringsWatcher(Type): ''' # map input types to rpc msg params = dict() - msg = dict(Type='StringsWatcher', Request='Stop', Version=1, Params=params) + msg = dict(type='StringsWatcher', request='Stop', version=1, params=params) reply = await self.rpc(msg) return reply -class Subnets(Type): +class SubnetsFacade(Type): name = 'Subnets' version = 2 schema = {'definitions': {'AddSubnetParams': {'additionalProperties': False, - 'properties': {'SpaceTag': {'type': 'string'}, - 'SubnetProviderId': {'type': 'string'}, - 'SubnetTag': {'type': 'string'}, - 'Zones': {'items': {'type': 'string'}, + 'properties': {'space-tag': {'type': 'string'}, + 'subnet-provider-id': {'type': 'string'}, + 'subnet-tag': {'type': 'string'}, + 'zones': {'items': {'type': 'string'}, 'type': 'array'}}, - 'required': ['SpaceTag'], + 'required': ['space-tag'], 'type': 'object'}, 'AddSubnetsParams': {'additionalProperties': False, - 'properties': {'Subnets': {'items': {'$ref': '#/definitions/AddSubnetParams'}, + 'properties': {'subnets': {'items': {'$ref': '#/definitions/AddSubnetParams'}, 'type': 'array'}}, - 'required': ['Subnets'], + 'required': ['subnets'], 'type': 'object'}, 'Error': {'additionalProperties': False, - 'properties': {'Code': {'type': 'string'}, - 'Info': {'$ref': '#/definitions/ErrorInfo'}, - 'Message': {'type': 'string'}}, - 'required': ['Message', 'Code'], + 'properties': {'code': {'type': 'string'}, + 'info': {'$ref': '#/definitions/ErrorInfo'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], 'type': 'object'}, 'ErrorInfo': {'additionalProperties': False, - 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'}, - 'MacaroonPath': {'type': 'string'}}, + 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'macaroon-path': {'type': 'string'}}, 'type': 'object'}, 'ErrorResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}}, - 'required': ['Error'], + 'properties': {'error': {'$ref': '#/definitions/Error'}}, 'type': 'object'}, 'ErrorResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'}, + 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, 'type': 'array'}}, - 'required': ['Results'], + 'required': ['results'], 'type': 'object'}, 'ListSubnetsResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/Subnet'}, + 'properties': {'results': {'items': {'$ref': '#/definitions/Subnet'}, 'type': 'array'}}, - 'required': ['Results'], + 'required': ['results'], 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, - 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'}, - 'type': 'array'}, - 'data': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'id': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'sig': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['data', - 'location', - 'id', - 'caveats', - 'sig'], - 'type': 'object'}, + 'Macaroon': {'additionalProperties': False, 'type': 'object'}, 'SpaceResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Tag': {'type': 'string'}}, - 'required': ['Error', 'Tag'], + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'tag': {'type': 'string'}}, + 'required': ['tag'], 'type': 'object'}, 'SpaceResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/SpaceResult'}, + 'properties': {'results': {'items': {'$ref': '#/definitions/SpaceResult'}, 'type': 'array'}}, - 'required': ['Results'], + 'required': ['results'], 'type': 'object'}, 'Subnet': {'additionalProperties': False, - 'properties': {'CIDR': {'type': 'string'}, - 'Life': {'type': 'string'}, - 'ProviderId': {'type': 'string'}, - 'SpaceTag': {'type': 'string'}, - 'StaticRangeHighIP': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'StaticRangeLowIP': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'Status': {'type': 'string'}, - 'VLANTag': {'type': 'integer'}, - 'Zones': {'items': {'type': 'string'}, + 'properties': {'cidr': {'type': 'string'}, + 'life': {'type': 'string'}, + 'provider-id': {'type': 'string'}, + 'space-tag': {'type': 'string'}, + 'status': {'type': 'string'}, + 'vlan-tag': {'type': 'integer'}, + 'zones': {'items': {'type': 'string'}, 'type': 'array'}}, - 'required': ['CIDR', - 'VLANTag', - 'Life', - 'SpaceTag', - 'Zones'], + 'required': ['cidr', + 'vlan-tag', + 'life', + 'space-tag', + 'zones'], 'type': 'object'}, 'SubnetsFilters': {'additionalProperties': False, - 'properties': {'SpaceTag': {'type': 'string'}, - 'Zone': {'type': 'string'}}, + 'properties': {'space-tag': {'type': 'string'}, + 'zone': {'type': 'string'}}, 'type': 'object'}, 'ZoneResult': {'additionalProperties': False, - 'properties': {'Available': {'type': 'boolean'}, - 'Error': {'$ref': '#/definitions/Error'}, - 'Name': {'type': 'string'}}, - 'required': ['Error', 'Name', 'Available'], + 'properties': {'available': {'type': 'boolean'}, + 'error': {'$ref': '#/definitions/Error'}, + 'name': {'type': 'string'}}, + 'required': ['name', 'available'], 'type': 'object'}, 'ZoneResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/ZoneResult'}, + 'properties': {'results': {'items': {'$ref': '#/definitions/ZoneResult'}, 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'caveat': {'additionalProperties': False, - 'properties': {'caveatId': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'verificationId': {'$ref': '#/definitions/packet'}}, - 'required': ['location', - 'caveatId', - 'verificationId'], - 'type': 'object'}, - 'packet': {'additionalProperties': False, - 'properties': {'headerLen': {'type': 'integer'}, - 'start': {'type': 'integer'}, - 'totalLen': {'type': 'integer'}}, - 'required': ['start', 'totalLen', 'headerLen'], - 'type': 'object'}}, + 'required': ['results'], + 'type': 'object'}}, 'properties': {'AddSubnets': {'properties': {'Params': {'$ref': '#/definitions/AddSubnetsParams'}, 'Result': {'$ref': '#/definitions/ErrorResults'}}, 'type': 'object'}, @@ -17449,13 +18118,13 @@ class Subnets(Type): @ReturnMapping(ErrorResults) async def AddSubnets(self, subnets): ''' - subnets : typing.Sequence[~AddSubnetParams] - Returns -> typing.Sequence[~ErrorResult] + subnets : typing.Sequence<+T_co>[~AddSubnetParams]<~AddSubnetParams> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Subnets', Request='AddSubnets', Version=2, Params=params) - params['Subnets'] = subnets + msg = dict(type='Subnets', request='AddSubnets', version=2, params=params) + params['subnets'] = subnets reply = await self.rpc(msg) return reply @@ -17465,11 +18134,11 @@ class Subnets(Type): async def AllSpaces(self): ''' - Returns -> typing.Sequence[~SpaceResult] + Returns -> typing.Sequence<+T_co>[~SpaceResult]<~SpaceResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Subnets', Request='AllSpaces', Version=2, Params=params) + msg = dict(type='Subnets', request='AllSpaces', version=2, params=params) reply = await self.rpc(msg) return reply @@ -17480,11 +18149,11 @@ class Subnets(Type): async def AllZones(self): ''' - Returns -> typing.Sequence[~ZoneResult] + Returns -> typing.Sequence<+T_co>[~ZoneResult]<~ZoneResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Subnets', Request='AllZones', Version=2, Params=params) + msg = dict(type='Subnets', request='AllZones', version=2, params=params) reply = await self.rpc(msg) return reply @@ -17492,122 +18161,93 @@ class Subnets(Type): @ReturnMapping(ListSubnetsResults) - async def ListSubnets(self, spacetag, zone): + async def ListSubnets(self, space_tag, zone): ''' - spacetag : str + space_tag : str zone : str - Returns -> typing.Sequence[~Subnet] + Returns -> typing.Sequence<+T_co>[~Subnet]<~Subnet> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Subnets', Request='ListSubnets', Version=2, Params=params) - params['SpaceTag'] = spacetag - params['Zone'] = zone + msg = dict(type='Subnets', request='ListSubnets', version=2, params=params) + params['space-tag'] = space_tag + params['zone'] = zone reply = await self.rpc(msg) return reply -class Undertaker(Type): +class UndertakerFacade(Type): name = 'Undertaker' version = 1 schema = {'definitions': {'EntityStatusArgs': {'additionalProperties': False, - 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True, + 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True, 'type': 'object'}}, 'type': 'object'}, - 'Info': {'type': 'string'}, - 'Status': {'type': 'string'}, - 'Tag': {'type': 'string'}}, - 'required': ['Tag', - 'Status', - 'Info', - 'Data'], + 'info': {'type': 'string'}, + 'status': {'type': 'string'}, + 'tag': {'type': 'string'}}, + 'required': ['tag', + 'status', + 'info', + 'data'], 'type': 'object'}, 'Error': {'additionalProperties': False, - 'properties': {'Code': {'type': 'string'}, - 'Info': {'$ref': '#/definitions/ErrorInfo'}, - 'Message': {'type': 'string'}}, - 'required': ['Message', 'Code'], + 'properties': {'code': {'type': 'string'}, + 'info': {'$ref': '#/definitions/ErrorInfo'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], 'type': 'object'}, 'ErrorInfo': {'additionalProperties': False, - 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'}, - 'MacaroonPath': {'type': 'string'}}, + 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'macaroon-path': {'type': 'string'}}, 'type': 'object'}, 'ErrorResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}}, - 'required': ['Error'], + 'properties': {'error': {'$ref': '#/definitions/Error'}}, 'type': 'object'}, 'ErrorResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'}, + 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, 'type': 'array'}}, - 'required': ['Results'], + 'required': ['results'], 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, - 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'}, - 'type': 'array'}, - 'data': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'id': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'sig': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['data', - 'location', - 'id', - 'caveats', - 'sig'], - 'type': 'object'}, + 'Macaroon': {'additionalProperties': False, 'type': 'object'}, 'ModelConfigResult': {'additionalProperties': False, - 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True, + 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True, 'type': 'object'}}, 'type': 'object'}}, - 'required': ['Config'], + 'required': ['config'], 'type': 'object'}, 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'NotifyWatcherId': {'type': 'string'}}, - 'required': ['NotifyWatcherId', 'Error'], + 'properties': {'NotifyWatcherId': {'type': 'string'}, + 'error': {'$ref': '#/definitions/Error'}}, + 'required': ['NotifyWatcherId'], 'type': 'object'}, 'NotifyWatchResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, + 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, 'type': 'array'}}, - 'required': ['Results'], + 'required': ['results'], 'type': 'object'}, 'SetStatus': {'additionalProperties': False, - 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'}, + 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'}, 'type': 'array'}}, - 'required': ['Entities'], + 'required': ['entities'], 'type': 'object'}, 'UndertakerModelInfo': {'additionalProperties': False, - 'properties': {'GlobalName': {'type': 'string'}, - 'IsSystem': {'type': 'boolean'}, - 'Life': {'type': 'string'}, - 'Name': {'type': 'string'}, - 'UUID': {'type': 'string'}}, - 'required': ['UUID', - 'Name', - 'GlobalName', - 'IsSystem', - 'Life'], + 'properties': {'global-name': {'type': 'string'}, + 'is-system': {'type': 'boolean'}, + 'life': {'type': 'string'}, + 'name': {'type': 'string'}, + 'uuid': {'type': 'string'}}, + 'required': ['uuid', + 'name', + 'global-name', + 'is-system', + 'life'], 'type': 'object'}, 'UndertakerModelInfoResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Result': {'$ref': '#/definitions/UndertakerModelInfo'}}, - 'required': ['Error', 'Result'], - 'type': 'object'}, - 'caveat': {'additionalProperties': False, - 'properties': {'caveatId': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'verificationId': {'$ref': '#/definitions/packet'}}, - 'required': ['location', - 'caveatId', - 'verificationId'], - 'type': 'object'}, - 'packet': {'additionalProperties': False, - 'properties': {'headerLen': {'type': 'integer'}, - 'start': {'type': 'integer'}, - 'totalLen': {'type': 'integer'}}, - 'required': ['start', 'totalLen', 'headerLen'], - 'type': 'object'}}, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'$ref': '#/definitions/UndertakerModelInfo'}}, + 'required': ['result'], + 'type': 'object'}}, 'properties': {'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}}, 'type': 'object'}, 'ModelInfo': {'properties': {'Result': {'$ref': '#/definitions/UndertakerModelInfoResult'}}, @@ -17629,11 +18269,11 @@ class Undertaker(Type): async def ModelConfig(self): ''' - Returns -> typing.Mapping[str, typing.Any] + Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any] ''' # map input types to rpc msg params = dict() - msg = dict(Type='Undertaker', Request='ModelConfig', Version=1, Params=params) + msg = dict(type='Undertaker', request='ModelConfig', version=1, params=params) reply = await self.rpc(msg) return reply @@ -17648,7 +18288,7 @@ class Undertaker(Type): ''' # map input types to rpc msg params = dict() - msg = dict(Type='Undertaker', Request='ModelInfo', Version=1, Params=params) + msg = dict(type='Undertaker', request='ModelInfo', version=1, params=params) reply = await self.rpc(msg) return reply @@ -17663,7 +18303,7 @@ class Undertaker(Type): ''' # map input types to rpc msg params = dict() - msg = dict(Type='Undertaker', Request='ProcessDyingModel', Version=1, Params=params) + msg = dict(type='Undertaker', request='ProcessDyingModel', version=1, params=params) reply = await self.rpc(msg) return reply @@ -17678,7 +18318,7 @@ class Undertaker(Type): ''' # map input types to rpc msg params = dict() - msg = dict(Type='Undertaker', Request='RemoveModel', Version=1, Params=params) + msg = dict(type='Undertaker', request='RemoveModel', version=1, params=params) reply = await self.rpc(msg) return reply @@ -17688,13 +18328,13 @@ class Undertaker(Type): @ReturnMapping(ErrorResults) async def SetStatus(self, entities): ''' - entities : typing.Sequence[~EntityStatusArgs] - Returns -> typing.Sequence[~ErrorResult] + entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Undertaker', Request='SetStatus', Version=1, Params=params) - params['Entities'] = entities + msg = dict(type='Undertaker', request='SetStatus', version=1, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @@ -17703,13 +18343,13 @@ class Undertaker(Type): @ReturnMapping(ErrorResults) async def UpdateStatus(self, entities): ''' - entities : typing.Sequence[~EntityStatusArgs] - Returns -> typing.Sequence[~ErrorResult] + entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Undertaker', Request='UpdateStatus', Version=1, Params=params) - params['Entities'] = entities + msg = dict(type='Undertaker', request='UpdateStatus', version=1, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @@ -17719,102 +18359,71 @@ class Undertaker(Type): async def WatchModelResources(self): ''' - Returns -> typing.Sequence[~NotifyWatchResult] + Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Undertaker', Request='WatchModelResources', Version=1, Params=params) + msg = dict(type='Undertaker', request='WatchModelResources', version=1, params=params) reply = await self.rpc(msg) return reply -class UnitAssigner(Type): +class UnitAssignerFacade(Type): name = 'UnitAssigner' version = 1 schema = {'definitions': {'Entities': {'additionalProperties': False, - 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'}, + 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, 'type': 'array'}}, - 'required': ['Entities'], + 'required': ['entities'], 'type': 'object'}, 'Entity': {'additionalProperties': False, - 'properties': {'Tag': {'type': 'string'}}, - 'required': ['Tag'], + 'properties': {'tag': {'type': 'string'}}, + 'required': ['tag'], 'type': 'object'}, 'EntityStatusArgs': {'additionalProperties': False, - 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True, + 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True, 'type': 'object'}}, 'type': 'object'}, - 'Info': {'type': 'string'}, - 'Status': {'type': 'string'}, - 'Tag': {'type': 'string'}}, - 'required': ['Tag', - 'Status', - 'Info', - 'Data'], + 'info': {'type': 'string'}, + 'status': {'type': 'string'}, + 'tag': {'type': 'string'}}, + 'required': ['tag', + 'status', + 'info', + 'data'], 'type': 'object'}, 'Error': {'additionalProperties': False, - 'properties': {'Code': {'type': 'string'}, - 'Info': {'$ref': '#/definitions/ErrorInfo'}, - 'Message': {'type': 'string'}}, - 'required': ['Message', 'Code'], + 'properties': {'code': {'type': 'string'}, + 'info': {'$ref': '#/definitions/ErrorInfo'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], 'type': 'object'}, 'ErrorInfo': {'additionalProperties': False, - 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'}, - 'MacaroonPath': {'type': 'string'}}, + 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'macaroon-path': {'type': 'string'}}, 'type': 'object'}, 'ErrorResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}}, - 'required': ['Error'], + 'properties': {'error': {'$ref': '#/definitions/Error'}}, 'type': 'object'}, 'ErrorResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'}, + 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, 'type': 'array'}}, - 'required': ['Results'], + 'required': ['results'], 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, - 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'}, - 'type': 'array'}, - 'data': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'id': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'sig': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['data', - 'location', - 'id', - 'caveats', - 'sig'], - 'type': 'object'}, + 'Macaroon': {'additionalProperties': False, 'type': 'object'}, 'SetStatus': {'additionalProperties': False, - 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'}, + 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'}, 'type': 'array'}}, - 'required': ['Entities'], + 'required': ['entities'], 'type': 'object'}, 'StringsWatchResult': {'additionalProperties': False, - 'properties': {'Changes': {'items': {'type': 'string'}, + 'properties': {'changes': {'items': {'type': 'string'}, 'type': 'array'}, - 'Error': {'$ref': '#/definitions/Error'}, - 'StringsWatcherId': {'type': 'string'}}, - 'required': ['StringsWatcherId', - 'Changes', - 'Error'], - 'type': 'object'}, - 'caveat': {'additionalProperties': False, - 'properties': {'caveatId': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'verificationId': {'$ref': '#/definitions/packet'}}, - 'required': ['location', - 'caveatId', - 'verificationId'], - 'type': 'object'}, - 'packet': {'additionalProperties': False, - 'properties': {'headerLen': {'type': 'integer'}, - 'start': {'type': 'integer'}, - 'totalLen': {'type': 'integer'}}, - 'required': ['start', 'totalLen', 'headerLen'], - 'type': 'object'}}, + 'error': {'$ref': '#/definitions/Error'}, + 'watcher-id': {'type': 'string'}}, + 'required': ['watcher-id'], + 'type': 'object'}}, 'properties': {'AssignUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, 'Result': {'$ref': '#/definitions/ErrorResults'}}, 'type': 'object'}, @@ -17829,13 +18438,13 @@ class UnitAssigner(Type): @ReturnMapping(ErrorResults) async def AssignUnits(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ErrorResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='UnitAssigner', Request='AssignUnits', Version=1, Params=params) - params['Entities'] = entities + msg = dict(type='UnitAssigner', request='AssignUnits', version=1, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @@ -17844,13 +18453,13 @@ class UnitAssigner(Type): @ReturnMapping(ErrorResults) async def SetAgentStatus(self, entities): ''' - entities : typing.Sequence[~EntityStatusArgs] - Returns -> typing.Sequence[~ErrorResult] + entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='UnitAssigner', Request='SetAgentStatus', Version=1, Params=params) - params['Entities'] = entities + msg = dict(type='UnitAssigner', request='SetAgentStatus', version=1, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @@ -17860,24 +18469,24 @@ class UnitAssigner(Type): async def WatchUnitAssignments(self): ''' - Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')] + Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')] ''' # map input types to rpc msg params = dict() - msg = dict(Type='UnitAssigner', Request='WatchUnitAssignments', Version=1, Params=params) + msg = dict(type='UnitAssigner', request='WatchUnitAssignments', version=1, params=params) reply = await self.rpc(msg) return reply -class Uniter(Type): +class UniterFacade(Type): name = 'Uniter' - version = 3 + version = 4 schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False, - 'properties': {'Servers': {'items': {'items': {'$ref': '#/definitions/HostPort'}, + 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'}, 'type': 'array'}, 'type': 'array'}}, - 'required': ['Servers'], + 'required': ['servers'], 'type': 'object'}, 'Action': {'additionalProperties': False, 'properties': {'name': {'type': 'string'}, @@ -17889,13 +18498,13 @@ class Uniter(Type): 'required': ['tag', 'receiver', 'name'], 'type': 'object'}, 'ActionExecutionResult': {'additionalProperties': False, - 'properties': {'actiontag': {'type': 'string'}, + 'properties': {'action-tag': {'type': 'string'}, 'message': {'type': 'string'}, 'results': {'patternProperties': {'.*': {'additionalProperties': True, 'type': 'object'}}, 'type': 'object'}, 'status': {'type': 'string'}}, - 'required': ['actiontag', 'status'], + 'required': ['action-tag', 'status'], 'type': 'object'}, 'ActionExecutionResults': {'additionalProperties': False, 'properties': {'results': {'items': {'$ref': '#/definitions/ActionExecutionResult'}, @@ -17921,490 +18530,480 @@ class Uniter(Type): 'type': 'array'}}, 'type': 'object'}, 'Address': {'additionalProperties': False, - 'properties': {'Scope': {'type': 'string'}, - 'SpaceName': {'type': 'string'}, - 'Type': {'type': 'string'}, - 'Value': {'type': 'string'}}, - 'required': ['Value', 'Type', 'Scope'], + 'properties': {'scope': {'type': 'string'}, + 'space-name': {'type': 'string'}, + 'type': {'type': 'string'}, + 'value': {'type': 'string'}}, + 'required': ['value', 'type', 'scope'], 'type': 'object'}, + 'ApplicationStatusResult': {'additionalProperties': False, + 'properties': {'application': {'$ref': '#/definitions/StatusResult'}, + 'error': {'$ref': '#/definitions/Error'}, + 'units': {'patternProperties': {'.*': {'$ref': '#/definitions/StatusResult'}}, + 'type': 'object'}}, + 'required': ['application', + 'units'], + 'type': 'object'}, + 'ApplicationStatusResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/ApplicationStatusResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, 'BoolResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Result': {'type': 'boolean'}}, - 'required': ['Error', 'Result'], + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'type': 'boolean'}}, + 'required': ['result'], 'type': 'object'}, 'BoolResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/BoolResult'}, + 'properties': {'results': {'items': {'$ref': '#/definitions/BoolResult'}, 'type': 'array'}}, - 'required': ['Results'], + 'required': ['results'], 'type': 'object'}, 'BytesResult': {'additionalProperties': False, - 'properties': {'Result': {'items': {'type': 'integer'}, + 'properties': {'result': {'items': {'type': 'integer'}, 'type': 'array'}}, - 'required': ['Result'], + 'required': ['result'], 'type': 'object'}, + 'CharmRelation': {'additionalProperties': False, + 'properties': {'interface': {'type': 'string'}, + 'limit': {'type': 'integer'}, + 'name': {'type': 'string'}, + 'optional': {'type': 'boolean'}, + 'role': {'type': 'string'}, + 'scope': {'type': 'string'}}, + 'required': ['name', + 'role', + 'interface', + 'optional', + 'limit', + 'scope'], + 'type': 'object'}, 'CharmURL': {'additionalProperties': False, - 'properties': {'URL': {'type': 'string'}}, - 'required': ['URL'], + 'properties': {'url': {'type': 'string'}}, + 'required': ['url'], 'type': 'object'}, 'CharmURLs': {'additionalProperties': False, - 'properties': {'URLs': {'items': {'$ref': '#/definitions/CharmURL'}, + 'properties': {'urls': {'items': {'$ref': '#/definitions/CharmURL'}, 'type': 'array'}}, - 'required': ['URLs'], + 'required': ['urls'], 'type': 'object'}, 'ConfigSettingsResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Settings': {'patternProperties': {'.*': {'additionalProperties': True, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'settings': {'patternProperties': {'.*': {'additionalProperties': True, 'type': 'object'}}, 'type': 'object'}}, - 'required': ['Error', 'Settings'], + 'required': ['settings'], 'type': 'object'}, 'ConfigSettingsResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/ConfigSettingsResult'}, + 'properties': {'results': {'items': {'$ref': '#/definitions/ConfigSettingsResult'}, 'type': 'array'}}, - 'required': ['Results'], + 'required': ['results'], 'type': 'object'}, 'Endpoint': {'additionalProperties': False, - 'properties': {'Relation': {'$ref': '#/definitions/Relation'}, - 'ServiceName': {'type': 'string'}}, - 'required': ['ServiceName', 'Relation'], + 'properties': {'application-name': {'type': 'string'}, + 'relation': {'$ref': '#/definitions/CharmRelation'}}, + 'required': ['application-name', 'relation'], 'type': 'object'}, 'Entities': {'additionalProperties': False, - 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'}, + 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, 'type': 'array'}}, - 'required': ['Entities'], + 'required': ['entities'], 'type': 'object'}, 'EntitiesCharmURL': {'additionalProperties': False, - 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityCharmURL'}, + 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityCharmURL'}, 'type': 'array'}}, - 'required': ['Entities'], + 'required': ['entities'], 'type': 'object'}, 'EntitiesPortRanges': {'additionalProperties': False, - 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityPortRange'}, + 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityPortRange'}, 'type': 'array'}}, - 'required': ['Entities'], + 'required': ['entities'], 'type': 'object'}, 'Entity': {'additionalProperties': False, - 'properties': {'Tag': {'type': 'string'}}, - 'required': ['Tag'], + 'properties': {'tag': {'type': 'string'}}, + 'required': ['tag'], 'type': 'object'}, 'EntityCharmURL': {'additionalProperties': False, - 'properties': {'CharmURL': {'type': 'string'}, - 'Tag': {'type': 'string'}}, - 'required': ['Tag', 'CharmURL'], + 'properties': {'charm-url': {'type': 'string'}, + 'tag': {'type': 'string'}}, + 'required': ['tag', 'charm-url'], 'type': 'object'}, 'EntityPortRange': {'additionalProperties': False, - 'properties': {'FromPort': {'type': 'integer'}, - 'Protocol': {'type': 'string'}, - 'Tag': {'type': 'string'}, - 'ToPort': {'type': 'integer'}}, - 'required': ['Tag', - 'Protocol', - 'FromPort', - 'ToPort'], + 'properties': {'from-port': {'type': 'integer'}, + 'protocol': {'type': 'string'}, + 'tag': {'type': 'string'}, + 'to-port': {'type': 'integer'}}, + 'required': ['tag', + 'protocol', + 'from-port', + 'to-port'], 'type': 'object'}, 'EntityStatusArgs': {'additionalProperties': False, - 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True, + 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True, 'type': 'object'}}, 'type': 'object'}, - 'Info': {'type': 'string'}, - 'Status': {'type': 'string'}, - 'Tag': {'type': 'string'}}, - 'required': ['Tag', - 'Status', - 'Info', - 'Data'], + 'info': {'type': 'string'}, + 'status': {'type': 'string'}, + 'tag': {'type': 'string'}}, + 'required': ['tag', + 'status', + 'info', + 'data'], 'type': 'object'}, + 'EntityWorkloadVersion': {'additionalProperties': False, + 'properties': {'tag': {'type': 'string'}, + 'workload-version': {'type': 'string'}}, + 'required': ['tag', + 'workload-version'], + 'type': 'object'}, + 'EntityWorkloadVersions': {'additionalProperties': False, + 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityWorkloadVersion'}, + 'type': 'array'}}, + 'required': ['entities'], + 'type': 'object'}, 'Error': {'additionalProperties': False, - 'properties': {'Code': {'type': 'string'}, - 'Info': {'$ref': '#/definitions/ErrorInfo'}, - 'Message': {'type': 'string'}}, - 'required': ['Message', 'Code'], + 'properties': {'code': {'type': 'string'}, + 'info': {'$ref': '#/definitions/ErrorInfo'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], 'type': 'object'}, 'ErrorInfo': {'additionalProperties': False, - 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'}, - 'MacaroonPath': {'type': 'string'}}, + 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'macaroon-path': {'type': 'string'}}, 'type': 'object'}, 'ErrorResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}}, - 'required': ['Error'], + 'properties': {'error': {'$ref': '#/definitions/Error'}}, 'type': 'object'}, 'ErrorResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'}, + 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, 'type': 'array'}}, - 'required': ['Results'], + 'required': ['results'], 'type': 'object'}, 'GetLeadershipSettingsBulkResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/GetLeadershipSettingsResult'}, + 'properties': {'results': {'items': {'$ref': '#/definitions/GetLeadershipSettingsResult'}, 'type': 'array'}}, - 'required': ['Results'], + 'required': ['results'], 'type': 'object'}, 'GetLeadershipSettingsResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Settings': {'patternProperties': {'.*': {'type': 'string'}}, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'settings': {'patternProperties': {'.*': {'type': 'string'}}, 'type': 'object'}}, - 'required': ['Settings', - 'Error'], + 'required': ['settings'], 'type': 'object'}, 'HostPort': {'additionalProperties': False, 'properties': {'Address': {'$ref': '#/definitions/Address'}, - 'Port': {'type': 'integer'}}, - 'required': ['Address', 'Port'], + 'port': {'type': 'integer'}}, + 'required': ['Address', 'port'], 'type': 'object'}, 'IntResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Result': {'type': 'integer'}}, - 'required': ['Error', 'Result'], + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'type': 'integer'}}, + 'required': ['result'], 'type': 'object'}, 'IntResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/IntResult'}, + 'properties': {'results': {'items': {'$ref': '#/definitions/IntResult'}, 'type': 'array'}}, - 'required': ['Results'], + 'required': ['results'], 'type': 'object'}, 'LifeResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Life': {'type': 'string'}}, - 'required': ['Life', 'Error'], + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'life': {'type': 'string'}}, + 'required': ['life'], 'type': 'object'}, 'LifeResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/LifeResult'}, + 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'}, 'type': 'array'}}, - 'required': ['Results'], + 'required': ['results'], 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, - 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'}, - 'type': 'array'}, - 'data': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'id': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'sig': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['data', - 'location', - 'id', - 'caveats', - 'sig'], - 'type': 'object'}, + 'Macaroon': {'additionalProperties': False, 'type': 'object'}, 'MachinePortRange': {'additionalProperties': False, - 'properties': {'PortRange': {'$ref': '#/definitions/PortRange'}, - 'RelationTag': {'type': 'string'}, - 'UnitTag': {'type': 'string'}}, - 'required': ['UnitTag', - 'RelationTag', - 'PortRange'], + 'properties': {'port-range': {'$ref': '#/definitions/PortRange'}, + 'relation-tag': {'type': 'string'}, + 'unit-tag': {'type': 'string'}}, + 'required': ['unit-tag', + 'relation-tag', + 'port-range'], 'type': 'object'}, 'MachinePortsResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Ports': {'items': {'$ref': '#/definitions/MachinePortRange'}, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'ports': {'items': {'$ref': '#/definitions/MachinePortRange'}, 'type': 'array'}}, - 'required': ['Error', 'Ports'], + 'required': ['ports'], 'type': 'object'}, 'MachinePortsResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/MachinePortsResult'}, + 'properties': {'results': {'items': {'$ref': '#/definitions/MachinePortsResult'}, 'type': 'array'}}, - 'required': ['Results'], + 'required': ['results'], 'type': 'object'}, 'MergeLeadershipSettingsBulkParams': {'additionalProperties': False, - 'properties': {'Params': {'items': {'$ref': '#/definitions/MergeLeadershipSettingsParam'}, + 'properties': {'params': {'items': {'$ref': '#/definitions/MergeLeadershipSettingsParam'}, 'type': 'array'}}, - 'required': ['Params'], + 'required': ['params'], 'type': 'object'}, 'MergeLeadershipSettingsParam': {'additionalProperties': False, - 'properties': {'ServiceTag': {'type': 'string'}, - 'Settings': {'patternProperties': {'.*': {'type': 'string'}}, + 'properties': {'application-tag': {'type': 'string'}, + 'settings': {'patternProperties': {'.*': {'type': 'string'}}, 'type': 'object'}}, - 'required': ['ServiceTag', - 'Settings'], + 'required': ['application-tag', + 'settings'], 'type': 'object'}, 'MeterStatusResult': {'additionalProperties': False, - 'properties': {'Code': {'type': 'string'}, - 'Error': {'$ref': '#/definitions/Error'}, - 'Info': {'type': 'string'}}, - 'required': ['Code', 'Info', 'Error'], + 'properties': {'code': {'type': 'string'}, + 'error': {'$ref': '#/definitions/Error'}, + 'info': {'type': 'string'}}, + 'required': ['code', 'info'], 'type': 'object'}, 'MeterStatusResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/MeterStatusResult'}, + 'properties': {'results': {'items': {'$ref': '#/definitions/MeterStatusResult'}, 'type': 'array'}}, - 'required': ['Results'], + 'required': ['results'], 'type': 'object'}, 'Metric': {'additionalProperties': False, - 'properties': {'Key': {'type': 'string'}, - 'Time': {'format': 'date-time', + 'properties': {'key': {'type': 'string'}, + 'time': {'format': 'date-time', 'type': 'string'}, - 'Value': {'type': 'string'}}, - 'required': ['Key', 'Value', 'Time'], + 'value': {'type': 'string'}}, + 'required': ['key', 'value', 'time'], 'type': 'object'}, 'MetricBatch': {'additionalProperties': False, - 'properties': {'CharmURL': {'type': 'string'}, - 'Created': {'format': 'date-time', + 'properties': {'charm-url': {'type': 'string'}, + 'created': {'format': 'date-time', 'type': 'string'}, - 'Metrics': {'items': {'$ref': '#/definitions/Metric'}, + 'metrics': {'items': {'$ref': '#/definitions/Metric'}, 'type': 'array'}, - 'UUID': {'type': 'string'}}, - 'required': ['UUID', - 'CharmURL', - 'Created', - 'Metrics'], + 'uuid': {'type': 'string'}}, + 'required': ['uuid', + 'charm-url', + 'created', + 'metrics'], 'type': 'object'}, 'MetricBatchParam': {'additionalProperties': False, - 'properties': {'Batch': {'$ref': '#/definitions/MetricBatch'}, - 'Tag': {'type': 'string'}}, - 'required': ['Tag', 'Batch'], + 'properties': {'batch': {'$ref': '#/definitions/MetricBatch'}, + 'tag': {'type': 'string'}}, + 'required': ['tag', 'batch'], 'type': 'object'}, 'MetricBatchParams': {'additionalProperties': False, - 'properties': {'Batches': {'items': {'$ref': '#/definitions/MetricBatchParam'}, + 'properties': {'batches': {'items': {'$ref': '#/definitions/MetricBatchParam'}, 'type': 'array'}}, - 'required': ['Batches'], + 'required': ['batches'], 'type': 'object'}, 'ModelConfigResult': {'additionalProperties': False, - 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True, + 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True, 'type': 'object'}}, 'type': 'object'}}, - 'required': ['Config'], + 'required': ['config'], 'type': 'object'}, 'ModelResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Name': {'type': 'string'}, - 'UUID': {'type': 'string'}}, - 'required': ['Error', 'Name', 'UUID'], + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'name': {'type': 'string'}, + 'uuid': {'type': 'string'}}, + 'required': ['name', 'uuid'], 'type': 'object'}, 'NetworkConfig': {'additionalProperties': False, - 'properties': {'Address': {'type': 'string'}, - 'CIDR': {'type': 'string'}, - 'ConfigType': {'type': 'string'}, - 'DNSSearchDomains': {'items': {'type': 'string'}, - 'type': 'array'}, - 'DNSServers': {'items': {'type': 'string'}, - 'type': 'array'}, - 'DeviceIndex': {'type': 'integer'}, - 'Disabled': {'type': 'boolean'}, - 'GatewayAddress': {'type': 'string'}, - 'InterfaceName': {'type': 'string'}, - 'InterfaceType': {'type': 'string'}, - 'MACAddress': {'type': 'string'}, - 'MTU': {'type': 'integer'}, - 'NoAutoStart': {'type': 'boolean'}, - 'ParentInterfaceName': {'type': 'string'}, - 'ProviderAddressId': {'type': 'string'}, - 'ProviderId': {'type': 'string'}, - 'ProviderSpaceId': {'type': 'string'}, - 'ProviderSubnetId': {'type': 'string'}, - 'ProviderVLANId': {'type': 'string'}, - 'VLANTag': {'type': 'integer'}}, - 'required': ['DeviceIndex', - 'MACAddress', - 'CIDR', - 'MTU', - 'ProviderId', - 'ProviderSubnetId', - 'ProviderSpaceId', - 'ProviderAddressId', - 'ProviderVLANId', - 'VLANTag', - 'InterfaceName', - 'ParentInterfaceName', - 'InterfaceType', - 'Disabled'], + 'properties': {'address': {'type': 'string'}, + 'cidr': {'type': 'string'}, + 'config-type': {'type': 'string'}, + 'device-index': {'type': 'integer'}, + 'disabled': {'type': 'boolean'}, + 'dns-search-domains': {'items': {'type': 'string'}, + 'type': 'array'}, + 'dns-servers': {'items': {'type': 'string'}, + 'type': 'array'}, + 'gateway-address': {'type': 'string'}, + 'interface-name': {'type': 'string'}, + 'interface-type': {'type': 'string'}, + 'mac-address': {'type': 'string'}, + 'mtu': {'type': 'integer'}, + 'no-auto-start': {'type': 'boolean'}, + 'parent-interface-name': {'type': 'string'}, + 'provider-address-id': {'type': 'string'}, + 'provider-id': {'type': 'string'}, + 'provider-space-id': {'type': 'string'}, + 'provider-subnet-id': {'type': 'string'}, + 'provider-vlan-id': {'type': 'string'}, + 'vlan-tag': {'type': 'integer'}}, + 'required': ['device-index', + 'mac-address', + 'cidr', + 'mtu', + 'provider-id', + 'provider-subnet-id', + 'provider-space-id', + 'provider-address-id', + 'provider-vlan-id', + 'vlan-tag', + 'interface-name', + 'parent-interface-name', + 'interface-type', + 'disabled'], 'type': 'object'}, 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'NotifyWatcherId': {'type': 'string'}}, - 'required': ['NotifyWatcherId', 'Error'], + 'properties': {'NotifyWatcherId': {'type': 'string'}, + 'error': {'$ref': '#/definitions/Error'}}, + 'required': ['NotifyWatcherId'], 'type': 'object'}, 'NotifyWatchResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, + 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, 'type': 'array'}}, - 'required': ['Results'], + 'required': ['results'], 'type': 'object'}, 'PortRange': {'additionalProperties': False, - 'properties': {'FromPort': {'type': 'integer'}, - 'Protocol': {'type': 'string'}, - 'ToPort': {'type': 'integer'}}, - 'required': ['FromPort', 'ToPort', 'Protocol'], + 'properties': {'from-port': {'type': 'integer'}, + 'protocol': {'type': 'string'}, + 'to-port': {'type': 'integer'}}, + 'required': ['from-port', 'to-port', 'protocol'], 'type': 'object'}, - 'Relation': {'additionalProperties': False, - 'properties': {'Interface': {'type': 'string'}, - 'Limit': {'type': 'integer'}, - 'Name': {'type': 'string'}, - 'Optional': {'type': 'boolean'}, - 'Role': {'type': 'string'}, - 'Scope': {'type': 'string'}}, - 'required': ['Name', - 'Role', - 'Interface', - 'Optional', - 'Limit', - 'Scope'], - 'type': 'object'}, 'RelationIds': {'additionalProperties': False, - 'properties': {'RelationIds': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['RelationIds'], + 'properties': {'relation-ids': {'items': {'type': 'integer'}, + 'type': 'array'}}, + 'required': ['relation-ids'], 'type': 'object'}, 'RelationResult': {'additionalProperties': False, - 'properties': {'Endpoint': {'$ref': '#/definitions/Endpoint'}, - 'Error': {'$ref': '#/definitions/Error'}, - 'Id': {'type': 'integer'}, - 'Key': {'type': 'string'}, - 'Life': {'type': 'string'}}, - 'required': ['Error', - 'Life', - 'Id', - 'Key', - 'Endpoint'], + 'properties': {'endpoint': {'$ref': '#/definitions/Endpoint'}, + 'error': {'$ref': '#/definitions/Error'}, + 'id': {'type': 'integer'}, + 'key': {'type': 'string'}, + 'life': {'type': 'string'}}, + 'required': ['life', + 'id', + 'key', + 'endpoint'], 'type': 'object'}, 'RelationResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/RelationResult'}, + 'properties': {'results': {'items': {'$ref': '#/definitions/RelationResult'}, 'type': 'array'}}, - 'required': ['Results'], + 'required': ['results'], 'type': 'object'}, 'RelationUnit': {'additionalProperties': False, - 'properties': {'Relation': {'type': 'string'}, - 'Unit': {'type': 'string'}}, - 'required': ['Relation', 'Unit'], + 'properties': {'relation': {'type': 'string'}, + 'unit': {'type': 'string'}}, + 'required': ['relation', 'unit'], 'type': 'object'}, 'RelationUnitPair': {'additionalProperties': False, - 'properties': {'LocalUnit': {'type': 'string'}, - 'Relation': {'type': 'string'}, - 'RemoteUnit': {'type': 'string'}}, - 'required': ['Relation', - 'LocalUnit', - 'RemoteUnit'], + 'properties': {'local-unit': {'type': 'string'}, + 'relation': {'type': 'string'}, + 'remote-unit': {'type': 'string'}}, + 'required': ['relation', + 'local-unit', + 'remote-unit'], 'type': 'object'}, 'RelationUnitPairs': {'additionalProperties': False, - 'properties': {'RelationUnitPairs': {'items': {'$ref': '#/definitions/RelationUnitPair'}, - 'type': 'array'}}, - 'required': ['RelationUnitPairs'], + 'properties': {'relation-unit-pairs': {'items': {'$ref': '#/definitions/RelationUnitPair'}, + 'type': 'array'}}, + 'required': ['relation-unit-pairs'], 'type': 'object'}, 'RelationUnitSettings': {'additionalProperties': False, - 'properties': {'Relation': {'type': 'string'}, - 'Settings': {'patternProperties': {'.*': {'type': 'string'}}, + 'properties': {'relation': {'type': 'string'}, + 'settings': {'patternProperties': {'.*': {'type': 'string'}}, 'type': 'object'}, - 'Unit': {'type': 'string'}}, - 'required': ['Relation', - 'Unit', - 'Settings'], + 'unit': {'type': 'string'}}, + 'required': ['relation', + 'unit', + 'settings'], 'type': 'object'}, 'RelationUnits': {'additionalProperties': False, - 'properties': {'RelationUnits': {'items': {'$ref': '#/definitions/RelationUnit'}, - 'type': 'array'}}, - 'required': ['RelationUnits'], + 'properties': {'relation-units': {'items': {'$ref': '#/definitions/RelationUnit'}, + 'type': 'array'}}, + 'required': ['relation-units'], 'type': 'object'}, 'RelationUnitsChange': {'additionalProperties': False, - 'properties': {'Changed': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitSettings'}}, + 'properties': {'changed': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitSettings'}}, 'type': 'object'}, - 'Departed': {'items': {'type': 'string'}, + 'departed': {'items': {'type': 'string'}, 'type': 'array'}}, - 'required': ['Changed', 'Departed'], + 'required': ['changed'], 'type': 'object'}, 'RelationUnitsSettings': {'additionalProperties': False, - 'properties': {'RelationUnits': {'items': {'$ref': '#/definitions/RelationUnitSettings'}, - 'type': 'array'}}, - 'required': ['RelationUnits'], + 'properties': {'relation-units': {'items': {'$ref': '#/definitions/RelationUnitSettings'}, + 'type': 'array'}}, + 'required': ['relation-units'], 'type': 'object'}, 'RelationUnitsWatchResult': {'additionalProperties': False, - 'properties': {'Changes': {'$ref': '#/definitions/RelationUnitsChange'}, - 'Error': {'$ref': '#/definitions/Error'}, - 'RelationUnitsWatcherId': {'type': 'string'}}, - 'required': ['RelationUnitsWatcherId', - 'Changes', - 'Error'], + 'properties': {'changes': {'$ref': '#/definitions/RelationUnitsChange'}, + 'error': {'$ref': '#/definitions/Error'}, + 'watcher-id': {'type': 'string'}}, + 'required': ['watcher-id', + 'changes'], 'type': 'object'}, 'RelationUnitsWatchResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/RelationUnitsWatchResult'}, + 'properties': {'results': {'items': {'$ref': '#/definitions/RelationUnitsWatchResult'}, 'type': 'array'}}, - 'required': ['Results'], + 'required': ['results'], 'type': 'object'}, 'ResolvedModeResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Mode': {'type': 'string'}}, - 'required': ['Error', 'Mode'], + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'mode': {'type': 'string'}}, + 'required': ['mode'], 'type': 'object'}, 'ResolvedModeResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/ResolvedModeResult'}, + 'properties': {'results': {'items': {'$ref': '#/definitions/ResolvedModeResult'}, 'type': 'array'}}, - 'required': ['Results'], + 'required': ['results'], 'type': 'object'}, - 'ServiceStatusResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Service': {'$ref': '#/definitions/StatusResult'}, - 'Units': {'patternProperties': {'.*': {'$ref': '#/definitions/StatusResult'}}, - 'type': 'object'}}, - 'required': ['Service', - 'Units', - 'Error'], - 'type': 'object'}, - 'ServiceStatusResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/ServiceStatusResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, 'SetStatus': {'additionalProperties': False, - 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'}, + 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'}, 'type': 'array'}}, - 'required': ['Entities'], + 'required': ['entities'], 'type': 'object'}, 'SettingsResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Settings': {'patternProperties': {'.*': {'type': 'string'}}, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'settings': {'patternProperties': {'.*': {'type': 'string'}}, 'type': 'object'}}, - 'required': ['Error', 'Settings'], + 'required': ['settings'], 'type': 'object'}, 'SettingsResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/SettingsResult'}, + 'properties': {'results': {'items': {'$ref': '#/definitions/SettingsResult'}, 'type': 'array'}}, - 'required': ['Results'], + 'required': ['results'], 'type': 'object'}, 'StatusResult': {'additionalProperties': False, - 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True, + 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True, 'type': 'object'}}, 'type': 'object'}, - 'Error': {'$ref': '#/definitions/Error'}, - 'Id': {'type': 'string'}, - 'Info': {'type': 'string'}, - 'Life': {'type': 'string'}, - 'Since': {'format': 'date-time', + 'error': {'$ref': '#/definitions/Error'}, + 'id': {'type': 'string'}, + 'info': {'type': 'string'}, + 'life': {'type': 'string'}, + 'since': {'format': 'date-time', 'type': 'string'}, - 'Status': {'type': 'string'}}, - 'required': ['Error', - 'Id', - 'Life', - 'Status', - 'Info', - 'Data', - 'Since'], + 'status': {'type': 'string'}}, + 'required': ['id', + 'life', + 'status', + 'info', + 'data', + 'since'], 'type': 'object'}, 'StatusResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/StatusResult'}, + 'properties': {'results': {'items': {'$ref': '#/definitions/StatusResult'}, 'type': 'array'}}, - 'required': ['Results'], + 'required': ['results'], 'type': 'object'}, 'StorageAddParams': {'additionalProperties': False, - 'properties': {'StorageName': {'type': 'string'}, + 'properties': {'name': {'type': 'string'}, 'storage': {'$ref': '#/definitions/StorageConstraints'}, 'unit': {'type': 'string'}}, - 'required': ['unit', - 'StorageName', - 'storage'], + 'required': ['unit', 'name', 'storage'], 'type': 'object'}, 'StorageAttachment': {'additionalProperties': False, - 'properties': {'Kind': {'type': 'integer'}, - 'Life': {'type': 'string'}, - 'Location': {'type': 'string'}, - 'OwnerTag': {'type': 'string'}, - 'StorageTag': {'type': 'string'}, - 'UnitTag': {'type': 'string'}}, - 'required': ['StorageTag', - 'OwnerTag', - 'UnitTag', - 'Kind', - 'Location', - 'Life'], + 'properties': {'kind': {'type': 'integer'}, + 'life': {'type': 'string'}, + 'location': {'type': 'string'}, + 'owner-tag': {'type': 'string'}, + 'storage-tag': {'type': 'string'}, + 'unit-tag': {'type': 'string'}}, + 'required': ['storage-tag', + 'owner-tag', + 'unit-tag', + 'kind', + 'location', + 'life'], 'type': 'object'}, 'StorageAttachmentId': {'additionalProperties': False, - 'properties': {'storagetag': {'type': 'string'}, - 'unittag': {'type': 'string'}}, - 'required': ['storagetag', 'unittag'], + 'properties': {'storage-tag': {'type': 'string'}, + 'unit-tag': {'type': 'string'}}, + 'required': ['storage-tag', + 'unit-tag'], 'type': 'object'}, 'StorageAttachmentIds': {'additionalProperties': False, 'properties': {'ids': {'items': {'$ref': '#/definitions/StorageAttachmentId'}, @@ -18430,10 +19029,9 @@ class Uniter(Type): 'type': 'array'}}, 'type': 'object'}, 'StorageConstraints': {'additionalProperties': False, - 'properties': {'Count': {'type': 'integer'}, - 'Pool': {'type': 'string'}, - 'Size': {'type': 'integer'}}, - 'required': ['Pool', 'Size', 'Count'], + 'properties': {'count': {'type': 'integer'}, + 'pool': {'type': 'string'}, + 'size': {'type': 'integer'}}, 'type': 'object'}, 'StoragesAddParams': {'additionalProperties': False, 'properties': {'storages': {'items': {'$ref': '#/definitions/StorageAddParams'}, @@ -18441,90 +19039,73 @@ class Uniter(Type): 'required': ['storages'], 'type': 'object'}, 'StringBoolResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Ok': {'type': 'boolean'}, - 'Result': {'type': 'string'}}, - 'required': ['Error', 'Result', 'Ok'], + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'ok': {'type': 'boolean'}, + 'result': {'type': 'string'}}, + 'required': ['result', 'ok'], 'type': 'object'}, 'StringBoolResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/StringBoolResult'}, + 'properties': {'results': {'items': {'$ref': '#/definitions/StringBoolResult'}, 'type': 'array'}}, - 'required': ['Results'], + 'required': ['results'], 'type': 'object'}, 'StringResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Result': {'type': 'string'}}, - 'required': ['Error', 'Result'], + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'type': 'string'}}, + 'required': ['result'], 'type': 'object'}, 'StringResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/StringResult'}, + 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'}, 'type': 'array'}}, - 'required': ['Results'], + 'required': ['results'], 'type': 'object'}, 'StringsResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Result': {'items': {'type': 'string'}, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'items': {'type': 'string'}, 'type': 'array'}}, - 'required': ['Error', 'Result'], 'type': 'object'}, 'StringsResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsResult'}, + 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'}, 'type': 'array'}}, - 'required': ['Results'], + 'required': ['results'], 'type': 'object'}, 'StringsWatchResult': {'additionalProperties': False, - 'properties': {'Changes': {'items': {'type': 'string'}, + 'properties': {'changes': {'items': {'type': 'string'}, 'type': 'array'}, - 'Error': {'$ref': '#/definitions/Error'}, - 'StringsWatcherId': {'type': 'string'}}, - 'required': ['StringsWatcherId', - 'Changes', - 'Error'], + 'error': {'$ref': '#/definitions/Error'}, + 'watcher-id': {'type': 'string'}}, + 'required': ['watcher-id'], 'type': 'object'}, 'StringsWatchResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsWatchResult'}, + 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'}, 'type': 'array'}}, - 'required': ['Results'], + 'required': ['results'], 'type': 'object'}, 'UnitNetworkConfig': {'additionalProperties': False, - 'properties': {'BindingName': {'type': 'string'}, - 'UnitTag': {'type': 'string'}}, - 'required': ['UnitTag', 'BindingName'], + 'properties': {'binding-name': {'type': 'string'}, + 'unit-tag': {'type': 'string'}}, + 'required': ['unit-tag', 'binding-name'], 'type': 'object'}, 'UnitNetworkConfigResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Info': {'items': {'$ref': '#/definitions/NetworkConfig'}, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'info': {'items': {'$ref': '#/definitions/NetworkConfig'}, 'type': 'array'}}, - 'required': ['Error', 'Info'], + 'required': ['info'], 'type': 'object'}, 'UnitNetworkConfigResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/UnitNetworkConfigResult'}, + 'properties': {'results': {'items': {'$ref': '#/definitions/UnitNetworkConfigResult'}, 'type': 'array'}}, - 'required': ['Results'], + 'required': ['results'], 'type': 'object'}, 'UnitSettings': {'additionalProperties': False, - 'properties': {'Version': {'type': 'integer'}}, - 'required': ['Version'], + 'properties': {'version': {'type': 'integer'}}, + 'required': ['version'], 'type': 'object'}, 'UnitsNetworkConfig': {'additionalProperties': False, - 'properties': {'Args': {'items': {'$ref': '#/definitions/UnitNetworkConfig'}, + 'properties': {'args': {'items': {'$ref': '#/definitions/UnitNetworkConfig'}, 'type': 'array'}}, - 'required': ['Args'], - 'type': 'object'}, - 'caveat': {'additionalProperties': False, - 'properties': {'caveatId': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'verificationId': {'$ref': '#/definitions/packet'}}, - 'required': ['location', - 'caveatId', - 'verificationId'], - 'type': 'object'}, - 'packet': {'additionalProperties': False, - 'properties': {'headerLen': {'type': 'integer'}, - 'start': {'type': 'integer'}, - 'totalLen': {'type': 'integer'}}, - 'required': ['start', 'totalLen', 'headerLen'], - 'type': 'object'}}, + 'required': ['args'], + 'type': 'object'}}, 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}}, 'type': 'object'}, 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}}, @@ -18541,6 +19122,9 @@ class Uniter(Type): 'AllMachinePorts': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, 'Result': {'$ref': '#/definitions/MachinePortsResults'}}, 'type': 'object'}, + 'ApplicationStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/ApplicationStatusResults'}}, + 'type': 'object'}, 'AssignedMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, 'Result': {'$ref': '#/definitions/StringResults'}}, 'type': 'object'}, @@ -18653,27 +19237,24 @@ class Uniter(Type): 'Resolved': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, 'Result': {'$ref': '#/definitions/ResolvedModeResults'}}, 'type': 'object'}, - 'ServiceOwner': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringResults'}}, - 'type': 'object'}, - 'ServiceStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ServiceStatusResults'}}, - 'type': 'object'}, 'SetAgentStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, 'Result': {'$ref': '#/definitions/ErrorResults'}}, 'type': 'object'}, + 'SetApplicationStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, 'SetCharmURL': {'properties': {'Params': {'$ref': '#/definitions/EntitiesCharmURL'}, 'Result': {'$ref': '#/definitions/ErrorResults'}}, 'type': 'object'}, - 'SetServiceStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, 'Result': {'$ref': '#/definitions/ErrorResults'}}, 'type': 'object'}, 'SetUnitStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, 'Result': {'$ref': '#/definitions/ErrorResults'}}, 'type': 'object'}, + 'SetWorkloadVersion': {'properties': {'Params': {'$ref': '#/definitions/EntityWorkloadVersions'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, 'StorageAttachmentLife': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'}, 'Result': {'$ref': '#/definitions/LifeResults'}}, 'type': 'object'}, @@ -18697,6 +19278,9 @@ class Uniter(Type): 'WatchActionNotifications': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, 'type': 'object'}, + 'WatchApplicationRelations': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, + 'type': 'object'}, 'WatchConfigSettings': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, 'type': 'object'}, @@ -18711,9 +19295,6 @@ class Uniter(Type): 'WatchRelationUnits': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'}, 'Result': {'$ref': '#/definitions/RelationUnitsWatchResults'}}, 'type': 'object'}, - 'WatchServiceRelations': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, - 'type': 'object'}, 'WatchStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'}, 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, 'type': 'object'}, @@ -18722,7 +19303,10 @@ class Uniter(Type): 'type': 'object'}, 'WatchUnitStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, - 'type': 'object'}}, + 'type': 'object'}, + 'WorkloadVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/StringResults'}}, + 'type': 'object'}}, 'type': 'object'} @@ -18730,11 +19314,11 @@ class Uniter(Type): async def APIAddresses(self): ''' - Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[str]] + Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[str]] ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='APIAddresses', Version=3, Params=params) + msg = dict(type='Uniter', request='APIAddresses', version=4, params=params) reply = await self.rpc(msg) return reply @@ -18745,11 +19329,11 @@ class Uniter(Type): async def APIHostPorts(self): ''' - Returns -> typing.Sequence[~HostPort] + Returns -> typing.Sequence<+T_co>[~HostPort]<~HostPort> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='APIHostPorts', Version=3, Params=params) + msg = dict(type='Uniter', request='APIHostPorts', version=4, params=params) reply = await self.rpc(msg) return reply @@ -18759,13 +19343,13 @@ class Uniter(Type): @ReturnMapping(ActionResults) async def Actions(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ActionResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~ActionResult]<~ActionResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='Actions', Version=3, Params=params) - params['Entities'] = entities + msg = dict(type='Uniter', request='Actions', version=4, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @@ -18774,13 +19358,13 @@ class Uniter(Type): @ReturnMapping(ErrorResults) async def AddMetricBatches(self, batches): ''' - batches : typing.Sequence[~MetricBatchParam] - Returns -> typing.Sequence[~ErrorResult] + batches : typing.Sequence<+T_co>[~MetricBatchParam]<~MetricBatchParam> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='AddMetricBatches', Version=3, Params=params) - params['Batches'] = batches + msg = dict(type='Uniter', request='AddMetricBatches', version=4, params=params) + params['batches'] = batches reply = await self.rpc(msg) return reply @@ -18789,12 +19373,12 @@ class Uniter(Type): @ReturnMapping(ErrorResults) async def AddUnitStorage(self, storages): ''' - storages : typing.Sequence[~StorageAddParams] - Returns -> typing.Sequence[~ErrorResult] + storages : typing.Sequence<+T_co>[~StorageAddParams]<~StorageAddParams> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='AddUnitStorage', Version=3, Params=params) + msg = dict(type='Uniter', request='AddUnitStorage', version=4, params=params) params['storages'] = storages reply = await self.rpc(msg) return reply @@ -18804,13 +19388,28 @@ class Uniter(Type): @ReturnMapping(MachinePortsResults) async def AllMachinePorts(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~MachinePortsResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~MachinePortsResult]<~MachinePortsResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='AllMachinePorts', Version=3, Params=params) - params['Entities'] = entities + msg = dict(type='Uniter', request='AllMachinePorts', version=4, params=params) + params['entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ApplicationStatusResults) + async def ApplicationStatus(self, entities): + ''' + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~ApplicationStatusResult]<~ApplicationStatusResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='Uniter', request='ApplicationStatus', version=4, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @@ -18819,13 +19418,13 @@ class Uniter(Type): @ReturnMapping(StringResults) async def AssignedMachine(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~StringResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='AssignedMachine', Version=3, Params=params) - params['Entities'] = entities + msg = dict(type='Uniter', request='AssignedMachine', version=4, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @@ -18834,13 +19433,13 @@ class Uniter(Type): @ReturnMapping(StringResults) async def AvailabilityZone(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~StringResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='AvailabilityZone', Version=3, Params=params) - params['Entities'] = entities + msg = dict(type='Uniter', request='AvailabilityZone', version=4, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @@ -18849,13 +19448,13 @@ class Uniter(Type): @ReturnMapping(ErrorResults) async def BeginActions(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ErrorResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='BeginActions', Version=3, Params=params) - params['Entities'] = entities + msg = dict(type='Uniter', request='BeginActions', version=4, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @@ -18865,11 +19464,11 @@ class Uniter(Type): async def CACert(self): ''' - Returns -> typing.Sequence[int] + Returns -> typing.Sequence<+T_co>[int] ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='CACert', Version=3, Params=params) + msg = dict(type='Uniter', request='CACert', version=4, params=params) reply = await self.rpc(msg) return reply @@ -18879,13 +19478,13 @@ class Uniter(Type): @ReturnMapping(StringResults) async def CharmArchiveSha256(self, urls): ''' - urls : typing.Sequence[~CharmURL] - Returns -> typing.Sequence[~StringResult] + urls : typing.Sequence<+T_co>[~CharmURL]<~CharmURL> + Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='CharmArchiveSha256', Version=3, Params=params) - params['URLs'] = urls + msg = dict(type='Uniter', request='CharmArchiveSha256', version=4, params=params) + params['urls'] = urls reply = await self.rpc(msg) return reply @@ -18894,13 +19493,13 @@ class Uniter(Type): @ReturnMapping(IntResults) async def CharmModifiedVersion(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~IntResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~IntResult]<~IntResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='CharmModifiedVersion', Version=3, Params=params) - params['Entities'] = entities + msg = dict(type='Uniter', request='CharmModifiedVersion', version=4, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @@ -18909,13 +19508,13 @@ class Uniter(Type): @ReturnMapping(StringBoolResults) async def CharmURL(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~StringBoolResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~StringBoolResult]<~StringBoolResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='CharmURL', Version=3, Params=params) - params['Entities'] = entities + msg = dict(type='Uniter', request='CharmURL', version=4, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @@ -18924,13 +19523,13 @@ class Uniter(Type): @ReturnMapping(ErrorResults) async def ClearResolved(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ErrorResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='ClearResolved', Version=3, Params=params) - params['Entities'] = entities + msg = dict(type='Uniter', request='ClearResolved', version=4, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @@ -18939,13 +19538,13 @@ class Uniter(Type): @ReturnMapping(ErrorResults) async def ClosePorts(self, entities): ''' - entities : typing.Sequence[~EntityPortRange] - Returns -> typing.Sequence[~ErrorResult] + entities : typing.Sequence<+T_co>[~EntityPortRange]<~EntityPortRange> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='ClosePorts', Version=3, Params=params) - params['Entities'] = entities + msg = dict(type='Uniter', request='ClosePorts', version=4, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @@ -18954,13 +19553,13 @@ class Uniter(Type): @ReturnMapping(ConfigSettingsResults) async def ConfigSettings(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ConfigSettingsResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~ConfigSettingsResult]<~ConfigSettingsResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='ConfigSettings', Version=3, Params=params) - params['Entities'] = entities + msg = dict(type='Uniter', request='ConfigSettings', version=4, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @@ -18974,7 +19573,7 @@ class Uniter(Type): ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='CurrentModel', Version=3, Params=params) + msg = dict(type='Uniter', request='CurrentModel', version=4, params=params) reply = await self.rpc(msg) return reply @@ -18984,13 +19583,13 @@ class Uniter(Type): @ReturnMapping(ErrorResults) async def Destroy(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ErrorResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='Destroy', Version=3, Params=params) - params['Entities'] = entities + msg = dict(type='Uniter', request='Destroy', version=4, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @@ -18999,13 +19598,13 @@ class Uniter(Type): @ReturnMapping(ErrorResults) async def DestroyAllSubordinates(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ErrorResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='DestroyAllSubordinates', Version=3, Params=params) - params['Entities'] = entities + msg = dict(type='Uniter', request='DestroyAllSubordinates', version=4, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @@ -19014,13 +19613,13 @@ class Uniter(Type): @ReturnMapping(ErrorResults) async def DestroyUnitStorageAttachments(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ErrorResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='DestroyUnitStorageAttachments', Version=3, Params=params) - params['Entities'] = entities + msg = dict(type='Uniter', request='DestroyUnitStorageAttachments', version=4, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @@ -19029,28 +19628,28 @@ class Uniter(Type): @ReturnMapping(ErrorResults) async def EnsureDead(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ErrorResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='EnsureDead', Version=3, Params=params) - params['Entities'] = entities + msg = dict(type='Uniter', request='EnsureDead', version=4, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @ReturnMapping(ErrorResults) - async def EnterScope(self, relationunits): + async def EnterScope(self, relation_units): ''' - relationunits : typing.Sequence[~RelationUnit] - Returns -> typing.Sequence[~ErrorResult] + relation_units : typing.Sequence<+T_co>[~RelationUnit]<~RelationUnit> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='EnterScope', Version=3, Params=params) - params['RelationUnits'] = relationunits + msg = dict(type='Uniter', request='EnterScope', version=4, params=params) + params['relation-units'] = relation_units reply = await self.rpc(msg) return reply @@ -19059,12 +19658,12 @@ class Uniter(Type): @ReturnMapping(ErrorResults) async def FinishActions(self, results): ''' - results : typing.Sequence[~ActionExecutionResult] - Returns -> typing.Sequence[~ErrorResult] + results : typing.Sequence<+T_co>[~ActionExecutionResult]<~ActionExecutionResult> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='FinishActions', Version=3, Params=params) + msg = dict(type='Uniter', request='FinishActions', version=4, params=params) params['results'] = results reply = await self.rpc(msg) return reply @@ -19074,13 +19673,13 @@ class Uniter(Type): @ReturnMapping(MeterStatusResults) async def GetMeterStatus(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~MeterStatusResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~MeterStatusResult]<~MeterStatusResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='GetMeterStatus', Version=3, Params=params) - params['Entities'] = entities + msg = dict(type='Uniter', request='GetMeterStatus', version=4, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @@ -19089,13 +19688,13 @@ class Uniter(Type): @ReturnMapping(StringBoolResults) async def GetPrincipal(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~StringBoolResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~StringBoolResult]<~StringBoolResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='GetPrincipal', Version=3, Params=params) - params['Entities'] = entities + msg = dict(type='Uniter', request='GetPrincipal', version=4, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @@ -19104,13 +19703,13 @@ class Uniter(Type): @ReturnMapping(BoolResults) async def HasSubordinates(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~BoolResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~BoolResult]<~BoolResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='HasSubordinates', Version=3, Params=params) - params['Entities'] = entities + msg = dict(type='Uniter', request='HasSubordinates', version=4, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @@ -19119,28 +19718,28 @@ class Uniter(Type): @ReturnMapping(StringsResults) async def JoinedRelations(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~StringsResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~StringsResult]<~StringsResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='JoinedRelations', Version=3, Params=params) - params['Entities'] = entities + msg = dict(type='Uniter', request='JoinedRelations', version=4, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @ReturnMapping(ErrorResults) - async def LeaveScope(self, relationunits): + async def LeaveScope(self, relation_units): ''' - relationunits : typing.Sequence[~RelationUnit] - Returns -> typing.Sequence[~ErrorResult] + relation_units : typing.Sequence<+T_co>[~RelationUnit]<~RelationUnit> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='LeaveScope', Version=3, Params=params) - params['RelationUnits'] = relationunits + msg = dict(type='Uniter', request='LeaveScope', version=4, params=params) + params['relation-units'] = relation_units reply = await self.rpc(msg) return reply @@ -19149,13 +19748,13 @@ class Uniter(Type): @ReturnMapping(LifeResults) async def Life(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~LifeResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='Life', Version=3, Params=params) - params['Entities'] = entities + msg = dict(type='Uniter', request='Life', version=4, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @@ -19164,13 +19763,13 @@ class Uniter(Type): @ReturnMapping(ErrorResults) async def Merge(self, params): ''' - params : typing.Sequence[~MergeLeadershipSettingsParam] - Returns -> typing.Sequence[~ErrorResult] + params : typing.Sequence<+T_co>[~MergeLeadershipSettingsParam]<~MergeLeadershipSettingsParam> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='Merge', Version=3, Params=params) - params['Params'] = params + msg = dict(type='Uniter', request='Merge', version=4, params=params) + params['params'] = params reply = await self.rpc(msg) return reply @@ -19180,11 +19779,11 @@ class Uniter(Type): async def ModelConfig(self): ''' - Returns -> typing.Mapping[str, typing.Any] + Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any] ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='ModelConfig', Version=3, Params=params) + msg = dict(type='Uniter', request='ModelConfig', version=4, params=params) reply = await self.rpc(msg) return reply @@ -19199,7 +19798,7 @@ class Uniter(Type): ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='ModelUUID', Version=3, Params=params) + msg = dict(type='Uniter', request='ModelUUID', version=4, params=params) reply = await self.rpc(msg) return reply @@ -19209,13 +19808,13 @@ class Uniter(Type): @ReturnMapping(UnitNetworkConfigResults) async def NetworkConfig(self, args): ''' - args : typing.Sequence[~UnitNetworkConfig] - Returns -> typing.Sequence[~UnitNetworkConfigResult] + args : typing.Sequence<+T_co>[~UnitNetworkConfig]<~UnitNetworkConfig> + Returns -> typing.Sequence<+T_co>[~UnitNetworkConfigResult]<~UnitNetworkConfigResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='NetworkConfig', Version=3, Params=params) - params['Args'] = args + msg = dict(type='Uniter', request='NetworkConfig', version=4, params=params) + params['args'] = args reply = await self.rpc(msg) return reply @@ -19224,13 +19823,13 @@ class Uniter(Type): @ReturnMapping(ErrorResults) async def OpenPorts(self, entities): ''' - entities : typing.Sequence[~EntityPortRange] - Returns -> typing.Sequence[~ErrorResult] + entities : typing.Sequence<+T_co>[~EntityPortRange]<~EntityPortRange> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='OpenPorts', Version=3, Params=params) - params['Entities'] = entities + msg = dict(type='Uniter', request='OpenPorts', version=4, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @@ -19239,13 +19838,13 @@ class Uniter(Type): @ReturnMapping(StringResults) async def PrivateAddress(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~StringResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='PrivateAddress', Version=3, Params=params) - params['Entities'] = entities + msg = dict(type='Uniter', request='PrivateAddress', version=4, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @@ -19259,7 +19858,7 @@ class Uniter(Type): ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='ProviderType', Version=3, Params=params) + msg = dict(type='Uniter', request='ProviderType', version=4, params=params) reply = await self.rpc(msg) return reply @@ -19269,13 +19868,13 @@ class Uniter(Type): @ReturnMapping(StringResults) async def PublicAddress(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~StringResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='PublicAddress', Version=3, Params=params) - params['Entities'] = entities + msg = dict(type='Uniter', request='PublicAddress', version=4, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @@ -19284,73 +19883,73 @@ class Uniter(Type): @ReturnMapping(GetLeadershipSettingsBulkResults) async def Read(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~GetLeadershipSettingsResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~GetLeadershipSettingsResult]<~GetLeadershipSettingsResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='Read', Version=3, Params=params) - params['Entities'] = entities + msg = dict(type='Uniter', request='Read', version=4, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @ReturnMapping(SettingsResults) - async def ReadRemoteSettings(self, relationunitpairs): + async def ReadRemoteSettings(self, relation_unit_pairs): ''' - relationunitpairs : typing.Sequence[~RelationUnitPair] - Returns -> typing.Sequence[~SettingsResult] + relation_unit_pairs : typing.Sequence<+T_co>[~RelationUnitPair]<~RelationUnitPair> + Returns -> typing.Sequence<+T_co>[~SettingsResult]<~SettingsResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='ReadRemoteSettings', Version=3, Params=params) - params['RelationUnitPairs'] = relationunitpairs + msg = dict(type='Uniter', request='ReadRemoteSettings', version=4, params=params) + params['relation-unit-pairs'] = relation_unit_pairs reply = await self.rpc(msg) return reply @ReturnMapping(SettingsResults) - async def ReadSettings(self, relationunits): + async def ReadSettings(self, relation_units): ''' - relationunits : typing.Sequence[~RelationUnit] - Returns -> typing.Sequence[~SettingsResult] + relation_units : typing.Sequence<+T_co>[~RelationUnit]<~RelationUnit> + Returns -> typing.Sequence<+T_co>[~SettingsResult]<~SettingsResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='ReadSettings', Version=3, Params=params) - params['RelationUnits'] = relationunits + msg = dict(type='Uniter', request='ReadSettings', version=4, params=params) + params['relation-units'] = relation_units reply = await self.rpc(msg) return reply @ReturnMapping(RelationResults) - async def Relation(self, relationunits): + async def Relation(self, relation_units): ''' - relationunits : typing.Sequence[~RelationUnit] - Returns -> typing.Sequence[~RelationResult] + relation_units : typing.Sequence<+T_co>[~RelationUnit]<~RelationUnit> + Returns -> typing.Sequence<+T_co>[~RelationResult]<~RelationResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='Relation', Version=3, Params=params) - params['RelationUnits'] = relationunits + msg = dict(type='Uniter', request='Relation', version=4, params=params) + params['relation-units'] = relation_units reply = await self.rpc(msg) return reply @ReturnMapping(RelationResults) - async def RelationById(self, relationids): + async def RelationById(self, relation_ids): ''' - relationids : typing.Sequence[int] - Returns -> typing.Sequence[~RelationResult] + relation_ids : typing.Sequence<+T_co>[int] + Returns -> typing.Sequence<+T_co>[~RelationResult]<~RelationResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='RelationById', Version=3, Params=params) - params['RelationIds'] = relationids + msg = dict(type='Uniter', request='RelationById', version=4, params=params) + params['relation-ids'] = relation_ids reply = await self.rpc(msg) return reply @@ -19359,12 +19958,12 @@ class Uniter(Type): @ReturnMapping(ErrorResults) async def RemoveStorageAttachments(self, ids): ''' - ids : typing.Sequence[~StorageAttachmentId] - Returns -> typing.Sequence[~ErrorResult] + ids : typing.Sequence<+T_co>[~StorageAttachmentId]<~StorageAttachmentId> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='RemoveStorageAttachments', Version=3, Params=params) + msg = dict(type='Uniter', request='RemoveStorageAttachments', version=4, params=params) params['ids'] = ids reply = await self.rpc(msg) return reply @@ -19374,13 +19973,13 @@ class Uniter(Type): @ReturnMapping(ErrorResults) async def RequestReboot(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ErrorResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='RequestReboot', Version=3, Params=params) - params['Entities'] = entities + msg = dict(type='Uniter', request='RequestReboot', version=4, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @@ -19389,58 +19988,43 @@ class Uniter(Type): @ReturnMapping(ResolvedModeResults) async def Resolved(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ResolvedModeResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='Resolved', Version=3, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringResults) - async def ServiceOwner(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~StringResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~ResolvedModeResult]<~ResolvedModeResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='ServiceOwner', Version=3, Params=params) - params['Entities'] = entities + msg = dict(type='Uniter', request='Resolved', version=4, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply - @ReturnMapping(ServiceStatusResults) - async def ServiceStatus(self, entities): + @ReturnMapping(ErrorResults) + async def SetAgentStatus(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ServiceStatusResult] + entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='ServiceStatus', Version=3, Params=params) - params['Entities'] = entities + msg = dict(type='Uniter', request='SetAgentStatus', version=4, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @ReturnMapping(ErrorResults) - async def SetAgentStatus(self, entities): + async def SetApplicationStatus(self, entities): ''' - entities : typing.Sequence[~EntityStatusArgs] - Returns -> typing.Sequence[~ErrorResult] + entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='SetAgentStatus', Version=3, Params=params) - params['Entities'] = entities + msg = dict(type='Uniter', request='SetApplicationStatus', version=4, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @@ -19449,58 +20033,58 @@ class Uniter(Type): @ReturnMapping(ErrorResults) async def SetCharmURL(self, entities): ''' - entities : typing.Sequence[~EntityCharmURL] - Returns -> typing.Sequence[~ErrorResult] + entities : typing.Sequence<+T_co>[~EntityCharmURL]<~EntityCharmURL> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='SetCharmURL', Version=3, Params=params) - params['Entities'] = entities + msg = dict(type='Uniter', request='SetCharmURL', version=4, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @ReturnMapping(ErrorResults) - async def SetServiceStatus(self, entities): + async def SetStatus(self, entities): ''' - entities : typing.Sequence[~EntityStatusArgs] - Returns -> typing.Sequence[~ErrorResult] + entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='SetServiceStatus', Version=3, Params=params) - params['Entities'] = entities + msg = dict(type='Uniter', request='SetStatus', version=4, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @ReturnMapping(ErrorResults) - async def SetStatus(self, entities): + async def SetUnitStatus(self, entities): ''' - entities : typing.Sequence[~EntityStatusArgs] - Returns -> typing.Sequence[~ErrorResult] + entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='SetStatus', Version=3, Params=params) - params['Entities'] = entities + msg = dict(type='Uniter', request='SetUnitStatus', version=4, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @ReturnMapping(ErrorResults) - async def SetUnitStatus(self, entities): + async def SetWorkloadVersion(self, entities): ''' - entities : typing.Sequence[~EntityStatusArgs] - Returns -> typing.Sequence[~ErrorResult] + entities : typing.Sequence<+T_co>[~EntityWorkloadVersion]<~EntityWorkloadVersion> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='SetUnitStatus', Version=3, Params=params) - params['Entities'] = entities + msg = dict(type='Uniter', request='SetWorkloadVersion', version=4, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @@ -19509,12 +20093,12 @@ class Uniter(Type): @ReturnMapping(LifeResults) async def StorageAttachmentLife(self, ids): ''' - ids : typing.Sequence[~StorageAttachmentId] - Returns -> typing.Sequence[~LifeResult] + ids : typing.Sequence<+T_co>[~StorageAttachmentId]<~StorageAttachmentId> + Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='StorageAttachmentLife', Version=3, Params=params) + msg = dict(type='Uniter', request='StorageAttachmentLife', version=4, params=params) params['ids'] = ids reply = await self.rpc(msg) return reply @@ -19524,12 +20108,12 @@ class Uniter(Type): @ReturnMapping(StorageAttachmentResults) async def StorageAttachments(self, ids): ''' - ids : typing.Sequence[~StorageAttachmentId] - Returns -> typing.Sequence[~StorageAttachmentResult] + ids : typing.Sequence<+T_co>[~StorageAttachmentId]<~StorageAttachmentId> + Returns -> typing.Sequence<+T_co>[~StorageAttachmentResult]<~StorageAttachmentResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='StorageAttachments', Version=3, Params=params) + msg = dict(type='Uniter', request='StorageAttachments', version=4, params=params) params['ids'] = ids reply = await self.rpc(msg) return reply @@ -19539,13 +20123,13 @@ class Uniter(Type): @ReturnMapping(StatusResults) async def UnitStatus(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~StatusResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~StatusResult]<~StatusResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='UnitStatus', Version=3, Params=params) - params['Entities'] = entities + msg = dict(type='Uniter', request='UnitStatus', version=4, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @@ -19554,28 +20138,28 @@ class Uniter(Type): @ReturnMapping(StorageAttachmentIdsResults) async def UnitStorageAttachments(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~StorageAttachmentIdsResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~StorageAttachmentIdsResult]<~StorageAttachmentIdsResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='UnitStorageAttachments', Version=3, Params=params) - params['Entities'] = entities + msg = dict(type='Uniter', request='UnitStorageAttachments', version=4, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @ReturnMapping(ErrorResults) - async def UpdateSettings(self, relationunits): + async def UpdateSettings(self, relation_units): ''' - relationunits : typing.Sequence[~RelationUnitSettings] - Returns -> typing.Sequence[~ErrorResult] + relation_units : typing.Sequence<+T_co>[~RelationUnitSettings]<~RelationUnitSettings> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='UpdateSettings', Version=3, Params=params) - params['RelationUnits'] = relationunits + msg = dict(type='Uniter', request='UpdateSettings', version=4, params=params) + params['relation-units'] = relation_units reply = await self.rpc(msg) return reply @@ -19584,13 +20168,13 @@ class Uniter(Type): @ReturnMapping(NotifyWatchResults) async def Watch(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~NotifyWatchResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='Watch', Version=3, Params=params) - params['Entities'] = entities + msg = dict(type='Uniter', request='Watch', version=4, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @@ -19600,11 +20184,11 @@ class Uniter(Type): async def WatchAPIHostPorts(self): ''' - Returns -> typing.Union[_ForwardRef('Error'), str] + Returns -> typing.Union[str, _ForwardRef('Error')] ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='WatchAPIHostPorts', Version=3, Params=params) + msg = dict(type='Uniter', request='WatchAPIHostPorts', version=4, params=params) reply = await self.rpc(msg) return reply @@ -19614,13 +20198,28 @@ class Uniter(Type): @ReturnMapping(StringsWatchResults) async def WatchActionNotifications(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~StringsWatchResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='Uniter', request='WatchActionNotifications', version=4, params=params) + params['entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(StringsWatchResults) + async def WatchApplicationRelations(self, entities): + ''' + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='WatchActionNotifications', Version=3, Params=params) - params['Entities'] = entities + msg = dict(type='Uniter', request='WatchApplicationRelations', version=4, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @@ -19629,13 +20228,13 @@ class Uniter(Type): @ReturnMapping(NotifyWatchResults) async def WatchConfigSettings(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~NotifyWatchResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='WatchConfigSettings', Version=3, Params=params) - params['Entities'] = entities + msg = dict(type='Uniter', request='WatchConfigSettings', version=4, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @@ -19645,11 +20244,11 @@ class Uniter(Type): async def WatchForModelConfigChanges(self): ''' - Returns -> typing.Union[_ForwardRef('Error'), str] + Returns -> typing.Union[str, _ForwardRef('Error')] ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='WatchForModelConfigChanges', Version=3, Params=params) + msg = dict(type='Uniter', request='WatchForModelConfigChanges', version=4, params=params) reply = await self.rpc(msg) return reply @@ -19659,13 +20258,13 @@ class Uniter(Type): @ReturnMapping(NotifyWatchResults) async def WatchLeadershipSettings(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~NotifyWatchResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='WatchLeadershipSettings', Version=3, Params=params) - params['Entities'] = entities + msg = dict(type='Uniter', request='WatchLeadershipSettings', version=4, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @@ -19674,93 +20273,93 @@ class Uniter(Type): @ReturnMapping(NotifyWatchResults) async def WatchMeterStatus(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~NotifyWatchResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='WatchMeterStatus', Version=3, Params=params) - params['Entities'] = entities + msg = dict(type='Uniter', request='WatchMeterStatus', version=4, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @ReturnMapping(RelationUnitsWatchResults) - async def WatchRelationUnits(self, relationunits): + async def WatchRelationUnits(self, relation_units): ''' - relationunits : typing.Sequence[~RelationUnit] - Returns -> typing.Sequence[~RelationUnitsWatchResult] + relation_units : typing.Sequence<+T_co>[~RelationUnit]<~RelationUnit> + Returns -> typing.Sequence<+T_co>[~RelationUnitsWatchResult]<~RelationUnitsWatchResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='WatchRelationUnits', Version=3, Params=params) - params['RelationUnits'] = relationunits + msg = dict(type='Uniter', request='WatchRelationUnits', version=4, params=params) + params['relation-units'] = relation_units reply = await self.rpc(msg) return reply - @ReturnMapping(StringsWatchResults) - async def WatchServiceRelations(self, entities): + @ReturnMapping(NotifyWatchResults) + async def WatchStorageAttachments(self, ids): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~StringsWatchResult] + ids : typing.Sequence<+T_co>[~StorageAttachmentId]<~StorageAttachmentId> + Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='WatchServiceRelations', Version=3, Params=params) - params['Entities'] = entities + msg = dict(type='Uniter', request='WatchStorageAttachments', version=4, params=params) + params['ids'] = ids reply = await self.rpc(msg) return reply @ReturnMapping(NotifyWatchResults) - async def WatchStorageAttachments(self, ids): + async def WatchUnitAddresses(self, entities): ''' - ids : typing.Sequence[~StorageAttachmentId] - Returns -> typing.Sequence[~NotifyWatchResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='WatchStorageAttachments', Version=3, Params=params) - params['ids'] = ids + msg = dict(type='Uniter', request='WatchUnitAddresses', version=4, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply - @ReturnMapping(NotifyWatchResults) - async def WatchUnitAddresses(self, entities): + @ReturnMapping(StringsWatchResults) + async def WatchUnitStorageAttachments(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~NotifyWatchResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='WatchUnitAddresses', Version=3, Params=params) - params['Entities'] = entities + msg = dict(type='Uniter', request='WatchUnitStorageAttachments', version=4, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply - @ReturnMapping(StringsWatchResults) - async def WatchUnitStorageAttachments(self, entities): + @ReturnMapping(StringResults) + async def WorkloadVersion(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~StringsWatchResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Uniter', Request='WatchUnitStorageAttachments', Version=3, Params=params) - params['Entities'] = entities + msg = dict(type='Uniter', request='WorkloadVersion', version=4, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply -class Upgrader(Type): +class UpgraderFacade(Type): name = 'Upgrader' version = 1 schema = {'definitions': {'Binary': {'additionalProperties': False, @@ -19770,67 +20369,52 @@ class Upgrader(Type): 'required': ['Number', 'Series', 'Arch'], 'type': 'object'}, 'Entities': {'additionalProperties': False, - 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'}, + 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, 'type': 'array'}}, - 'required': ['Entities'], + 'required': ['entities'], 'type': 'object'}, 'EntitiesVersion': {'additionalProperties': False, - 'properties': {'AgentTools': {'items': {'$ref': '#/definitions/EntityVersion'}, - 'type': 'array'}}, - 'required': ['AgentTools'], + 'properties': {'agent-tools': {'items': {'$ref': '#/definitions/EntityVersion'}, + 'type': 'array'}}, + 'required': ['agent-tools'], 'type': 'object'}, 'Entity': {'additionalProperties': False, - 'properties': {'Tag': {'type': 'string'}}, - 'required': ['Tag'], + 'properties': {'tag': {'type': 'string'}}, + 'required': ['tag'], 'type': 'object'}, 'EntityVersion': {'additionalProperties': False, - 'properties': {'Tag': {'type': 'string'}, - 'Tools': {'$ref': '#/definitions/Version'}}, - 'required': ['Tag', 'Tools'], + 'properties': {'tag': {'type': 'string'}, + 'tools': {'$ref': '#/definitions/Version'}}, + 'required': ['tag', 'tools'], 'type': 'object'}, 'Error': {'additionalProperties': False, - 'properties': {'Code': {'type': 'string'}, - 'Info': {'$ref': '#/definitions/ErrorInfo'}, - 'Message': {'type': 'string'}}, - 'required': ['Message', 'Code'], + 'properties': {'code': {'type': 'string'}, + 'info': {'$ref': '#/definitions/ErrorInfo'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], 'type': 'object'}, 'ErrorInfo': {'additionalProperties': False, - 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'}, - 'MacaroonPath': {'type': 'string'}}, + 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'macaroon-path': {'type': 'string'}}, 'type': 'object'}, 'ErrorResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}}, - 'required': ['Error'], + 'properties': {'error': {'$ref': '#/definitions/Error'}}, 'type': 'object'}, 'ErrorResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'}, + 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, 'type': 'array'}}, - 'required': ['Results'], + 'required': ['results'], 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, - 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'}, - 'type': 'array'}, - 'data': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'id': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'sig': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['data', - 'location', - 'id', - 'caveats', - 'sig'], - 'type': 'object'}, + 'Macaroon': {'additionalProperties': False, 'type': 'object'}, 'NotifyWatchResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'NotifyWatcherId': {'type': 'string'}}, - 'required': ['NotifyWatcherId', 'Error'], + 'properties': {'NotifyWatcherId': {'type': 'string'}, + 'error': {'$ref': '#/definitions/Error'}}, + 'required': ['NotifyWatcherId'], 'type': 'object'}, 'NotifyWatchResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, + 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, 'type': 'array'}}, - 'required': ['Results'], + 'required': ['results'], 'type': 'object'}, 'Number': {'additionalProperties': False, 'properties': {'Build': {'type': 'integer'}, @@ -19852,47 +20436,31 @@ class Upgrader(Type): 'required': ['version', 'url', 'size'], 'type': 'object'}, 'ToolsResult': {'additionalProperties': False, - 'properties': {'DisableSSLHostnameVerification': {'type': 'boolean'}, - 'Error': {'$ref': '#/definitions/Error'}, - 'ToolsList': {'items': {'$ref': '#/definitions/Tools'}, - 'type': 'array'}}, - 'required': ['ToolsList', - 'DisableSSLHostnameVerification', - 'Error'], + 'properties': {'disable-ssl-hostname-verification': {'type': 'boolean'}, + 'error': {'$ref': '#/definitions/Error'}, + 'tools': {'items': {'$ref': '#/definitions/Tools'}, + 'type': 'array'}}, + 'required': ['tools', + 'disable-ssl-hostname-verification'], 'type': 'object'}, 'ToolsResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/ToolsResult'}, + 'properties': {'results': {'items': {'$ref': '#/definitions/ToolsResult'}, 'type': 'array'}}, - 'required': ['Results'], + 'required': ['results'], 'type': 'object'}, 'Version': {'additionalProperties': False, - 'properties': {'Version': {'$ref': '#/definitions/Binary'}}, - 'required': ['Version'], + 'properties': {'version': {'$ref': '#/definitions/Binary'}}, + 'required': ['version'], 'type': 'object'}, 'VersionResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Version': {'$ref': '#/definitions/Number'}}, - 'required': ['Version', 'Error'], + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'version': {'$ref': '#/definitions/Number'}}, 'type': 'object'}, 'VersionResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/VersionResult'}, + 'properties': {'results': {'items': {'$ref': '#/definitions/VersionResult'}, 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'caveat': {'additionalProperties': False, - 'properties': {'caveatId': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'verificationId': {'$ref': '#/definitions/packet'}}, - 'required': ['location', - 'caveatId', - 'verificationId'], - 'type': 'object'}, - 'packet': {'additionalProperties': False, - 'properties': {'headerLen': {'type': 'integer'}, - 'start': {'type': 'integer'}, - 'totalLen': {'type': 'integer'}}, - 'required': ['start', 'totalLen', 'headerLen'], - 'type': 'object'}}, + 'required': ['results'], + 'type': 'object'}}, 'properties': {'DesiredVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, 'Result': {'$ref': '#/definitions/VersionResults'}}, 'type': 'object'}, @@ -19911,28 +20479,28 @@ class Upgrader(Type): @ReturnMapping(VersionResults) async def DesiredVersion(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~VersionResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~VersionResult]<~VersionResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Upgrader', Request='DesiredVersion', Version=1, Params=params) - params['Entities'] = entities + msg = dict(type='Upgrader', request='DesiredVersion', version=1, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @ReturnMapping(ErrorResults) - async def SetTools(self, agenttools): + async def SetTools(self, agent_tools): ''' - agenttools : typing.Sequence[~EntityVersion] - Returns -> typing.Sequence[~ErrorResult] + agent_tools : typing.Sequence<+T_co>[~EntityVersion]<~EntityVersion> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Upgrader', Request='SetTools', Version=1, Params=params) - params['AgentTools'] = agenttools + msg = dict(type='Upgrader', request='SetTools', version=1, params=params) + params['agent-tools'] = agent_tools reply = await self.rpc(msg) return reply @@ -19941,13 +20509,13 @@ class Upgrader(Type): @ReturnMapping(ToolsResults) async def Tools(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ToolsResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~ToolsResult]<~ToolsResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Upgrader', Request='Tools', Version=1, Params=params) - params['Entities'] = entities + msg = dict(type='Upgrader', request='Tools', version=1, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @@ -19956,30 +20524,25 @@ class Upgrader(Type): @ReturnMapping(NotifyWatchResults) async def WatchAPIVersion(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~NotifyWatchResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='Upgrader', Request='WatchAPIVersion', Version=1, Params=params) - params['Entities'] = entities + msg = dict(type='Upgrader', request='WatchAPIVersion', version=1, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply -class UserManager(Type): +class UserManagerFacade(Type): name = 'UserManager' version = 1 schema = {'definitions': {'AddUser': {'additionalProperties': False, 'properties': {'display-name': {'type': 'string'}, - 'model-access-permission': {'type': 'string'}, 'password': {'type': 'string'}, - 'shared-model-tags': {'items': {'type': 'string'}, - 'type': 'array'}, 'username': {'type': 'string'}}, - 'required': ['username', - 'display-name', - 'shared-model-tags'], + 'required': ['username', 'display-name'], 'type': 'object'}, 'AddUserResult': {'additionalProperties': False, 'properties': {'error': {'$ref': '#/definitions/Error'}, @@ -19998,58 +20561,43 @@ class UserManager(Type): 'required': ['users'], 'type': 'object'}, 'Entities': {'additionalProperties': False, - 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'}, + 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, 'type': 'array'}}, - 'required': ['Entities'], + 'required': ['entities'], 'type': 'object'}, 'Entity': {'additionalProperties': False, - 'properties': {'Tag': {'type': 'string'}}, - 'required': ['Tag'], + 'properties': {'tag': {'type': 'string'}}, + 'required': ['tag'], 'type': 'object'}, 'EntityPassword': {'additionalProperties': False, - 'properties': {'Password': {'type': 'string'}, - 'Tag': {'type': 'string'}}, - 'required': ['Tag', 'Password'], + 'properties': {'password': {'type': 'string'}, + 'tag': {'type': 'string'}}, + 'required': ['tag', 'password'], 'type': 'object'}, 'EntityPasswords': {'additionalProperties': False, - 'properties': {'Changes': {'items': {'$ref': '#/definitions/EntityPassword'}, + 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'}, 'type': 'array'}}, - 'required': ['Changes'], + 'required': ['changes'], 'type': 'object'}, 'Error': {'additionalProperties': False, - 'properties': {'Code': {'type': 'string'}, - 'Info': {'$ref': '#/definitions/ErrorInfo'}, - 'Message': {'type': 'string'}}, - 'required': ['Message', 'Code'], + 'properties': {'code': {'type': 'string'}, + 'info': {'$ref': '#/definitions/ErrorInfo'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], 'type': 'object'}, 'ErrorInfo': {'additionalProperties': False, - 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'}, - 'MacaroonPath': {'type': 'string'}}, + 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'macaroon-path': {'type': 'string'}}, 'type': 'object'}, 'ErrorResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}}, - 'required': ['Error'], + 'properties': {'error': {'$ref': '#/definitions/Error'}}, 'type': 'object'}, 'ErrorResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'}, + 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, 'type': 'array'}}, - 'required': ['Results'], + 'required': ['results'], 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, - 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'}, - 'type': 'array'}, - 'data': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'id': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'sig': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['data', - 'location', - 'id', - 'caveats', - 'sig'], - 'type': 'object'}, + 'Macaroon': {'additionalProperties': False, 'type': 'object'}, 'MacaroonResult': {'additionalProperties': False, 'properties': {'error': {'$ref': '#/definitions/Error'}, 'result': {'$ref': '#/definitions/Macaroon'}}, @@ -20060,7 +20608,8 @@ class UserManager(Type): 'required': ['results'], 'type': 'object'}, 'UserInfo': {'additionalProperties': False, - 'properties': {'created-by': {'type': 'string'}, + 'properties': {'access': {'type': 'string'}, + 'created-by': {'type': 'string'}, 'date-created': {'format': 'date-time', 'type': 'string'}, 'disabled': {'type': 'boolean'}, @@ -20070,6 +20619,7 @@ class UserManager(Type): 'username': {'type': 'string'}}, 'required': ['username', 'display-name', + 'access', 'created-by', 'date-created', 'disabled'], @@ -20089,21 +20639,7 @@ class UserManager(Type): 'properties': {'results': {'items': {'$ref': '#/definitions/UserInfoResult'}, 'type': 'array'}}, 'required': ['results'], - 'type': 'object'}, - 'caveat': {'additionalProperties': False, - 'properties': {'caveatId': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'verificationId': {'$ref': '#/definitions/packet'}}, - 'required': ['location', - 'caveatId', - 'verificationId'], - 'type': 'object'}, - 'packet': {'additionalProperties': False, - 'properties': {'headerLen': {'type': 'integer'}, - 'start': {'type': 'integer'}, - 'totalLen': {'type': 'integer'}}, - 'required': ['start', 'totalLen', 'headerLen'], - 'type': 'object'}}, + 'type': 'object'}}, 'properties': {'AddUser': {'properties': {'Params': {'$ref': '#/definitions/AddUsers'}, 'Result': {'$ref': '#/definitions/AddUserResults'}}, 'type': 'object'}, @@ -20116,6 +20652,9 @@ class UserManager(Type): 'EnableUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, 'Result': {'$ref': '#/definitions/ErrorResults'}}, 'type': 'object'}, + 'RemoveUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, 'SetPassword': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'}, 'Result': {'$ref': '#/definitions/ErrorResults'}}, 'type': 'object'}, @@ -20128,12 +20667,12 @@ class UserManager(Type): @ReturnMapping(AddUserResults) async def AddUser(self, users): ''' - users : typing.Sequence[~AddUser] - Returns -> typing.Sequence[~AddUserResult] + users : typing.Sequence<+T_co>[~AddUser]<~AddUser> + Returns -> typing.Sequence<+T_co>[~AddUserResult]<~AddUserResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='UserManager', Request='AddUser', Version=1, Params=params) + msg = dict(type='UserManager', request='AddUser', version=1, params=params) params['users'] = users reply = await self.rpc(msg) return reply @@ -20143,13 +20682,13 @@ class UserManager(Type): @ReturnMapping(MacaroonResults) async def CreateLocalLoginMacaroon(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~MacaroonResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~MacaroonResult]<~MacaroonResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='UserManager', Request='CreateLocalLoginMacaroon', Version=1, Params=params) - params['Entities'] = entities + msg = dict(type='UserManager', request='CreateLocalLoginMacaroon', version=1, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @@ -20158,13 +20697,13 @@ class UserManager(Type): @ReturnMapping(ErrorResults) async def DisableUser(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ErrorResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='UserManager', Request='DisableUser', Version=1, Params=params) - params['Entities'] = entities + msg = dict(type='UserManager', request='DisableUser', version=1, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @@ -20173,13 +20712,28 @@ class UserManager(Type): @ReturnMapping(ErrorResults) async def EnableUser(self, entities): ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ErrorResult] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> + ''' + # map input types to rpc msg + params = dict() + msg = dict(type='UserManager', request='EnableUser', version=1, params=params) + params['entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def RemoveUser(self, entities): + ''' + entities : typing.Sequence<+T_co>[~Entity]<~Entity> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='UserManager', Request='EnableUser', Version=1, Params=params) - params['Entities'] = entities + msg = dict(type='UserManager', request='RemoveUser', version=1, params=params) + params['entities'] = entities reply = await self.rpc(msg) return reply @@ -20188,13 +20742,13 @@ class UserManager(Type): @ReturnMapping(ErrorResults) async def SetPassword(self, changes): ''' - changes : typing.Sequence[~EntityPassword] - Returns -> typing.Sequence[~ErrorResult] + changes : typing.Sequence<+T_co>[~EntityPassword]<~EntityPassword> + Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='UserManager', Request='SetPassword', Version=1, Params=params) - params['Changes'] = changes + msg = dict(type='UserManager', request='SetPassword', version=1, params=params) + params['changes'] = changes reply = await self.rpc(msg) return reply @@ -20203,76 +20757,47 @@ class UserManager(Type): @ReturnMapping(UserInfoResults) async def UserInfo(self, entities, include_disabled): ''' - entities : typing.Sequence[~Entity] + entities : typing.Sequence<+T_co>[~Entity]<~Entity> include_disabled : bool - Returns -> typing.Sequence[~UserInfoResult] + Returns -> typing.Sequence<+T_co>[~UserInfoResult]<~UserInfoResult> ''' # map input types to rpc msg params = dict() - msg = dict(Type='UserManager', Request='UserInfo', Version=1, Params=params) + msg = dict(type='UserManager', request='UserInfo', version=1, params=params) params['entities'] = entities params['include-disabled'] = include_disabled reply = await self.rpc(msg) return reply -class VolumeAttachmentsWatcher(Type): +class VolumeAttachmentsWatcherFacade(Type): name = 'VolumeAttachmentsWatcher' version = 2 schema = {'definitions': {'Error': {'additionalProperties': False, - 'properties': {'Code': {'type': 'string'}, - 'Info': {'$ref': '#/definitions/ErrorInfo'}, - 'Message': {'type': 'string'}}, - 'required': ['Message', 'Code'], + 'properties': {'code': {'type': 'string'}, + 'info': {'$ref': '#/definitions/ErrorInfo'}, + 'message': {'type': 'string'}}, + 'required': ['message', 'code'], 'type': 'object'}, 'ErrorInfo': {'additionalProperties': False, - 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'}, - 'MacaroonPath': {'type': 'string'}}, + 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, + 'macaroon-path': {'type': 'string'}}, 'type': 'object'}, - 'Macaroon': {'additionalProperties': False, - 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'}, - 'type': 'array'}, - 'data': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'id': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'sig': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['data', - 'location', - 'id', - 'caveats', - 'sig'], - 'type': 'object'}, + 'Macaroon': {'additionalProperties': False, 'type': 'object'}, 'MachineStorageId': {'additionalProperties': False, - 'properties': {'attachmenttag': {'type': 'string'}, - 'machinetag': {'type': 'string'}}, - 'required': ['machinetag', - 'attachmenttag'], + 'properties': {'attachment-tag': {'type': 'string'}, + 'machine-tag': {'type': 'string'}}, + 'required': ['machine-tag', + 'attachment-tag'], 'type': 'object'}, 'MachineStorageIdsWatchResult': {'additionalProperties': False, - 'properties': {'Changes': {'items': {'$ref': '#/definitions/MachineStorageId'}, + 'properties': {'changes': {'items': {'$ref': '#/definitions/MachineStorageId'}, 'type': 'array'}, - 'Error': {'$ref': '#/definitions/Error'}, - 'MachineStorageIdsWatcherId': {'type': 'string'}}, - 'required': ['MachineStorageIdsWatcherId', - 'Changes', - 'Error'], - 'type': 'object'}, - 'caveat': {'additionalProperties': False, - 'properties': {'caveatId': {'$ref': '#/definitions/packet'}, - 'location': {'$ref': '#/definitions/packet'}, - 'verificationId': {'$ref': '#/definitions/packet'}}, - 'required': ['location', - 'caveatId', - 'verificationId'], - 'type': 'object'}, - 'packet': {'additionalProperties': False, - 'properties': {'headerLen': {'type': 'integer'}, - 'start': {'type': 'integer'}, - 'totalLen': {'type': 'integer'}}, - 'required': ['start', 'totalLen', 'headerLen'], - 'type': 'object'}}, + 'error': {'$ref': '#/definitions/Error'}, + 'watcher-id': {'type': 'string'}}, + 'required': ['watcher-id', + 'changes'], + 'type': 'object'}}, 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResult'}}, 'type': 'object'}, 'Stop': {'type': 'object'}}, @@ -20283,11 +20808,11 @@ class VolumeAttachmentsWatcher(Type): async def Next(self): ''' - Returns -> typing.Union[typing.Sequence[~MachineStorageId], _ForwardRef('Error')] + Returns -> typing.Union[typing.Sequence<+T_co>[~MachineStorageId]<~MachineStorageId>, _ForwardRef('Error')] ''' # map input types to rpc msg params = dict() - msg = dict(Type='VolumeAttachmentsWatcher', Request='Next', Version=2, Params=params) + msg = dict(type='VolumeAttachmentsWatcher', request='Next', version=2, params=params) reply = await self.rpc(msg) return reply @@ -20302,7 +20827,7 @@ class VolumeAttachmentsWatcher(Type): ''' # map input types to rpc msg params = dict() - msg = dict(Type='VolumeAttachmentsWatcher', Request='Stop', Version=2, Params=params) + msg = dict(type='VolumeAttachmentsWatcher', request='Stop', version=2, params=params) reply = await self.rpc(msg) return reply