From edf3beda420d3a2c66d6ef8fe9b5e45a76d052b9 Mon Sep 17 00:00:00 2001 From: Tim Van Steenburgh Date: Thu, 9 Jun 2016 14:08:52 -0400 Subject: [PATCH] Working async AllWatcher example --- Makefile | 2 +- examples/allwatcher.py | 19 + juju/client/_client.py | 20409 +++++++++++++++++++++++++++++++++++++ juju/client/client.py | 20303 +----------------------------------- juju/client/facade.py | 3 + juju/client/overrides.py | 20 + juju/client/schemas.json | 16207 ++++++++++++++--------------- juju/client/watcher.py | 15 + 8 files changed, 28634 insertions(+), 28344 deletions(-) create mode 100644 examples/allwatcher.py create mode 100644 juju/client/_client.py create mode 100644 juju/client/overrides.py create mode 100644 juju/client/watcher.py diff --git a/Makefile b/Makefile index 0812d53..64e6ba5 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ PY := .tox/py35/bin/python3.5 .phony: client client: - $(PY) -m juju.client.facade -s juju/client/schemas.json -o juju/client/client.py + $(PY) -m juju.client.facade -s juju/client/schemas.json -o juju/client/_client.py .phony: test test: diff --git a/examples/allwatcher.py b/examples/allwatcher.py new file mode 100644 index 0000000..6c549b4 --- /dev/null +++ b/examples/allwatcher.py @@ -0,0 +1,19 @@ +import asyncio + +from juju.client.connection import Connection +from juju.client import watcher + + +loop = asyncio.get_event_loop() +conn = loop.run_until_complete(Connection.connect_current()) + + +async def watch(): + allwatcher = watcher.AllWatcher() + allwatcher.connect(conn) + while True: + change = await allwatcher.Next() + for delta in change.deltas: + print(delta.deltas) + +loop.run_until_complete(watch()) diff --git a/juju/client/_client.py b/juju/client/_client.py new file mode 100644 index 0000000..f4b5b56 --- /dev/null +++ b/juju/client/_client.py @@ -0,0 +1,20409 @@ + +from juju.client.facade import Type, ReturnMapping + +class Action(Type): + _toSchema = {'name': 'name', 'tag': 'tag', 'receiver': 'receiver', 'parameters': 'parameters'} + _toPy = {'name': 'name', 'tag': 'tag', 'receiver': 'receiver', 'parameters': 'parameters'} + def __init__(self, name=None, parameters=None, receiver=None, tag=None): + ''' + name : str + parameters : typing.Mapping[str, typing.Any] + receiver : str + tag : str + ''' + self.name = name + self.parameters = parameters + self.receiver = receiver + self.tag = tag + + +class ActionResult(Type): + _toSchema = {'message': 'message', 'status': 'status', 'enqueued': 'enqueued', 'action': 'action', 'output': 'output', 'completed': 'completed', 'started': 'started', 'error': 'error'} + _toPy = {'message': 'message', 'status': 'status', 'enqueued': 'enqueued', 'action': 'action', 'output': 'output', 'completed': 'completed', 'started': 'started', 'error': 'error'} + def __init__(self, action=None, completed=None, enqueued=None, error=None, message=None, output=None, started=None, status=None): + ''' + action : Action + completed : str + enqueued : str + error : Error + message : str + output : typing.Mapping[str, typing.Any] + started : str + status : str + ''' + self.action = Action.from_json(action) if action else None + self.completed = completed + self.enqueued = enqueued + self.error = Error.from_json(error) if error else None + self.message = message + self.output = output + self.started = started + self.status = status + + +class ActionResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~ActionResult] + ''' + self.results = [ActionResult.from_json(o) for o in results or []] + + +class ActionSpec(Type): + _toSchema = {'params': 'Params', 'description': 'Description'} + _toPy = {'Params': 'params', 'Description': 'description'} + def __init__(self, description=None, params=None): + ''' + description : str + params : typing.Mapping[str, typing.Any] + ''' + self.description = description + self.params = params + + +class Actions(Type): + _toSchema = {'actionspecs': 'ActionSpecs'} + _toPy = {'ActionSpecs': 'actionspecs'} + def __init__(self, actionspecs=None): + ''' + actionspecs : typing.Mapping[str, ~ActionSpec] + ''' + self.actionspecs = {k: ActionSpec.from_json(v) for k, v in (actionspecs or dict()).items()} + + +class ActionsByName(Type): + _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] + error : Error + name : str + ''' + self.actions = [ActionResult.from_json(o) for o in actions or []] + self.error = Error.from_json(error) if error else None + self.name = name + + +class ActionsByNames(Type): + _toSchema = {'actions': 'actions'} + _toPy = {'actions': 'actions'} + def __init__(self, actions=None): + ''' + actions : typing.Sequence[~ActionsByName] + ''' + self.actions = [ActionsByName.from_json(o) for o in actions or []] + + +class ActionsByReceiver(Type): + _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] + error : Error + receiver : str + ''' + self.actions = [ActionResult.from_json(o) for o in actions or []] + self.error = Error.from_json(error) if error else None + self.receiver = receiver + + +class ActionsByReceivers(Type): + _toSchema = {'actions': 'actions'} + _toPy = {'actions': 'actions'} + def __init__(self, actions=None): + ''' + actions : typing.Sequence[~ActionsByReceiver] + ''' + self.actions = [ActionsByReceiver.from_json(o) for o in actions or []] + + +class ApplicationCharmActionsResult(Type): + _toSchema = {'applicationtag': 'ApplicationTag', 'actions': 'actions', 'error': 'error'} + _toPy = {'actions': 'actions', 'ApplicationTag': 'applicationtag', 'error': 'error'} + def __init__(self, applicationtag=None, actions=None, error=None): + ''' + applicationtag : str + actions : Actions + error : Error + ''' + self.applicationtag = applicationtag + self.actions = Actions.from_json(actions) if actions else None + 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[~ApplicationCharmActionsResult] + ''' + self.results = [ApplicationCharmActionsResult.from_json(o) for o in results or []] + + +class Entities(Type): + _toSchema = {'entities': 'Entities'} + _toPy = {'Entities': 'entities'} + def __init__(self, entities=None): + ''' + entities : typing.Sequence[~Entity] + ''' + self.entities = [Entity.from_json(o) for o in entities or []] + + +class Entity(Type): + _toSchema = {'tag': 'Tag'} + _toPy = {'Tag': 'tag'} + def __init__(self, tag=None): + ''' + tag : str + ''' + self.tag = tag + + +class Error(Type): + _toSchema = {'code': 'Code', 'message': 'Message', 'info': 'Info'} + _toPy = {'Code': 'code', 'Message': 'message', 'Info': 'info'} + 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 ErrorInfo(Type): + _toSchema = {'macaroon': 'Macaroon', 'macaroonpath': 'MacaroonPath'} + _toPy = {'Macaroon': 'macaroon', 'MacaroonPath': 'macaroonpath'} + def __init__(self, macaroon=None, macaroonpath=None): + ''' + macaroon : Macaroon + macaroonpath : str + ''' + self.macaroon = Macaroon.from_json(macaroon) if macaroon else None + self.macaroonpath = macaroonpath + + +class FindActionsByNames(Type): + _toSchema = {'names': 'names'} + _toPy = {'names': 'names'} + def __init__(self, names=None): + ''' + names : typing.Sequence[str] + ''' + self.names = names + + +class FindTags(Type): + _toSchema = {'prefixes': 'prefixes'} + _toPy = {'prefixes': 'prefixes'} + def __init__(self, prefixes=None): + ''' + prefixes : typing.Sequence[str] + ''' + self.prefixes = prefixes + + +class FindTagsResults(Type): + _toSchema = {'matches': 'matches'} + _toPy = {'matches': 'matches'} + def __init__(self, matches=None): + ''' + matches : typing.Sequence[~Entity] + ''' + self.matches = [Entity.from_json(o) for o in matches or []] + + +class Macaroon(Type): + _toSchema = {'sig': 'sig', 'caveats': 'caveats', 'location': 'location', 'id_': 'id', 'data': 'data'} + _toPy = {'caveats': 'caveats', 'id': 'id_', 'sig': 'sig', 'location': 'location', 'data': 'data'} + def __init__(self, caveats=None, data=None, id_=None, location=None, sig=None): + ''' + 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 + + +class RunParams(Type): + _toSchema = {'timeout': 'Timeout', 'commands': 'Commands', 'units': 'Units', 'machines': 'Machines', 'applications': 'Applications'} + _toPy = {'Commands': 'commands', 'Timeout': 'timeout', 'Machines': 'machines', 'Applications': 'applications', 'Units': 'units'} + def __init__(self, applications=None, commands=None, machines=None, timeout=None, units=None): + ''' + applications : typing.Sequence[str] + commands : str + machines : typing.Sequence[str] + timeout : int + units : typing.Sequence[str] + ''' + self.applications = applications + self.commands = commands + self.machines = machines + self.timeout = timeout + self.units = units + + +class caveat(Type): + _toSchema = {'caveatid': 'caveatId', 'verificationid': 'verificationId', 'location': 'location'} + _toPy = {'verificationId': 'verificationid', 'location': 'location', 'caveatId': 'caveatid'} + def __init__(self, caveatid=None, location=None, verificationid=None): + ''' + caveatid : packet + location : packet + verificationid : packet + ''' + 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 + + +class packet(Type): + _toSchema = {'headerlen': 'headerLen', 'start': 'start', 'totallen': 'totalLen'} + _toPy = {'totalLen': 'totallen', 'start': 'start', 'headerLen': 'headerlen'} + def __init__(self, headerlen=None, start=None, totallen=None): + ''' + headerlen : int + start : int + totallen : int + ''' + self.headerlen = headerlen + self.start = start + self.totallen = totallen + + +class BoolResult(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', 'entitywatcherid': 'EntityWatcherId', 'error': 'Error'} + _toPy = {'Changes': 'changes', 'EntityWatcherId': 'entitywatcherid', 'Error': 'error'} + def __init__(self, changes=None, entitywatcherid=None, error=None): + ''' + changes : typing.Sequence[str] + entitywatcherid : str + error : Error + ''' + self.changes = changes + self.entitywatcherid = entitywatcherid + self.error = Error.from_json(error) if error else None + + +class ErrorResult(Type): + _toSchema = {'code': 'Code', 'message': 'Message', 'info': 'Info'} + _toPy = {'Code': 'code', 'Message': 'message', 'Info': 'info'} + 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 = {'jobs': 'Jobs', 'containertype': 'ContainerType', 'life': 'Life', 'error': 'Error'} + _toPy = {'Life': 'life', 'ContainerType': 'containertype', 'Jobs': 'jobs', 'Error': 'error'} + def __init__(self, containertype=None, error=None, jobs=None, life=None): + ''' + containertype : str + error : Error + jobs : typing.Sequence[str] + life : str + ''' + self.containertype = containertype + self.error = Error.from_json(error) if error else None + self.jobs = jobs + self.life = life + + +class AgentGetEntitiesResults(Type): + _toSchema = {'entities': 'Entities'} + _toPy = {'Entities': 'entities'} + def __init__(self, entities=None): + ''' + entities : typing.Sequence[~AgentGetEntitiesResult] + ''' + self.entities = [AgentGetEntitiesResult.from_json(o) for o in entities or []] + + +class EntityPassword(Type): + _toSchema = {'password': 'Password', 'tag': 'Tag'} + _toPy = {'Password': 'password', 'Tag': 'tag'} + def __init__(self, password=None, tag=None): + ''' + password : str + tag : str + ''' + self.password = password + self.tag = tag + + +class EntityPasswords(Type): + _toSchema = {'changes': 'Changes'} + _toPy = {'Changes': 'changes'} + def __init__(self, changes=None): + ''' + changes : typing.Sequence[~EntityPassword] + ''' + self.changes = [EntityPassword.from_json(o) for o in changes or []] + + +class ErrorResults(Type): + _toSchema = {'results': 'Results'} + _toPy = {'Results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~ErrorResult] + ''' + self.results = [ErrorResult.from_json(o) for o in results or []] + + +class IsMasterResult(Type): + _toSchema = {'master': 'Master'} + _toPy = {'Master': 'master'} + def __init__(self, master=None): + ''' + master : bool + ''' + self.master = master + + +class ModelConfigResult(Type): + _toSchema = {'config': 'Config'} + _toPy = {'Config': 'config'} + def __init__(self, config=None): + ''' + config : typing.Mapping[str, typing.Any] + ''' + self.config = config + + +class NotifyWatchResult(Type): + _toSchema = {'notifywatcherid': 'NotifyWatcherId', 'error': 'Error'} + _toPy = {'NotifyWatcherId': 'notifywatcherid', 'Error': 'error'} + def __init__(self, error=None, notifywatcherid=None): + ''' + error : Error + notifywatcherid : str + ''' + self.error = Error.from_json(error) if error else None + self.notifywatcherid = notifywatcherid + + +class StateServingInfo(Type): + _toSchema = {'caprivatekey': 'CAPrivateKey', 'systemidentity': 'SystemIdentity', 'cert': 'Cert', 'apiport': 'APIPort', 'privatekey': 'PrivateKey', 'stateport': 'StatePort', 'sharedsecret': 'SharedSecret'} + _toPy = {'Cert': 'cert', 'CAPrivateKey': 'caprivatekey', 'APIPort': 'apiport', 'PrivateKey': 'privatekey', 'SystemIdentity': 'systemidentity', 'StatePort': 'stateport', 'SharedSecret': 'sharedsecret'} + def __init__(self, apiport=None, caprivatekey=None, cert=None, privatekey=None, sharedsecret=None, stateport=None, systemidentity=None): + ''' + apiport : int + caprivatekey : str + cert : str + privatekey : str + sharedsecret : str + stateport : int + systemidentity : str + ''' + self.apiport = apiport + self.caprivatekey = caprivatekey + self.cert = cert + self.privatekey = privatekey + self.sharedsecret = sharedsecret + self.stateport = stateport + self.systemidentity = systemidentity + + +class AllWatcherNextResults(Type): + _toSchema = {'deltas': 'Deltas'} + _toPy = {'Deltas': 'deltas'} + def __init__(self, deltas=None): + ''' + deltas : typing.Sequence[~Delta] + ''' + self.deltas = [Delta.from_json(o) for o in deltas or []] + + +class Delta(Type): + _toSchema = {'removed': 'Removed'} + _toPy = {'Removed': 'removed'} + def __init__(self, removed=None): + ''' + removed : bool + ''' + self.removed = removed + + +class AnnotationsGetResult(Type): + _toSchema = {'entitytag': 'EntityTag', 'annotations': 'Annotations', 'error': 'Error'} + _toPy = {'Annotations': 'annotations', 'EntityTag': 'entitytag', 'Error': 'error'} + def __init__(self, annotations=None, entitytag=None, error=None): + ''' + annotations : typing.Mapping[str, str] + entitytag : str + error : ErrorResult + ''' + self.annotations = annotations + self.entitytag = entitytag + self.error = ErrorResult.from_json(error) if error else None + + +class AnnotationsGetResults(Type): + _toSchema = {'results': 'Results'} + _toPy = {'Results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~AnnotationsGetResult] + ''' + self.results = [AnnotationsGetResult.from_json(o) for o in results or []] + + +class AnnotationsSet(Type): + _toSchema = {'annotations': 'Annotations'} + _toPy = {'Annotations': 'annotations'} + def __init__(self, annotations=None): + ''' + annotations : typing.Sequence[~EntityAnnotations] + ''' + self.annotations = [EntityAnnotations.from_json(o) for o in annotations or []] + + +class EntityAnnotations(Type): + _toSchema = {'entitytag': 'EntityTag', 'annotations': 'Annotations'} + _toPy = {'Annotations': 'annotations', 'EntityTag': 'entitytag'} + def __init__(self, annotations=None, entitytag=None): + ''' + annotations : typing.Mapping[str, str] + entitytag : str + ''' + self.annotations = annotations + self.entitytag = entitytag + + +class AddApplicationUnits(Type): + _toSchema = {'placement': 'Placement', 'numunits': 'NumUnits', 'applicationname': 'ApplicationName'} + _toPy = {'NumUnits': 'numunits', 'ApplicationName': 'applicationname', 'Placement': 'placement'} + def __init__(self, applicationname=None, numunits=None, placement=None): + ''' + applicationname : str + numunits : int + placement : typing.Sequence[~Placement] + ''' + self.applicationname = applicationname + self.numunits = numunits + self.placement = [Placement.from_json(o) for o in placement or []] + + +class AddApplicationUnitsResults(Type): + _toSchema = {'units': 'Units'} + _toPy = {'Units': 'units'} + def __init__(self, units=None): + ''' + units : typing.Sequence[str] + ''' + self.units = units + + +class AddRelation(Type): + _toSchema = {'endpoints': 'Endpoints'} + _toPy = {'Endpoints': 'endpoints'} + def __init__(self, endpoints=None): + ''' + endpoints : typing.Sequence[str] + ''' + self.endpoints = endpoints + + +class AddRelationResults(Type): + _toSchema = {'endpoints': 'Endpoints'} + _toPy = {'Endpoints': 'endpoints'} + def __init__(self, endpoints=None): + ''' + endpoints : typing.Mapping[str, ~Relation] + ''' + self.endpoints = {k: Relation.from_json(v) for k, v in (endpoints or dict()).items()} + + +class ApplicationCharmRelations(Type): + _toSchema = {'applicationname': 'ApplicationName'} + _toPy = {'ApplicationName': 'applicationname'} + def __init__(self, applicationname=None): + ''' + applicationname : str + ''' + self.applicationname = applicationname + + +class ApplicationCharmRelationsResults(Type): + _toSchema = {'charmrelations': 'CharmRelations'} + _toPy = {'CharmRelations': 'charmrelations'} + def __init__(self, charmrelations=None): + ''' + charmrelations : typing.Sequence[str] + ''' + self.charmrelations = charmrelations + + +class ApplicationDeploy(Type): + _toSchema = {'channel': 'Channel', 'resources': 'Resources', 'storage': 'Storage', 'placement': 'Placement', 'series': 'Series', 'applicationname': 'ApplicationName', 'config': 'Config', 'endpointbindings': 'EndpointBindings', 'numunits': 'NumUnits', 'constraints': 'Constraints', 'charmurl': 'CharmUrl', 'configyaml': 'ConfigYAML'} + _toPy = {'CharmUrl': 'charmurl', 'ApplicationName': 'applicationname', 'Channel': 'channel', 'Placement': 'placement', 'ConfigYAML': 'configyaml', 'EndpointBindings': 'endpointbindings', 'Storage': 'storage', 'Series': 'series', 'Resources': 'resources', 'NumUnits': 'numunits', 'Constraints': 'constraints', 'Config': 'config'} + def __init__(self, applicationname=None, channel=None, charmurl=None, config=None, configyaml=None, constraints=None, endpointbindings=None, numunits=None, placement=None, resources=None, series=None, storage=None): + ''' + applicationname : str + 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 + storage : typing.Mapping[str, ~Constraints] + ''' + self.applicationname = applicationname + 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.storage = {k: Constraints.from_json(v) for k, v in (storage or dict()).items()} + + +class ApplicationDestroy(Type): + _toSchema = {'applicationname': 'ApplicationName'} + _toPy = {'ApplicationName': 'applicationname'} + def __init__(self, applicationname=None): + ''' + applicationname : str + ''' + self.applicationname = applicationname + + +class ApplicationExpose(Type): + _toSchema = {'applicationname': 'ApplicationName'} + _toPy = {'ApplicationName': 'applicationname'} + def __init__(self, applicationname=None): + ''' + applicationname : str + ''' + self.applicationname = applicationname + + +class ApplicationGet(Type): + _toSchema = {'applicationname': 'ApplicationName'} + _toPy = {'ApplicationName': 'applicationname'} + def __init__(self, applicationname=None): + ''' + applicationname : str + ''' + self.applicationname = applicationname + + +class ApplicationGetResults(Type): + _toSchema = {'charm': 'Charm', 'config': 'Config', 'application': 'Application', 'constraints': 'Constraints'} + _toPy = {'Application': 'application', 'Charm': 'charm', 'Constraints': 'constraints', 'Config': 'config'} + def __init__(self, application=None, charm=None, config=None, constraints=None): + ''' + application : str + charm : str + config : typing.Mapping[str, typing.Any] + constraints : Value + ''' + self.application = application + self.charm = charm + self.config = config + self.constraints = Value.from_json(constraints) if constraints else None + + +class ApplicationMetricCredential(Type): + _toSchema = {'metriccredentials': 'MetricCredentials', 'applicationname': 'ApplicationName'} + _toPy = {'MetricCredentials': 'metriccredentials', 'ApplicationName': 'applicationname'} + def __init__(self, applicationname=None, metriccredentials=None): + ''' + applicationname : str + metriccredentials : typing.Sequence[int] + ''' + self.applicationname = applicationname + self.metriccredentials = metriccredentials + + +class ApplicationMetricCredentials(Type): + _toSchema = {'creds': 'Creds'} + _toPy = {'Creds': 'creds'} + def __init__(self, creds=None): + ''' + creds : typing.Sequence[~ApplicationMetricCredential] + ''' + self.creds = [ApplicationMetricCredential.from_json(o) for o in creds or []] + + +class ApplicationSet(Type): + _toSchema = {'applicationname': 'ApplicationName', 'options': 'Options'} + _toPy = {'ApplicationName': 'applicationname', 'Options': 'options'} + def __init__(self, applicationname=None, options=None): + ''' + applicationname : str + options : typing.Mapping[str, str] + ''' + self.applicationname = applicationname + self.options = options + + +class ApplicationSetCharm(Type): + _toSchema = {'cs_channel': 'cs-channel', 'forceunits': 'forceunits', 'resourceids': 'resourceids', 'charmurl': 'charmurl', 'forceseries': 'forceseries', 'applicationname': 'applicationname'} + _toPy = {'cs-channel': 'cs_channel', 'forceunits': 'forceunits', 'resourceids': 'resourceids', 'charmurl': 'charmurl', 'forceseries': 'forceseries', 'applicationname': 'applicationname'} + def __init__(self, applicationname=None, charmurl=None, cs_channel=None, forceseries=None, forceunits=None, resourceids=None): + ''' + applicationname : str + charmurl : str + cs_channel : str + forceseries : bool + forceunits : bool + resourceids : typing.Mapping[str, str] + ''' + self.applicationname = applicationname + self.charmurl = charmurl + self.cs_channel = cs_channel + self.forceseries = forceseries + self.forceunits = forceunits + self.resourceids = resourceids + + +class ApplicationUnexpose(Type): + _toSchema = {'applicationname': 'ApplicationName'} + _toPy = {'ApplicationName': 'applicationname'} + def __init__(self, applicationname=None): + ''' + applicationname : str + ''' + self.applicationname = applicationname + + +class ApplicationUnset(Type): + _toSchema = {'applicationname': 'ApplicationName', 'options': 'Options'} + _toPy = {'ApplicationName': 'applicationname', 'Options': 'options'} + def __init__(self, applicationname=None, options=None): + ''' + applicationname : str + options : typing.Sequence[str] + ''' + self.applicationname = applicationname + self.options = options + + +class ApplicationUpdate(Type): + _toSchema = {'settingsstrings': 'SettingsStrings', 'settingsyaml': 'SettingsYAML', 'constraints': 'Constraints', 'charmurl': 'CharmUrl', 'forcecharmurl': 'ForceCharmUrl', 'forceseries': 'ForceSeries', 'minunits': 'MinUnits', 'applicationname': 'ApplicationName'} + _toPy = {'ForceCharmUrl': 'forcecharmurl', 'CharmUrl': 'charmurl', 'ApplicationName': 'applicationname', 'MinUnits': 'minunits', 'SettingsYAML': 'settingsyaml', 'ForceSeries': 'forceseries', 'SettingsStrings': 'settingsstrings', 'Constraints': 'constraints'} + def __init__(self, applicationname=None, charmurl=None, constraints=None, forcecharmurl=None, forceseries=None, minunits=None, settingsstrings=None, settingsyaml=None): + ''' + applicationname : str + charmurl : str + constraints : Value + forcecharmurl : bool + forceseries : bool + minunits : int + settingsstrings : typing.Mapping[str, str] + settingsyaml : str + ''' + self.applicationname = applicationname + self.charmurl = charmurl + self.constraints = Value.from_json(constraints) if constraints else None + self.forcecharmurl = forcecharmurl + self.forceseries = forceseries + self.minunits = minunits + self.settingsstrings = settingsstrings + self.settingsyaml = settingsyaml + + +class ApplicationsDeploy(Type): + _toSchema = {'applications': 'Applications'} + _toPy = {'Applications': 'applications'} + def __init__(self, applications=None): + ''' + applications : typing.Sequence[~ApplicationDeploy] + ''' + self.applications = [ApplicationDeploy.from_json(o) for o in applications or []] + + +class Constraints(Type): + _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 + pool : str + size : int + ''' + self.count = count + self.pool = pool + self.size = size + + +class DestroyApplicationUnits(Type): + _toSchema = {'unitnames': 'UnitNames'} + _toPy = {'UnitNames': 'unitnames'} + def __init__(self, unitnames=None): + ''' + unitnames : typing.Sequence[str] + ''' + self.unitnames = unitnames + + +class DestroyRelation(Type): + _toSchema = {'endpoints': 'Endpoints'} + _toPy = {'Endpoints': 'endpoints'} + def __init__(self, endpoints=None): + ''' + endpoints : typing.Sequence[str] + ''' + self.endpoints = endpoints + + +class GetApplicationConstraints(Type): + _toSchema = {'applicationname': 'ApplicationName'} + _toPy = {'ApplicationName': 'applicationname'} + def __init__(self, applicationname=None): + ''' + applicationname : str + ''' + self.applicationname = applicationname + + +class GetConstraintsResults(Type): + _toSchema = {'cpu_cores': 'cpu-cores', 'container': 'container', 'spaces': 'spaces', 'mem': 'mem', 'arch': 'arch', 'tags': 'tags', 'cpu_power': 'cpu-power', 'virt_type': 'virt-type', 'instance_type': 'instance-type', 'root_disk': 'root-disk'} + _toPy = {'tags': 'tags', 'container': 'container', 'spaces': 'spaces', 'instance-type': 'instance_type', 'arch': 'arch', 'cpu-cores': 'cpu_cores', 'virt-type': 'virt_type', 'root-disk': 'root_disk', 'mem': 'mem', 'cpu-power': 'cpu_power'} + 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 Placement(Type): + _toSchema = {'scope': 'Scope', 'directive': 'Directive'} + _toPy = {'Directive': 'directive', 'Scope': 'scope'} + def __init__(self, directive=None, scope=None): + ''' + directive : str + scope : str + ''' + self.directive = directive + self.scope = scope + + +class Relation(Type): + _toSchema = {'name': 'Name', 'role': 'Role', 'scope': 'Scope', 'limit': 'Limit', 'interface': 'Interface', 'optional': 'Optional'} + _toPy = {'Scope': 'scope', 'Interface': 'interface', 'Optional': 'optional', 'Role': 'role', 'Limit': 'limit', 'Name': 'name'} + def __init__(self, interface=None, limit=None, name=None, optional=None, role=None, scope=None): + ''' + 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 + + +class SetConstraints(Type): + _toSchema = {'constraints': 'Constraints', 'applicationname': 'ApplicationName'} + _toPy = {'ApplicationName': 'applicationname', 'Constraints': 'constraints'} + def __init__(self, applicationname=None, constraints=None): + ''' + applicationname : str + constraints : Value + ''' + self.applicationname = applicationname + self.constraints = Value.from_json(constraints) if constraints else None + + +class StringResult(Type): + _toSchema = {'result': 'Result', 'error': 'Error'} + _toPy = {'Result': 'result', 'Error': 'error'} + def __init__(self, error=None, result=None): + ''' + error : Error + result : str + ''' + self.error = Error.from_json(error) if error else None + self.result = result + + +class Value(Type): + _toSchema = {'cpu_cores': 'cpu-cores', 'container': 'container', 'spaces': 'spaces', 'mem': 'mem', 'arch': 'arch', 'tags': 'tags', 'cpu_power': 'cpu-power', 'virt_type': 'virt-type', 'instance_type': 'instance-type', 'root_disk': 'root-disk'} + _toPy = {'tags': 'tags', 'container': 'container', 'spaces': 'spaces', 'instance-type': 'instance_type', 'arch': 'arch', 'cpu-cores': 'cpu_cores', 'virt-type': 'virt_type', 'root-disk': 'root_disk', 'mem': 'mem', 'cpu-power': 'cpu_power'} + 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 StringsWatchResult(Type): + _toSchema = {'changes': 'Changes', 'stringswatcherid': 'StringsWatcherId', 'error': 'Error'} + _toPy = {'Changes': 'changes', 'StringsWatcherId': 'stringswatcherid', 'Error': 'error'} + def __init__(self, changes=None, error=None, stringswatcherid=None): + ''' + changes : typing.Sequence[str] + error : Error + stringswatcherid : str + ''' + self.changes = changes + self.error = Error.from_json(error) if error else None + self.stringswatcherid = stringswatcherid + + +class BackupsCreateArgs(Type): + _toSchema = {'notes': 'Notes'} + _toPy = {'Notes': 'notes'} + def __init__(self, notes=None): + ''' + notes : str + ''' + self.notes = notes + + +class BackupsInfoArgs(Type): + _toSchema = {'id_': 'ID'} + _toPy = {'ID': 'id_'} + def __init__(self, id_=None): + ''' + id_ : str + ''' + self.id_ = id_ + + +class BackupsListArgs(Type): + _toSchema = {} + _toPy = {} + def __init__(self): + ''' + + ''' + pass + + +class BackupsListResult(Type): + _toSchema = {'list_': 'List'} + _toPy = {'List': 'list_'} + def __init__(self, list_=None): + ''' + list_ : typing.Sequence[~BackupsMetadataResult] + ''' + self.list_ = [BackupsMetadataResult.from_json(o) for o in list_ or []] + + +class BackupsMetadataResult(Type): + _toSchema = {'stored': 'Stored', 'caprivatekey': 'CAPrivateKey', 'series': 'Series', 'notes': 'Notes', 'id_': 'ID', 'finished': 'Finished', 'model': 'Model', 'machine': 'Machine', 'checksumformat': 'ChecksumFormat', 'checksum': 'Checksum', 'size': 'Size', 'version': 'Version', 'cacert': 'CACert', 'started': 'Started', 'hostname': 'Hostname'} + _toPy = {'Notes': 'notes', 'ID': 'id_', 'Started': 'started', 'Version': 'version', 'Series': 'series', 'Machine': 'machine', 'ChecksumFormat': 'checksumformat', 'Finished': 'finished', 'CAPrivateKey': 'caprivatekey', 'Hostname': 'hostname', 'Model': 'model', 'CACert': 'cacert', 'Size': 'size', 'Checksum': 'checksum', 'Stored': 'stored'} + def __init__(self, cacert=None, caprivatekey=None, checksum=None, checksumformat=None, finished=None, hostname=None, id_=None, machine=None, model=None, notes=None, series=None, size=None, started=None, stored=None, version=None): + ''' + cacert : str + caprivatekey : str + checksum : str + checksumformat : str + finished : str + hostname : str + id_ : str + machine : str + model : str + notes : str + series : str + size : int + started : str + stored : str + version : Number + ''' + 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.series = series + self.size = size + self.started = started + self.stored = stored + self.version = Number.from_json(version) if version else None + + +class BackupsRemoveArgs(Type): + _toSchema = {'id_': 'ID'} + _toPy = {'ID': 'id_'} + def __init__(self, id_=None): + ''' + id_ : str + ''' + self.id_ = id_ + + +class Number(Type): + _toSchema = {'patch': 'Patch', 'tag': 'Tag', 'major': 'Major', 'build': 'Build', 'minor': 'Minor'} + _toPy = {'Patch': 'patch', 'Major': 'major', 'Build': 'build', 'Minor': 'minor', 'Tag': 'tag'} + 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 RestoreArgs(Type): + _toSchema = {'backupid': 'BackupId'} + _toPy = {'BackupId': 'backupid'} + def __init__(self, backupid=None): + ''' + backupid : str + ''' + self.backupid = backupid + + +class Block(Type): + _toSchema = {'tag': 'tag', 'message': 'message', 'type_': 'type', 'id_': 'id'} + _toPy = {'id': 'id_', 'message': 'message', 'type': 'type_', 'tag': 'tag'} + def __init__(self, id_=None, message=None, tag=None, type_=None): + ''' + id_ : str + message : str + tag : str + type_ : str + ''' + self.id_ = id_ + self.message = message + self.tag = tag + self.type_ = type_ + + +class BlockResult(Type): + _toSchema = {'result': 'result', 'error': 'error'} + _toPy = {'result': 'result', 'error': 'error'} + def __init__(self, error=None, result=None): + ''' + error : Error + result : Block + ''' + self.error = Error.from_json(error) if error else None + self.result = Block.from_json(result) if result else None + + +class BlockResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~BlockResult] + ''' + self.results = [BlockResult.from_json(o) for o in results or []] + + +class BlockSwitchParams(Type): + _toSchema = {'message': 'message', 'type_': 'type'} + _toPy = {'message': 'message', 'type': 'type_'} + def __init__(self, message=None, type_=None): + ''' + message : str + type_ : str + ''' + self.message = message + self.type_ = type_ + + +class CharmInfo(Type): + _toSchema = {'charmurl': 'CharmURL'} + _toPy = {'CharmURL': 'charmurl'} + def __init__(self, charmurl=None): + ''' + charmurl : str + ''' + self.charmurl = charmurl + + +class CharmsList(Type): + _toSchema = {'names': 'Names'} + _toPy = {'Names': 'names'} + def __init__(self, names=None): + ''' + names : typing.Sequence[str] + ''' + self.names = names + + +class CharmsListResult(Type): + _toSchema = {'charmurls': 'CharmURLs'} + _toPy = {'CharmURLs': 'charmurls'} + def __init__(self, charmurls=None): + ''' + charmurls : typing.Sequence[str] + ''' + self.charmurls = charmurls + + +class IsMeteredResult(Type): + _toSchema = {'metered': 'Metered'} + _toPy = {'Metered': 'metered'} + def __init__(self, metered=None): + ''' + metered : bool + ''' + self.metered = metered + + +class APIHostPortsResult(Type): + _toSchema = {'servers': 'Servers'} + _toPy = {'Servers': 'servers'} + def __init__(self, servers=None): + ''' + servers : typing.Sequence[~HostPort] + ''' + self.servers = [HostPort.from_json(o) for o in servers or []] + + +class AddCharm(Type): + _toSchema = {'channel': 'Channel', 'url': 'URL'} + _toPy = {'URL': 'url', 'Channel': 'channel'} + def __init__(self, channel=None, url=None): + ''' + channel : str + url : str + ''' + self.channel = channel + self.url = url + + +class AddCharmWithAuthorization(Type): + _toSchema = {'charmstoremacaroon': 'CharmStoreMacaroon', 'channel': 'Channel', 'url': 'URL'} + _toPy = {'CharmStoreMacaroon': 'charmstoremacaroon', 'URL': 'url', 'Channel': 'channel'} + def __init__(self, channel=None, charmstoremacaroon=None, url=None): + ''' + channel : str + charmstoremacaroon : Macaroon + url : str + ''' + self.channel = channel + self.charmstoremacaroon = Macaroon.from_json(charmstoremacaroon) if charmstoremacaroon else None + self.url = url + + +class AddMachineParams(Type): + _toSchema = {'hardwarecharacteristics': 'HardwareCharacteristics', 'instanceid': 'InstanceId', 'parentid': 'ParentId', 'disks': 'Disks', 'constraints': 'Constraints', 'placement': 'Placement', 'containertype': 'ContainerType', 'addrs': 'Addrs', 'jobs': 'Jobs', 'nonce': 'Nonce', 'series': 'Series'} + _toPy = {'Placement': 'placement', 'ContainerType': 'containertype', 'InstanceId': 'instanceid', 'HardwareCharacteristics': 'hardwarecharacteristics', 'ParentId': 'parentid', 'Nonce': 'nonce', 'Series': 'series', 'Addrs': 'addrs', 'Disks': 'disks', 'Constraints': 'constraints', 'Jobs': 'jobs'} + 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): + ''' + 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 = {'machine': 'Machine', 'error': 'Error'} + _toPy = {'Machine': 'machine', 'Error': 'error'} + 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 = {'value': 'Value', 'spacename': 'SpaceName', 'scope': 'Scope', 'type_': 'Type'} + _toPy = {'Scope': 'scope', 'SpaceName': 'spacename', 'Value': 'value', 'Type': 'type_'} + def __init__(self, scope=None, spacename=None, type_=None, value=None): + ''' + scope : str + spacename : str + type_ : str + value : str + ''' + self.scope = scope + self.spacename = spacename + self.type_ = type_ + self.value = value + + +class AgentVersionResult(Type): + _toSchema = {'patch': 'Patch', 'tag': 'Tag', 'major': 'Major', 'build': 'Build', 'minor': 'Minor'} + _toPy = {'Patch': 'patch', 'Major': 'major', 'Build': 'build', 'Minor': 'minor', 'Tag': 'tag'} + 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 ApplicationStatus(Type): + _toSchema = {'meterstatuses': 'MeterStatuses', 'relations': 'Relations', 'units': 'Units', 'exposed': 'Exposed', 'life': 'Life', 'charm': 'Charm', 'status': 'Status', 'canupgradeto': 'CanUpgradeTo', 'subordinateto': 'SubordinateTo'} + _toPy = {'Status': 'status', 'SubordinateTo': 'subordinateto', 'CanUpgradeTo': 'canupgradeto', 'Relations': 'relations', 'Life': 'life', 'MeterStatuses': 'meterstatuses', 'Exposed': 'exposed', 'Charm': 'charm', 'Units': 'units'} + def __init__(self, canupgradeto=None, charm=None, exposed=None, life=None, meterstatuses=None, relations=None, status=None, subordinateto=None, units=None): + ''' + canupgradeto : str + charm : str + exposed : bool + life : str + meterstatuses : typing.Mapping[str, ~MeterStatus] + relations : typing.Sequence[str] + status : DetailedStatus + subordinateto : typing.Sequence[str] + units : typing.Mapping[str, ~UnitStatus] + ''' + self.canupgradeto = canupgradeto + self.charm = charm + 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()} + + +class Binary(Type): + _toSchema = {'series': 'Series', 'number': 'Number', 'arch': 'Arch'} + _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 = {'method': 'method', 'requires': 'requires', 'args': 'args', 'id_': 'id'} + _toPy = {'method': 'method', 'id': 'id_', 'args': 'args', '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 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 = {'status': 'Status', 'version': 'Version', 'kind': 'Kind', 'life': 'Life', 'data': 'Data', 'since': 'Since', 'info': 'Info'} + _toPy = {'Life': 'life', 'Version': 'version', 'Data': 'data', 'Since': 'since', 'Status': 'status', 'Kind': 'kind', 'Info': 'info'} + def __init__(self, data=None, info=None, kind=None, life=None, since=None, status=None, version=None): + ''' + data : typing.Mapping[str, typing.Any] + info : str + kind : str + life : str + since : str + status : str + version : str + ''' + self.data = data + self.info = info + self.kind = kind + self.life = life + self.since = since + self.status = status + self.version = version + + +class EndpointStatus(Type): + _toSchema = {'name': 'Name', 'role': 'Role', 'subordinate': 'Subordinate', 'applicationname': 'ApplicationName'} + _toPy = {'Role': 'role', 'ApplicationName': 'applicationname', 'Subordinate': 'subordinate', 'Name': 'name'} + def __init__(self, applicationname=None, name=None, role=None, subordinate=None): + ''' + applicationname : str + name : str + role : str + subordinate : bool + ''' + self.applicationname = applicationname + self.name = name + self.role = role + self.subordinate = subordinate + + +class EntityStatus(Type): + _toSchema = {'data': 'Data', 'since': 'Since', 'status': 'Status', 'info': 'Info'} + _toPy = {'Data': 'data', 'Since': 'since', 'Status': 'status', 'Info': 'info'} + def __init__(self, data=None, info=None, since=None, status=None): + ''' + data : typing.Mapping[str, typing.Any] + info : str + since : str + status : str + ''' + self.data = data + self.info = info + self.since = since + self.status = status + + +class FindToolsParams(Type): + _toSchema = {'series': 'Series', 'minorversion': 'MinorVersion', 'majorversion': 'MajorVersion', 'number': 'Number', 'arch': 'Arch'} + _toPy = {'MajorVersion': 'majorversion', 'Arch': 'arch', 'Number': 'number', 'Series': 'series', 'MinorVersion': 'minorversion'} + def __init__(self, arch=None, majorversion=None, minorversion=None, number=None, series=None): + ''' + arch : str + majorversion : int + minorversion : int + number : Number + series : str + ''' + self.arch = arch + self.majorversion = majorversion + self.minorversion = minorversion + self.number = Number.from_json(number) if number else None + self.series = series + + +class FindToolsResult(Type): + _toSchema = {'list_': 'List', 'error': 'Error'} + _toPy = {'List': 'list_', 'Error': 'error'} + def __init__(self, error=None, list_=None): + ''' + error : Error + list_ : typing.Sequence[~Tools] + ''' + 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 = {'relations': 'Relations', 'modelname': 'ModelName', 'machines': 'Machines', 'availableversion': 'AvailableVersion', 'applications': 'Applications'} + _toPy = {'Relations': 'relations', 'Machines': 'machines', 'Applications': 'applications', 'AvailableVersion': 'availableversion', 'ModelName': 'modelname'} + def __init__(self, applications=None, availableversion=None, machines=None, modelname=None, relations=None): + ''' + applications : typing.Mapping[str, ~ApplicationStatus] + availableversion : str + machines : typing.Mapping[str, ~MachineStatus] + modelname : str + relations : typing.Sequence[~RelationStatus] + ''' + self.applications = {k: ApplicationStatus.from_json(v) for k, v in (applications or dict()).items()} + 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 []] + + +class GetBundleChangesParams(Type): + _toSchema = {'yaml': 'yaml'} + _toPy = {'yaml': 'yaml'} + def __init__(self, yaml=None): + ''' + yaml : str + ''' + self.yaml = yaml + + +class GetBundleChangesResults(Type): + _toSchema = {'changes': 'changes', 'errors': 'errors'} + _toPy = {'changes': 'changes', 'errors': 'errors'} + def __init__(self, changes=None, errors=None): + ''' + changes : typing.Sequence[~BundleChangesChange] + errors : typing.Sequence[str] + ''' + self.changes = [BundleChangesChange.from_json(o) for o in changes or []] + self.errors = errors + + +class HardwareCharacteristics(Type): + _toSchema = {'tags': 'Tags', 'cpupower': 'CpuPower', 'availabilityzone': 'AvailabilityZone', 'rootdisk': 'RootDisk', 'arch': 'Arch', 'cpucores': 'CpuCores', 'mem': 'Mem'} + _toPy = {'RootDisk': 'rootdisk', 'Arch': 'arch', 'Tags': 'tags', 'CpuPower': 'cpupower', 'CpuCores': 'cpucores', 'Mem': 'mem', 'AvailabilityZone': 'availabilityzone'} + def __init__(self, arch=None, availabilityzone=None, cpucores=None, cpupower=None, mem=None, rootdisk=None, tags=None): + ''' + arch : str + availabilityzone : str + cpucores : int + cpupower : int + mem : int + rootdisk : int + tags : typing.Sequence[str] + ''' + self.arch = arch + self.availabilityzone = availabilityzone + self.cpucores = cpucores + self.cpupower = cpupower + self.mem = mem + self.rootdisk = rootdisk + self.tags = tags + + +class History(Type): + _toSchema = {'statuses': 'Statuses', 'error': 'Error'} + _toPy = {'Statuses': 'statuses', 'Error': 'error'} + def __init__(self, error=None, statuses=None): + ''' + error : Error + statuses : typing.Sequence[~DetailedStatus] + ''' + self.error = Error.from_json(error) if error else None + self.statuses = [DetailedStatus.from_json(o) for o in statuses or []] + + +class HostPort(Type): + _toSchema = {'address': 'Address', 'port': 'Port'} + _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 MachineStatus(Type): + _toSchema = {'jobs': 'Jobs', 'instanceid': 'InstanceId', 'series': 'Series', 'dnsname': 'DNSName', 'hasvote': 'HasVote', 'id_': 'Id', 'wantsvote': 'WantsVote', 'hardware': 'Hardware', 'agentstatus': 'AgentStatus', 'containers': 'Containers', 'instancestatus': 'InstanceStatus'} + _toPy = {'WantsVote': 'wantsvote', 'Containers': 'containers', 'HasVote': 'hasvote', 'InstanceStatus': 'instancestatus', 'Hardware': 'hardware', 'DNSName': 'dnsname', 'Jobs': 'jobs', 'Series': 'series', 'Id': 'id_', 'InstanceId': 'instanceid', 'AgentStatus': 'agentstatus'} + 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): + ''' + 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 = {'color': 'Color', 'message': 'Message'} + _toPy = {'Message': 'message', 'Color': 'color'} + def __init__(self, color=None, message=None): + ''' + color : str + message : str + ''' + 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 + + +class ModelInfo(Type): + _toSchema = {'name': 'Name', 'providertype': 'ProviderType', 'ownertag': 'OwnerTag', 'uuid': 'UUID', 'life': 'Life', 'status': 'Status', 'users': 'Users', 'defaultseries': 'DefaultSeries', 'serveruuid': 'ServerUUID', 'cloud': 'Cloud'} + _toPy = {'ServerUUID': 'serveruuid', 'Users': 'users', 'UUID': 'uuid', 'ProviderType': 'providertype', 'OwnerTag': 'ownertag', 'DefaultSeries': 'defaultseries', 'Status': 'status', 'Life': 'life', 'Cloud': 'cloud', 'Name': 'name'} + def __init__(self, cloud=None, defaultseries=None, life=None, name=None, ownertag=None, providertype=None, serveruuid=None, status=None, uuid=None, users=None): + ''' + cloud : str + defaultseries : str + life : str + name : str + ownertag : str + providertype : str + serveruuid : str + status : EntityStatus + uuid : str + users : typing.Sequence[~ModelUserInfo] + ''' + self.cloud = cloud + 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 []] + + +class ModelSet(Type): + _toSchema = {'config': 'Config'} + _toPy = {'Config': 'config'} + def __init__(self, config=None): + ''' + config : typing.Mapping[str, typing.Any] + ''' + self.config = config + + +class ModelUnset(Type): + _toSchema = {'keys': 'Keys'} + _toPy = {'Keys': 'keys'} + def __init__(self, keys=None): + ''' + keys : typing.Sequence[str] + ''' + self.keys = keys + + +class ModelUserInfo(Type): + _toSchema = {'user': 'user', 'displayname': 'displayname', 'lastconnection': 'lastconnection', 'access': 'access'} + _toPy = {'user': 'user', 'displayname': 'displayname', 'lastconnection': 'lastconnection', 'access': 'access'} + def __init__(self, access=None, displayname=None, lastconnection=None, user=None): + ''' + access : str + displayname : str + lastconnection : str + user : str + ''' + self.access = access + self.displayname = displayname + self.lastconnection = lastconnection + self.user = user + + +class ModelUserInfoResult(Type): + _toSchema = {'result': 'result', 'error': 'error'} + _toPy = {'result': 'result', 'error': 'error'} + def __init__(self, error=None, result=None): + ''' + error : Error + result : ModelUserInfo + ''' + self.error = Error.from_json(error) if error else None + self.result = ModelUserInfo.from_json(result) if result else None + + +class ModelUserInfoResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~ModelUserInfoResult] + ''' + self.results = [ModelUserInfoResult.from_json(o) for o in results or []] + + +class PrivateAddress(Type): + _toSchema = {'target': 'Target'} + _toPy = {'Target': 'target'} + def __init__(self, target=None): + ''' + target : str + ''' + self.target = target + + +class PrivateAddressResults(Type): + _toSchema = {'privateaddress': 'PrivateAddress'} + _toPy = {'PrivateAddress': 'privateaddress'} + def __init__(self, privateaddress=None): + ''' + privateaddress : str + ''' + self.privateaddress = privateaddress + + +class ProvisioningScriptParams(Type): + _toSchema = {'datadir': 'DataDir', 'disablepackagecommands': 'DisablePackageCommands', 'machineid': 'MachineId', 'nonce': 'Nonce'} + _toPy = {'MachineId': 'machineid', 'DisablePackageCommands': 'disablepackagecommands', 'DataDir': 'datadir', 'Nonce': 'nonce'} + def __init__(self, datadir=None, disablepackagecommands=None, machineid=None, nonce=None): + ''' + datadir : str + disablepackagecommands : bool + machineid : str + nonce : str + ''' + self.datadir = datadir + self.disablepackagecommands = disablepackagecommands + self.machineid = machineid + self.nonce = nonce + + +class ProvisioningScriptResult(Type): + _toSchema = {'script': 'Script'} + _toPy = {'Script': 'script'} + def __init__(self, script=None): + ''' + script : str + ''' + self.script = script + + +class PublicAddress(Type): + _toSchema = {'target': 'Target'} + _toPy = {'Target': 'target'} + def __init__(self, target=None): + ''' + target : str + ''' + self.target = target + + +class PublicAddressResults(Type): + _toSchema = {'publicaddress': 'PublicAddress'} + _toPy = {'PublicAddress': 'publicaddress'} + def __init__(self, publicaddress=None): + ''' + publicaddress : str + ''' + self.publicaddress = publicaddress + + +class RelationStatus(Type): + _toSchema = {'scope': 'Scope', 'interface': 'Interface', 'endpoints': 'Endpoints', 'id_': 'Id', 'key': 'Key'} + _toPy = {'Scope': 'scope', 'Id': 'id_', 'Endpoints': 'endpoints', 'Key': 'key', 'Interface': 'interface'} + def __init__(self, endpoints=None, id_=None, interface=None, key=None, scope=None): + ''' + endpoints : typing.Sequence[~EndpointStatus] + id_ : int + interface : str + key : str + scope : str + ''' + self.endpoints = [EndpointStatus.from_json(o) for o in endpoints or []] + self.id_ = id_ + self.interface = interface + self.key = key + self.scope = scope + + +class ResolveCharmResult(Type): + _toSchema = {'url': 'URL', 'error': 'Error'} + _toPy = {'URL': 'url', 'Error': 'error'} + def __init__(self, error=None, url=None): + ''' + error : str + url : URL + ''' + self.error = error + self.url = URL.from_json(url) if url else None + + +class ResolveCharmResults(Type): + _toSchema = {'urls': 'URLs'} + _toPy = {'URLs': 'urls'} + def __init__(self, urls=None): + ''' + urls : typing.Sequence[~ResolveCharmResult] + ''' + self.urls = [ResolveCharmResult.from_json(o) for o in urls or []] + + +class ResolveCharms(Type): + _toSchema = {'references': 'References'} + _toPy = {'References': 'references'} + def __init__(self, references=None): + ''' + references : typing.Sequence[~URL] + ''' + self.references = [URL.from_json(o) for o in references or []] + + +class Resolved(Type): + _toSchema = {'unitname': 'UnitName', 'retry': 'Retry'} + _toPy = {'UnitName': 'unitname', 'Retry': 'retry'} + def __init__(self, retry=None, unitname=None): + ''' + retry : bool + unitname : str + ''' + self.retry = retry + self.unitname = unitname + + +class SetModelAgentVersion(Type): + _toSchema = {'patch': 'Patch', 'tag': 'Tag', 'major': 'Major', 'build': 'Build', 'minor': 'Minor'} + _toPy = {'Patch': 'patch', 'Major': 'major', 'Build': 'build', 'Minor': 'minor', 'Tag': 'tag'} + 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 StatusHistoryFilter(Type): + _toSchema = {'delta': 'Delta', 'date': 'Date', 'size': 'Size'} + _toPy = {'Size': 'size', 'Delta': 'delta', 'Date': 'date'} + def __init__(self, date=None, delta=None, size=None): + ''' + date : str + delta : int + size : int + ''' + self.date = date + self.delta = delta + self.size = size + + +class StatusHistoryRequest(Type): + _toSchema = {'tag': 'Tag', 'filter_': 'Filter', 'historykind': 'HistoryKind', 'size': 'Size'} + _toPy = {'Size': 'size', 'Filter': 'filter_', 'HistoryKind': 'historykind', 'Tag': 'tag'} + def __init__(self, filter_=None, historykind=None, size=None, tag=None): + ''' + filter_ : StatusHistoryFilter + historykind : str + size : int + tag : str + ''' + self.filter_ = StatusHistoryFilter.from_json(filter_) if filter_ else None + self.historykind = historykind + self.size = size + self.tag = tag + + +class StatusHistoryRequests(Type): + _toSchema = {'requests': 'Requests'} + _toPy = {'Requests': 'requests'} + def __init__(self, requests=None): + ''' + requests : typing.Sequence[~StatusHistoryRequest] + ''' + self.requests = [StatusHistoryRequest.from_json(o) for o in requests or []] + + +class StatusHistoryResult(Type): + _toSchema = {'history': 'History', 'error': 'Error'} + _toPy = {'History': 'history', 'Error': 'error'} + def __init__(self, error=None, history=None): + ''' + error : Error + history : History + ''' + self.error = Error.from_json(error) if error else None + self.history = History.from_json(history) if history else None + + +class StatusHistoryResults(Type): + _toSchema = {'results': 'Results'} + _toPy = {'Results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~StatusHistoryResult] + ''' + self.results = [StatusHistoryResult.from_json(o) for o in results or []] + + +class StatusParams(Type): + _toSchema = {'patterns': 'Patterns'} + _toPy = {'Patterns': 'patterns'} + def __init__(self, patterns=None): + ''' + patterns : typing.Sequence[str] + ''' + self.patterns = patterns + + +class Tools(Type): + _toSchema = {'url': 'url', 'size': 'size', 'version': 'version', 'sha256': 'sha256'} + _toPy = {'url': 'url', 'size': 'size', 'version': 'version', 'sha256': 'sha256'} + def __init__(self, sha256=None, size=None, url=None, version=None): + ''' + sha256 : str + size : int + url : str + version : Binary + ''' + self.sha256 = sha256 + self.size = size + self.url = url + self.version = Binary.from_json(version) if version else None + + +class URL(Type): + _toSchema = {'name': 'Name', 'channel': 'Channel', 'schema': 'Schema', 'user': 'User', 'series': 'Series', 'revision': 'Revision'} + _toPy = {'Channel': 'channel', 'User': 'user', 'Name': 'name', 'Series': 'series', 'Revision': 'revision', 'Schema': 'schema'} + def __init__(self, channel=None, name=None, revision=None, schema=None, series=None, user=None): + ''' + channel : str + name : str + revision : int + schema : str + series : str + user : str + ''' + self.channel = channel + self.name = name + self.revision = revision + self.schema = schema + self.series = series + self.user = user + + +class UnitStatus(Type): + _toSchema = {'publicaddress': 'PublicAddress', 'charm': 'Charm', 'agentstatus': 'AgentStatus', 'subordinates': 'Subordinates', 'machine': 'Machine', 'workloadstatus': 'WorkloadStatus', 'openedports': 'OpenedPorts'} + _toPy = {'WorkloadStatus': 'workloadstatus', 'OpenedPorts': 'openedports', 'PublicAddress': 'publicaddress', 'Subordinates': 'subordinates', 'AgentStatus': 'agentstatus', 'Machine': 'machine', 'Charm': 'charm'} + 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 + ''' + 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 DestroyControllerArgs(Type): + _toSchema = {'destroy_models': 'destroy-models'} + _toPy = {'destroy-models': 'destroy_models'} + def __init__(self, destroy_models=None): + ''' + destroy_models : bool + ''' + self.destroy_models = destroy_models + + +class InitiateModelMigrationArgs(Type): + _toSchema = {'specs': 'specs'} + _toPy = {'specs': 'specs'} + def __init__(self, specs=None): + ''' + specs : typing.Sequence[~ModelMigrationSpec] + ''' + self.specs = [ModelMigrationSpec.from_json(o) for o in specs or []] + + +class InitiateModelMigrationResult(Type): + _toSchema = {'model_tag': 'model-tag', 'id_': 'id', 'error': 'error'} + _toPy = {'id': 'id_', 'model-tag': 'model_tag', 'error': 'error'} + def __init__(self, error=None, id_=None, model_tag=None): + ''' + error : Error + id_ : str + model_tag : str + ''' + self.error = Error.from_json(error) if error else None + self.id_ = id_ + self.model_tag = model_tag + + +class InitiateModelMigrationResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~InitiateModelMigrationResult] + ''' + self.results = [InitiateModelMigrationResult.from_json(o) for o in results or []] + + +class Model(Type): + _toSchema = {'name': 'Name', 'ownertag': 'OwnerTag', 'uuid': 'UUID'} + _toPy = {'OwnerTag': 'ownertag', 'UUID': 'uuid', 'Name': 'name'} + def __init__(self, name=None, ownertag=None, uuid=None): + ''' + name : str + ownertag : str + uuid : str + ''' + self.name = name + self.ownertag = ownertag + self.uuid = uuid + + +class ModelBlockInfo(Type): + _toSchema = {'blocks': 'blocks', 'model_uuid': 'model-uuid', 'owner_tag': 'owner-tag', 'name': 'name'} + _toPy = {'blocks': 'blocks', 'model-uuid': 'model_uuid', 'owner-tag': 'owner_tag', 'name': 'name'} + def __init__(self, blocks=None, model_uuid=None, name=None, owner_tag=None): + ''' + blocks : typing.Sequence[str] + model_uuid : str + name : str + owner_tag : str + ''' + self.blocks = blocks + self.model_uuid = model_uuid + self.name = name + self.owner_tag = owner_tag + + +class ModelBlockInfoList(Type): + _toSchema = {'models': 'models'} + _toPy = {'models': 'models'} + def __init__(self, models=None): + ''' + models : typing.Sequence[~ModelBlockInfo] + ''' + self.models = [ModelBlockInfo.from_json(o) for o in models or []] + + +class ModelMigrationSpec(Type): + _toSchema = {'model_tag': 'model-tag', 'target_info': 'target-info'} + _toPy = {'target-info': 'target_info', 'model-tag': 'model_tag'} + def __init__(self, model_tag=None, target_info=None): + ''' + model_tag : str + target_info : ModelMigrationTargetInfo + ''' + self.model_tag = model_tag + self.target_info = ModelMigrationTargetInfo.from_json(target_info) if target_info else None + + +class ModelMigrationTargetInfo(Type): + _toSchema = {'password': 'password', 'addrs': 'addrs', 'auth_tag': 'auth-tag', 'controller_tag': 'controller-tag', 'ca_cert': 'ca-cert'} + _toPy = {'password': 'password', 'ca-cert': 'ca_cert', 'addrs': 'addrs', 'controller-tag': 'controller_tag', 'auth-tag': 'auth_tag'} + def __init__(self, addrs=None, auth_tag=None, ca_cert=None, controller_tag=None, password=None): + ''' + addrs : typing.Sequence[str] + auth_tag : str + ca_cert : str + controller_tag : str + password : str + ''' + self.addrs = addrs + self.auth_tag = auth_tag + self.ca_cert = ca_cert + self.controller_tag = controller_tag + self.password = password + + +class ModelStatus(Type): + _toSchema = {'model_tag': 'model-tag', 'owner_tag': 'owner-tag', 'application_count': 'application-count', 'hosted_machine_count': 'hosted-machine-count', 'life': 'life'} + _toPy = {'application-count': 'application_count', 'hosted-machine-count': 'hosted_machine_count', 'owner-tag': 'owner_tag', 'model-tag': 'model_tag', 'life': 'life'} + def __init__(self, application_count=None, hosted_machine_count=None, life=None, model_tag=None, owner_tag=None): + ''' + application_count : int + hosted_machine_count : int + life : str + model_tag : str + owner_tag : str + ''' + 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 ModelStatusResults(Type): + _toSchema = {'models': 'models'} + _toPy = {'models': 'models'} + def __init__(self, models=None): + ''' + models : typing.Sequence[~ModelStatus] + ''' + self.models = [ModelStatus.from_json(o) for o in models or []] + + +class RemoveBlocksArgs(Type): + _toSchema = {'all_': 'all'} + _toPy = {'all': 'all_'} + def __init__(self, all_=None): + ''' + all_ : bool + ''' + self.all_ = all_ + + +class UserModel(Type): + _toSchema = {'model': 'Model', 'lastconnection': 'LastConnection'} + _toPy = {'LastConnection': 'lastconnection', 'Model': 'model'} + def __init__(self, lastconnection=None, model=None): + ''' + lastconnection : str + model : Model + ''' + self.lastconnection = lastconnection + self.model = Model.from_json(model) if model else None + + +class UserModelList(Type): + _toSchema = {'usermodels': 'UserModels'} + _toPy = {'UserModels': 'usermodels'} + def __init__(self, usermodels=None): + ''' + usermodels : typing.Sequence[~UserModel] + ''' + self.usermodels = [UserModel.from_json(o) for o in usermodels or []] + + +class BytesResult(Type): + _toSchema = {'result': 'Result'} + _toPy = {'Result': 'result'} + def __init__(self, result=None): + ''' + result : typing.Sequence[int] + ''' + self.result = result + + +class DeployerConnectionValues(Type): + _toSchema = {'stateaddresses': 'StateAddresses', 'apiaddresses': 'APIAddresses'} + _toPy = {'APIAddresses': 'apiaddresses', 'StateAddresses': 'stateaddresses'} + def __init__(self, apiaddresses=None, stateaddresses=None): + ''' + apiaddresses : typing.Sequence[str] + stateaddresses : typing.Sequence[str] + ''' + self.apiaddresses = apiaddresses + self.stateaddresses = stateaddresses + + +class LifeResult(Type): + _toSchema = {'life': 'Life', 'error': 'Error'} + _toPy = {'Life': 'life', 'Error': 'error'} + def __init__(self, error=None, life=None): + ''' + error : Error + life : str + ''' + self.error = Error.from_json(error) if error else None + self.life = life + + +class LifeResults(Type): + _toSchema = {'results': 'Results'} + _toPy = {'Results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~LifeResult] + ''' + self.results = [LifeResult.from_json(o) for o in results or []] + + +class StringsResult(Type): + _toSchema = {'result': 'Result', 'error': 'Error'} + _toPy = {'Result': 'result', 'Error': 'error'} + 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 StringsWatchResults(Type): + _toSchema = {'results': 'Results'} + _toPy = {'Results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~StringsWatchResult] + ''' + self.results = [StringsWatchResult.from_json(o) for o in results or []] + + +class AddSubnetParams(Type): + _toSchema = {'zones': 'Zones', 'spacetag': 'SpaceTag', 'subnetproviderid': 'SubnetProviderId', 'subnettag': 'SubnetTag'} + _toPy = {'Zones': 'zones', 'SubnetProviderId': 'subnetproviderid', 'SpaceTag': 'spacetag', 'SubnetTag': 'subnettag'} + 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 AddSubnetsParams(Type): + _toSchema = {'subnets': 'Subnets'} + _toPy = {'Subnets': 'subnets'} + def __init__(self, subnets=None): + ''' + subnets : typing.Sequence[~AddSubnetParams] + ''' + self.subnets = [AddSubnetParams.from_json(o) for o in subnets or []] + + +class CreateSpaceParams(Type): + _toSchema = {'subnettags': 'SubnetTags', 'providerid': 'ProviderId', 'spacetag': 'SpaceTag', 'public': 'Public'} + _toPy = {'Public': 'public', 'ProviderId': 'providerid', 'SpaceTag': 'spacetag', 'SubnetTags': 'subnettags'} + def __init__(self, providerid=None, public=None, spacetag=None, subnettags=None): + ''' + providerid : str + public : bool + spacetag : str + subnettags : typing.Sequence[str] + ''' + self.providerid = providerid + self.public = public + self.spacetag = spacetag + self.subnettags = subnettags + + +class CreateSpacesParams(Type): + _toSchema = {'spaces': 'Spaces'} + _toPy = {'Spaces': 'spaces'} + def __init__(self, spaces=None): + ''' + spaces : typing.Sequence[~CreateSpaceParams] + ''' + self.spaces = [CreateSpaceParams.from_json(o) for o in spaces or []] + + +class DiscoverSpacesResults(Type): + _toSchema = {'results': 'Results'} + _toPy = {'Results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~ProviderSpace] + ''' + self.results = [ProviderSpace.from_json(o) for o in results or []] + + +class ListSubnetsResults(Type): + _toSchema = {'results': 'Results'} + _toPy = {'Results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~Subnet] + ''' + self.results = [Subnet.from_json(o) for o in results or []] + + +class ProviderSpace(Type): + _toSchema = {'name': 'Name', 'subnets': 'Subnets', 'providerid': 'ProviderId', 'error': 'Error'} + _toPy = {'Subnets': 'subnets', 'ProviderId': 'providerid', 'Name': 'name', 'Error': 'error'} + def __init__(self, error=None, name=None, providerid=None, subnets=None): + ''' + error : Error + name : str + providerid : str + subnets : typing.Sequence[~Subnet] + ''' + 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 []] + + +class Subnet(Type): + _toSchema = {'vlantag': 'VLANTag', 'staticrangelowip': 'StaticRangeLowIP', 'spacetag': 'SpaceTag', 'status': 'Status', 'life': 'Life', 'zones': 'Zones', 'cidr': 'CIDR', 'providerid': 'ProviderId', 'staticrangehighip': 'StaticRangeHighIP'} + _toPy = {'Zones': 'zones', 'CIDR': 'cidr', 'StaticRangeLowIP': 'staticrangelowip', 'StaticRangeHighIP': 'staticrangehighip', 'VLANTag': 'vlantag', 'Life': 'life', 'Status': 'status', 'ProviderId': 'providerid', 'SpaceTag': 'spacetag'} + def __init__(self, cidr=None, life=None, providerid=None, spacetag=None, staticrangehighip=None, staticrangelowip=None, status=None, vlantag=None, zones=None): + ''' + cidr : str + life : str + providerid : str + spacetag : str + staticrangehighip : typing.Sequence[int] + staticrangelowip : typing.Sequence[int] + status : str + vlantag : int + zones : typing.Sequence[str] + ''' + self.cidr = cidr + self.life = life + self.providerid = providerid + self.spacetag = spacetag + self.staticrangehighip = staticrangehighip + self.staticrangelowip = staticrangelowip + self.status = status + self.vlantag = vlantag + self.zones = zones + + +class SubnetsFilters(Type): + _toSchema = {'zone': 'Zone', 'spacetag': 'SpaceTag'} + _toPy = {'Zone': 'zone', 'SpaceTag': 'spacetag'} + def __init__(self, spacetag=None, zone=None): + ''' + spacetag : str + zone : str + ''' + self.spacetag = spacetag + self.zone = zone + + +class BlockDevice(Type): + _toSchema = {'uuid': 'UUID', 'label': 'Label', 'size': 'Size', 'hardwareid': 'HardwareId', 'mountpoint': 'MountPoint', 'inuse': 'InUse', 'devicename': 'DeviceName', 'devicelinks': 'DeviceLinks', 'busaddress': 'BusAddress', 'filesystemtype': 'FilesystemType'} + _toPy = {'Label': 'label', 'DeviceLinks': 'devicelinks', 'UUID': 'uuid', 'BusAddress': 'busaddress', 'HardwareId': 'hardwareid', 'Size': 'size', 'InUse': 'inuse', 'FilesystemType': 'filesystemtype', 'DeviceName': 'devicename', '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): + ''' + busaddress : str + devicelinks : typing.Sequence[str] + devicename : str + filesystemtype : str + hardwareid : str + inuse : bool + label : str + mountpoint : str + size : int + uuid : 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 + + +class MachineBlockDevices(Type): + _toSchema = {'blockdevices': 'blockdevices', 'machine': 'machine'} + _toPy = {'blockdevices': 'blockdevices', 'machine': 'machine'} + def __init__(self, blockdevices=None, machine=None): + ''' + blockdevices : typing.Sequence[~BlockDevice] + machine : str + ''' + self.blockdevices = [BlockDevice.from_json(o) for o in blockdevices or []] + self.machine = machine + + +class SetMachineBlockDevices(Type): + _toSchema = {'machineblockdevices': 'machineblockdevices'} + _toPy = {'machineblockdevices': 'machineblockdevices'} + def __init__(self, machineblockdevices=None): + ''' + machineblockdevices : typing.Sequence[~MachineBlockDevices] + ''' + self.machineblockdevices = [MachineBlockDevices.from_json(o) for o in machineblockdevices or []] + + +class MachineStorageId(Type): + _toSchema = {'machinetag': 'machinetag', 'attachmenttag': 'attachmenttag'} + _toPy = {'machinetag': 'machinetag', 'attachmenttag': 'attachmenttag'} + def __init__(self, attachmenttag=None, machinetag=None): + ''' + attachmenttag : str + machinetag : str + ''' + self.attachmenttag = attachmenttag + self.machinetag = machinetag + + +class MachineStorageIdsWatchResult(Type): + _toSchema = {'changes': 'Changes', 'machinestorageidswatcherid': 'MachineStorageIdsWatcherId', 'error': 'Error'} + _toPy = {'Changes': 'changes', 'MachineStorageIdsWatcherId': 'machinestorageidswatcherid', 'Error': 'error'} + def __init__(self, changes=None, error=None, machinestorageidswatcherid=None): + ''' + changes : typing.Sequence[~MachineStorageId] + error : Error + machinestorageidswatcherid : str + ''' + self.changes = [MachineStorageId.from_json(o) for o in changes or []] + self.error = Error.from_json(error) if error else None + self.machinestorageidswatcherid = machinestorageidswatcherid + + +class BoolResults(Type): + _toSchema = {'results': 'Results'} + _toPy = {'Results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~BoolResult] + ''' + self.results = [BoolResult.from_json(o) for o in results or []] + + +class MachinePortRange(Type): + _toSchema = {'portrange': 'PortRange', 'relationtag': 'RelationTag', 'unittag': 'UnitTag'} + _toPy = {'RelationTag': 'relationtag', 'PortRange': 'portrange', 'UnitTag': 'unittag'} + def __init__(self, portrange=None, relationtag=None, unittag=None): + ''' + portrange : PortRange + relationtag : str + unittag : str + ''' + self.portrange = PortRange.from_json(portrange) if portrange else None + self.relationtag = relationtag + self.unittag = unittag + + +class MachinePorts(Type): + _toSchema = {'machinetag': 'MachineTag', 'subnettag': 'SubnetTag'} + _toPy = {'MachineTag': 'machinetag', 'SubnetTag': 'subnettag'} + def __init__(self, machinetag=None, subnettag=None): + ''' + machinetag : str + subnettag : str + ''' + self.machinetag = machinetag + self.subnettag = subnettag + + +class MachinePortsParams(Type): + _toSchema = {'params': 'Params'} + _toPy = {'Params': 'params'} + def __init__(self, params=None): + ''' + params : typing.Sequence[~MachinePorts] + ''' + self.params = [MachinePorts.from_json(o) for o in params or []] + + +class MachinePortsResult(Type): + _toSchema = {'ports': 'Ports', 'error': 'Error'} + _toPy = {'Ports': 'ports', 'Error': 'error'} + def __init__(self, error=None, ports=None): + ''' + error : Error + ports : typing.Sequence[~MachinePortRange] + ''' + self.error = Error.from_json(error) if error else None + self.ports = [MachinePortRange.from_json(o) for o in ports or []] + + +class MachinePortsResults(Type): + _toSchema = {'results': 'Results'} + _toPy = {'Results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~MachinePortsResult] + ''' + self.results = [MachinePortsResult.from_json(o) for o in results or []] + + +class NotifyWatchResults(Type): + _toSchema = {'results': 'Results'} + _toPy = {'Results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~NotifyWatchResult] + ''' + self.results = [NotifyWatchResult.from_json(o) for o in results or []] + + +class PortRange(Type): + _toSchema = {'toport': 'ToPort', 'protocol': 'Protocol', 'fromport': 'FromPort'} + _toPy = {'ToPort': 'toport', 'Protocol': 'protocol', 'FromPort': 'fromport'} + def __init__(self, fromport=None, protocol=None, toport=None): + ''' + fromport : int + protocol : str + toport : int + ''' + self.fromport = fromport + self.protocol = protocol + self.toport = toport + + +class StringResults(Type): + _toSchema = {'results': 'Results'} + _toPy = {'Results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~StringResult] + ''' + self.results = [StringResult.from_json(o) for o in results or []] + + +class StringsResults(Type): + _toSchema = {'results': 'Results'} + _toPy = {'Results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~StringsResult] + ''' + self.results = [StringsResult.from_json(o) for o in results or []] + + +class ControllersChangeResult(Type): + _toSchema = {'result': 'Result', 'error': 'Error'} + _toPy = {'Result': 'result', 'Error': 'error'} + def __init__(self, error=None, result=None): + ''' + error : Error + result : ControllersChanges + ''' + self.error = Error.from_json(error) if error else None + self.result = ControllersChanges.from_json(result) if result else None + + +class ControllersChangeResults(Type): + _toSchema = {'results': 'Results'} + _toPy = {'Results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~ControllersChangeResult] + ''' + self.results = [ControllersChangeResult.from_json(o) for o in results or []] + + +class ControllersChanges(Type): + _toSchema = {'added': 'added', 'promoted': 'promoted', 'converted': 'converted', 'maintained': 'maintained', 'removed': 'removed', 'demoted': 'demoted'} + _toPy = {'added': 'added', 'promoted': 'promoted', 'converted': 'converted', 'maintained': 'maintained', 'removed': 'removed', 'demoted': 'demoted'} + def __init__(self, added=None, converted=None, demoted=None, maintained=None, promoted=None, removed=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] + ''' + self.added = added + self.converted = converted + self.demoted = demoted + self.maintained = maintained + self.promoted = promoted + self.removed = removed + + +class ControllersSpec(Type): + _toSchema = {'num_controllers': 'num-controllers', 'placement': 'placement', 'series': 'series', 'constraints': 'constraints', 'modeltag': 'ModelTag'} + _toPy = {'placement': 'placement', 'num-controllers': 'num_controllers', 'ModelTag': 'modeltag', 'series': 'series', 'constraints': 'constraints'} + 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 + ''' + self.modeltag = modeltag + self.constraints = Value.from_json(constraints) if constraints else None + self.num_controllers = num_controllers + self.placement = placement + self.series = series + + +class ControllersSpecs(Type): + _toSchema = {'specs': 'Specs'} + _toPy = {'Specs': 'specs'} + def __init__(self, specs=None): + ''' + specs : typing.Sequence[~ControllersSpec] + ''' + self.specs = [ControllersSpec.from_json(o) for o in specs or []] + + +class HAMember(Type): + _toSchema = {'publicaddress': 'PublicAddress', 'series': 'Series', 'tag': 'Tag'} + _toPy = {'PublicAddress': 'publicaddress', 'Series': 'series', 'Tag': 'tag'} + def __init__(self, publicaddress=None, series=None, tag=None): + ''' + publicaddress : Address + series : str + tag : str + ''' + self.publicaddress = Address.from_json(publicaddress) if publicaddress else None + self.series = series + self.tag = tag + + +class Member(Type): + _toSchema = {'hidden': 'Hidden', 'slavedelay': 'SlaveDelay', 'votes': 'Votes', 'priority': 'Priority', 'id_': 'Id', 'buildindexes': 'BuildIndexes', 'tags': 'Tags', 'address': 'Address', 'arbiter': 'Arbiter'} + _toPy = {'BuildIndexes': 'buildindexes', 'Arbiter': 'arbiter', 'Votes': 'votes', 'Hidden': 'hidden', 'Id': 'id_', 'Priority': 'priority', 'Tags': 'tags', 'Address': 'address', 'SlaveDelay': 'slavedelay'} + def __init__(self, address=None, arbiter=None, buildindexes=None, hidden=None, id_=None, priority=None, slavedelay=None, tags=None, votes=None): + ''' + address : str + arbiter : bool + buildindexes : bool + hidden : bool + id_ : int + priority : float + slavedelay : int + tags : typing.Mapping[str, str] + votes : int + ''' + 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 MongoUpgradeResults(Type): + _toSchema = {'rsmembers': 'RsMembers', 'master': 'Master', 'members': 'Members'} + _toPy = {'Members': 'members', 'RsMembers': 'rsmembers', 'Master': 'master'} + def __init__(self, master=None, members=None, rsmembers=None): + ''' + master : HAMember + members : typing.Sequence[~HAMember] + rsmembers : typing.Sequence[~Member] + ''' + 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 []] + + +class ResumeReplicationParams(Type): + _toSchema = {'members': 'Members'} + _toPy = {'Members': 'members'} + def __init__(self, members=None): + ''' + members : typing.Sequence[~Member] + ''' + self.members = [Member.from_json(o) for o in members or []] + + +class UpgradeMongoParams(Type): + _toSchema = {'storageengine': 'StorageEngine', 'major': 'Major', 'minor': 'Minor', 'patch': 'Patch'} + _toPy = {'StorageEngine': 'storageengine', 'Patch': 'patch', 'Major': 'major', 'Minor': 'minor'} + def __init__(self, major=None, minor=None, patch=None, storageengine=None): + ''' + major : int + minor : int + patch : str + storageengine : str + ''' + self.major = major + self.minor = minor + self.patch = patch + self.storageengine = storageengine + + +class Version(Type): + _toSchema = {'storageengine': 'StorageEngine', 'major': 'Major', 'minor': 'Minor', 'patch': 'Patch'} + _toPy = {'StorageEngine': 'storageengine', 'Patch': 'patch', 'Major': 'major', 'Minor': 'minor'} + def __init__(self, major=None, minor=None, patch=None, storageengine=None): + ''' + major : int + minor : int + patch : str + storageengine : str + ''' + self.major = major + self.minor = minor + self.patch = patch + self.storageengine = storageengine + + +class SSHHostKeySet(Type): + _toSchema = {'entity_keys': 'entity-keys'} + _toPy = {'entity-keys': 'entity_keys'} + def __init__(self, entity_keys=None): + ''' + entity_keys : typing.Sequence[~SSHHostKeys] + ''' + self.entity_keys = [SSHHostKeys.from_json(o) for o in entity_keys or []] + + +class SSHHostKeys(Type): + _toSchema = {'public_keys': 'public-keys', 'tag': 'tag'} + _toPy = {'tag': 'tag', 'public-keys': 'public_keys'} + def __init__(self, public_keys=None, tag=None): + ''' + public_keys : typing.Sequence[str] + tag : str + ''' + self.public_keys = public_keys + self.tag = tag + + +class ImageFilterParams(Type): + _toSchema = {'images': 'images'} + _toPy = {'images': 'images'} + def __init__(self, images=None): + ''' + images : typing.Sequence[~ImageSpec] + ''' + self.images = [ImageSpec.from_json(o) for o in images or []] + + +class ImageMetadata(Type): + _toSchema = {'series': 'series', 'url': 'url', 'created': 'created', 'kind': 'kind', 'arch': 'arch'} + _toPy = {'series': 'series', 'url': 'url', 'created': 'created', 'kind': 'kind', 'arch': 'arch'} + def __init__(self, arch=None, created=None, kind=None, series=None, url=None): + ''' + arch : str + created : str + kind : str + series : str + url : str + ''' + self.arch = arch + self.created = created + self.kind = kind + self.series = series + self.url = url + + +class ImageSpec(Type): + _toSchema = {'series': 'series', 'kind': 'kind', 'arch': 'arch'} + _toPy = {'series': 'series', 'kind': 'kind', 'arch': 'arch'} + def __init__(self, arch=None, kind=None, series=None): + ''' + arch : str + kind : str + series : str + ''' + self.arch = arch + self.kind = kind + self.series = series + + +class ListImageResult(Type): + _toSchema = {'result': 'result'} + _toPy = {'result': 'result'} + def __init__(self, result=None): + ''' + result : typing.Sequence[~ImageMetadata] + ''' + self.result = [ImageMetadata.from_json(o) for o in result or []] + + +class CloudImageMetadata(Type): + _toSchema = {'series': 'series', 'priority': 'priority', 'source': 'source', 'root_storage_size': 'root_storage_size', 'arch': 'arch', 'image_id': 'image_id', 'root_storage_type': 'root_storage_type', 'virt_type': 'virt_type', 'version': 'version', 'region': 'region', 'stream': 'stream'} + _toPy = {'series': 'series', 'priority': 'priority', 'source': 'source', 'root_storage_size': 'root_storage_size', 'arch': 'arch', 'image_id': 'image_id', 'root_storage_type': 'root_storage_type', 'virt_type': 'virt_type', 'version': 'version', 'region': 'region', 'stream': 'stream'} + 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): + ''' + 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.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 CloudImageMetadataList(Type): + _toSchema = {'metadata': 'metadata'} + _toPy = {'metadata': 'metadata'} + def __init__(self, metadata=None): + ''' + metadata : typing.Sequence[~CloudImageMetadata] + ''' + self.metadata = [CloudImageMetadata.from_json(o) for o in metadata or []] + + +class ImageMetadataFilter(Type): + _toSchema = {'series': 'series', 'root_storage_type': 'root-storage-type', 'arches': 'arches', 'virt_type': 'virt_type', 'region': 'region', 'stream': 'stream'} + _toPy = {'series': 'series', 'arches': 'arches', 'root-storage-type': 'root_storage_type', 'virt_type': 'virt_type', 'region': 'region', 'stream': 'stream'} + def __init__(self, arches=None, region=None, root_storage_type=None, series=None, stream=None, virt_type=None): + ''' + arches : typing.Sequence[str] + region : str + root_storage_type : str + series : typing.Sequence[str] + stream : str + virt_type : str + ''' + 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 ListCloudImageMetadataResult(Type): + _toSchema = {'result': 'result'} + _toPy = {'result': 'result'} + def __init__(self, result=None): + ''' + result : typing.Sequence[~CloudImageMetadata] + ''' + self.result = [CloudImageMetadata.from_json(o) for o in result or []] + + +class MetadataImageIds(Type): + _toSchema = {'image_ids': 'image_ids'} + _toPy = {'image_ids': 'image_ids'} + def __init__(self, image_ids=None): + ''' + image_ids : typing.Sequence[str] + ''' + self.image_ids = image_ids + + +class MetadataSaveParams(Type): + _toSchema = {'metadata': 'metadata'} + _toPy = {'metadata': 'metadata'} + def __init__(self, metadata=None): + ''' + metadata : typing.Sequence[~CloudImageMetadataList] + ''' + self.metadata = [CloudImageMetadataList.from_json(o) for o in metadata or []] + + +class EntityStatusArgs(Type): + _toSchema = {'data': 'Data', 'tag': 'Tag', 'status': 'Status', 'info': 'Info'} + _toPy = {'Data': 'data', 'Status': 'status', 'Info': 'info', 'Tag': 'tag'} + def __init__(self, data=None, info=None, status=None, tag=None): + ''' + data : typing.Mapping[str, typing.Any] + info : str + status : str + tag : str + ''' + self.data = data + self.info = info + self.status = status + self.tag = tag + + +class MachineAddresses(Type): + _toSchema = {'addresses': 'Addresses', 'tag': 'Tag'} + _toPy = {'Addresses': 'addresses', 'Tag': 'tag'} + def __init__(self, addresses=None, tag=None): + ''' + addresses : typing.Sequence[~Address] + tag : str + ''' + self.addresses = [Address.from_json(o) for o in addresses or []] + self.tag = tag + + +class MachineAddressesResult(Type): + _toSchema = {'addresses': 'Addresses', 'error': 'Error'} + _toPy = {'Addresses': 'addresses', 'Error': 'error'} + def __init__(self, addresses=None, error=None): + ''' + addresses : typing.Sequence[~Address] + error : Error + ''' + self.addresses = [Address.from_json(o) for o in addresses or []] + self.error = Error.from_json(error) if error else None + + +class MachineAddressesResults(Type): + _toSchema = {'results': 'Results'} + _toPy = {'Results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~MachineAddressesResult] + ''' + self.results = [MachineAddressesResult.from_json(o) for o in results or []] + + +class SetMachinesAddresses(Type): + _toSchema = {'machineaddresses': 'MachineAddresses'} + _toPy = {'MachineAddresses': 'machineaddresses'} + def __init__(self, machineaddresses=None): + ''' + machineaddresses : typing.Sequence[~MachineAddresses] + ''' + self.machineaddresses = [MachineAddresses.from_json(o) for o in machineaddresses or []] + + +class SetStatus(Type): + _toSchema = {'entities': 'Entities'} + _toPy = {'Entities': 'entities'} + def __init__(self, entities=None): + ''' + entities : typing.Sequence[~EntityStatusArgs] + ''' + self.entities = [EntityStatusArgs.from_json(o) for o in entities or []] + + +class StatusResult(Type): + _toSchema = {'status': 'Status', 'id_': 'Id', 'life': 'Life', 'data': 'Data', 'since': 'Since', 'error': 'Error', 'info': 'Info'} + _toPy = {'Since': 'since', 'Error': 'error', 'Data': 'data', 'Id': 'id_', 'Status': 'status', 'Life': 'life', 'Info': 'info'} + def __init__(self, data=None, error=None, id_=None, info=None, life=None, since=None, status=None): + ''' + data : typing.Mapping[str, typing.Any] + error : Error + id_ : str + info : str + life : str + since : str + status : 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 + + +class StatusResults(Type): + _toSchema = {'results': 'Results'} + _toPy = {'Results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~StatusResult] + ''' + self.results = [StatusResult.from_json(o) for o in results or []] + + +class ListSSHKeys(Type): + _toSchema = {'entities': 'Entities', 'mode': 'Mode'} + _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 + + +class ModifyUserSSHKeys(Type): + _toSchema = {'keys': 'Keys', 'user': 'User'} + _toPy = {'User': 'user', 'Keys': 'keys'} + def __init__(self, keys=None, user=None): + ''' + keys : typing.Sequence[str] + user : str + ''' + self.keys = keys + self.user = user + + +class ApplicationTag(Type): + _toSchema = {'name': 'Name'} + _toPy = {'Name': 'name'} + def __init__(self, name=None): + ''' + name : str + ''' + self.name = name + + +class ClaimLeadershipBulkParams(Type): + _toSchema = {'params': 'Params'} + _toPy = {'Params': 'params'} + def __init__(self, params=None): + ''' + params : typing.Sequence[~ClaimLeadershipParams] + ''' + self.params = [ClaimLeadershipParams.from_json(o) for o in params or []] + + +class ClaimLeadershipBulkResults(Type): + _toSchema = {'results': 'Results'} + _toPy = {'Results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~ErrorResult] + ''' + self.results = [ErrorResult.from_json(o) for o in results or []] + + +class ClaimLeadershipParams(Type): + _toSchema = {'applicationtag': 'ApplicationTag', 'durationseconds': 'DurationSeconds', 'unittag': 'UnitTag'} + _toPy = {'UnitTag': 'unittag', 'ApplicationTag': 'applicationtag', 'DurationSeconds': 'durationseconds'} + def __init__(self, applicationtag=None, durationseconds=None, unittag=None): + ''' + applicationtag : str + durationseconds : float + unittag : str + ''' + self.applicationtag = applicationtag + self.durationseconds = durationseconds + self.unittag = unittag + + +class ActionExecutionResult(Type): + _toSchema = {'actiontag': 'actiontag', 'message': 'message', 'status': 'status', 'results': 'results'} + _toPy = {'actiontag': 'actiontag', 'message': 'message', 'status': 'status', 'results': 'results'} + def __init__(self, actiontag=None, message=None, results=None, status=None): + ''' + actiontag : str + message : str + results : typing.Mapping[str, typing.Any] + status : str + ''' + self.actiontag = actiontag + self.message = message + self.results = results + self.status = status + + +class ActionExecutionResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~ActionExecutionResult] + ''' + self.results = [ActionExecutionResult.from_json(o) for o in results or []] + + +class JobsResult(Type): + _toSchema = {'jobs': 'Jobs', 'error': 'Error'} + _toPy = {'Jobs': 'jobs', 'Error': 'error'} + def __init__(self, error=None, jobs=None): + ''' + error : Error + jobs : typing.Sequence[str] + ''' + self.error = Error.from_json(error) if error else None + self.jobs = jobs + + +class JobsResults(Type): + _toSchema = {'results': 'Results'} + _toPy = {'Results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~JobsResult] + ''' + self.results = [JobsResult.from_json(o) for o in results or []] + + +class NetworkConfig(Type): + _toSchema = {'providerspaceid': 'ProviderSpaceId', 'vlantag': 'VLANTag', 'configtype': 'ConfigType', 'mtu': 'MTU', 'provideraddressid': 'ProviderAddressId', 'gatewayaddress': 'GatewayAddress', 'providersubnetid': 'ProviderSubnetId', 'interfacetype': 'InterfaceType', 'providervlanid': 'ProviderVLANId', 'dnsservers': 'DNSServers', 'disabled': 'Disabled', 'providerid': 'ProviderId', 'parentinterfacename': 'ParentInterfaceName', 'cidr': 'CIDR', 'dnssearchdomains': 'DNSSearchDomains', 'deviceindex': 'DeviceIndex', 'noautostart': 'NoAutoStart', 'interfacename': 'InterfaceName', 'address': 'Address', 'macaddress': 'MACAddress'} + _toPy = {'ProviderSpaceId': 'providerspaceid', 'ProviderAddressId': 'provideraddressid', 'DeviceIndex': 'deviceindex', 'GatewayAddress': 'gatewayaddress', 'ConfigType': 'configtype', 'Disabled': 'disabled', 'ProviderSubnetId': 'providersubnetid', 'VLANTag': 'vlantag', 'NoAutoStart': 'noautostart', 'MTU': 'mtu', 'InterfaceType': 'interfacetype', 'InterfaceName': 'interfacename', 'Address': 'address', 'CIDR': 'cidr', 'DNSSearchDomains': 'dnssearchdomains', 'MACAddress': 'macaddress', 'DNSServers': 'dnsservers', 'ProviderId': 'providerid', 'ParentInterfaceName': 'parentinterfacename', 'ProviderVLANId': 'providervlanid'} + 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): + ''' + 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 + ''' + 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 + + +class SetMachineNetworkConfig(Type): + _toSchema = {'tag': 'Tag', 'config': 'Config'} + _toPy = {'Tag': 'tag', 'Config': 'config'} + def __init__(self, config=None, tag=None): + ''' + config : typing.Sequence[~NetworkConfig] + tag : str + ''' + self.config = [NetworkConfig.from_json(o) for o in config or []] + self.tag = tag + + +class MeterStatusResult(Type): + _toSchema = {'code': 'Code', 'info': 'Info', 'error': 'Error'} + _toPy = {'Code': 'code', 'Info': 'info', 'Error': 'error'} + def __init__(self, code=None, error=None, info=None): + ''' + code : str + error : Error + info : str + ''' + self.code = code + self.error = Error.from_json(error) if error else None + self.info = info + + +class MeterStatusResults(Type): + _toSchema = {'results': 'Results'} + _toPy = {'Results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~MeterStatusResult] + ''' + self.results = [MeterStatusResult.from_json(o) for o in results or []] + + +class Metric(Type): + _toSchema = {'value': 'Value', 'time': 'Time', 'key': 'Key'} + _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 MetricBatch(Type): + _toSchema = {'charmurl': 'CharmURL', 'metrics': 'Metrics', 'created': 'Created', 'uuid': 'UUID'} + _toPy = {'CharmURL': 'charmurl', 'Created': 'created', 'Metrics': 'metrics', 'UUID': 'uuid'} + def __init__(self, charmurl=None, created=None, metrics=None, uuid=None): + ''' + charmurl : str + created : str + metrics : typing.Sequence[~Metric] + uuid : str + ''' + self.charmurl = charmurl + self.created = created + self.metrics = [Metric.from_json(o) for o in metrics or []] + self.uuid = uuid + + +class MetricBatchParam(Type): + _toSchema = {'tag': 'Tag', 'batch': 'Batch'} + _toPy = {'Batch': 'batch', 'Tag': 'tag'} + def __init__(self, batch=None, tag=None): + ''' + batch : MetricBatch + tag : str + ''' + self.batch = MetricBatch.from_json(batch) if batch else None + self.tag = tag + + +class MetricBatchParams(Type): + _toSchema = {'batches': 'Batches'} + _toPy = {'Batches': 'batches'} + def __init__(self, batches=None): + ''' + batches : typing.Sequence[~MetricBatchParam] + ''' + self.batches = [MetricBatchParam.from_json(o) for o in batches or []] + + +class EntityMetrics(Type): + _toSchema = {'metrics': 'metrics', 'error': 'error'} + _toPy = {'metrics': 'metrics', 'error': 'error'} + def __init__(self, error=None, metrics=None): + ''' + error : Error + metrics : typing.Sequence[~MetricResult] + ''' + self.error = Error.from_json(error) if error else None + self.metrics = [MetricResult.from_json(o) for o in metrics or []] + + +class MeterStatusParam(Type): + _toSchema = {'code': 'code', 'tag': 'tag', 'info': 'info'} + _toPy = {'code': 'code', 'tag': 'tag', 'info': 'info'} + def __init__(self, code=None, info=None, tag=None): + ''' + code : str + info : str + tag : str + ''' + self.code = code + self.info = info + self.tag = tag + + +class MeterStatusParams(Type): + _toSchema = {'statues': 'statues'} + _toPy = {'statues': 'statues'} + def __init__(self, statues=None): + ''' + statues : typing.Sequence[~MeterStatusParam] + ''' + self.statues = [MeterStatusParam.from_json(o) for o in statues or []] + + +class MetricResult(Type): + _toSchema = {'value': 'value', 'time': 'time', 'key': 'key'} + _toPy = {'value': 'value', 'time': 'time', 'key': 'key'} + 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 MetricResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~EntityMetrics] + ''' + self.results = [EntityMetrics.from_json(o) for o in results or []] + + +class PhaseResult(Type): + _toSchema = {'phase': 'phase', 'error': 'Error'} + _toPy = {'phase': 'phase', 'Error': 'error'} + def __init__(self, error=None, phase=None): + ''' + error : Error + phase : str + ''' + self.error = Error.from_json(error) if error else None + self.phase = phase + + +class PhaseResults(Type): + _toSchema = {'results': 'Results'} + _toPy = {'Results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~PhaseResult] + ''' + self.results = [PhaseResult.from_json(o) for o in results or []] + + +class FullMigrationStatus(Type): + _toSchema = {'phase': 'phase', 'spec': 'spec', 'attempt': 'attempt'} + _toPy = {'phase': 'phase', 'spec': 'spec', 'attempt': 'attempt'} + def __init__(self, attempt=None, phase=None, spec=None): + ''' + attempt : int + phase : str + spec : ModelMigrationSpec + ''' + self.attempt = attempt + self.phase = phase + self.spec = ModelMigrationSpec.from_json(spec) if spec else None + + +class SerializedModel(Type): + _toSchema = {'bytes_': 'bytes'} + _toPy = {'bytes': 'bytes_'} + def __init__(self, bytes_=None): + ''' + bytes_ : typing.Sequence[int] + ''' + self.bytes_ = bytes_ + + +class SetMigrationPhaseArgs(Type): + _toSchema = {'phase': 'phase'} + _toPy = {'phase': 'phase'} + def __init__(self, phase=None): + ''' + phase : str + ''' + self.phase = phase + + +class MigrationStatus(Type): + _toSchema = {'phase': 'phase', 'source_api_addrs': 'source-api-addrs', 'source_ca_cert': 'source-ca-cert', 'target_api_addrs': 'target-api-addrs', 'target_ca_cert': 'target-ca-cert', 'attempt': 'attempt'} + _toPy = {'phase': 'phase', 'source-api-addrs': 'source_api_addrs', 'attempt': 'attempt', 'target-api-addrs': 'target_api_addrs', 'source-ca-cert': 'source_ca_cert', 'target-ca-cert': 'target_ca_cert'} + def __init__(self, attempt=None, phase=None, source_api_addrs=None, source_ca_cert=None, target_api_addrs=None, target_ca_cert=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 + ''' + 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 + + +class ModelArgs(Type): + _toSchema = {'model_tag': 'model-tag'} + _toPy = {'model-tag': 'model_tag'} + def __init__(self, model_tag=None): + ''' + model_tag : str + ''' + self.model_tag = model_tag + + +class ModelCreateArgs(Type): + _toSchema = {'account': 'Account', 'ownertag': 'OwnerTag', 'config': 'Config'} + _toPy = {'Config': 'config', 'OwnerTag': 'ownertag', 'Account': 'account'} + def __init__(self, account=None, config=None, ownertag=None): + ''' + account : typing.Mapping[str, typing.Any] + config : typing.Mapping[str, typing.Any] + ownertag : str + ''' + self.account = account + self.config = config + self.ownertag = ownertag + + +class ModelInfoResult(Type): + _toSchema = {'result': 'result', 'error': 'error'} + _toPy = {'result': 'result', 'error': 'error'} + def __init__(self, error=None, result=None): + ''' + error : Error + result : ModelInfo + ''' + self.error = Error.from_json(error) if error else None + self.result = ModelInfo.from_json(result) if result else None + + +class ModelInfoResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~ModelInfoResult] + ''' + self.results = [ModelInfoResult.from_json(o) for o in results or []] + + +class ModelSkeletonConfigArgs(Type): + _toSchema = {'provider': 'Provider', 'region': 'Region'} + _toPy = {'Provider': 'provider', 'Region': 'region'} + def __init__(self, provider=None, region=None): + ''' + provider : str + region : str + ''' + self.provider = provider + self.region = region + + +class ModifyModelAccess(Type): + _toSchema = {'action': 'action', 'model_tag': 'model-tag', 'user_tag': 'user-tag', 'access': 'access'} + _toPy = {'action': 'action', 'user-tag': 'user_tag', 'access': 'access', 'model-tag': 'model_tag'} + def __init__(self, access=None, action=None, model_tag=None, user_tag=None): + ''' + access : str + action : str + model_tag : str + user_tag : str + ''' + self.access = access + self.action = action + self.model_tag = model_tag + self.user_tag = user_tag + + +class ModifyModelAccessRequest(Type): + _toSchema = {'changes': 'changes'} + _toPy = {'changes': 'changes'} + def __init__(self, changes=None): + ''' + changes : typing.Sequence[~ModifyModelAccess] + ''' + self.changes = [ModifyModelAccess.from_json(o) for o in changes or []] + + +class ConstraintsResult(Type): + _toSchema = {'constraints': 'Constraints', 'error': 'Error'} + _toPy = {'Constraints': 'constraints', 'Error': 'error'} + def __init__(self, constraints=None, error=None): + ''' + constraints : Value + error : Error + ''' + self.constraints = Value.from_json(constraints) if constraints else None + self.error = Error.from_json(error) if error else None + + +class ConstraintsResults(Type): + _toSchema = {'results': 'Results'} + _toPy = {'Results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~ConstraintsResult] + ''' + self.results = [ConstraintsResult.from_json(o) for o in results or []] + + +class ContainerConfig(Type): + _toSchema = {'sslhostnameverification': 'SSLHostnameVerification', 'aptproxy': 'AptProxy', 'providertype': 'ProviderType', 'proxy': 'Proxy', 'updatebehavior': 'UpdateBehavior', 'authorizedkeys': 'AuthorizedKeys', 'aptmirror': 'AptMirror', 'allowlxcloopmounts': 'AllowLXCLoopMounts'} + _toPy = {'AuthorizedKeys': 'authorizedkeys', 'Proxy': 'proxy', 'UpdateBehavior': 'updatebehavior', 'SSLHostnameVerification': 'sslhostnameverification', 'AptMirror': 'aptmirror', 'AllowLXCLoopMounts': 'allowlxcloopmounts', 'ProviderType': 'providertype', 'AptProxy': 'aptproxy'} + def __init__(self, allowlxcloopmounts=None, aptmirror=None, aptproxy=None, authorizedkeys=None, providertype=None, proxy=None, sslhostnameverification=None, updatebehavior=None): + ''' + allowlxcloopmounts : bool + aptmirror : str + aptproxy : Settings + authorizedkeys : str + providertype : str + proxy : Settings + sslhostnameverification : bool + updatebehavior : UpdateBehavior + ''' + self.allowlxcloopmounts = allowlxcloopmounts + self.aptmirror = aptmirror + self.aptproxy = Settings.from_json(aptproxy) if aptproxy else None + self.authorizedkeys = authorizedkeys + 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 + + +class ContainerManagerConfig(Type): + _toSchema = {'managerconfig': 'ManagerConfig'} + _toPy = {'ManagerConfig': 'managerconfig'} + def __init__(self, managerconfig=None): + ''' + managerconfig : typing.Mapping[str, str] + ''' + self.managerconfig = managerconfig + + +class ContainerManagerConfigParams(Type): + _toSchema = {'type_': 'Type'} + _toPy = {'Type': 'type_'} + def __init__(self, type_=None): + ''' + type_ : str + ''' + self.type_ = type_ + + +class DistributionGroupResult(Type): + _toSchema = {'result': 'Result', 'error': 'Error'} + _toPy = {'Result': 'result', 'Error': 'error'} + 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 DistributionGroupResults(Type): + _toSchema = {'results': 'Results'} + _toPy = {'Results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~DistributionGroupResult] + ''' + self.results = [DistributionGroupResult.from_json(o) for o in results or []] + + +class InstanceInfo(Type): + _toSchema = {'instanceid': 'InstanceId', 'tag': 'Tag', 'networkconfig': 'NetworkConfig', 'volumes': 'Volumes', 'nonce': 'Nonce', 'characteristics': 'Characteristics', 'volumeattachments': 'VolumeAttachments'} + _toPy = {'InstanceId': 'instanceid', 'Characteristics': 'characteristics', 'Nonce': 'nonce', 'VolumeAttachments': 'volumeattachments', 'NetworkConfig': 'networkconfig', 'Tag': 'tag', 'Volumes': 'volumes'} + def __init__(self, characteristics=None, instanceid=None, networkconfig=None, nonce=None, tag=None, volumeattachments=None, volumes=None): + ''' + characteristics : HardwareCharacteristics + instanceid : str + networkconfig : typing.Sequence[~NetworkConfig] + nonce : str + tag : str + volumeattachments : typing.Mapping[str, ~VolumeAttachmentInfo] + volumes : typing.Sequence[~Volume] + ''' + 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 []] + + +class InstancesInfo(Type): + _toSchema = {'machines': 'Machines'} + _toPy = {'Machines': 'machines'} + def __init__(self, machines=None): + ''' + machines : typing.Sequence[~InstanceInfo] + ''' + self.machines = [InstanceInfo.from_json(o) for o in machines or []] + + +class MachineContainers(Type): + _toSchema = {'machinetag': 'MachineTag', 'containertypes': 'ContainerTypes'} + _toPy = {'MachineTag': 'machinetag', 'ContainerTypes': 'containertypes'} + def __init__(self, containertypes=None, machinetag=None): + ''' + containertypes : typing.Sequence[str] + machinetag : str + ''' + self.containertypes = containertypes + self.machinetag = machinetag + + +class MachineContainersParams(Type): + _toSchema = {'params': 'Params'} + _toPy = {'Params': 'params'} + def __init__(self, params=None): + ''' + params : typing.Sequence[~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 + info : typing.Sequence[~NetworkConfig] + ''' + self.error = Error.from_json(error) if error else None + self.info = [NetworkConfig.from_json(o) for o in info or []] + + +class MachineNetworkConfigResults(Type): + _toSchema = {'results': 'Results'} + _toPy = {'Results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~MachineNetworkConfigResult] + ''' + self.results = [MachineNetworkConfigResult.from_json(o) for o in results or []] + + +class ProvisioningInfo(Type): + _toSchema = {'jobs': 'Jobs', 'volumes': 'Volumes', 'endpointbindings': 'EndpointBindings', 'constraints': 'Constraints', 'tags': 'Tags', 'placement': 'Placement', 'imagemetadata': 'ImageMetadata', 'series': 'Series', 'subnetstozones': 'SubnetsToZones'} + _toPy = {'Volumes': 'volumes', 'Tags': 'tags', 'Placement': 'placement', 'EndpointBindings': 'endpointbindings', 'ImageMetadata': 'imagemetadata', 'Series': 'series', 'SubnetsToZones': 'subnetstozones', 'Constraints': 'constraints', 'Jobs': 'jobs'} + def __init__(self, constraints=None, endpointbindings=None, imagemetadata=None, jobs=None, placement=None, series=None, subnetstozones=None, tags=None, volumes=None): + ''' + constraints : Value + endpointbindings : typing.Mapping[str, str] + imagemetadata : typing.Sequence[~CloudImageMetadata] + jobs : typing.Sequence[str] + placement : 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.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 = {'result': 'Result', 'error': 'Error'} + _toPy = {'Result': 'result', 'Error': 'error'} + def __init__(self, error=None, result=None): + ''' + error : Error + result : ProvisioningInfo + ''' + self.error = Error.from_json(error) if error else None + self.result = ProvisioningInfo.from_json(result) if result else None + + +class ProvisioningInfoResults(Type): + _toSchema = {'results': 'Results'} + _toPy = {'Results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~ProvisioningInfoResult] + ''' + self.results = [ProvisioningInfoResult.from_json(o) for o in results or []] + + +class Settings(Type): + _toSchema = {'noproxy': 'NoProxy', 'https': 'Https', 'ftp': 'Ftp', 'http': 'Http'} + _toPy = {'Https': 'https', 'NoProxy': 'noproxy', 'Http': 'http', 'Ftp': 'ftp'} + 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 = {'disablesslhostnameverification': 'DisableSSLHostnameVerification', 'toolslist': 'ToolsList', 'error': 'Error'} + _toPy = {'ToolsList': 'toolslist', 'DisableSSLHostnameVerification': 'disablesslhostnameverification', 'Error': 'error'} + def __init__(self, disablesslhostnameverification=None, error=None, toolslist=None): + ''' + disablesslhostnameverification : bool + error : Error + toolslist : typing.Sequence[~Tools] + ''' + self.disablesslhostnameverification = disablesslhostnameverification + self.error = Error.from_json(error) if error else None + self.toolslist = [Tools.from_json(o) for o in toolslist or []] + + +class ToolsResults(Type): + _toSchema = {'results': 'Results'} + _toPy = {'Results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~ToolsResult] + ''' + self.results = [ToolsResult.from_json(o) for o in results or []] + + +class UpdateBehavior(Type): + _toSchema = {'enableosrefreshupdate': 'EnableOSRefreshUpdate', 'enableosupgrade': 'EnableOSUpgrade'} + _toPy = {'EnableOSRefreshUpdate': 'enableosrefreshupdate', 'EnableOSUpgrade': 'enableosupgrade'} + def __init__(self, enableosrefreshupdate=None, enableosupgrade=None): + ''' + enableosrefreshupdate : bool + enableosupgrade : bool + ''' + self.enableosrefreshupdate = enableosrefreshupdate + self.enableosupgrade = enableosupgrade + + +class Volume(Type): + _toSchema = {'volumetag': 'volumetag', 'info': 'info'} + _toPy = {'volumetag': 'volumetag', 'info': 'info'} + def __init__(self, info=None, volumetag=None): + ''' + info : VolumeInfo + volumetag : str + ''' + self.info = VolumeInfo.from_json(info) if info else None + self.volumetag = volumetag + + +class VolumeAttachmentInfo(Type): + _toSchema = {'read_only': 'read-only', 'devicename': 'devicename', 'devicelink': 'devicelink', 'busaddress': 'busaddress'} + _toPy = {'devicename': 'devicename', 'devicelink': 'devicelink', 'busaddress': 'busaddress', 'read-only': 'read_only'} + def __init__(self, busaddress=None, devicelink=None, devicename=None, read_only=None): + ''' + busaddress : str + devicelink : str + devicename : str + read_only : bool + ''' + self.busaddress = busaddress + self.devicelink = devicelink + self.devicename = devicename + self.read_only = read_only + + +class VolumeAttachmentParams(Type): + _toSchema = {'instanceid': 'instanceid', 'read_only': 'read-only', 'volumeid': 'volumeid', 'machinetag': 'machinetag', 'provider': 'provider', 'volumetag': 'volumetag'} + _toPy = {'read-only': 'read_only', 'instanceid': 'instanceid', 'volumeid': 'volumeid', 'machinetag': 'machinetag', 'provider': 'provider', 'volumetag': 'volumetag'} + def __init__(self, instanceid=None, machinetag=None, provider=None, read_only=None, volumeid=None, volumetag=None): + ''' + instanceid : str + machinetag : str + provider : str + read_only : bool + volumeid : str + volumetag : str + ''' + self.instanceid = instanceid + self.machinetag = machinetag + self.provider = provider + self.read_only = read_only + self.volumeid = volumeid + self.volumetag = volumetag + + +class VolumeInfo(Type): + _toSchema = {'volumeid': 'volumeid', 'persistent': 'persistent', 'size': 'size', 'hardwareid': 'hardwareid'} + _toPy = {'volumeid': 'volumeid', 'persistent': 'persistent', 'size': 'size', 'hardwareid': 'hardwareid'} + def __init__(self, hardwareid=None, persistent=None, size=None, volumeid=None): + ''' + hardwareid : str + persistent : bool + size : int + volumeid : str + ''' + self.hardwareid = hardwareid + self.persistent = persistent + self.size = size + self.volumeid = volumeid + + +class VolumeParams(Type): + _toSchema = {'size': 'size', 'attributes': 'attributes', 'volumetag': 'volumetag', 'tags': 'tags', 'attachment': 'attachment', 'provider': 'provider'} + _toPy = {'size': 'size', 'attributes': 'attributes', 'volumetag': 'volumetag', 'tags': 'tags', 'attachment': 'attachment', 'provider': 'provider'} + def __init__(self, attachment=None, attributes=None, provider=None, size=None, tags=None, volumetag=None): + ''' + attachment : VolumeAttachmentParams + attributes : typing.Mapping[str, typing.Any] + provider : str + size : int + tags : typing.Mapping[str, str] + volumetag : str + ''' + 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 + + +class WatchContainer(Type): + _toSchema = {'machinetag': 'MachineTag', 'containertype': 'ContainerType'} + _toPy = {'MachineTag': 'machinetag', 'ContainerType': 'containertype'} + def __init__(self, containertype=None, machinetag=None): + ''' + containertype : str + machinetag : str + ''' + self.containertype = containertype + self.machinetag = machinetag + + +class WatchContainers(Type): + _toSchema = {'params': 'Params'} + _toPy = {'Params': 'params'} + def __init__(self, params=None): + ''' + params : typing.Sequence[~WatchContainer] + ''' + self.params = [WatchContainer.from_json(o) for o in params or []] + + +class ProxyConfig(Type): + _toSchema = {'noproxy': 'NoProxy', 'https': 'HTTPS', 'ftp': 'FTP', 'http': 'HTTP'} + _toPy = {'NoProxy': 'noproxy', 'HTTP': 'http', 'HTTPS': 'https', 'FTP': 'ftp'} + 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 ProxyConfigResult(Type): + _toSchema = {'proxysettings': 'ProxySettings', 'aptproxysettings': 'APTProxySettings', 'error': 'Error'} + _toPy = {'APTProxySettings': 'aptproxysettings', 'ProxySettings': 'proxysettings', 'Error': 'error'} + def __init__(self, aptproxysettings=None, error=None, proxysettings=None): + ''' + aptproxysettings : ProxyConfig + error : Error + proxysettings : ProxyConfig + ''' + 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 + + +class ProxyConfigResults(Type): + _toSchema = {'results': 'Results'} + _toPy = {'Results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~ProxyConfigResult] + ''' + self.results = [ProxyConfigResult.from_json(o) for o in results or []] + + +class RebootActionResult(Type): + _toSchema = {'result': 'result', 'error': 'error'} + _toPy = {'result': 'result', 'error': 'error'} + def __init__(self, error=None, result=None): + ''' + error : Error + result : str + ''' + self.error = Error.from_json(error) if error else None + self.result = result + + +class RebootActionResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~RebootActionResult] + ''' + self.results = [RebootActionResult.from_json(o) for o in results or []] + + +class RelationUnitsChange(Type): + _toSchema = {'changed': 'Changed', 'departed': 'Departed'} + _toPy = {'Departed': 'departed', 'Changed': 'changed'} + def __init__(self, changed=None, departed=None): + ''' + changed : typing.Mapping[str, ~UnitSettings] + departed : typing.Sequence[str] + ''' + self.changed = {k: UnitSettings.from_json(v) for k, v in (changed or dict()).items()} + self.departed = departed + + +class RelationUnitsWatchResult(Type): + _toSchema = {'changes': 'Changes', 'relationunitswatcherid': 'RelationUnitsWatcherId', 'error': 'Error'} + _toPy = {'Changes': 'changes', 'RelationUnitsWatcherId': 'relationunitswatcherid', 'Error': 'error'} + def __init__(self, changes=None, error=None, relationunitswatcherid=None): + ''' + changes : RelationUnitsChange + error : Error + relationunitswatcherid : str + ''' + self.changes = RelationUnitsChange.from_json(changes) if changes else None + self.error = Error.from_json(error) if error else None + self.relationunitswatcherid = relationunitswatcherid + + +class UnitSettings(Type): + _toSchema = {'version': 'Version'} + _toPy = {'Version': 'version'} + def __init__(self, version=None): + ''' + version : int + ''' + self.version = version + + +class RetryStrategy(Type): + _toSchema = {'shouldretry': 'ShouldRetry', 'jitterretrytime': 'JitterRetryTime', 'minretrytime': 'MinRetryTime', 'retrytimefactor': 'RetryTimeFactor', 'maxretrytime': 'MaxRetryTime'} + _toPy = {'RetryTimeFactor': 'retrytimefactor', 'MaxRetryTime': 'maxretrytime', 'ShouldRetry': 'shouldretry', 'MinRetryTime': 'minretrytime', 'JitterRetryTime': 'jitterretrytime'} + def __init__(self, jitterretrytime=None, maxretrytime=None, minretrytime=None, retrytimefactor=None, shouldretry=None): + ''' + jitterretrytime : bool + maxretrytime : int + minretrytime : int + retrytimefactor : int + shouldretry : bool + ''' + self.jitterretrytime = jitterretrytime + self.maxretrytime = maxretrytime + self.minretrytime = minretrytime + self.retrytimefactor = retrytimefactor + self.shouldretry = shouldretry + + +class RetryStrategyResult(Type): + _toSchema = {'result': 'Result', 'error': 'Error'} + _toPy = {'Result': 'result', 'Error': 'error'} + def __init__(self, error=None, result=None): + ''' + error : Error + result : RetryStrategy + ''' + 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'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~RetryStrategyResult] + ''' + self.results = [RetryStrategyResult.from_json(o) for o in results or []] + + +class SSHAddressResult(Type): + _toSchema = {'address': 'address', 'error': 'error'} + _toPy = {'address': 'address', 'error': 'error'} + def __init__(self, address=None, error=None): + ''' + address : str + error : Error + ''' + self.address = address + self.error = Error.from_json(error) if error else None + + +class SSHAddressResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~SSHAddressResult] + ''' + self.results = [SSHAddressResult.from_json(o) for o in results or []] + + +class SSHProxyResult(Type): + _toSchema = {'use_proxy': 'use-proxy'} + _toPy = {'use-proxy': 'use_proxy'} + def __init__(self, use_proxy=None): + ''' + use_proxy : bool + ''' + self.use_proxy = use_proxy + + +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): + ''' + error : Error + public_keys : typing.Sequence[str] + ''' + self.error = Error.from_json(error) if error else None + self.public_keys = public_keys + + +class SSHPublicKeysResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~SSHPublicKeysResult] + ''' + self.results = [SSHPublicKeysResult.from_json(o) for o in results or []] + + +class SingularClaim(Type): + _toSchema = {'controllertag': 'ControllerTag', 'duration': 'Duration', 'modeltag': 'ModelTag'} + _toPy = {'Duration': 'duration', 'ModelTag': 'modeltag', 'ControllerTag': 'controllertag'} + def __init__(self, controllertag=None, duration=None, modeltag=None): + ''' + controllertag : str + duration : int + modeltag : str + ''' + self.controllertag = controllertag + self.duration = duration + self.modeltag = modeltag + + +class SingularClaims(Type): + _toSchema = {'claims': 'Claims'} + _toPy = {'Claims': 'claims'} + def __init__(self, claims=None): + ''' + claims : typing.Sequence[~SingularClaim] + ''' + self.claims = [SingularClaim.from_json(o) for o in claims or []] + + +class ListSpacesResults(Type): + _toSchema = {'results': 'Results'} + _toPy = {'Results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~Space] + ''' + self.results = [Space.from_json(o) for o in results or []] + + +class Space(Type): + _toSchema = {'name': 'Name', 'subnets': 'Subnets', 'error': 'Error'} + _toPy = {'Subnets': 'subnets', 'Name': 'name', 'Error': 'error'} + def __init__(self, error=None, name=None, subnets=None): + ''' + error : Error + name : str + subnets : typing.Sequence[~Subnet] + ''' + self.error = Error.from_json(error) if error else None + self.name = name + self.subnets = [Subnet.from_json(o) for o in subnets or []] + + +class StatusHistoryPruneArgs(Type): + _toSchema = {'maxhistorytime': 'MaxHistoryTime', 'maxhistorymb': 'MaxHistoryMB'} + _toPy = {'MaxHistoryTime': 'maxhistorytime', 'MaxHistoryMB': 'maxhistorymb'} + def __init__(self, maxhistorymb=None, maxhistorytime=None): + ''' + maxhistorymb : int + maxhistorytime : int + ''' + self.maxhistorymb = maxhistorymb + self.maxhistorytime = maxhistorytime + + +class FilesystemAttachmentInfo(Type): + _toSchema = {'read_only': 'read-only', 'mountpoint': 'mountpoint'} + _toPy = {'read-only': 'read_only', 'mountpoint': 'mountpoint'} + def __init__(self, mountpoint=None, read_only=None): + ''' + mountpoint : str + read_only : bool + ''' + self.mountpoint = mountpoint + self.read_only = read_only + + +class FilesystemDetails(Type): + _toSchema = {'volumetag': 'volumetag', 'machineattachments': 'machineattachments', 'status': 'status', 'storage': 'storage', 'filesystemtag': 'filesystemtag', 'info': 'info'} + _toPy = {'volumetag': 'volumetag', 'machineattachments': 'machineattachments', 'status': 'status', 'storage': 'storage', 'filesystemtag': 'filesystemtag', 'info': 'info'} + def __init__(self, filesystemtag=None, info=None, machineattachments=None, status=None, storage=None, volumetag=None): + ''' + filesystemtag : str + info : FilesystemInfo + machineattachments : typing.Mapping[str, ~FilesystemAttachmentInfo] + status : EntityStatus + storage : StorageDetails + volumetag : str + ''' + 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 + + +class FilesystemDetailsListResult(Type): + _toSchema = {'result': 'result', 'error': 'error'} + _toPy = {'result': 'result', 'error': 'error'} + def __init__(self, error=None, result=None): + ''' + error : Error + result : typing.Sequence[~FilesystemDetails] + ''' + self.error = Error.from_json(error) if error else None + self.result = [FilesystemDetails.from_json(o) for o in result or []] + + +class FilesystemDetailsListResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~FilesystemDetailsListResult] + ''' + 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): + ''' + machines : typing.Sequence[str] + ''' + self.machines = machines + + +class FilesystemFilters(Type): + _toSchema = {'filters': 'filters'} + _toPy = {'filters': 'filters'} + def __init__(self, filters=None): + ''' + filters : typing.Sequence[~FilesystemFilter] + ''' + self.filters = [FilesystemFilter.from_json(o) for o in filters or []] + + +class FilesystemInfo(Type): + _toSchema = {'filesystemid': 'filesystemid', 'size': 'size'} + _toPy = {'filesystemid': 'filesystemid', 'size': 'size'} + def __init__(self, filesystemid=None, size=None): + ''' + filesystemid : str + size : int + ''' + self.filesystemid = filesystemid + self.size = size + + +class StorageAddParams(Type): + _toSchema = {'storage': 'storage', 'unit': 'unit', 'storagename': 'StorageName'} + _toPy = {'storage': 'storage', 'unit': 'unit', 'StorageName': 'storagename'} + def __init__(self, storagename=None, storage=None, unit=None): + ''' + storagename : str + storage : StorageConstraints + unit : str + ''' + self.storagename = storagename + self.storage = StorageConstraints.from_json(storage) if storage else None + self.unit = unit + + +class StorageAttachmentDetails(Type): + _toSchema = {'machinetag': 'machinetag', 'storagetag': 'storagetag', 'location': 'location', 'unittag': 'unittag'} + _toPy = {'machinetag': 'machinetag', 'storagetag': 'storagetag', 'location': 'location', 'unittag': 'unittag'} + def __init__(self, location=None, machinetag=None, storagetag=None, unittag=None): + ''' + location : str + machinetag : str + storagetag : str + unittag : str + ''' + self.location = location + self.machinetag = machinetag + self.storagetag = storagetag + self.unittag = unittag + + +class StorageConstraints(Type): + _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 + pool : str + size : int + ''' + self.count = count + self.pool = pool + self.size = size + + +class StorageDetails(Type): + _toSchema = {'attachments': 'attachments', 'ownertag': 'ownertag', 'kind': 'kind', 'status': 'status', 'persistent': 'Persistent', 'storagetag': 'storagetag'} + _toPy = {'attachments': 'attachments', 'ownertag': 'ownertag', 'kind': 'kind', 'status': 'status', 'storagetag': 'storagetag', 'Persistent': 'persistent'} + def __init__(self, persistent=None, attachments=None, kind=None, ownertag=None, status=None, storagetag=None): + ''' + persistent : bool + attachments : typing.Mapping[str, ~StorageAttachmentDetails] + kind : int + ownertag : str + status : EntityStatus + storagetag : 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 + + +class StorageDetailsListResult(Type): + _toSchema = {'result': 'result', 'error': 'error'} + _toPy = {'result': 'result', 'error': 'error'} + def __init__(self, error=None, result=None): + ''' + error : Error + result : typing.Sequence[~StorageDetails] + ''' + self.error = Error.from_json(error) if error else None + self.result = [StorageDetails.from_json(o) for o in result or []] + + +class StorageDetailsListResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~StorageDetailsListResult] + ''' + self.results = [StorageDetailsListResult.from_json(o) for o in results or []] + + +class StorageDetailsResult(Type): + _toSchema = {'result': 'result', 'error': 'error'} + _toPy = {'result': 'result', 'error': 'error'} + def __init__(self, error=None, result=None): + ''' + error : Error + result : StorageDetails + ''' + self.error = Error.from_json(error) if error else None + self.result = StorageDetails.from_json(result) if result else None + + +class StorageDetailsResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~StorageDetailsResult] + ''' + self.results = [StorageDetailsResult.from_json(o) for o in results or []] + + +class StorageFilter(Type): + _toSchema = {} + _toPy = {} + def __init__(self): + ''' + + ''' + pass + + +class StorageFilters(Type): + _toSchema = {'filters': 'filters'} + _toPy = {'filters': 'filters'} + def __init__(self, filters=None): + ''' + filters : typing.Sequence[~StorageFilter] + ''' + self.filters = [StorageFilter.from_json(o) for o in filters or []] + + +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): + ''' + attrs : typing.Mapping[str, typing.Any] + name : str + provider : str + ''' + self.attrs = attrs + self.name = name + self.provider = provider + + +class StoragePoolFilter(Type): + _toSchema = {'providers': 'providers', 'names': 'names'} + _toPy = {'providers': 'providers', 'names': 'names'} + def __init__(self, names=None, providers=None): + ''' + names : typing.Sequence[str] + providers : typing.Sequence[str] + ''' + self.names = names + self.providers = providers + + +class StoragePoolFilters(Type): + _toSchema = {'filters': 'filters'} + _toPy = {'filters': 'filters'} + def __init__(self, filters=None): + ''' + filters : typing.Sequence[~StoragePoolFilter] + ''' + self.filters = [StoragePoolFilter.from_json(o) for o in filters or []] + + +class StoragePoolsResult(Type): + _toSchema = {'storagepools': 'storagepools', 'error': 'error'} + _toPy = {'storagepools': 'storagepools', 'error': 'error'} + def __init__(self, error=None, storagepools=None): + ''' + error : Error + storagepools : typing.Sequence[~StoragePool] + ''' + self.error = Error.from_json(error) if error else None + self.storagepools = [StoragePool.from_json(o) for o in storagepools or []] + + +class StoragePoolsResults(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] + ''' + self.storages = [StorageAddParams.from_json(o) for o in storages or []] + + +class VolumeDetails(Type): + _toSchema = {'storage': 'storage', 'volumetag': 'volumetag', 'machineattachments': 'machineattachments', 'status': 'status', 'info': 'info'} + _toPy = {'storage': 'storage', 'volumetag': 'volumetag', 'machineattachments': 'machineattachments', 'status': 'status', 'info': 'info'} + def __init__(self, info=None, machineattachments=None, status=None, storage=None, volumetag=None): + ''' + info : VolumeInfo + machineattachments : typing.Mapping[str, ~VolumeAttachmentInfo] + status : EntityStatus + storage : StorageDetails + volumetag : 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 + + +class VolumeDetailsListResult(Type): + _toSchema = {'result': 'result', 'error': 'error'} + _toPy = {'result': 'result', 'error': 'error'} + def __init__(self, error=None, result=None): + ''' + error : Error + result : typing.Sequence[~VolumeDetails] + ''' + self.error = Error.from_json(error) if error else None + self.result = [VolumeDetails.from_json(o) for o in result or []] + + +class VolumeDetailsListResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~VolumeDetailsListResult] + ''' + self.results = [VolumeDetailsListResult.from_json(o) for o in results or []] + + +class VolumeFilter(Type): + _toSchema = {'machines': 'machines'} + _toPy = {'machines': 'machines'} + def __init__(self, machines=None): + ''' + machines : typing.Sequence[str] + ''' + self.machines = machines + + +class VolumeFilters(Type): + _toSchema = {'filters': 'filters'} + _toPy = {'filters': 'filters'} + def __init__(self, filters=None): + ''' + filters : typing.Sequence[~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 + result : BlockDevice + ''' + self.error = Error.from_json(error) if error else None + self.result = BlockDevice.from_json(result) if result else None + + +class BlockDeviceResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~BlockDeviceResult] + ''' + self.results = [BlockDeviceResult.from_json(o) for o in results or []] + + +class Filesystem(Type): + _toSchema = {'volumetag': 'volumetag', 'info': 'info', 'filesystemtag': 'filesystemtag'} + _toPy = {'volumetag': 'volumetag', 'info': 'info', 'filesystemtag': 'filesystemtag'} + def __init__(self, filesystemtag=None, info=None, volumetag=None): + ''' + filesystemtag : str + info : FilesystemInfo + volumetag : str + ''' + self.filesystemtag = filesystemtag + self.info = FilesystemInfo.from_json(info) if info else None + self.volumetag = volumetag + + +class FilesystemAttachment(Type): + _toSchema = {'machinetag': 'machinetag', 'info': 'info', 'filesystemtag': 'filesystemtag'} + _toPy = {'machinetag': 'machinetag', 'info': 'info', 'filesystemtag': 'filesystemtag'} + def __init__(self, filesystemtag=None, info=None, machinetag=None): + ''' + filesystemtag : str + info : FilesystemAttachmentInfo + machinetag : str + ''' + self.filesystemtag = filesystemtag + self.info = FilesystemAttachmentInfo.from_json(info) if info else None + self.machinetag = machinetag + + +class FilesystemAttachmentParams(Type): + _toSchema = {'instanceid': 'instanceid', 'filesystemid': 'filesystemid', 'read_only': 'read-only', 'machinetag': 'machinetag', 'provider': 'provider', 'mountpoint': 'mountpoint', 'filesystemtag': 'filesystemtag'} + _toPy = {'instanceid': 'instanceid', 'filesystemid': 'filesystemid', 'read-only': 'read_only', 'machinetag': 'machinetag', 'provider': 'provider', 'mountpoint': 'mountpoint', 'filesystemtag': 'filesystemtag'} + 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 + ''' + self.filesystemid = filesystemid + self.filesystemtag = filesystemtag + self.instanceid = instanceid + self.machinetag = machinetag + self.mountpoint = mountpoint + self.provider = provider + self.read_only = read_only + + +class FilesystemAttachmentParamsResult(Type): + _toSchema = {'result': 'result', 'error': 'error'} + _toPy = {'result': 'result', 'error': 'error'} + def __init__(self, error=None, result=None): + ''' + error : Error + result : FilesystemAttachmentParams + ''' + self.error = Error.from_json(error) if error else None + self.result = FilesystemAttachmentParams.from_json(result) if result else None + + +class FilesystemAttachmentParamsResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~FilesystemAttachmentParamsResult] + ''' + self.results = [FilesystemAttachmentParamsResult.from_json(o) for o in results or []] + + +class FilesystemAttachmentResult(Type): + _toSchema = {'result': 'result', 'error': 'error'} + _toPy = {'result': 'result', 'error': 'error'} + def __init__(self, error=None, result=None): + ''' + error : Error + result : FilesystemAttachment + ''' + self.error = Error.from_json(error) if error else None + self.result = FilesystemAttachment.from_json(result) if result else None + + +class FilesystemAttachmentResults(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] + ''' + self.filesystemattachments = [FilesystemAttachment.from_json(o) for o in filesystemattachments or []] + + +class FilesystemParams(Type): + _toSchema = {'size': 'size', 'attributes': 'attributes', 'volumetag': 'volumetag', 'tags': 'tags', 'attachment': 'attachment', 'provider': 'provider', 'filesystemtag': 'filesystemtag'} + _toPy = {'size': 'size', 'attributes': 'attributes', 'volumetag': 'volumetag', 'tags': 'tags', 'attachment': 'attachment', 'provider': 'provider', 'filesystemtag': 'filesystemtag'} + def __init__(self, attachment=None, attributes=None, filesystemtag=None, provider=None, size=None, tags=None, volumetag=None): + ''' + attachment : FilesystemAttachmentParams + attributes : typing.Mapping[str, typing.Any] + filesystemtag : str + provider : str + size : int + tags : typing.Mapping[str, str] + volumetag : str + ''' + self.attachment = FilesystemAttachmentParams.from_json(attachment) if attachment else None + self.attributes = attributes + self.filesystemtag = filesystemtag + self.provider = provider + self.size = size + self.tags = tags + self.volumetag = volumetag + + +class FilesystemParamsResult(Type): + _toSchema = {'result': 'result', 'error': 'error'} + _toPy = {'result': 'result', 'error': 'error'} + def __init__(self, error=None, result=None): + ''' + error : Error + result : FilesystemParams + ''' + self.error = Error.from_json(error) if error else None + self.result = FilesystemParams.from_json(result) if result else None + + +class FilesystemParamsResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~FilesystemParamsResult] + ''' + self.results = [FilesystemParamsResult.from_json(o) for o in results or []] + + +class FilesystemResult(Type): + _toSchema = {'result': 'result', 'error': 'error'} + _toPy = {'result': 'result', 'error': 'error'} + def __init__(self, error=None, result=None): + ''' + error : Error + result : Filesystem + ''' + self.error = Error.from_json(error) if error else None + self.result = Filesystem.from_json(result) if result else None + + +class FilesystemResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~FilesystemResult] + ''' + self.results = [FilesystemResult.from_json(o) for o in results or []] + + +class Filesystems(Type): + _toSchema = {'filesystems': 'filesystems'} + _toPy = {'filesystems': 'filesystems'} + def __init__(self, filesystems=None): + ''' + filesystems : typing.Sequence[~Filesystem] + ''' + self.filesystems = [Filesystem.from_json(o) for o in filesystems or []] + + +class MachineStorageIds(Type): + _toSchema = {'ids': 'ids'} + _toPy = {'ids': 'ids'} + def __init__(self, ids=None): + ''' + ids : typing.Sequence[~MachineStorageId] + ''' + self.ids = [MachineStorageId.from_json(o) for o in ids or []] + + +class MachineStorageIdsWatchResults(Type): + _toSchema = {'results': 'Results'} + _toPy = {'Results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~MachineStorageIdsWatchResult] + ''' + self.results = [MachineStorageIdsWatchResult.from_json(o) for o in results or []] + + +class VolumeAttachment(Type): + _toSchema = {'volumetag': 'volumetag', 'machinetag': 'machinetag', 'info': 'info'} + _toPy = {'volumetag': 'volumetag', 'machinetag': 'machinetag', 'info': 'info'} + def __init__(self, info=None, machinetag=None, volumetag=None): + ''' + info : VolumeAttachmentInfo + machinetag : str + volumetag : str + ''' + self.info = VolumeAttachmentInfo.from_json(info) if info else None + self.machinetag = machinetag + self.volumetag = volumetag + + +class VolumeAttachmentParamsResult(Type): + _toSchema = {'result': 'result', 'error': 'error'} + _toPy = {'result': 'result', 'error': 'error'} + def __init__(self, error=None, result=None): + ''' + error : Error + result : VolumeAttachmentParams + ''' + self.error = Error.from_json(error) if error else None + self.result = VolumeAttachmentParams.from_json(result) if result else None + + +class VolumeAttachmentParamsResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~VolumeAttachmentParamsResult] + ''' + self.results = [VolumeAttachmentParamsResult.from_json(o) for o in results or []] + + +class VolumeAttachmentResult(Type): + _toSchema = {'result': 'result', 'error': 'error'} + _toPy = {'result': 'result', 'error': 'error'} + def __init__(self, error=None, result=None): + ''' + error : Error + result : VolumeAttachment + ''' + self.error = Error.from_json(error) if error else None + self.result = VolumeAttachment.from_json(result) if result else None + + +class VolumeAttachmentResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~VolumeAttachmentResult] + ''' + self.results = [VolumeAttachmentResult.from_json(o) for o in results or []] + + +class VolumeAttachments(Type): + _toSchema = {'volumeattachments': 'volumeattachments'} + _toPy = {'volumeattachments': 'volumeattachments'} + def __init__(self, volumeattachments=None): + ''' + volumeattachments : typing.Sequence[~VolumeAttachment] + ''' + self.volumeattachments = [VolumeAttachment.from_json(o) for o in volumeattachments or []] + + +class VolumeParamsResult(Type): + _toSchema = {'result': 'result', 'error': 'error'} + _toPy = {'result': 'result', 'error': 'error'} + def __init__(self, error=None, result=None): + ''' + error : Error + result : VolumeParams + ''' + self.error = Error.from_json(error) if error else None + self.result = VolumeParams.from_json(result) if result else None + + +class VolumeParamsResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~VolumeParamsResult] + ''' + self.results = [VolumeParamsResult.from_json(o) for o in results or []] + + +class VolumeResult(Type): + _toSchema = {'result': 'result', 'error': 'error'} + _toPy = {'result': 'result', 'error': 'error'} + def __init__(self, error=None, result=None): + ''' + error : Error + result : Volume + ''' + self.error = Error.from_json(error) if error else None + self.result = Volume.from_json(result) if result else None + + +class VolumeResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~VolumeResult] + ''' + self.results = [VolumeResult.from_json(o) for o in results or []] + + +class Volumes(Type): + _toSchema = {'volumes': 'volumes'} + _toPy = {'volumes': 'volumes'} + def __init__(self, volumes=None): + ''' + volumes : typing.Sequence[~Volume] + ''' + self.volumes = [Volume.from_json(o) for o in volumes or []] + + +class SpaceResult(Type): + _toSchema = {'tag': 'Tag', 'error': 'Error'} + _toPy = {'Tag': 'tag', 'Error': 'error'} + def __init__(self, error=None, tag=None): + ''' + error : Error + tag : str + ''' + self.error = Error.from_json(error) if error else None + self.tag = tag + + +class SpaceResults(Type): + _toSchema = {'results': 'Results'} + _toPy = {'Results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~SpaceResult] + ''' + self.results = [SpaceResult.from_json(o) for o in results or []] + + +class ZoneResult(Type): + _toSchema = {'name': 'Name', 'error': 'Error', 'available': 'Available'} + _toPy = {'Error': 'error', 'Name': 'name', 'Available': 'available'} + def __init__(self, available=None, error=None, name=None): + ''' + available : bool + error : Error + name : str + ''' + self.available = available + self.error = Error.from_json(error) if error else None + self.name = name + + +class ZoneResults(Type): + _toSchema = {'results': 'Results'} + _toPy = {'Results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~ZoneResult] + ''' + self.results = [ZoneResult.from_json(o) for o in results or []] + + +class UndertakerModelInfo(Type): + _toSchema = {'life': 'Life', 'name': 'Name', 'globalname': 'GlobalName', 'uuid': 'UUID', 'issystem': 'IsSystem'} + _toPy = {'GlobalName': 'globalname', 'Name': 'name', 'UUID': 'uuid', 'Life': 'life', '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 = {'result': 'Result', 'error': 'Error'} + _toPy = {'Result': 'result', 'Error': 'error'} + def __init__(self, error=None, result=None): + ''' + error : Error + result : UndertakerModelInfo + ''' + self.error = Error.from_json(error) if error else None + self.result = UndertakerModelInfo.from_json(result) if result else None + + +class ApplicationStatusResult(Type): + _toSchema = {'units': 'Units', 'application': 'Application', 'error': 'Error'} + _toPy = {'Application': 'application', 'Units': 'units', 'Error': 'error'} + def __init__(self, application=None, error=None, units=None): + ''' + application : StatusResult + error : Error + units : typing.Mapping[str, ~StatusResult] + ''' + self.application = StatusResult.from_json(application) if application else None + self.error = Error.from_json(error) if error else None + self.units = {k: StatusResult.from_json(v) for k, v in (units or dict()).items()} + + +class ApplicationStatusResults(Type): + _toSchema = {'results': 'Results'} + _toPy = {'Results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~ApplicationStatusResult] + ''' + self.results = [ApplicationStatusResult.from_json(o) for o in results or []] + + +class CharmURL(Type): + _toSchema = {'url': 'URL'} + _toPy = {'URL': 'url'} + def __init__(self, url=None): + ''' + url : str + ''' + self.url = url + + +class CharmURLs(Type): + _toSchema = {'urls': 'URLs'} + _toPy = {'URLs': 'urls'} + def __init__(self, urls=None): + ''' + urls : typing.Sequence[~CharmURL] + ''' + self.urls = [CharmURL.from_json(o) for o in urls or []] + + +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[str, typing.Any] + ''' + self.error = Error.from_json(error) if error else None + self.settings = settings + + +class ConfigSettingsResults(Type): + _toSchema = {'results': 'Results'} + _toPy = {'Results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~ConfigSettingsResult] + ''' + self.results = [ConfigSettingsResult.from_json(o) for o in results or []] + + +class Endpoint(Type): + _toSchema = {'relation': 'Relation', 'applicationname': 'ApplicationName'} + _toPy = {'Relation': 'relation', 'ApplicationName': 'applicationname'} + def __init__(self, applicationname=None, relation=None): + ''' + applicationname : str + relation : Relation + ''' + self.applicationname = applicationname + self.relation = Relation.from_json(relation) if relation else None + + +class EntitiesCharmURL(Type): + _toSchema = {'entities': 'Entities'} + _toPy = {'Entities': 'entities'} + def __init__(self, entities=None): + ''' + entities : typing.Sequence[~EntityCharmURL] + ''' + self.entities = [EntityCharmURL.from_json(o) for o in entities or []] + + +class EntitiesPortRanges(Type): + _toSchema = {'entities': 'Entities'} + _toPy = {'Entities': 'entities'} + def __init__(self, entities=None): + ''' + entities : typing.Sequence[~EntityPortRange] + ''' + self.entities = [EntityPortRange.from_json(o) for o in entities or []] + + +class EntityCharmURL(Type): + _toSchema = {'charmurl': 'CharmURL', 'tag': 'Tag'} + _toPy = {'CharmURL': 'charmurl', 'Tag': 'tag'} + def __init__(self, charmurl=None, tag=None): + ''' + charmurl : str + tag : str + ''' + self.charmurl = charmurl + self.tag = tag + + +class EntityPortRange(Type): + _toSchema = {'tag': 'Tag', 'toport': 'ToPort', 'protocol': 'Protocol', 'fromport': 'FromPort'} + _toPy = {'ToPort': 'toport', 'Protocol': 'protocol', 'Tag': 'tag', 'FromPort': 'fromport'} + def __init__(self, fromport=None, protocol=None, tag=None, toport=None): + ''' + fromport : int + protocol : str + tag : str + toport : int + ''' + self.fromport = fromport + self.protocol = protocol + self.tag = tag + self.toport = toport + + +class GetLeadershipSettingsBulkResults(Type): + _toSchema = {'results': 'Results'} + _toPy = {'Results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~GetLeadershipSettingsResult] + ''' + self.results = [GetLeadershipSettingsResult.from_json(o) for o in results or []] + + +class GetLeadershipSettingsResult(Type): + _toSchema = {'settings': 'Settings', 'error': 'Error'} + _toPy = {'Settings': 'settings', 'Error': 'error'} + 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 + + +class IntResult(Type): + _toSchema = {'result': 'Result', 'error': 'Error'} + _toPy = {'Result': 'result', 'Error': 'error'} + def __init__(self, error=None, result=None): + ''' + error : Error + result : int + ''' + 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 []] + + +class MergeLeadershipSettingsParam(Type): + _toSchema = {'applicationtag': 'ApplicationTag', 'settings': 'Settings'} + _toPy = {'Settings': 'settings', 'ApplicationTag': 'applicationtag'} + def __init__(self, applicationtag=None, settings=None): + ''' + applicationtag : str + settings : typing.Mapping[str, str] + ''' + self.applicationtag = applicationtag + self.settings = settings + + +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): + ''' + error : Error + name : str + uuid : str + ''' + self.error = Error.from_json(error) if error else None + self.name = name + self.uuid = uuid + + +class RelationIds(Type): + _toSchema = {'relationids': 'RelationIds'} + _toPy = {'RelationIds': 'relationids'} + def __init__(self, relationids=None): + ''' + relationids : typing.Sequence[int] + ''' + self.relationids = relationids + + +class RelationResult(Type): + _toSchema = {'life': 'Life', 'key': 'Key', 'endpoint': 'Endpoint', 'id_': 'Id', 'error': 'Error'} + _toPy = {'Key': 'key', 'Id': 'id_', 'Life': 'life', 'Endpoint': 'endpoint', 'Error': 'error'} + def __init__(self, endpoint=None, error=None, id_=None, key=None, life=None): + ''' + endpoint : Endpoint + error : Error + id_ : int + key : str + life : str + ''' + 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 + + +class RelationResults(Type): + _toSchema = {'results': 'Results'} + _toPy = {'Results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~RelationResult] + ''' + self.results = [RelationResult.from_json(o) for o in results or []] + + +class RelationUnit(Type): + _toSchema = {'relation': 'Relation', 'unit': 'Unit'} + _toPy = {'Unit': 'unit', 'Relation': 'relation'} + def __init__(self, relation=None, unit=None): + ''' + relation : str + unit : str + ''' + self.relation = relation + self.unit = unit + + +class RelationUnitPair(Type): + _toSchema = {'relation': 'Relation', 'remoteunit': 'RemoteUnit', 'localunit': 'LocalUnit'} + _toPy = {'LocalUnit': 'localunit', 'Relation': 'relation', 'RemoteUnit': 'remoteunit'} + def __init__(self, localunit=None, relation=None, remoteunit=None): + ''' + localunit : str + relation : str + remoteunit : str + ''' + self.localunit = localunit + self.relation = relation + self.remoteunit = remoteunit + + +class RelationUnitPairs(Type): + _toSchema = {'relationunitpairs': 'RelationUnitPairs'} + _toPy = {'RelationUnitPairs': 'relationunitpairs'} + def __init__(self, relationunitpairs=None): + ''' + relationunitpairs : typing.Sequence[~RelationUnitPair] + ''' + self.relationunitpairs = [RelationUnitPair.from_json(o) for o in relationunitpairs or []] + + +class RelationUnitSettings(Type): + _toSchema = {'settings': 'Settings', 'relation': 'Relation', 'unit': 'Unit'} + _toPy = {'Settings': 'settings', 'Unit': 'unit', 'Relation': 'relation'} + def __init__(self, relation=None, settings=None, unit=None): + ''' + relation : str + settings : typing.Mapping[str, str] + unit : str + ''' + self.relation = relation + self.settings = settings + self.unit = unit + + +class RelationUnits(Type): + _toSchema = {'relationunits': 'RelationUnits'} + _toPy = {'RelationUnits': 'relationunits'} + def __init__(self, relationunits=None): + ''' + relationunits : typing.Sequence[~RelationUnit] + ''' + self.relationunits = [RelationUnit.from_json(o) for o in relationunits or []] + + +class RelationUnitsSettings(Type): + _toSchema = {'relationunits': 'RelationUnits'} + _toPy = {'RelationUnits': 'relationunits'} + def __init__(self, relationunits=None): + ''' + relationunits : typing.Sequence[~RelationUnitSettings] + ''' + self.relationunits = [RelationUnitSettings.from_json(o) for o in relationunits or []] + + +class RelationUnitsWatchResults(Type): + _toSchema = {'results': 'Results'} + _toPy = {'Results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~RelationUnitsWatchResult] + ''' + self.results = [RelationUnitsWatchResult.from_json(o) for o in results or []] + + +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 ResolvedModeResults(Type): + _toSchema = {'results': 'Results'} + _toPy = {'Results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~ResolvedModeResult] + ''' + 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[str, str] + ''' + self.error = Error.from_json(error) if error else None + self.settings = settings + + +class SettingsResults(Type): + _toSchema = {'results': 'Results'} + _toPy = {'Results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~SettingsResult] + ''' + self.results = [SettingsResult.from_json(o) for o in results or []] + + +class StorageAttachment(Type): + _toSchema = {'storagetag': 'StorageTag', 'kind': 'Kind', 'location': 'Location', 'life': 'Life', 'ownertag': 'OwnerTag', 'unittag': 'UnitTag'} + _toPy = {'UnitTag': 'unittag', 'StorageTag': 'storagetag', 'Kind': 'kind', 'OwnerTag': 'ownertag', 'Life': 'life', 'Location': 'location'} + def __init__(self, kind=None, life=None, location=None, ownertag=None, storagetag=None, unittag=None): + ''' + kind : int + life : str + location : str + ownertag : str + storagetag : str + unittag : str + ''' + self.kind = kind + self.life = life + self.location = location + self.ownertag = ownertag + self.storagetag = storagetag + self.unittag = unittag + + +class StorageAttachmentId(Type): + _toSchema = {'storagetag': 'storagetag', 'unittag': 'unittag'} + _toPy = {'storagetag': 'storagetag', 'unittag': 'unittag'} + def __init__(self, storagetag=None, unittag=None): + ''' + storagetag : str + unittag : str + ''' + self.storagetag = storagetag + self.unittag = unittag + + +class StorageAttachmentIds(Type): + _toSchema = {'ids': 'ids'} + _toPy = {'ids': 'ids'} + def __init__(self, ids=None): + ''' + ids : typing.Sequence[~StorageAttachmentId] + ''' + self.ids = [StorageAttachmentId.from_json(o) for o in ids or []] + + +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 + + +class StorageAttachmentIdsResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~StorageAttachmentIdsResult] + ''' + self.results = [StorageAttachmentIdsResult.from_json(o) for o in results or []] + + +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 + + +class StorageAttachmentResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~StorageAttachmentResult] + ''' + self.results = [StorageAttachmentResult.from_json(o) for o in results or []] + + +class StringBoolResult(Type): + _toSchema = {'result': 'Result', 'ok': 'Ok', 'error': 'Error'} + _toPy = {'Ok': 'ok', 'Result': 'result', 'Error': 'error'} + def __init__(self, error=None, ok=None, result=None): + ''' + error : Error + ok : bool + result : str + ''' + self.error = Error.from_json(error) if error else None + self.ok = ok + self.result = result + + +class StringBoolResults(Type): + _toSchema = {'results': 'Results'} + _toPy = {'Results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~StringBoolResult] + ''' + self.results = [StringBoolResult.from_json(o) for o in results or []] + + +class UnitNetworkConfig(Type): + _toSchema = {'bindingname': 'BindingName', 'unittag': 'UnitTag'} + _toPy = {'BindingName': 'bindingname', 'UnitTag': 'unittag'} + def __init__(self, bindingname=None, unittag=None): + ''' + bindingname : str + unittag : str + ''' + self.bindingname = bindingname + self.unittag = unittag + + +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[~NetworkConfig] + ''' + self.error = Error.from_json(error) if error else None + self.info = [NetworkConfig.from_json(o) for o in info or []] + + +class UnitNetworkConfigResults(Type): + _toSchema = {'results': 'Results'} + _toPy = {'Results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~UnitNetworkConfigResult] + ''' + self.results = [UnitNetworkConfigResult.from_json(o) for o in results or []] + + +class UnitsNetworkConfig(Type): + _toSchema = {'args': 'Args'} + _toPy = {'Args': 'args'} + def __init__(self, args=None): + ''' + args : typing.Sequence[~UnitNetworkConfig] + ''' + self.args = [UnitNetworkConfig.from_json(o) for o in args or []] + + +class EntitiesVersion(Type): + _toSchema = {'agenttools': 'AgentTools'} + _toPy = {'AgentTools': 'agenttools'} + def __init__(self, agenttools=None): + ''' + agenttools : typing.Sequence[~EntityVersion] + ''' + self.agenttools = [EntityVersion.from_json(o) for o in agenttools or []] + + +class EntityVersion(Type): + _toSchema = {'tag': 'Tag', 'tools': 'Tools'} + _toPy = {'Tag': 'tag', 'Tools': 'tools'} + def __init__(self, tag=None, tools=None): + ''' + tag : str + tools : Version + ''' + self.tag = tag + self.tools = Version.from_json(tools) if tools else None + + +class VersionResult(Type): + _toSchema = {'version': 'Version', 'error': 'Error'} + _toPy = {'Version': 'version', 'Error': 'error'} + def __init__(self, error=None, version=None): + ''' + error : Error + version : Number + ''' + self.error = Error.from_json(error) if error else None + self.version = Number.from_json(version) if version else None + + +class VersionResults(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 = {'password': 'password', 'shared_model_tags': 'shared-model-tags', 'model_access_permission': 'model-access-permission', 'username': 'username', 'display_name': 'display-name'} + _toPy = {'password': 'password', 'display-name': 'display_name', 'shared-model-tags': 'shared_model_tags', 'username': 'username', 'model-access-permission': 'model_access_permission'} + 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 + ''' + 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 + + +class AddUserResult(Type): + _toSchema = {'tag': 'tag', 'secret_key': 'secret-key', 'error': 'error'} + _toPy = {'secret-key': 'secret_key', 'tag': 'tag', 'error': 'error'} + def __init__(self, error=None, secret_key=None, tag=None): + ''' + error : Error + secret_key : typing.Sequence[int] + tag : str + ''' + self.error = Error.from_json(error) if error else None + self.secret_key = secret_key + self.tag = tag + + +class AddUserResults(Type): + _toSchema = {'results': 'results'} + _toPy = {'results': 'results'} + def __init__(self, results=None): + ''' + results : typing.Sequence[~AddUserResult] + ''' + self.results = [AddUserResult.from_json(o) for o in results or []] + + +class AddUsers(Type): + _toSchema = {'users': 'users'} + _toPy = {'users': 'users'} + def __init__(self, users=None): + ''' + users : typing.Sequence[~AddUser] + ''' + 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 + + +class MacaroonResults(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 = {'username': 'username', 'disabled': 'disabled', 'date_created': 'date-created', 'created_by': 'created-by', 'last_connection': 'last-connection', 'display_name': 'display-name'} + _toPy = {'username': 'username', 'display-name': 'display_name', 'disabled': 'disabled', 'last-connection': 'last_connection', 'date-created': 'date_created', 'created-by': 'created_by'} + 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 = {'entities': 'entities', 'include_disabled': 'include-disabled'} + _toPy = {'entities': 'entities', 'include-disabled': 'include_disabled'} + def __init__(self, entities=None, include_disabled=None): + ''' + entities : typing.Sequence[~Entity] + include_disabled : bool + ''' + self.entities = [Entity.from_json(o) for o in entities or []] + self.include_disabled = include_disabled + + +class UserInfoResult(Type): + _toSchema = {'result': 'result', 'error': 'error'} + _toPy = {'result': 'result', 'error': 'error'} + def __init__(self, error=None, result=None): + ''' + error : Error + result : UserInfo + ''' + 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[~UserInfoResult] + ''' + self.results = [UserInfoResult.from_json(o) for o in results or []] + + +class Action(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': {'ActionSpecs': {'patternProperties': {'.*': {'$ref': '#/definitions/ActionSpec'}}, + 'type': 'object'}}, + 'required': ['ActionSpecs'], + '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': {'ApplicationTag': {'type': 'string'}, + 'actions': {'$ref': '#/definitions/Actions'}, + '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'}, + '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': {'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', + 'Machines', + 'Applications', + 'Units'], + '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'}, + '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): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~ActionResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Action', Request='Actions', Version=2, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ApplicationsCharmActionsResults) + async def ApplicationsCharmsActions(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~ApplicationCharmActionsResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Action', Request='ApplicationsCharmsActions', Version=2, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ActionResults) + async def Cancel(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~ActionResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Action', Request='Cancel', Version=2, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ActionResults) + async def Enqueue(self, actionspecs): + ''' + actionspecs : typing.Mapping[str, ~ActionSpec] + Returns -> typing.Sequence[~ActionResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Action', Request='Enqueue', Version=2, Params=params) + params['ActionSpecs'] = actionspecs + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(FindTagsResults) + async def FindActionTagsByPrefix(self, prefixes): + ''' + prefixes : typing.Sequence[str] + Returns -> typing.Sequence[~Entity] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Action', Request='FindActionTagsByPrefix', Version=2, Params=params) + params['prefixes'] = prefixes + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ActionsByNames) + async def FindActionsByNames(self, names): + ''' + names : typing.Sequence[str] + Returns -> typing.Sequence[~ActionsByName] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Action', Request='FindActionsByNames', Version=2, Params=params) + params['names'] = names + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ActionsByReceivers) + async def ListAll(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~ActionsByReceiver] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Action', Request='ListAll', Version=2, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ActionsByReceivers) + async def ListCompleted(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~ActionsByReceiver] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Action', Request='ListCompleted', Version=2, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ActionsByReceivers) + async def ListPending(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~ActionsByReceiver] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Action', Request='ListPending', Version=2, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ActionsByReceivers) + async def ListRunning(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~ActionsByReceiver] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Action', Request='ListRunning', Version=2, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ActionResults) + async def Run(self, applications, commands, machines, timeout, units): + ''' + applications : typing.Sequence[str] + commands : str + machines : typing.Sequence[str] + timeout : int + units : typing.Sequence[str] + Returns -> typing.Sequence[~ActionResult] + ''' + # map input types to rpc msg + params = dict() + 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(ActionResults) + async def RunOnAllMachines(self, applications, commands, machines, timeout, units): + ''' + applications : typing.Sequence[str] + commands : str + machines : typing.Sequence[str] + timeout : int + units : typing.Sequence[str] + Returns -> typing.Sequence[~ActionResult] + ''' + # map input types to rpc msg + params = dict() + 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 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): + ''' + + Returns -> typing.Union[_ForwardRef('Error'), bool] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Addresser', Request='CanDeallocateAddresses', Version=2, Params=params) + + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResult) + async def CleanupIPAddresses(self): + ''' + + Returns -> Error + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Addresser', Request='CleanupIPAddresses', Version=2, Params=params) + + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(EntitiesWatchResult) + async def WatchIPAddresses(self): + ''' + + Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Addresser', Request='WatchIPAddresses', Version=2, Params=params) + + reply = await self.rpc(msg) + return reply + + +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): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~ErrorResult] + ''' + # 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 + + + + @ReturnMapping(AgentGetEntitiesResults) + async def GetEntities(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~AgentGetEntitiesResult] + ''' + # 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 + + + + @ReturnMapping(IsMasterResult) + async def IsMaster(self): + ''' + + Returns -> bool + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Agent', Request='IsMaster', Version=2, Params=params) + + 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='Agent', Request='ModelConfig', Version=2, Params=params) + + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def SetPasswords(self, changes): + ''' + changes : typing.Sequence[~EntityPassword] + Returns -> typing.Sequence[~ErrorResult] + ''' + # 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 + + + + @ReturnMapping(StateServingInfo) + async def StateServingInfo(self): + ''' + + Returns -> typing.Union[int, str] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Agent', Request='StateServingInfo', Version=2, Params=params) + + 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='Agent', Request='WatchForModelConfigChanges', Version=2, Params=params) + + reply = await self.rpc(msg) + return reply + + +class AgentTools(Type): + name = 'AgentTools' + version = 1 + schema = {'properties': {'UpdateToolsAvailable': {'type': 'object'}}, 'type': 'object'} + + + @ReturnMapping(None) + async def UpdateToolsAvailable(self): + ''' + + Returns -> None + ''' + # 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 + + +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): + ''' + + Returns -> typing.Sequence[~Delta] + ''' + # 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 + + + + @ReturnMapping(None) + async def Stop(self): + ''' + + Returns -> None + ''' + # 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 + + +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): + ''' + + Returns -> typing.Sequence[~Delta] + ''' + # 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 + + + + @ReturnMapping(None) + async def Stop(self): + ''' + + Returns -> None + ''' + # 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 + + +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): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~AnnotationsGetResult] + ''' + # 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 + + + + @ReturnMapping(ErrorResults) + async def Set(self, annotations): + ''' + annotations : typing.Sequence[~EntityAnnotations] + Returns -> typing.Sequence[~ErrorResult] + ''' + # 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 + + +class Application(Type): + name = 'Application' + version = 1 + schema = {'definitions': {'AddApplicationUnits': {'additionalProperties': False, + 'properties': {'ApplicationName': {'type': 'string'}, + 'NumUnits': {'type': 'integer'}, + 'Placement': {'items': {'$ref': '#/definitions/Placement'}, + 'type': 'array'}}, + 'required': ['ApplicationName', + 'NumUnits', + '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': ['Endpoints'], + 'type': 'object'}, + 'AddRelationResults': {'additionalProperties': False, + 'properties': {'Endpoints': {'patternProperties': {'.*': {'$ref': '#/definitions/Relation'}}, + 'type': 'object'}}, + 'required': ['Endpoints'], + 'type': 'object'}, + 'ApplicationCharmRelations': {'additionalProperties': False, + 'properties': {'ApplicationName': {'type': 'string'}}, + 'required': ['ApplicationName'], + 'type': 'object'}, + 'ApplicationCharmRelationsResults': {'additionalProperties': False, + 'properties': {'CharmRelations': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'required': ['CharmRelations'], + 'type': 'object'}, + 'ApplicationDeploy': {'additionalProperties': False, + 'properties': {'ApplicationName': {'type': 'string'}, + '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'}, + 'Storage': {'patternProperties': {'.*': {'$ref': '#/definitions/Constraints'}}, + 'type': 'object'}}, + 'required': ['ApplicationName', + 'Series', + 'CharmUrl', + 'Channel', + 'NumUnits', + 'Config', + 'ConfigYAML', + 'Constraints', + 'Placement', + 'Storage', + 'EndpointBindings', + 'Resources'], + 'type': 'object'}, + 'ApplicationDestroy': {'additionalProperties': False, + 'properties': {'ApplicationName': {'type': 'string'}}, + 'required': ['ApplicationName'], + 'type': 'object'}, + 'ApplicationExpose': {'additionalProperties': False, + 'properties': {'ApplicationName': {'type': 'string'}}, + 'required': ['ApplicationName'], + 'type': 'object'}, + 'ApplicationGet': {'additionalProperties': False, + 'properties': {'ApplicationName': {'type': 'string'}}, + 'required': ['ApplicationName'], + 'type': 'object'}, + 'ApplicationGetResults': {'additionalProperties': False, + 'properties': {'Application': {'type': 'string'}, + 'Charm': {'type': 'string'}, + 'Config': {'patternProperties': {'.*': {'additionalProperties': True, + 'type': 'object'}}, + 'type': 'object'}, + 'Constraints': {'$ref': '#/definitions/Value'}}, + 'required': ['Application', + 'Charm', + 'Config', + 'Constraints'], + 'type': 'object'}, + 'ApplicationMetricCredential': {'additionalProperties': False, + 'properties': {'ApplicationName': {'type': 'string'}, + 'MetricCredentials': {'items': {'type': 'integer'}, + 'type': 'array'}}, + 'required': ['ApplicationName', + 'MetricCredentials'], + 'type': 'object'}, + 'ApplicationMetricCredentials': {'additionalProperties': False, + 'properties': {'Creds': {'items': {'$ref': '#/definitions/ApplicationMetricCredential'}, + 'type': 'array'}}, + 'required': ['Creds'], + 'type': 'object'}, + 'ApplicationSet': {'additionalProperties': False, + 'properties': {'ApplicationName': {'type': 'string'}, + 'Options': {'patternProperties': {'.*': {'type': 'string'}}, + 'type': 'object'}}, + 'required': ['ApplicationName', 'Options'], + 'type': 'object'}, + 'ApplicationSetCharm': {'additionalProperties': False, + 'properties': {'applicationname': {'type': 'string'}, + 'charmurl': {'type': 'string'}, + 'cs-channel': {'type': 'string'}, + 'forceseries': {'type': 'boolean'}, + 'forceunits': {'type': 'boolean'}, + 'resourceids': {'patternProperties': {'.*': {'type': 'string'}}, + 'type': 'object'}}, + 'required': ['applicationname', + 'charmurl', + 'cs-channel', + 'forceunits', + 'forceseries', + 'resourceids'], + 'type': 'object'}, + 'ApplicationUnexpose': {'additionalProperties': False, + 'properties': {'ApplicationName': {'type': 'string'}}, + 'required': ['ApplicationName'], + 'type': 'object'}, + 'ApplicationUnset': {'additionalProperties': False, + 'properties': {'ApplicationName': {'type': 'string'}, + 'Options': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'required': ['ApplicationName', + 'Options'], + 'type': 'object'}, + 'ApplicationUpdate': {'additionalProperties': False, + 'properties': {'ApplicationName': {'type': 'string'}, + 'CharmUrl': {'type': 'string'}, + 'Constraints': {'$ref': '#/definitions/Value'}, + 'ForceCharmUrl': {'type': 'boolean'}, + 'ForceSeries': {'type': 'boolean'}, + 'MinUnits': {'type': 'integer'}, + 'SettingsStrings': {'patternProperties': {'.*': {'type': 'string'}}, + 'type': 'object'}, + 'SettingsYAML': {'type': 'string'}}, + 'required': ['ApplicationName', + 'CharmUrl', + 'ForceCharmUrl', + 'ForceSeries', + 'MinUnits', + 'SettingsStrings', + 'SettingsYAML', + 'Constraints'], + 'type': 'object'}, + 'ApplicationsDeploy': {'additionalProperties': False, + 'properties': {'Applications': {'items': {'$ref': '#/definitions/ApplicationDeploy'}, + 'type': 'array'}}, + 'required': ['Applications'], + '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': {'UnitNames': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'required': ['UnitNames'], + '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'], + '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'}, + 'GetApplicationConstraints': {'additionalProperties': False, + 'properties': {'ApplicationName': {'type': 'string'}}, + 'required': ['ApplicationName'], + 'type': 'object'}, + 'GetConstraintsResults': {'additionalProperties': False, + 'properties': {'Constraints': {'$ref': '#/definitions/Value'}}, + 'required': ['Constraints'], + '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'}, + 'SetConstraints': {'additionalProperties': False, + 'properties': {'ApplicationName': {'type': 'string'}, + 'Constraints': {'$ref': '#/definitions/Value'}}, + 'required': ['ApplicationName', + '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/AddApplicationUnits'}, + 'Result': {'$ref': '#/definitions/AddApplicationUnitsResults'}}, + 'type': 'object'}, + 'CharmRelations': {'properties': {'Params': {'$ref': '#/definitions/ApplicationCharmRelations'}, + 'Result': {'$ref': '#/definitions/ApplicationCharmRelationsResults'}}, + 'type': 'object'}, + 'Deploy': {'properties': {'Params': {'$ref': '#/definitions/ApplicationsDeploy'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'Destroy': {'properties': {'Params': {'$ref': '#/definitions/ApplicationDestroy'}}, + 'type': 'object'}, + 'DestroyRelation': {'properties': {'Params': {'$ref': '#/definitions/DestroyRelation'}}, + 'type': 'object'}, + 'DestroyUnits': {'properties': {'Params': {'$ref': '#/definitions/DestroyApplicationUnits'}}, + 'type': 'object'}, + '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'}, + '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(AddRelationResults) + async def AddRelation(self, endpoints): + ''' + endpoints : typing.Sequence[str] + Returns -> typing.Mapping[str, ~Relation] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Application', Request='AddRelation', Version=1, Params=params) + params['Endpoints'] = endpoints + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(AddApplicationUnitsResults) + async def AddUnits(self, applicationname, numunits, placement): + ''' + applicationname : str + numunits : int + placement : typing.Sequence[~Placement] + Returns -> typing.Sequence[str] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Application', Request='AddUnits', Version=1, Params=params) + params['ApplicationName'] = applicationname + params['NumUnits'] = numunits + params['Placement'] = placement + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ApplicationCharmRelationsResults) + async def CharmRelations(self, applicationname): + ''' + applicationname : str + Returns -> typing.Sequence[str] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Application', Request='CharmRelations', Version=1, Params=params) + params['ApplicationName'] = applicationname + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def Deploy(self, applications): + ''' + applications : typing.Sequence[~ApplicationDeploy] + Returns -> typing.Sequence[~ErrorResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Application', Request='Deploy', Version=1, Params=params) + params['Applications'] = applications + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(None) + async def Destroy(self, applicationname): + ''' + applicationname : str + Returns -> None + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Application', Request='Destroy', Version=1, Params=params) + params['ApplicationName'] = applicationname + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(None) + async def DestroyRelation(self, endpoints): + ''' + endpoints : typing.Sequence[str] + Returns -> None + ''' + # map input types to rpc msg + params = dict() + 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, unitnames): + ''' + unitnames : typing.Sequence[str] + Returns -> None + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Application', Request='DestroyUnits', Version=1, Params=params) + params['UnitNames'] = unitnames + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(None) + async def Expose(self, applicationname): + ''' + applicationname : str + Returns -> None + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Application', Request='Expose', Version=1, Params=params) + params['ApplicationName'] = applicationname + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ApplicationGetResults) + async def Get(self, applicationname): + ''' + applicationname : str + Returns -> typing.Union[str, typing.Mapping[str, typing.Any], _ForwardRef('Value')] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Application', Request='Get', Version=1, Params=params) + params['ApplicationName'] = applicationname + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(StringResult) + async def GetCharmURL(self, applicationname): + ''' + applicationname : str + Returns -> typing.Union[_ForwardRef('Error'), str] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Application', Request='GetCharmURL', Version=1, Params=params) + params['ApplicationName'] = applicationname + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(GetConstraintsResults) + async def GetConstraints(self, applicationname): + ''' + applicationname : str + Returns -> Value + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Application', Request='GetConstraints', Version=1, Params=params) + params['ApplicationName'] = applicationname + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(None) + async def Set(self, applicationname, options): + ''' + applicationname : str + options : typing.Mapping[str, str] + Returns -> None + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Application', Request='Set', Version=1, Params=params) + params['ApplicationName'] = applicationname + params['Options'] = options + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(None) + async def SetCharm(self, applicationname, charmurl, cs_channel, forceseries, forceunits, resourceids): + ''' + applicationname : str + charmurl : str + cs_channel : str + forceseries : bool + forceunits : bool + resourceids : typing.Mapping[str, str] + Returns -> None + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Application', Request='SetCharm', Version=1, Params=params) + params['applicationname'] = applicationname + params['charmurl'] = charmurl + params['cs-channel'] = cs_channel + params['forceseries'] = forceseries + params['forceunits'] = forceunits + params['resourceids'] = resourceids + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(None) + async def SetConstraints(self, applicationname, constraints): + ''' + applicationname : str + constraints : Value + Returns -> None + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Application', Request='SetConstraints', Version=1, Params=params) + params['ApplicationName'] = applicationname + params['Constraints'] = constraints + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def SetMetricCredentials(self, creds): + ''' + creds : typing.Sequence[~ApplicationMetricCredential] + Returns -> typing.Sequence[~ErrorResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Application', Request='SetMetricCredentials', Version=1, Params=params) + params['Creds'] = creds + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(None) + async def Unexpose(self, applicationname): + ''' + applicationname : str + Returns -> None + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Application', Request='Unexpose', Version=1, Params=params) + params['ApplicationName'] = applicationname + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(None) + async def Unset(self, applicationname, options): + ''' + applicationname : str + options : typing.Sequence[str] + Returns -> None + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Application', Request='Unset', Version=1, Params=params) + params['ApplicationName'] = applicationname + params['Options'] = options + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(None) + async def Update(self, applicationname, charmurl, constraints, forcecharmurl, forceseries, minunits, settingsstrings, settingsyaml): + ''' + applicationname : str + charmurl : str + constraints : Value + forcecharmurl : bool + forceseries : bool + minunits : int + settingsstrings : typing.Mapping[str, str] + settingsyaml : str + Returns -> None + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Application', Request='Update', Version=1, Params=params) + params['ApplicationName'] = applicationname + params['CharmUrl'] = charmurl + params['Constraints'] = constraints + params['ForceCharmUrl'] = forcecharmurl + params['ForceSeries'] = forceseries + params['MinUnits'] = minunits + params['SettingsStrings'] = settingsstrings + params['SettingsYAML'] = settingsyaml + reply = await self.rpc(msg) + return reply + + +class ApplicationScaler(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'}, + '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'}, + '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'}}, + 'type': 'object'} + + + @ReturnMapping(ErrorResults) + async def Rescale(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~ErrorResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='ApplicationScaler', Request='Rescale', Version=1, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(StringsWatchResult) + async def Watch(self): + ''' + + Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='ApplicationScaler', Request='Watch', Version=1, Params=params) + + reply = await self.rpc(msg) + return reply + + +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'}, + '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', + 'ChecksumFormat', + 'Size', + 'Stored', + 'Started', + 'Finished', + 'Notes', + 'Model', + 'Machine', + 'Hostname', + 'Version', + 'Series', + '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): + ''' + 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(None) + async def FinishRestore(self): + ''' + + Returns -> None + ''' + # 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 + + + + @ReturnMapping(BackupsMetadataResult) + async def Info(self, id_): + ''' + id_ : str + Returns -> typing.Union[str, int, _ForwardRef('Number')] + ''' + # 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 + + + + @ReturnMapping(BackupsListResult) + async def List(self): + ''' + + Returns -> typing.Sequence[~BackupsMetadataResult] + ''' + # 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 + + + + @ReturnMapping(None) + async def PrepareRestore(self): + ''' + + Returns -> None + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Backups', Request='PrepareRestore', Version=1, Params=params) + + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(None) + async def Remove(self, id_): + ''' + id_ : str + Returns -> None + ''' + # 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 + + + + @ReturnMapping(None) + async def Restore(self, backupid): + ''' + backupid : str + Returns -> None + ''' + # 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 + + +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): + ''' + + Returns -> typing.Sequence[~BlockResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Block', Request='List', Version=2, Params=params) + + reply = await self.rpc(msg) + return reply + + + + @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_): + ''' + message : str + type_ : str + Returns -> Error + ''' + # 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 + + +class CharmRevisionUpdater(Type): + name = 'CharmRevisionUpdater' + 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'}, + '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): + ''' + + Returns -> Error + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='CharmRevisionUpdater', Request='UpdateLatestRevisions', Version=2, Params=params) + + reply = await self.rpc(msg) + return reply + + +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): + ''' + charmurl : str + Returns -> str + ''' + # 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 + + + + @ReturnMapping(IsMeteredResult) + async def IsMetered(self, charmurl): + ''' + charmurl : str + Returns -> bool + ''' + # 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 + + + + @ReturnMapping(CharmsListResult) + async def List(self, names): + ''' + names : typing.Sequence[str] + Returns -> typing.Sequence[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 + + +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'} + + + @ReturnMapping(None) + async def Cleanup(self): + ''' + + Returns -> None + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Cleaner', Request='Cleanup', Version=2, Params=params) + + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(NotifyWatchResult) + async def WatchCleanups(self): + ''' + + Returns -> typing.Union[_ForwardRef('Error'), str] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Cleaner', Request='WatchCleanups', Version=2, Params=params) + + reply = await self.rpc(msg) + return reply + + +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'}, + 'ApplicationStatus': {'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'}, + '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': {'ApplicationName': {'type': 'string'}, + 'Name': {'type': 'string'}, + 'Role': {'type': 'string'}, + 'Subordinate': {'type': 'boolean'}}, + 'required': ['ApplicationName', + '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': {'Applications': {'patternProperties': {'.*': {'$ref': '#/definitions/ApplicationStatus'}}, + 'type': 'object'}, + 'AvailableVersion': {'type': 'string'}, + 'Machines': {'patternProperties': {'.*': {'$ref': '#/definitions/MachineStatus'}}, + 'type': 'object'}, + 'ModelName': {'type': 'string'}, + 'Relations': {'items': {'$ref': '#/definitions/RelationStatus'}, + 'type': 'array'}}, + 'required': ['ModelName', + 'AvailableVersion', + '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'}, + 'AvailabilityZone': {'type': 'string'}, + 'CpuCores': {'type': 'integer'}, + 'CpuPower': {'type': 'integer'}, + 'Mem': {'type': 'integer'}, + 'RootDisk': {'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'}, + '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': {'Cloud': {'type': 'string'}, + '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', + 'Cloud', + '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'}, + 'SetConstraints': {'additionalProperties': False, + 'properties': {'ApplicationName': {'type': 'string'}, + 'Constraints': {'$ref': '#/definitions/Value'}}, + 'required': ['ApplicationName', + 'Constraints'], + 'type': 'object'}, + 'SetModelAgentVersion': {'additionalProperties': False, + 'properties': {'Version': {'$ref': '#/definitions/Number'}}, + 'required': ['Version'], + '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'}, + '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/StatusHistoryRequests'}, + 'Result': {'$ref': '#/definitions/StatusHistoryResults'}}, + 'type': 'object'}, + 'WatchAll': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherId'}}, + 'type': 'object'}}, + 'type': 'object'} + + + @ReturnMapping(APIHostPortsResult) + async def APIHostPorts(self): + ''' + + Returns -> typing.Sequence[~HostPort] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Client', Request='APIHostPorts', Version=1, Params=params) + + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(None) + async def AbortCurrentUpgrade(self): + ''' + + Returns -> None + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Client', Request='AbortCurrentUpgrade', Version=1, Params=params) + + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(None) + async def AddCharm(self, channel, url): + ''' + channel : str + url : str + Returns -> None + ''' + # 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 + + + + @ReturnMapping(None) + async def AddCharmWithAuthorization(self, channel, charmstoremacaroon, url): + ''' + channel : str + charmstoremacaroon : Macaroon + url : str + Returns -> None + ''' + # 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 + + + + @ReturnMapping(AddMachinesResults) + async def AddMachines(self, machineparams): + ''' + machineparams : typing.Sequence[~AddMachineParams] + Returns -> typing.Sequence[~AddMachinesResult] + ''' + # 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 + + + + @ReturnMapping(AddMachinesResults) + async def AddMachinesV2(self, machineparams): + ''' + machineparams : typing.Sequence[~AddMachineParams] + Returns -> typing.Sequence[~AddMachinesResult] + ''' + # 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 + + + + @ReturnMapping(AgentVersionResult) + async def AgentVersion(self): + ''' + + Returns -> Number + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Client', Request='AgentVersion', Version=1, Params=params) + + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(CharmInfo) + async def CharmInfo(self, charmurl): + ''' + charmurl : str + Returns -> str + ''' + # 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 + + + + @ReturnMapping(None) + async def DestroyMachines(self, force, machinenames): + ''' + force : bool + machinenames : typing.Sequence[str] + Returns -> None + ''' + # 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 + + + + @ReturnMapping(None) + async def DestroyModel(self): + ''' + + Returns -> None + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Client', Request='DestroyModel', Version=1, Params=params) + + reply = await self.rpc(msg) + return reply + + + + @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='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 + + + + @ReturnMapping(FullStatus) + async def FullStatus(self, patterns): + ''' + patterns : typing.Sequence[str] + Returns -> typing.Union[typing.Mapping[str, ~MachineStatus], typing.Sequence[~RelationStatus]] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Client', Request='FullStatus', Version=1, Params=params) + params['Patterns'] = patterns + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(GetBundleChangesResults) + async def GetBundleChanges(self, yaml): + ''' + yaml : str + Returns -> typing.Sequence[~BundleChangesChange] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Client', Request='GetBundleChanges', Version=1, Params=params) + params['yaml'] = yaml + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(GetConstraintsResults) + async def GetModelConstraints(self): + ''' + + Returns -> Value + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Client', Request='GetModelConstraints', Version=1, Params=params) + + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(AddMachinesResults) + async def InjectMachines(self, machineparams): + ''' + machineparams : typing.Sequence[~AddMachineParams] + Returns -> typing.Sequence[~AddMachinesResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Client', Request='InjectMachines', Version=1, Params=params) + params['MachineParams'] = machineparams + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ModelConfigResults) + async def ModelGet(self): + ''' + + Returns -> typing.Mapping[str, typing.Any] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Client', Request='ModelGet', Version=1, Params=params) + + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ModelInfo) + async def ModelInfo(self): + ''' + + Returns -> typing.Union[_ForwardRef('EntityStatus'), typing.Sequence[~ModelUserInfo]] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Client', Request='ModelInfo', Version=1, Params=params) + + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(None) + async def ModelSet(self, config): + ''' + config : typing.Mapping[str, typing.Any] + Returns -> None + ''' + # map input types to rpc msg + params = dict() + 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[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(ModelUserInfoResults) + async def ModelUserInfo(self): + ''' + + Returns -> typing.Sequence[~ModelUserInfoResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Client', Request='ModelUserInfo', Version=1, Params=params) + + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(PrivateAddressResults) + async def PrivateAddress(self, target): + ''' + target : str + Returns -> str + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Client', Request='PrivateAddress', Version=1, Params=params) + params['Target'] = target + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ProvisioningScriptResult) + async def ProvisioningScript(self, datadir, disablepackagecommands, machineid, nonce): + ''' + datadir : str + disablepackagecommands : bool + machineid : str + nonce : str + Returns -> str + ''' + # 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 + reply = await self.rpc(msg) + return reply + + + + @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 + + + + @ReturnMapping(ResolveCharmResults) + async def ResolveCharms(self, references): + ''' + references : typing.Sequence[~URL] + Returns -> typing.Sequence[~ResolveCharmResult] + ''' + # map input types to rpc msg + params = dict() + 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, unitname): + ''' + retry : bool + unitname : 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['UnitName'] = unitname + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def RetryProvisioning(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~ErrorResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Client', Request='RetryProvisioning', Version=1, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(None) + async def SetModelAgentVersion(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='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(None) + async def SetModelConstraints(self, applicationname, constraints): + ''' + applicationname : str + constraints : Value + Returns -> None + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Client', Request='SetModelConstraints', Version=1, Params=params) + params['ApplicationName'] = applicationname + params['Constraints'] = constraints + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(StatusHistoryResults) + async def StatusHistory(self, requests): + ''' + requests : typing.Sequence[~StatusHistoryRequest] + Returns -> typing.Sequence[~StatusHistoryResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Client', Request='StatusHistory', Version=1, Params=params) + params['Requests'] = requests + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(AllWatcherId) + async def WatchAll(self): + ''' + + Returns -> str + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Client', Request='WatchAll', Version=1, Params=params) + + reply = await self.rpc(msg) + return reply + + +class Controller(Type): + name = 'Controller' + version = 3 + 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': {'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'}, + '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): + ''' + + Returns -> typing.Sequence[~UserModel] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Controller', Request='AllModels', Version=3, Params=params) + + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(None) + async def DestroyController(self, destroy_models): + ''' + destroy_models : bool + Returns -> None + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Controller', Request='DestroyController', Version=3, Params=params) + params['destroy-models'] = destroy_models + reply = await self.rpc(msg) + return reply + + + + @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=3, Params=params) + params['specs'] = specs + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ModelBlockInfoList) + async def ListBlockedModels(self): + ''' + + Returns -> typing.Sequence[~ModelBlockInfo] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Controller', Request='ListBlockedModels', Version=3, Params=params) + + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ModelConfigResults) + async def ModelConfig(self): + ''' + + Returns -> typing.Mapping[str, typing.Any] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Controller', Request='ModelConfig', Version=3, Params=params) + + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ModelStatusResults) + async def ModelStatus(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~ModelStatus] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Controller', Request='ModelStatus', Version=3, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(None) + async def RemoveBlocks(self, all_): + ''' + all_ : bool + Returns -> None + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Controller', Request='RemoveBlocks', Version=3, Params=params) + params['all'] = all_ + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(AllWatcherId) + async def WatchAllModels(self): + ''' + + Returns -> str + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Controller', Request='WatchAllModels', Version=3, 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'}, + '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'}, + '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'}, + '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'], + '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'}}, + '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): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~ErrorResult] + ''' + # map input types to rpc msg + params = dict() + 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[~EntityPassword] + Returns -> typing.Sequence[~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 + + + + @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'}, + 'type': 'array'}}, + 'required': ['SpaceTag'], + 'type': 'object'}, + 'AddSubnetsParams': {'additionalProperties': False, + 'properties': {'Subnets': {'items': {'$ref': '#/definitions/AddSubnetParams'}, + 'type': 'array'}}, + 'required': ['Subnets'], + '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'], + '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'], + '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'}, + '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'], + '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'], + 'type': 'object'}, + 'SubnetsFilters': {'additionalProperties': False, + 'properties': {'SpaceTag': {'type': 'string'}, + 'Zone': {'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': {'AddSubnets': {'properties': {'Params': {'$ref': '#/definitions/AddSubnetsParams'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + '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[~AddSubnetParams] + Returns -> typing.Sequence[~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[~CreateSpaceParams] + Returns -> typing.Sequence[~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[~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, spacetag, zone): + ''' + spacetag : str + zone : str + Returns -> typing.Sequence[~Subnet] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='DiscoverSpaces', Request='ListSubnets', Version=2, Params=params) + params['SpaceTag'] = spacetag + params['Zone'] = zone + 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='DiscoverSpaces', Request='ModelConfig', Version=2, Params=params) + + 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): + ''' + machineblockdevices : typing.Sequence[~MachineBlockDevices] + Returns -> typing.Sequence[~ErrorResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='DiskManager', Request='SetMachineBlockDevices', Version=2, Params=params) + params['machineblockdevices'] = machineblockdevices + 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): + ''' + + Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='EntityWatcher', Request='Next', Version=2, 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='EntityWatcher', Request='Stop', Version=2, Params=params) + + 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): + ''' + + Returns -> typing.Union[typing.Sequence[~MachineStorageId], _ForwardRef('Error')] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='FilesystemAttachmentsWatcher', Request='Next', Version=2, 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='FilesystemAttachmentsWatcher', Request='Stop', Version=2, Params=params) + + reply = await self.rpc(msg) + return reply + + +class Firewaller(Type): + name = 'Firewaller' + version = 3 + 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=3, 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=3, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(StringsResults) + async def GetMachineActiveSubnets(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~StringsResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Firewaller', Request='GetMachineActiveSubnets', Version=3, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(MachinePortsResults) + async def GetMachinePorts(self, params): + ''' + params : typing.Sequence[~MachinePorts] + Returns -> typing.Sequence[~MachinePortsResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Firewaller', Request='GetMachinePorts', Version=3, Params=params) + params['Params'] = params + 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='Firewaller', Request='InstanceId', Version=3, 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='Firewaller', 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[str, typing.Any] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Firewaller', Request='ModelConfig', Version=3, Params=params) + + 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='Firewaller', Request='Watch', Version=3, 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='Firewaller', Request='WatchForModelConfigChanges', Version=3, Params=params) + + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(StringsWatchResult) + async def WatchModelMachines(self): + ''' + + Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Firewaller', Request='WatchModelMachines', Version=3, 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=3, Params=params) + params['Entities'] = entities + 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='Firewaller', Request='WatchUnits', Version=3, Params=params) + params['Entities'] = entities + 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): + ''' + specs : typing.Sequence[~ControllersSpec] + Returns -> typing.Sequence[~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[~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[~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 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): + ''' + entity_keys : typing.Sequence[~SSHHostKeys] + Returns -> typing.Sequence[~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 ImageManager(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'}, + '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'}, + '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, + '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'}}, + '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[~ImageSpec] + Returns -> typing.Sequence[~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[~ImageSpec] + Returns -> typing.Sequence[~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 ImageMetadata(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'}, + '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'}, + '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'}}, + 'type': 'object'} + + + @ReturnMapping(ErrorResults) + async def Delete(self, image_ids): + ''' + image_ids : typing.Sequence[str] + Returns -> typing.Sequence[~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[str] + region : str + root_storage_type : str + series : typing.Sequence[str] + stream : str + virt_type : str + Returns -> typing.Sequence[~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[~CloudImageMetadataList] + Returns -> typing.Sequence[~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 InstancePoller(Type): + name = 'InstancePoller' + version = 3 + 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'], + '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'}, + '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'}, + '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'}}, + '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=3, 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=3, 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=3, 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=3, 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=3, 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=3, 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] + ''' + # 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, machineaddresses): + ''' + machineaddresses : typing.Sequence[~MachineAddresses] + Returns -> typing.Sequence[~ErrorResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='InstancePoller', Request='SetProviderAddresses', Version=3, Params=params) + params['MachineAddresses'] = machineaddresses + reply = await self.rpc(msg) + return reply + + + + @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=3, 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=3, Params=params) + + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(StringsWatchResult) + async def WatchModelMachines(self): + ''' + + Returns -> typing.Union[typing.Sequence[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 KeyManager(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'}, + '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'], + 'type': 'object'}, + 'ModifyUserSSHKeys': {'additionalProperties': False, + 'properties': {'Keys': {'items': {'type': 'string'}, + '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'}}, + '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'}, + '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'}, + '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': {'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[~Entity] + Returns -> typing.Sequence[~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[~Entity] + Returns -> typing.Sequence[~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 LeadershipService(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': {'ApplicationTag': {'type': 'string'}, + 'DurationSeconds': {'type': 'number'}, + 'UnitTag': {'type': 'string'}}, + 'required': ['ApplicationTag', + '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'}, + '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/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[~ClaimLeadershipParams] + Returns -> typing.Sequence[~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 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): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~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[~Entity] + Returns -> typing.Sequence[~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 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): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~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[~Entity] + Returns -> typing.Sequence[~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 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): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~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[~Entity] + Returns -> typing.Sequence[~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[~ActionExecutionResult] + Returns -> typing.Sequence[~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[~Entity] + Returns -> typing.Sequence[~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[~Entity] + Returns -> typing.Sequence[~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 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): + ''' + machineparams : typing.Sequence[~AddMachineParams] + Returns -> typing.Sequence[~AddMachinesResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='MachineManager', Request='AddMachines', Version=2, Params=params) + params['MachineParams'] = machineparams + 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): + ''' + + Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[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[~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[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[~Entity] + Returns -> typing.Sequence[~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[~Entity] + Returns -> typing.Sequence[~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[~Entity] + Returns -> typing.Sequence[~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, machineaddresses): + ''' + machineaddresses : typing.Sequence[~MachineAddresses] + Returns -> typing.Sequence[~ErrorResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Machiner', Request='SetMachineAddresses', Version=1, Params=params) + params['MachineAddresses'] = machineaddresses + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(None) + async def SetObservedNetworkConfig(self, config, tag): + ''' + config : typing.Sequence[~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[~Entity] + Returns -> typing.Sequence[~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[~EntityStatusArgs] + Returns -> typing.Sequence[~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[~EntityStatusArgs] + Returns -> typing.Sequence[~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[~Entity] + Returns -> typing.Sequence[~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[_ForwardRef('Error'), str] + ''' + # 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 MeterStatus(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'}, + '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'}, + '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'}}, + '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[~Entity] + Returns -> typing.Sequence[~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[~Entity] + Returns -> typing.Sequence[~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 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): + ''' + batches : typing.Sequence[~MetricBatchParam] + Returns -> typing.Sequence[~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 MetricsDebug(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'}, + '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): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~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[~MeterStatusParam] + Returns -> typing.Sequence[~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 MetricsManager(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'}, + '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': {'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[~Entity] + Returns -> typing.Sequence[~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[~Entity] + Returns -> typing.Sequence[~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 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): + ''' + + Returns -> typing.Sequence[int] + ''' + # 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(FullMigrationStatus) + async def GetMigrationStatus(self): + ''' + + Returns -> typing.Union[int, str, _ForwardRef('ModelMigrationSpec')] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='MigrationMaster', Request='GetMigrationStatus', 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(NotifyWatchResult) + async def Watch(self): + ''' + + Returns -> typing.Union[_ForwardRef('Error'), str] + ''' + # 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 + + +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): + ''' + + Returns -> typing.Union[_ForwardRef('Error'), str] + ''' + # 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 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): + ''' + + Returns -> typing.Union[int, typing.Sequence[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 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): + ''' + 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_): + ''' + bytes_ : typing.Sequence[int] + Returns -> None + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='MigrationTarget', Request='Import', Version=1, Params=params) + params['bytes'] = bytes_ + 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'}, + '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'}, + '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'}, + 'ModelConfigResult': {'additionalProperties': False, + 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True, + 'type': 'object'}}, + 'type': 'object'}}, + 'required': ['Config'], + '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': {'Cloud': {'type': 'string'}, + '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', + 'Cloud', + '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'], + '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'}}, + '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'}}, + 'type': 'object'}, + 'ModifyModelAccess': {'properties': {'Params': {'$ref': '#/definitions/ModifyModelAccessRequest'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}}, + 'type': 'object'} + + + @ReturnMapping(ModelConfigResult) + async def ConfigSkeleton(self, provider, region): + ''' + provider : str + region : str + Returns -> typing.Mapping[str, typing.Any] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='ModelManager', Request='ConfigSkeleton', Version=2, Params=params) + params['Provider'] = provider + params['Region'] = region + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(Model) + async def CreateModel(self, account, config, ownertag): + ''' + account : typing.Mapping[str, typing.Any] + config : typing.Mapping[str, typing.Any] + ownertag : str + Returns -> + ''' + # 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 + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(UserModelList) + async def ListModels(self, tag): + ''' + tag : str + Returns -> typing.Sequence[~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[~Entity] + Returns -> typing.Sequence[~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[~ModifyModelAccess] + Returns -> typing.Sequence[~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 NotifyWatcher(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 Pinger(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 Provisioner(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'}, + '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'}, + 'ProviderType': {'type': 'string'}, + 'Proxy': {'$ref': '#/definitions/Settings'}, + 'SSLHostnameVerification': {'type': 'boolean'}, + 'UpdateBehavior': {'$ref': '#/definitions/UpdateBehavior'}}, + 'required': ['ProviderType', + 'AuthorizedKeys', + 'SSLHostnameVerification', + 'Proxy', + 'AptProxy', + 'AptMirror', + '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'], + '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'}, + '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'}, + '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'}, + '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'}, + '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'}, + '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'], + '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'], + 'type': 'object'}, + 'ToolsResult': {'additionalProperties': False, + 'properties': {'DisableSSLHostnameVerification': {'type': 'boolean'}, + 'Error': {'$ref': '#/definitions/Error'}, + 'ToolsList': {'items': {'$ref': '#/definitions/Tools'}, + 'type': 'array'}}, + 'required': ['ToolsList', + 'DisableSSLHostnameVerification', + 'Error'], + 'type': 'object'}, + 'ToolsResults': {'additionalProperties': False, + 'properties': {'Results': {'items': {'$ref': '#/definitions/ToolsResult'}, + 'type': 'array'}}, + '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'}}, + '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'}}, + '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'}, + '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 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=3, 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=3, 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='Provisioner', Request='CACert', Version=3, Params=params) + + reply = await self.rpc(msg) + return reply + + + + @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=3, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ContainerConfig) + async def ContainerConfig(self): + ''' + + Returns -> typing.Union[bool, str, _ForwardRef('Settings'), _ForwardRef('Settings'), _ForwardRef('UpdateBehavior')] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Provisioner', Request='ContainerConfig', Version=3, Params=params) + + reply = await self.rpc(msg) + return reply + + + + @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=3, Params=params) + params['Type'] = type_ + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(DistributionGroupResults) + async def DistributionGroup(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~DistributionGroupResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Provisioner', Request='DistributionGroup', Version=3, 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] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Provisioner', Request='EnsureDead', Version=3, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @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=3, 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] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Provisioner', Request='GetContainerInterfaceInfo', Version=3, 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='Provisioner', 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[~Entity] + Returns -> typing.Sequence[~StatusResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Provisioner', 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[~Entity] + Returns -> typing.Sequence[~LifeResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Provisioner', Request='Life', Version=3, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(StatusResults) + async def MachinesWithTransientErrors(self): + ''' + + Returns -> typing.Sequence[~StatusResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Provisioner', Request='MachinesWithTransientErrors', Version=3, Params=params) + + 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='Provisioner', Request='ModelConfig', Version=3, Params=params) + + 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='Provisioner', Request='ModelUUID', Version=3, Params=params) + + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(MachineNetworkConfigResults) + async def PrepareContainerInterfaceInfo(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~MachineNetworkConfigResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Provisioner', Request='PrepareContainerInterfaceInfo', Version=3, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ProvisioningInfoResults) + async def ProvisioningInfo(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~ProvisioningInfoResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Provisioner', Request='ProvisioningInfo', Version=3, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def ReleaseContainerAddresses(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~ErrorResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Provisioner', Request='ReleaseContainerAddresses', Version=3, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def Remove(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~ErrorResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Provisioner', Request='Remove', Version=3, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(StringResults) + async def Series(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~StringResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Provisioner', Request='Series', Version=3, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def SetInstanceInfo(self, machines): + ''' + machines : typing.Sequence[~InstanceInfo] + Returns -> typing.Sequence[~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): + ''' + entities : typing.Sequence[~EntityStatusArgs] + Returns -> typing.Sequence[~ErrorResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Provisioner', Request='SetInstanceStatus', Version=3, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def SetPasswords(self, changes): + ''' + changes : typing.Sequence[~EntityPassword] + Returns -> typing.Sequence[~ErrorResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Provisioner', Request='SetPasswords', Version=3, Params=params) + params['Changes'] = changes + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def SetStatus(self, entities): + ''' + entities : typing.Sequence[~EntityStatusArgs] + Returns -> typing.Sequence[~ErrorResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Provisioner', Request='SetStatus', Version=3, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def SetSupportedContainers(self, params): + ''' + params : typing.Sequence[~MachineContainers] + Returns -> typing.Sequence[~ErrorResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Provisioner', Request='SetSupportedContainers', Version=3, Params=params) + params['Params'] = params + 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='Provisioner', Request='StateAddresses', 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] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Provisioner', Request='Status', Version=3, 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] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Provisioner', Request='Tools', Version=3, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @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=3, Params=params) + params['Entities'] = entities + 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='Provisioner', Request='WatchAPIHostPorts', Version=3, Params=params) + + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(StringsWatchResults) + async def WatchAllContainers(self, params): + ''' + params : typing.Sequence[~WatchContainer] + Returns -> typing.Sequence[~StringsWatchResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Provisioner', Request='WatchAllContainers', Version=3, Params=params) + params['Params'] = params + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(StringsWatchResults) + async def WatchContainers(self, params): + ''' + params : typing.Sequence[~WatchContainer] + Returns -> typing.Sequence[~StringsWatchResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Provisioner', Request='WatchContainers', Version=3, Params=params) + params['Params'] = params + 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='Provisioner', Request='WatchForModelConfigChanges', Version=3, Params=params) + + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(NotifyWatchResult) + async def WatchMachineErrorRetry(self): + ''' + + Returns -> typing.Union[_ForwardRef('Error'), str] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Provisioner', Request='WatchMachineErrorRetry', Version=3, Params=params) + + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(StringsWatchResult) + async def WatchModelMachines(self): + ''' + + Returns -> typing.Union[typing.Sequence[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 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): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~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[~Entity] + Returns -> typing.Sequence[~NotifyWatchResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='ProxyUpdater', Request='WatchForProxyConfigAndAPIHostPortChanges', Version=1, Params=params) + params['Entities'] = entities + 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): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~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[~Entity] + Returns -> typing.Sequence[~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[~Entity] + Returns -> typing.Sequence[~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[_ForwardRef('Error'), str] + ''' + # 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 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): + ''' + + 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='RelationUnitsWatcher', Request='Stop', Version=1, Params=params) + + 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): + ''' + + Returns -> None + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Resumer', Request='ResumeTransactions', Version=2, 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): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~RetryStrategyResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='RetryStrategy', Request='RetryStrategy', Version=1, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(NotifyWatchResults) + async def WatchRetryStrategy(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~NotifyWatchResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='RetryStrategy', Request='WatchRetryStrategy', Version=1, 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): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~SSHAddressResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='SSHClient', Request='PrivateAddress', Version=1, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @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 + + + + @ReturnMapping(SSHAddressResults) + async def PublicAddress(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~SSHAddressResult] + ''' + # map input types to rpc msg + params = dict() + 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[~Entity] + Returns -> typing.Sequence[~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): + name = 'Singular' + 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'}, + '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'}, + 'SingularClaim': {'additionalProperties': False, + 'properties': {'ControllerTag': {'type': 'string'}, + 'Duration': {'type': 'integer'}, + 'ModelTag': {'type': 'string'}}, + 'required': ['ModelTag', + 'ControllerTag', + 'Duration'], + 'type': 'object'}, + 'SingularClaims': {'additionalProperties': False, + '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'}}, + 'properties': {'Claim': {'properties': {'Params': {'$ref': '#/definitions/SingularClaims'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'Wait': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}}, + 'type': 'object'} + + + @ReturnMapping(ErrorResults) + async def Claim(self, claims): + ''' + claims : typing.Sequence[~SingularClaim] + Returns -> typing.Sequence[~ErrorResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Singular', Request='Claim', Version=1, Params=params) + params['Claims'] = claims + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def Wait(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~ErrorResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Singular', Request='Wait', Version=1, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + +class Spaces(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'], + 'type': 'object'}, + 'CreateSpacesParams': {'additionalProperties': False, + 'properties': {'Spaces': {'items': {'$ref': '#/definitions/CreateSpaceParams'}, + 'type': 'array'}}, + 'required': ['Spaces'], + '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'}, + 'ListSpacesResults': {'additionalProperties': False, + 'properties': {'Results': {'items': {'$ref': '#/definitions/Space'}, + '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'}, + 'Space': {'additionalProperties': False, + 'properties': {'Error': {'$ref': '#/definitions/Error'}, + 'Name': {'type': 'string'}, + 'Subnets': {'items': {'$ref': '#/definitions/Subnet'}, + 'type': 'array'}}, + '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'}, + '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'], + 'type': 'object'}}, + 'properties': {'CreateSpaces': {'properties': {'Params': {'$ref': '#/definitions/CreateSpacesParams'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'ListSpaces': {'properties': {'Result': {'$ref': '#/definitions/ListSpacesResults'}}, + 'type': 'object'}}, + 'type': 'object'} + + + @ReturnMapping(ErrorResults) + async def CreateSpaces(self, spaces): + ''' + spaces : typing.Sequence[~CreateSpaceParams] + Returns -> typing.Sequence[~ErrorResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Spaces', Request='CreateSpaces', Version=2, Params=params) + params['Spaces'] = spaces + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ListSpacesResults) + async def ListSpaces(self): + ''' + + Returns -> typing.Sequence[~Space] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Spaces', Request='ListSpaces', Version=2, Params=params) + + reply = await self.rpc(msg) + return reply + + +class StatusHistory(Type): + name = 'StatusHistory' + version = 2 + schema = {'definitions': {'StatusHistoryPruneArgs': {'additionalProperties': False, + 'properties': {'MaxHistoryMB': {'type': 'integer'}, + 'MaxHistoryTime': {'type': 'integer'}}, + 'required': ['MaxHistoryTime', + 'MaxHistoryMB'], + 'type': 'object'}}, + 'properties': {'Prune': {'properties': {'Params': {'$ref': '#/definitions/StatusHistoryPruneArgs'}}, + 'type': 'object'}}, + 'type': 'object'} + + + @ReturnMapping(None) + async def Prune(self, maxhistorymb, maxhistorytime): + ''' + maxhistorymb : int + maxhistorytime : int + Returns -> None + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='StatusHistory', Request='Prune', Version=2, Params=params) + params['MaxHistoryMB'] = maxhistorymb + params['MaxHistoryTime'] = maxhistorytime + reply = await self.rpc(msg) + return reply + + +class Storage(Type): + name = 'Storage' + 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', + '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'}, + 'FilesystemAttachmentInfo': {'additionalProperties': False, + 'properties': {'mountpoint': {'type': 'string'}, + 'read-only': {'type': 'boolean'}}, + 'type': 'object'}, + 'FilesystemDetails': {'additionalProperties': False, + 'properties': {'filesystemtag': {'type': 'string'}, + 'info': {'$ref': '#/definitions/FilesystemInfo'}, + 'machineattachments': {'patternProperties': {'.*': {'$ref': '#/definitions/FilesystemAttachmentInfo'}}, + 'type': 'object'}, + 'status': {'$ref': '#/definitions/EntityStatus'}, + 'storage': {'$ref': '#/definitions/StorageDetails'}, + 'volumetag': {'type': 'string'}}, + 'required': ['filesystemtag', + 'info', + 'status'], + 'type': 'object'}, + 'FilesystemDetailsListResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'items': {'$ref': '#/definitions/FilesystemDetails'}, + 'type': 'array'}}, + 'type': 'object'}, + 'FilesystemDetailsListResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemDetailsListResult'}, + 'type': 'array'}}, + 'type': 'object'}, + 'FilesystemFilter': {'additionalProperties': False, + 'properties': {'machines': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'type': 'object'}, + 'FilesystemFilters': {'additionalProperties': False, + 'properties': {'filters': {'items': {'$ref': '#/definitions/FilesystemFilter'}, + 'type': 'array'}}, + 'type': 'object'}, + 'FilesystemInfo': {'additionalProperties': False, + 'properties': {'filesystemid': {'type': 'string'}, + 'size': {'type': 'integer'}}, + 'required': ['filesystemid', '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'}, + 'StorageAddParams': {'additionalProperties': False, + 'properties': {'StorageName': {'type': 'string'}, + 'storage': {'$ref': '#/definitions/StorageConstraints'}, + 'unit': {'type': 'string'}}, + 'required': ['unit', + 'StorageName', + 'storage'], + 'type': 'object'}, + 'StorageAttachmentDetails': {'additionalProperties': False, + 'properties': {'location': {'type': 'string'}, + 'machinetag': {'type': 'string'}, + 'storagetag': {'type': 'string'}, + 'unittag': {'type': 'string'}}, + 'required': ['storagetag', + 'unittag', + 'machinetag'], + 'type': 'object'}, + 'StorageConstraints': {'additionalProperties': False, + 'properties': {'Count': {'type': 'integer'}, + 'Pool': {'type': 'string'}, + 'Size': {'type': 'integer'}}, + 'required': ['Pool', 'Size', 'Count'], + 'type': 'object'}, + 'StorageDetails': {'additionalProperties': False, + 'properties': {'Persistent': {'type': 'boolean'}, + 'attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/StorageAttachmentDetails'}}, + 'type': 'object'}, + 'kind': {'type': 'integer'}, + 'ownertag': {'type': 'string'}, + 'status': {'$ref': '#/definitions/EntityStatus'}, + 'storagetag': {'type': 'string'}}, + 'required': ['storagetag', + 'ownertag', + 'kind', + 'status', + 'Persistent'], + 'type': 'object'}, + 'StorageDetailsListResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'items': {'$ref': '#/definitions/StorageDetails'}, + 'type': 'array'}}, + 'type': 'object'}, + 'StorageDetailsListResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/StorageDetailsListResult'}, + 'type': 'array'}}, + 'type': 'object'}, + 'StorageDetailsResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'$ref': '#/definitions/StorageDetails'}}, + 'type': 'object'}, + 'StorageDetailsResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/StorageDetailsResult'}, + 'type': 'array'}}, + 'type': 'object'}, + 'StorageFilter': {'additionalProperties': False, + 'type': 'object'}, + 'StorageFilters': {'additionalProperties': False, + 'properties': {'filters': {'items': {'$ref': '#/definitions/StorageFilter'}, + 'type': 'array'}}, + 'type': 'object'}, + 'StoragePool': {'additionalProperties': False, + 'properties': {'attrs': {'patternProperties': {'.*': {'additionalProperties': True, + 'type': 'object'}}, + 'type': 'object'}, + 'name': {'type': 'string'}, + 'provider': {'type': 'string'}}, + 'required': ['name', 'provider', 'attrs'], + 'type': 'object'}, + 'StoragePoolFilter': {'additionalProperties': False, + 'properties': {'names': {'items': {'type': 'string'}, + 'type': 'array'}, + 'providers': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'type': 'object'}, + 'StoragePoolFilters': {'additionalProperties': False, + 'properties': {'filters': {'items': {'$ref': '#/definitions/StoragePoolFilter'}, + 'type': 'array'}}, + 'type': 'object'}, + 'StoragePoolsResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'storagepools': {'items': {'$ref': '#/definitions/StoragePool'}, + 'type': 'array'}}, + 'type': 'object'}, + 'StoragePoolsResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/StoragePoolsResult'}, + 'type': 'array'}}, + 'type': 'object'}, + 'StoragesAddParams': {'additionalProperties': False, + 'properties': {'storages': {'items': {'$ref': '#/definitions/StorageAddParams'}, + 'type': 'array'}}, + 'required': ['storages'], + 'type': 'object'}, + 'VolumeAttachmentInfo': {'additionalProperties': False, + 'properties': {'busaddress': {'type': 'string'}, + 'devicelink': {'type': 'string'}, + 'devicename': {'type': 'string'}, + 'read-only': {'type': 'boolean'}}, + 'type': 'object'}, + 'VolumeDetails': {'additionalProperties': False, + 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'}, + 'machineattachments': {'patternProperties': {'.*': {'$ref': '#/definitions/VolumeAttachmentInfo'}}, + 'type': 'object'}, + 'status': {'$ref': '#/definitions/EntityStatus'}, + 'storage': {'$ref': '#/definitions/StorageDetails'}, + 'volumetag': {'type': 'string'}}, + 'required': ['volumetag', 'info', 'status'], + 'type': 'object'}, + 'VolumeDetailsListResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'items': {'$ref': '#/definitions/VolumeDetails'}, + 'type': 'array'}}, + 'type': 'object'}, + 'VolumeDetailsListResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeDetailsListResult'}, + 'type': 'array'}}, + 'type': 'object'}, + 'VolumeFilter': {'additionalProperties': False, + 'properties': {'machines': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'type': 'object'}, + 'VolumeFilters': {'additionalProperties': False, + 'properties': {'filters': {'items': {'$ref': '#/definitions/VolumeFilter'}, + 'type': 'array'}}, + 'type': 'object'}, + 'VolumeInfo': {'additionalProperties': False, + 'properties': {'hardwareid': {'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'}}, + 'properties': {'AddToUnit': {'properties': {'Params': {'$ref': '#/definitions/StoragesAddParams'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'CreatePool': {'properties': {'Params': {'$ref': '#/definitions/StoragePool'}}, + 'type': 'object'}, + 'ListFilesystems': {'properties': {'Params': {'$ref': '#/definitions/FilesystemFilters'}, + 'Result': {'$ref': '#/definitions/FilesystemDetailsListResults'}}, + 'type': 'object'}, + 'ListPools': {'properties': {'Params': {'$ref': '#/definitions/StoragePoolFilters'}, + 'Result': {'$ref': '#/definitions/StoragePoolsResults'}}, + 'type': 'object'}, + 'ListStorageDetails': {'properties': {'Params': {'$ref': '#/definitions/StorageFilters'}, + 'Result': {'$ref': '#/definitions/StorageDetailsListResults'}}, + 'type': 'object'}, + 'ListVolumes': {'properties': {'Params': {'$ref': '#/definitions/VolumeFilters'}, + 'Result': {'$ref': '#/definitions/VolumeDetailsListResults'}}, + 'type': 'object'}, + 'StorageDetails': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/StorageDetailsResults'}}, + 'type': 'object'}}, + 'type': 'object'} + + + @ReturnMapping(ErrorResults) + async def AddToUnit(self, storages): + ''' + storages : typing.Sequence[~StorageAddParams] + Returns -> typing.Sequence[~ErrorResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Storage', Request='AddToUnit', Version=2, Params=params) + params['storages'] = storages + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(None) + async def CreatePool(self, attrs, name, provider): + ''' + attrs : typing.Mapping[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) + params['attrs'] = attrs + params['name'] = name + params['provider'] = provider + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(FilesystemDetailsListResults) + async def ListFilesystems(self, filters): + ''' + filters : typing.Sequence[~FilesystemFilter] + Returns -> typing.Sequence[~FilesystemDetailsListResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Storage', Request='ListFilesystems', Version=2, Params=params) + params['filters'] = filters + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(StoragePoolsResults) + async def ListPools(self, filters): + ''' + filters : typing.Sequence[~StoragePoolFilter] + Returns -> typing.Sequence[~StoragePoolsResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Storage', Request='ListPools', Version=2, Params=params) + params['filters'] = filters + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(StorageDetailsListResults) + async def ListStorageDetails(self, filters): + ''' + filters : typing.Sequence[~StorageFilter] + Returns -> typing.Sequence[~StorageDetailsListResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Storage', Request='ListStorageDetails', Version=2, Params=params) + params['filters'] = filters + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(VolumeDetailsListResults) + async def ListVolumes(self, filters): + ''' + filters : typing.Sequence[~VolumeFilter] + Returns -> typing.Sequence[~VolumeDetailsListResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Storage', Request='ListVolumes', Version=2, Params=params) + params['filters'] = filters + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(StorageDetailsResults) + async def StorageDetails(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~StorageDetailsResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Storage', Request='StorageDetails', Version=2, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + +class StorageProvisioner(Type): + name = 'StorageProvisioner' + 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'}, + 'BlockDeviceResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'$ref': '#/definitions/BlockDevice'}}, + 'required': ['result'], + 'type': 'object'}, + 'BlockDeviceResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/BlockDeviceResult'}, + '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'}, + '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'}, + 'Filesystem': {'additionalProperties': False, + 'properties': {'filesystemtag': {'type': 'string'}, + 'info': {'$ref': '#/definitions/FilesystemInfo'}, + 'volumetag': {'type': 'string'}}, + 'required': ['filesystemtag', 'info'], + 'type': 'object'}, + 'FilesystemAttachment': {'additionalProperties': False, + 'properties': {'filesystemtag': {'type': 'string'}, + 'info': {'$ref': '#/definitions/FilesystemAttachmentInfo'}, + 'machinetag': {'type': 'string'}}, + 'required': ['filesystemtag', + 'machinetag', + 'info'], + 'type': 'object'}, + 'FilesystemAttachmentInfo': {'additionalProperties': False, + 'properties': {'mountpoint': {'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'}, + 'provider': {'type': 'string'}, + 'read-only': {'type': 'boolean'}}, + 'required': ['filesystemtag', + 'machinetag', + 'provider'], + 'type': 'object'}, + 'FilesystemAttachmentParamsResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'$ref': '#/definitions/FilesystemAttachmentParams'}}, + 'required': ['result'], + 'type': 'object'}, + 'FilesystemAttachmentParamsResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemAttachmentParamsResult'}, + 'type': 'array'}}, + 'type': 'object'}, + 'FilesystemAttachmentResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'$ref': '#/definitions/FilesystemAttachment'}}, + 'required': ['result'], + 'type': 'object'}, + 'FilesystemAttachmentResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemAttachmentResult'}, + 'type': 'array'}}, + 'type': 'object'}, + 'FilesystemAttachments': {'additionalProperties': False, + 'properties': {'filesystemattachments': {'items': {'$ref': '#/definitions/FilesystemAttachment'}, + 'type': 'array'}}, + 'required': ['filesystemattachments'], + 'type': 'object'}, + 'FilesystemInfo': {'additionalProperties': False, + 'properties': {'filesystemid': {'type': 'string'}, + 'size': {'type': 'integer'}}, + 'required': ['filesystemid', 'size'], + 'type': 'object'}, + 'FilesystemParams': {'additionalProperties': False, + 'properties': {'attachment': {'$ref': '#/definitions/FilesystemAttachmentParams'}, + 'attributes': {'patternProperties': {'.*': {'additionalProperties': True, + 'type': 'object'}}, + 'type': 'object'}, + 'filesystemtag': {'type': 'string'}, + 'provider': {'type': 'string'}, + 'size': {'type': 'integer'}, + 'tags': {'patternProperties': {'.*': {'type': 'string'}}, + 'type': 'object'}, + 'volumetag': {'type': 'string'}}, + 'required': ['filesystemtag', + 'size', + 'provider'], + 'type': 'object'}, + 'FilesystemParamsResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'$ref': '#/definitions/FilesystemParams'}}, + 'required': ['result'], + 'type': 'object'}, + 'FilesystemParamsResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemParamsResult'}, + 'type': 'array'}}, + 'type': 'object'}, + 'FilesystemResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'$ref': '#/definitions/Filesystem'}}, + 'required': ['result'], + 'type': 'object'}, + 'FilesystemResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemResult'}, + 'type': 'array'}}, + 'type': 'object'}, + 'Filesystems': {'additionalProperties': False, + 'properties': {'filesystems': {'items': {'$ref': '#/definitions/Filesystem'}, + 'type': 'array'}}, + 'required': ['filesystems'], + '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'}, + 'MachineStorageId': {'additionalProperties': False, + 'properties': {'attachmenttag': {'type': 'string'}, + 'machinetag': {'type': 'string'}}, + 'required': ['machinetag', + 'attachmenttag'], + 'type': 'object'}, + 'MachineStorageIds': {'additionalProperties': False, + 'properties': {'ids': {'items': {'$ref': '#/definitions/MachineStorageId'}, + 'type': 'array'}}, + 'required': ['ids'], + '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'}, + 'MachineStorageIdsWatchResults': {'additionalProperties': False, + 'properties': {'Results': {'items': {'$ref': '#/definitions/MachineStorageIdsWatchResult'}, + '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'}, + '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'}, + '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'}, + 'StringsWatchResults': {'additionalProperties': False, + 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsWatchResult'}, + 'type': 'array'}}, + 'required': ['Results'], + 'type': 'object'}, + 'Volume': {'additionalProperties': False, + 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'}, + 'volumetag': {'type': 'string'}}, + 'required': ['volumetag', 'info'], + 'type': 'object'}, + 'VolumeAttachment': {'additionalProperties': False, + 'properties': {'info': {'$ref': '#/definitions/VolumeAttachmentInfo'}, + 'machinetag': {'type': 'string'}, + 'volumetag': {'type': 'string'}}, + 'required': ['volumetag', + 'machinetag', + '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'}, + 'VolumeAttachmentParamsResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'$ref': '#/definitions/VolumeAttachmentParams'}}, + 'required': ['result'], + 'type': 'object'}, + 'VolumeAttachmentParamsResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeAttachmentParamsResult'}, + 'type': 'array'}}, + 'type': 'object'}, + 'VolumeAttachmentResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'$ref': '#/definitions/VolumeAttachment'}}, + 'required': ['result'], + 'type': 'object'}, + 'VolumeAttachmentResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeAttachmentResult'}, + 'type': 'array'}}, + 'type': 'object'}, + 'VolumeAttachments': {'additionalProperties': False, + 'properties': {'volumeattachments': {'items': {'$ref': '#/definitions/VolumeAttachment'}, + 'type': 'array'}}, + 'required': ['volumeattachments'], + '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'}, + 'VolumeParamsResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'$ref': '#/definitions/VolumeParams'}}, + 'required': ['result'], + 'type': 'object'}, + 'VolumeParamsResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeParamsResult'}, + 'type': 'array'}}, + 'type': 'object'}, + 'VolumeResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'$ref': '#/definitions/Volume'}}, + 'required': ['result'], + 'type': 'object'}, + 'VolumeResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeResult'}, + 'type': 'array'}}, + 'type': 'object'}, + 'Volumes': {'additionalProperties': False, + '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'}}, + 'properties': {'AttachmentLife': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'}, + 'Result': {'$ref': '#/definitions/LifeResults'}}, + 'type': 'object'}, + 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'FilesystemAttachmentParams': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'}, + 'Result': {'$ref': '#/definitions/FilesystemAttachmentParamsResults'}}, + 'type': 'object'}, + 'FilesystemAttachments': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'}, + 'Result': {'$ref': '#/definitions/FilesystemAttachmentResults'}}, + 'type': 'object'}, + 'FilesystemParams': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/FilesystemParamsResults'}}, + 'type': 'object'}, + 'Filesystems': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/FilesystemResults'}}, + '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'}, + 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'RemoveAttachment': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'SetFilesystemAttachmentInfo': {'properties': {'Params': {'$ref': '#/definitions/FilesystemAttachments'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'SetFilesystemInfo': {'properties': {'Params': {'$ref': '#/definitions/Filesystems'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'SetVolumeAttachmentInfo': {'properties': {'Params': {'$ref': '#/definitions/VolumeAttachments'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'SetVolumeInfo': {'properties': {'Params': {'$ref': '#/definitions/Volumes'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'VolumeAttachmentParams': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'}, + 'Result': {'$ref': '#/definitions/VolumeAttachmentParamsResults'}}, + 'type': 'object'}, + 'VolumeAttachments': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'}, + 'Result': {'$ref': '#/definitions/VolumeAttachmentResults'}}, + 'type': 'object'}, + 'VolumeBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'}, + 'Result': {'$ref': '#/definitions/BlockDeviceResults'}}, + 'type': 'object'}, + 'VolumeParams': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/VolumeParamsResults'}}, + 'type': 'object'}, + 'Volumes': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/VolumeResults'}}, + 'type': 'object'}, + 'WatchBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, + 'type': 'object'}, + 'WatchFilesystemAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResults'}}, + 'type': 'object'}, + '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'}, + 'WatchVolumeAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResults'}}, + 'type': 'object'}, + 'WatchVolumes': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, + 'type': 'object'}}, + 'type': 'object'} + + + @ReturnMapping(LifeResults) + async def AttachmentLife(self, ids): + ''' + ids : typing.Sequence[~MachineStorageId] + Returns -> typing.Sequence[~LifeResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='StorageProvisioner', Request='AttachmentLife', Version=2, Params=params) + params['ids'] = ids + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def EnsureDead(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~ErrorResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='StorageProvisioner', Request='EnsureDead', Version=2, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(FilesystemAttachmentParamsResults) + async def FilesystemAttachmentParams(self, ids): + ''' + ids : typing.Sequence[~MachineStorageId] + Returns -> typing.Sequence[~FilesystemAttachmentParamsResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='StorageProvisioner', Request='FilesystemAttachmentParams', Version=2, Params=params) + params['ids'] = ids + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(FilesystemAttachmentResults) + async def FilesystemAttachments(self, ids): + ''' + ids : typing.Sequence[~MachineStorageId] + Returns -> typing.Sequence[~FilesystemAttachmentResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='StorageProvisioner', Request='FilesystemAttachments', Version=2, Params=params) + params['ids'] = ids + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(FilesystemParamsResults) + async def FilesystemParams(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~FilesystemParamsResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='StorageProvisioner', Request='FilesystemParams', Version=2, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(FilesystemResults) + async def Filesystems(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~FilesystemResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='StorageProvisioner', Request='Filesystems', 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='StorageProvisioner', Request='InstanceId', 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='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] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='StorageProvisioner', Request='ModelConfig', Version=2, Params=params) + + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def Remove(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~ErrorResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='StorageProvisioner', Request='Remove', Version=2, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def RemoveAttachment(self, ids): + ''' + ids : typing.Sequence[~MachineStorageId] + Returns -> typing.Sequence[~ErrorResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='StorageProvisioner', Request='RemoveAttachment', Version=2, Params=params) + params['ids'] = ids + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def SetFilesystemAttachmentInfo(self, filesystemattachments): + ''' + filesystemattachments : typing.Sequence[~FilesystemAttachment] + Returns -> typing.Sequence[~ErrorResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='StorageProvisioner', Request='SetFilesystemAttachmentInfo', Version=2, Params=params) + params['filesystemattachments'] = filesystemattachments + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def SetFilesystemInfo(self, filesystems): + ''' + filesystems : typing.Sequence[~Filesystem] + Returns -> typing.Sequence[~ErrorResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='StorageProvisioner', Request='SetFilesystemInfo', Version=2, Params=params) + params['filesystems'] = filesystems + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def SetStatus(self, entities): + ''' + entities : typing.Sequence[~EntityStatusArgs] + Returns -> typing.Sequence[~ErrorResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='StorageProvisioner', Request='SetStatus', Version=2, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def SetVolumeAttachmentInfo(self, volumeattachments): + ''' + volumeattachments : typing.Sequence[~VolumeAttachment] + Returns -> typing.Sequence[~ErrorResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='StorageProvisioner', Request='SetVolumeAttachmentInfo', Version=2, Params=params) + params['volumeattachments'] = volumeattachments + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def SetVolumeInfo(self, volumes): + ''' + volumes : typing.Sequence[~Volume] + Returns -> typing.Sequence[~ErrorResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='StorageProvisioner', Request='SetVolumeInfo', Version=2, Params=params) + params['volumes'] = volumes + reply = await self.rpc(msg) + return reply + + + + @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='StorageProvisioner', Request='UpdateStatus', Version=2, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(VolumeAttachmentParamsResults) + async def VolumeAttachmentParams(self, ids): + ''' + ids : typing.Sequence[~MachineStorageId] + Returns -> typing.Sequence[~VolumeAttachmentParamsResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='StorageProvisioner', Request='VolumeAttachmentParams', Version=2, Params=params) + params['ids'] = ids + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(VolumeAttachmentResults) + async def VolumeAttachments(self, ids): + ''' + ids : typing.Sequence[~MachineStorageId] + Returns -> typing.Sequence[~VolumeAttachmentResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='StorageProvisioner', Request='VolumeAttachments', Version=2, Params=params) + params['ids'] = ids + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(BlockDeviceResults) + async def VolumeBlockDevices(self, ids): + ''' + ids : typing.Sequence[~MachineStorageId] + Returns -> typing.Sequence[~BlockDeviceResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='StorageProvisioner', Request='VolumeBlockDevices', Version=2, Params=params) + params['ids'] = ids + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(VolumeParamsResults) + async def VolumeParams(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~VolumeParamsResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='StorageProvisioner', Request='VolumeParams', Version=2, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(VolumeResults) + async def Volumes(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~VolumeResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='StorageProvisioner', Request='Volumes', Version=2, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(NotifyWatchResults) + async def WatchBlockDevices(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~NotifyWatchResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='StorageProvisioner', Request='WatchBlockDevices', Version=2, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(MachineStorageIdsWatchResults) + async def WatchFilesystemAttachments(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~MachineStorageIdsWatchResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='StorageProvisioner', Request='WatchFilesystemAttachments', Version=2, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @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] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='StorageProvisioner', Request='WatchForModelConfigChanges', Version=2, Params=params) + + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(NotifyWatchResults) + async def WatchMachines(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~NotifyWatchResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='StorageProvisioner', Request='WatchMachines', Version=2, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(MachineStorageIdsWatchResults) + async def WatchVolumeAttachments(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~MachineStorageIdsWatchResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='StorageProvisioner', Request='WatchVolumeAttachments', Version=2, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(StringsWatchResults) + async def WatchVolumes(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~StringsWatchResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='StorageProvisioner', Request='WatchVolumes', Version=2, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + +class StringsWatcher(Type): + name = 'StringsWatcher' + 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'}, + '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': {'Next': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}}, + 'type': 'object'}, + 'Stop': {'type': 'object'}}, + 'type': 'object'} + + + @ReturnMapping(StringsWatchResult) + async def Next(self): + ''' + + Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='StringsWatcher', 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='StringsWatcher', Request='Stop', Version=1, Params=params) + + reply = await self.rpc(msg) + return reply + + +class Subnets(Type): + name = 'Subnets' + version = 2 + schema = {'definitions': {'AddSubnetParams': {'additionalProperties': False, + 'properties': {'SpaceTag': {'type': 'string'}, + 'SubnetProviderId': {'type': 'string'}, + 'SubnetTag': {'type': 'string'}, + 'Zones': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'required': ['SpaceTag'], + 'type': 'object'}, + 'AddSubnetsParams': {'additionalProperties': False, + 'properties': {'Subnets': {'items': {'$ref': '#/definitions/AddSubnetParams'}, + 'type': 'array'}}, + 'required': ['Subnets'], + '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'}, + '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'}, + 'SpaceResult': {'additionalProperties': False, + 'properties': {'Error': {'$ref': '#/definitions/Error'}, + 'Tag': {'type': 'string'}}, + 'required': ['Error', 'Tag'], + 'type': 'object'}, + 'SpaceResults': {'additionalProperties': False, + 'properties': {'Results': {'items': {'$ref': '#/definitions/SpaceResult'}, + 'type': 'array'}}, + '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'}, + 'type': 'array'}}, + 'required': ['CIDR', + 'VLANTag', + 'Life', + 'SpaceTag', + 'Zones'], + 'type': 'object'}, + 'SubnetsFilters': {'additionalProperties': False, + 'properties': {'SpaceTag': {'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'], + 'type': 'object'}, + 'ZoneResults': {'additionalProperties': False, + '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'}}, + 'properties': {'AddSubnets': {'properties': {'Params': {'$ref': '#/definitions/AddSubnetsParams'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'AllSpaces': {'properties': {'Result': {'$ref': '#/definitions/SpaceResults'}}, + 'type': 'object'}, + 'AllZones': {'properties': {'Result': {'$ref': '#/definitions/ZoneResults'}}, + 'type': 'object'}, + 'ListSubnets': {'properties': {'Params': {'$ref': '#/definitions/SubnetsFilters'}, + 'Result': {'$ref': '#/definitions/ListSubnetsResults'}}, + 'type': 'object'}}, + 'type': 'object'} + + + @ReturnMapping(ErrorResults) + async def AddSubnets(self, subnets): + ''' + subnets : typing.Sequence[~AddSubnetParams] + Returns -> typing.Sequence[~ErrorResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Subnets', Request='AddSubnets', Version=2, Params=params) + params['Subnets'] = subnets + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(SpaceResults) + async def AllSpaces(self): + ''' + + Returns -> typing.Sequence[~SpaceResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Subnets', Request='AllSpaces', Version=2, Params=params) + + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ZoneResults) + async def AllZones(self): + ''' + + Returns -> typing.Sequence[~ZoneResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Subnets', Request='AllZones', Version=2, Params=params) + + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ListSubnetsResults) + async def ListSubnets(self, spacetag, zone): + ''' + spacetag : str + zone : str + Returns -> typing.Sequence[~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 + reply = await self.rpc(msg) + return reply + + +class Undertaker(Type): + name = 'Undertaker' + version = 1 + schema = {'definitions': {'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'}, + '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'}, + 'NotifyWatchResults': {'additionalProperties': False, + 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, + 'type': 'array'}}, + 'required': ['Results'], + 'type': 'object'}, + 'SetStatus': {'additionalProperties': False, + 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'}, + 'type': 'array'}}, + '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'], + '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': {'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}}, + 'type': 'object'}, + 'ModelInfo': {'properties': {'Result': {'$ref': '#/definitions/UndertakerModelInfoResult'}}, + 'type': 'object'}, + 'ProcessDyingModel': {'type': 'object'}, + 'RemoveModel': {'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'}, + 'WatchModelResources': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, + 'type': 'object'}}, + 'type': 'object'} + + + @ReturnMapping(ModelConfigResult) + async def ModelConfig(self): + ''' + + Returns -> typing.Mapping[str, typing.Any] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Undertaker', Request='ModelConfig', Version=1, Params=params) + + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(UndertakerModelInfoResult) + async def ModelInfo(self): + ''' + + Returns -> typing.Union[_ForwardRef('Error'), _ForwardRef('UndertakerModelInfo')] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Undertaker', Request='ModelInfo', Version=1, Params=params) + + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(None) + async def ProcessDyingModel(self): + ''' + + Returns -> None + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Undertaker', Request='ProcessDyingModel', Version=1, Params=params) + + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(None) + async def RemoveModel(self): + ''' + + Returns -> None + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Undertaker', Request='RemoveModel', Version=1, Params=params) + + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def SetStatus(self, entities): + ''' + entities : typing.Sequence[~EntityStatusArgs] + Returns -> typing.Sequence[~ErrorResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Undertaker', 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[~EntityStatusArgs] + Returns -> typing.Sequence[~ErrorResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Undertaker', Request='UpdateStatus', Version=1, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(NotifyWatchResults) + async def WatchModelResources(self): + ''' + + Returns -> typing.Sequence[~NotifyWatchResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Undertaker', Request='WatchModelResources', Version=1, Params=params) + + reply = await self.rpc(msg) + return reply + + +class UnitAssigner(Type): + name = 'UnitAssigner' + 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'}, + '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'}, + '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'}, + 'SetStatus': {'additionalProperties': False, + 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'}, + 'type': 'array'}}, + 'required': ['Entities'], + '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': {'AssignUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'SetAgentStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'WatchUnitAssignments': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}}, + 'type': 'object'}}, + 'type': 'object'} + + + @ReturnMapping(ErrorResults) + async def AssignUnits(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~ErrorResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='UnitAssigner', Request='AssignUnits', Version=1, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def SetAgentStatus(self, entities): + ''' + entities : typing.Sequence[~EntityStatusArgs] + Returns -> typing.Sequence[~ErrorResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='UnitAssigner', Request='SetAgentStatus', Version=1, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(StringsWatchResult) + async def WatchUnitAssignments(self): + ''' + + Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='UnitAssigner', Request='WatchUnitAssignments', Version=1, Params=params) + + reply = await self.rpc(msg) + return reply + + +class Uniter(Type): + name = 'Uniter' + version = 4 + schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False, + 'properties': {'Servers': {'items': {'items': {'$ref': '#/definitions/HostPort'}, + 'type': 'array'}, + 'type': 'array'}}, + 'required': ['Servers'], + 'type': 'object'}, + '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'}, + 'Address': {'additionalProperties': False, + 'properties': {'Scope': {'type': 'string'}, + 'SpaceName': {'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', + 'Error'], + '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'], + 'type': 'object'}, + 'BoolResults': {'additionalProperties': False, + 'properties': {'Results': {'items': {'$ref': '#/definitions/BoolResult'}, + 'type': 'array'}}, + 'required': ['Results'], + 'type': 'object'}, + 'BytesResult': {'additionalProperties': False, + 'properties': {'Result': {'items': {'type': 'integer'}, + 'type': 'array'}}, + 'required': ['Result'], + 'type': 'object'}, + 'CharmURL': {'additionalProperties': False, + 'properties': {'URL': {'type': 'string'}}, + 'required': ['URL'], + 'type': 'object'}, + 'CharmURLs': {'additionalProperties': False, + 'properties': {'URLs': {'items': {'$ref': '#/definitions/CharmURL'}, + 'type': 'array'}}, + 'required': ['URLs'], + 'type': 'object'}, + 'ConfigSettingsResult': {'additionalProperties': False, + 'properties': {'Error': {'$ref': '#/definitions/Error'}, + 'Settings': {'patternProperties': {'.*': {'additionalProperties': True, + 'type': 'object'}}, + 'type': 'object'}}, + 'required': ['Error', 'Settings'], + 'type': 'object'}, + 'ConfigSettingsResults': {'additionalProperties': False, + 'properties': {'Results': {'items': {'$ref': '#/definitions/ConfigSettingsResult'}, + 'type': 'array'}}, + 'required': ['Results'], + 'type': 'object'}, + 'Endpoint': {'additionalProperties': False, + 'properties': {'ApplicationName': {'type': 'string'}, + 'Relation': {'$ref': '#/definitions/Relation'}}, + 'required': ['ApplicationName', 'Relation'], + 'type': 'object'}, + 'Entities': {'additionalProperties': False, + 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'}, + 'type': 'array'}}, + 'required': ['Entities'], + 'type': 'object'}, + 'EntitiesCharmURL': {'additionalProperties': False, + 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityCharmURL'}, + 'type': 'array'}}, + 'required': ['Entities'], + 'type': 'object'}, + 'EntitiesPortRanges': {'additionalProperties': False, + 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityPortRange'}, + 'type': 'array'}}, + 'required': ['Entities'], + 'type': 'object'}, + 'Entity': {'additionalProperties': False, + 'properties': {'Tag': {'type': 'string'}}, + 'required': ['Tag'], + 'type': 'object'}, + 'EntityCharmURL': {'additionalProperties': False, + 'properties': {'CharmURL': {'type': 'string'}, + 'Tag': {'type': 'string'}}, + 'required': ['Tag', 'CharmURL'], + 'type': 'object'}, + 'EntityPortRange': {'additionalProperties': False, + 'properties': {'FromPort': {'type': 'integer'}, + 'Protocol': {'type': 'string'}, + 'Tag': {'type': 'string'}, + 'ToPort': {'type': 'integer'}}, + 'required': ['Tag', + 'Protocol', + 'FromPort', + 'ToPort'], + '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'}, + 'GetLeadershipSettingsBulkResults': {'additionalProperties': False, + 'properties': {'Results': {'items': {'$ref': '#/definitions/GetLeadershipSettingsResult'}, + 'type': 'array'}}, + 'required': ['Results'], + 'type': 'object'}, + 'GetLeadershipSettingsResult': {'additionalProperties': False, + 'properties': {'Error': {'$ref': '#/definitions/Error'}, + 'Settings': {'patternProperties': {'.*': {'type': 'string'}}, + 'type': 'object'}}, + 'required': ['Settings', + 'Error'], + 'type': 'object'}, + 'HostPort': {'additionalProperties': False, + 'properties': {'Address': {'$ref': '#/definitions/Address'}, + 'Port': {'type': 'integer'}}, + 'required': ['Address', 'Port'], + 'type': 'object'}, + 'IntResult': {'additionalProperties': False, + 'properties': {'Error': {'$ref': '#/definitions/Error'}, + 'Result': {'type': 'integer'}}, + 'required': ['Error', 'Result'], + 'type': 'object'}, + 'IntResults': {'additionalProperties': False, + 'properties': {'Results': {'items': {'$ref': '#/definitions/IntResult'}, + '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'}, + 'MachinePortRange': {'additionalProperties': False, + 'properties': {'PortRange': {'$ref': '#/definitions/PortRange'}, + 'RelationTag': {'type': 'string'}, + 'UnitTag': {'type': 'string'}}, + 'required': ['UnitTag', + 'RelationTag', + 'PortRange'], + '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'}, + 'MergeLeadershipSettingsBulkParams': {'additionalProperties': False, + 'properties': {'Params': {'items': {'$ref': '#/definitions/MergeLeadershipSettingsParam'}, + 'type': 'array'}}, + 'required': ['Params'], + 'type': 'object'}, + 'MergeLeadershipSettingsParam': {'additionalProperties': False, + 'properties': {'ApplicationTag': {'type': 'string'}, + 'Settings': {'patternProperties': {'.*': {'type': 'string'}}, + 'type': 'object'}}, + 'required': ['ApplicationTag', + 'Settings'], + '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'}, + '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'}, + 'ModelConfigResult': {'additionalProperties': False, + 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True, + 'type': 'object'}}, + 'type': 'object'}}, + 'required': ['Config'], + 'type': 'object'}, + 'ModelResult': {'additionalProperties': False, + 'properties': {'Error': {'$ref': '#/definitions/Error'}, + 'Name': {'type': 'string'}, + 'UUID': {'type': 'string'}}, + 'required': ['Error', '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'], + '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'}, + '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'], + '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'], + 'type': 'object'}, + 'RelationResults': {'additionalProperties': False, + 'properties': {'Results': {'items': {'$ref': '#/definitions/RelationResult'}, + 'type': 'array'}}, + 'required': ['Results'], + 'type': 'object'}, + 'RelationUnit': {'additionalProperties': False, + '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'], + 'type': 'object'}, + 'RelationUnitPairs': {'additionalProperties': False, + 'properties': {'RelationUnitPairs': {'items': {'$ref': '#/definitions/RelationUnitPair'}, + 'type': 'array'}}, + 'required': ['RelationUnitPairs'], + 'type': 'object'}, + 'RelationUnitSettings': {'additionalProperties': False, + 'properties': {'Relation': {'type': 'string'}, + 'Settings': {'patternProperties': {'.*': {'type': 'string'}}, + 'type': 'object'}, + 'Unit': {'type': 'string'}}, + 'required': ['Relation', + 'Unit', + 'Settings'], + 'type': 'object'}, + 'RelationUnits': {'additionalProperties': False, + 'properties': {'RelationUnits': {'items': {'$ref': '#/definitions/RelationUnit'}, + 'type': 'array'}}, + 'required': ['RelationUnits'], + 'type': 'object'}, + 'RelationUnitsChange': {'additionalProperties': False, + 'properties': {'Changed': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitSettings'}}, + 'type': 'object'}, + 'Departed': {'items': {'type': 'string'}, + 'type': 'array'}}, + 'required': ['Changed', 'Departed'], + 'type': 'object'}, + 'RelationUnitsSettings': {'additionalProperties': False, + 'properties': {'RelationUnits': {'items': {'$ref': '#/definitions/RelationUnitSettings'}, + 'type': 'array'}}, + 'required': ['RelationUnits'], + 'type': 'object'}, + 'RelationUnitsWatchResult': {'additionalProperties': False, + 'properties': {'Changes': {'$ref': '#/definitions/RelationUnitsChange'}, + 'Error': {'$ref': '#/definitions/Error'}, + 'RelationUnitsWatcherId': {'type': 'string'}}, + 'required': ['RelationUnitsWatcherId', + 'Changes', + 'Error'], + 'type': 'object'}, + 'RelationUnitsWatchResults': {'additionalProperties': False, + 'properties': {'Results': {'items': {'$ref': '#/definitions/RelationUnitsWatchResult'}, + 'type': 'array'}}, + 'required': ['Results'], + 'type': 'object'}, + 'ResolvedModeResult': {'additionalProperties': False, + 'properties': {'Error': {'$ref': '#/definitions/Error'}, + 'Mode': {'type': 'string'}}, + 'required': ['Error', 'Mode'], + 'type': 'object'}, + 'ResolvedModeResults': {'additionalProperties': False, + 'properties': {'Results': {'items': {'$ref': '#/definitions/ResolvedModeResult'}, + 'type': 'array'}}, + 'required': ['Results'], + 'type': 'object'}, + 'SetStatus': {'additionalProperties': False, + 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'}, + 'type': 'array'}}, + 'required': ['Entities'], + 'type': 'object'}, + 'SettingsResult': {'additionalProperties': False, + 'properties': {'Error': {'$ref': '#/definitions/Error'}, + 'Settings': {'patternProperties': {'.*': {'type': 'string'}}, + 'type': 'object'}}, + 'required': ['Error', 'Settings'], + 'type': 'object'}, + 'SettingsResults': {'additionalProperties': False, + 'properties': {'Results': {'items': {'$ref': '#/definitions/SettingsResult'}, + 'type': 'array'}}, + 'required': ['Results'], + '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'}, + 'StorageAddParams': {'additionalProperties': False, + 'properties': {'StorageName': {'type': 'string'}, + 'storage': {'$ref': '#/definitions/StorageConstraints'}, + 'unit': {'type': 'string'}}, + 'required': ['unit', + 'StorageName', + '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'], + 'type': 'object'}, + 'StorageAttachmentId': {'additionalProperties': False, + 'properties': {'storagetag': {'type': 'string'}, + 'unittag': {'type': 'string'}}, + 'required': ['storagetag', 'unittag'], + 'type': 'object'}, + 'StorageAttachmentIds': {'additionalProperties': False, + 'properties': {'ids': {'items': {'$ref': '#/definitions/StorageAttachmentId'}, + 'type': 'array'}}, + 'required': ['ids'], + 'type': 'object'}, + 'StorageAttachmentIdsResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'$ref': '#/definitions/StorageAttachmentIds'}}, + 'required': ['result'], + 'type': 'object'}, + 'StorageAttachmentIdsResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/StorageAttachmentIdsResult'}, + 'type': 'array'}}, + 'type': 'object'}, + 'StorageAttachmentResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'$ref': '#/definitions/StorageAttachment'}}, + 'required': ['result'], + 'type': 'object'}, + 'StorageAttachmentResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/StorageAttachmentResult'}, + 'type': 'array'}}, + 'type': 'object'}, + 'StorageConstraints': {'additionalProperties': False, + 'properties': {'Count': {'type': 'integer'}, + 'Pool': {'type': 'string'}, + 'Size': {'type': 'integer'}}, + 'required': ['Pool', 'Size', 'Count'], + 'type': 'object'}, + 'StoragesAddParams': {'additionalProperties': False, + 'properties': {'storages': {'items': {'$ref': '#/definitions/StorageAddParams'}, + 'type': 'array'}}, + 'required': ['storages'], + 'type': 'object'}, + 'StringBoolResult': {'additionalProperties': False, + 'properties': {'Error': {'$ref': '#/definitions/Error'}, + 'Ok': {'type': 'boolean'}, + 'Result': {'type': 'string'}}, + 'required': ['Error', 'Result', 'Ok'], + 'type': 'object'}, + 'StringBoolResults': {'additionalProperties': False, + 'properties': {'Results': {'items': {'$ref': '#/definitions/StringBoolResult'}, + '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'}, + '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'}, + 'UnitNetworkConfig': {'additionalProperties': False, + 'properties': {'BindingName': {'type': 'string'}, + 'UnitTag': {'type': 'string'}}, + 'required': ['UnitTag', 'BindingName'], + 'type': 'object'}, + 'UnitNetworkConfigResult': {'additionalProperties': False, + 'properties': {'Error': {'$ref': '#/definitions/Error'}, + 'Info': {'items': {'$ref': '#/definitions/NetworkConfig'}, + 'type': 'array'}}, + 'required': ['Error', 'Info'], + 'type': 'object'}, + 'UnitNetworkConfigResults': {'additionalProperties': False, + 'properties': {'Results': {'items': {'$ref': '#/definitions/UnitNetworkConfigResult'}, + 'type': 'array'}}, + 'required': ['Results'], + 'type': 'object'}, + 'UnitSettings': {'additionalProperties': False, + 'properties': {'Version': {'type': 'integer'}}, + 'required': ['Version'], + 'type': 'object'}, + 'UnitsNetworkConfig': {'additionalProperties': False, + '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'}}, + 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}}, + 'type': 'object'}, + 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}}, + 'type': 'object'}, + 'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/ActionResults'}}, + 'type': 'object'}, + 'AddMetricBatches': {'properties': {'Params': {'$ref': '#/definitions/MetricBatchParams'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'AddUnitStorage': {'properties': {'Params': {'$ref': '#/definitions/StoragesAddParams'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'AllMachinePorts': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/MachinePortsResults'}}, + 'type': 'object'}, + 'ApplicationOwner': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/StringResults'}}, + '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'}, + 'AvailabilityZone': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/StringResults'}}, + 'type': 'object'}, + 'BeginActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}}, + 'type': 'object'}, + 'CharmArchiveSha256': {'properties': {'Params': {'$ref': '#/definitions/CharmURLs'}, + 'Result': {'$ref': '#/definitions/StringResults'}}, + 'type': 'object'}, + 'CharmModifiedVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/IntResults'}}, + 'type': 'object'}, + 'CharmURL': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/StringBoolResults'}}, + 'type': 'object'}, + 'ClearResolved': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'ClosePorts': {'properties': {'Params': {'$ref': '#/definitions/EntitiesPortRanges'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'ConfigSettings': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/ConfigSettingsResults'}}, + 'type': 'object'}, + 'CurrentModel': {'properties': {'Result': {'$ref': '#/definitions/ModelResult'}}, + 'type': 'object'}, + 'Destroy': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'DestroyAllSubordinates': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'DestroyUnitStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'EnterScope': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'FinishActions': {'properties': {'Params': {'$ref': '#/definitions/ActionExecutionResults'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'GetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/MeterStatusResults'}}, + 'type': 'object'}, + 'GetPrincipal': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/StringBoolResults'}}, + 'type': 'object'}, + 'HasSubordinates': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/BoolResults'}}, + 'type': 'object'}, + 'JoinedRelations': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/StringsResults'}}, + 'type': 'object'}, + 'LeaveScope': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/LifeResults'}}, + 'type': 'object'}, + 'Merge': {'properties': {'Params': {'$ref': '#/definitions/MergeLeadershipSettingsBulkParams'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}}, + 'type': 'object'}, + 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}}, + 'type': 'object'}, + 'NetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/UnitsNetworkConfig'}, + 'Result': {'$ref': '#/definitions/UnitNetworkConfigResults'}}, + 'type': 'object'}, + 'OpenPorts': {'properties': {'Params': {'$ref': '#/definitions/EntitiesPortRanges'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/StringResults'}}, + 'type': 'object'}, + 'ProviderType': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}}, + 'type': 'object'}, + 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/StringResults'}}, + 'type': 'object'}, + 'Read': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/GetLeadershipSettingsBulkResults'}}, + 'type': 'object'}, + 'ReadRemoteSettings': {'properties': {'Params': {'$ref': '#/definitions/RelationUnitPairs'}, + 'Result': {'$ref': '#/definitions/SettingsResults'}}, + 'type': 'object'}, + 'ReadSettings': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'}, + 'Result': {'$ref': '#/definitions/SettingsResults'}}, + 'type': 'object'}, + 'Relation': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'}, + 'Result': {'$ref': '#/definitions/RelationResults'}}, + 'type': 'object'}, + 'RelationById': {'properties': {'Params': {'$ref': '#/definitions/RelationIds'}, + 'Result': {'$ref': '#/definitions/RelationResults'}}, + 'type': 'object'}, + 'RemoveStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'RequestReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'Resolved': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/ResolvedModeResults'}}, + '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'}, + 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'SetUnitStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'StorageAttachmentLife': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'}, + 'Result': {'$ref': '#/definitions/LifeResults'}}, + 'type': 'object'}, + 'StorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'}, + 'Result': {'$ref': '#/definitions/StorageAttachmentResults'}}, + 'type': 'object'}, + 'UnitStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/StatusResults'}}, + 'type': 'object'}, + 'UnitStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/StorageAttachmentIdsResults'}}, + 'type': 'object'}, + 'UpdateSettings': {'properties': {'Params': {'$ref': '#/definitions/RelationUnitsSettings'}, + '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'}, + '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'}, + 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, + 'type': 'object'}, + 'WatchLeadershipSettings': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, + 'type': 'object'}, + 'WatchMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, + 'type': 'object'}, + 'WatchRelationUnits': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'}, + 'Result': {'$ref': '#/definitions/RelationUnitsWatchResults'}}, + 'type': 'object'}, + 'WatchStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'}, + 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, + 'type': 'object'}, + 'WatchUnitAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, + 'type': 'object'}, + 'WatchUnitStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, + '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='Uniter', Request='APIAddresses', Version=4, 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='Uniter', Request='APIHostPorts', Version=4, Params=params) + + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ActionResults) + async def Actions(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~ActionResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Uniter', Request='Actions', Version=4, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def AddMetricBatches(self, batches): + ''' + batches : typing.Sequence[~MetricBatchParam] + Returns -> typing.Sequence[~ErrorResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Uniter', Request='AddMetricBatches', Version=4, Params=params) + params['Batches'] = batches + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def AddUnitStorage(self, storages): + ''' + storages : typing.Sequence[~StorageAddParams] + Returns -> typing.Sequence[~ErrorResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Uniter', Request='AddUnitStorage', Version=4, Params=params) + params['storages'] = storages + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(MachinePortsResults) + async def AllMachinePorts(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~MachinePortsResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Uniter', Request='AllMachinePorts', Version=4, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(StringResults) + async def ApplicationOwner(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~StringResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Uniter', Request='ApplicationOwner', Version=4, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ApplicationStatusResults) + async def ApplicationStatus(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~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 + + + + @ReturnMapping(StringResults) + async def AssignedMachine(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~StringResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Uniter', Request='AssignedMachine', Version=4, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(StringResults) + async def AvailabilityZone(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~StringResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Uniter', Request='AvailabilityZone', Version=4, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def BeginActions(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~ErrorResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Uniter', Request='BeginActions', Version=4, Params=params) + params['Entities'] = entities + 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='Uniter', Request='CACert', Version=4, Params=params) + + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(StringResults) + async def CharmArchiveSha256(self, urls): + ''' + urls : typing.Sequence[~CharmURL] + Returns -> typing.Sequence[~StringResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Uniter', Request='CharmArchiveSha256', Version=4, Params=params) + params['URLs'] = urls + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(IntResults) + async def CharmModifiedVersion(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~IntResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Uniter', Request='CharmModifiedVersion', Version=4, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(StringBoolResults) + async def CharmURL(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~StringBoolResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Uniter', Request='CharmURL', Version=4, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def ClearResolved(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~ErrorResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Uniter', Request='ClearResolved', Version=4, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def ClosePorts(self, entities): + ''' + entities : typing.Sequence[~EntityPortRange] + Returns -> typing.Sequence[~ErrorResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Uniter', Request='ClosePorts', Version=4, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ConfigSettingsResults) + async def ConfigSettings(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~ConfigSettingsResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Uniter', Request='ConfigSettings', Version=4, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ModelResult) + async def CurrentModel(self): + ''' + + Returns -> typing.Union[_ForwardRef('Error'), str] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Uniter', Request='CurrentModel', Version=4, Params=params) + + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def Destroy(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~ErrorResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Uniter', Request='Destroy', Version=4, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def DestroyAllSubordinates(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~ErrorResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Uniter', Request='DestroyAllSubordinates', Version=4, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def DestroyUnitStorageAttachments(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~ErrorResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Uniter', Request='DestroyUnitStorageAttachments', Version=4, 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] + ''' + # map input types to rpc msg + params = dict() + 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): + ''' + relationunits : typing.Sequence[~RelationUnit] + Returns -> typing.Sequence[~ErrorResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Uniter', Request='EnterScope', Version=4, Params=params) + params['RelationUnits'] = relationunits + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def FinishActions(self, results): + ''' + results : typing.Sequence[~ActionExecutionResult] + Returns -> typing.Sequence[~ErrorResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Uniter', Request='FinishActions', Version=4, Params=params) + params['results'] = results + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(MeterStatusResults) + async def GetMeterStatus(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~MeterStatusResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Uniter', Request='GetMeterStatus', Version=4, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(StringBoolResults) + async def GetPrincipal(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~StringBoolResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Uniter', Request='GetPrincipal', Version=4, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(BoolResults) + async def HasSubordinates(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~BoolResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Uniter', Request='HasSubordinates', Version=4, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(StringsResults) + async def JoinedRelations(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~StringsResult] + ''' + # map input types to rpc msg + params = dict() + 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): + ''' + relationunits : typing.Sequence[~RelationUnit] + Returns -> typing.Sequence[~ErrorResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Uniter', Request='LeaveScope', Version=4, Params=params) + params['RelationUnits'] = relationunits + 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='Uniter', Request='Life', Version=4, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def Merge(self, params): + ''' + params : typing.Sequence[~MergeLeadershipSettingsParam] + Returns -> typing.Sequence[~ErrorResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Uniter', Request='Merge', Version=4, Params=params) + params['Params'] = params + 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='Uniter', Request='ModelConfig', Version=4, Params=params) + + 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='Uniter', Request='ModelUUID', Version=4, Params=params) + + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(UnitNetworkConfigResults) + async def NetworkConfig(self, args): + ''' + args : typing.Sequence[~UnitNetworkConfig] + Returns -> typing.Sequence[~UnitNetworkConfigResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Uniter', Request='NetworkConfig', Version=4, Params=params) + params['Args'] = args + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def OpenPorts(self, entities): + ''' + entities : typing.Sequence[~EntityPortRange] + Returns -> typing.Sequence[~ErrorResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Uniter', Request='OpenPorts', Version=4, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(StringResults) + async def PrivateAddress(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~StringResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Uniter', Request='PrivateAddress', Version=4, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(StringResult) + async def ProviderType(self): + ''' + + Returns -> typing.Union[_ForwardRef('Error'), str] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Uniter', Request='ProviderType', Version=4, Params=params) + + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(StringResults) + async def PublicAddress(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~StringResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Uniter', Request='PublicAddress', Version=4, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(GetLeadershipSettingsBulkResults) + async def Read(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~GetLeadershipSettingsResult] + ''' + # map input types to rpc msg + params = dict() + 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): + ''' + relationunitpairs : typing.Sequence[~RelationUnitPair] + Returns -> typing.Sequence[~SettingsResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Uniter', Request='ReadRemoteSettings', Version=4, Params=params) + params['RelationUnitPairs'] = relationunitpairs + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(SettingsResults) + async def ReadSettings(self, relationunits): + ''' + relationunits : typing.Sequence[~RelationUnit] + Returns -> typing.Sequence[~SettingsResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Uniter', Request='ReadSettings', Version=4, Params=params) + params['RelationUnits'] = relationunits + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(RelationResults) + async def Relation(self, relationunits): + ''' + relationunits : typing.Sequence[~RelationUnit] + Returns -> typing.Sequence[~RelationResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Uniter', Request='Relation', Version=4, Params=params) + params['RelationUnits'] = relationunits + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(RelationResults) + async def RelationById(self, relationids): + ''' + relationids : typing.Sequence[int] + Returns -> typing.Sequence[~RelationResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Uniter', Request='RelationById', Version=4, Params=params) + params['RelationIds'] = relationids + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def RemoveStorageAttachments(self, ids): + ''' + ids : typing.Sequence[~StorageAttachmentId] + Returns -> typing.Sequence[~ErrorResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Uniter', Request='RemoveStorageAttachments', Version=4, Params=params) + params['ids'] = ids + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def RequestReboot(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~ErrorResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Uniter', Request='RequestReboot', Version=4, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @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=4, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def SetAgentStatus(self, entities): + ''' + entities : typing.Sequence[~EntityStatusArgs] + Returns -> typing.Sequence[~ErrorResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Uniter', Request='SetAgentStatus', Version=4, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def SetApplicationStatus(self, entities): + ''' + entities : typing.Sequence[~EntityStatusArgs] + Returns -> typing.Sequence[~ErrorResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Uniter', Request='SetApplicationStatus', Version=4, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def SetCharmURL(self, entities): + ''' + entities : typing.Sequence[~EntityCharmURL] + Returns -> typing.Sequence[~ErrorResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Uniter', Request='SetCharmURL', Version=4, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def SetStatus(self, entities): + ''' + entities : typing.Sequence[~EntityStatusArgs] + Returns -> typing.Sequence[~ErrorResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Uniter', Request='SetStatus', Version=4, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def SetUnitStatus(self, entities): + ''' + entities : typing.Sequence[~EntityStatusArgs] + Returns -> typing.Sequence[~ErrorResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Uniter', Request='SetUnitStatus', Version=4, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(LifeResults) + async def StorageAttachmentLife(self, ids): + ''' + ids : typing.Sequence[~StorageAttachmentId] + Returns -> typing.Sequence[~LifeResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Uniter', Request='StorageAttachmentLife', Version=4, Params=params) + params['ids'] = ids + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(StorageAttachmentResults) + async def StorageAttachments(self, ids): + ''' + ids : typing.Sequence[~StorageAttachmentId] + Returns -> typing.Sequence[~StorageAttachmentResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Uniter', Request='StorageAttachments', Version=4, Params=params) + params['ids'] = ids + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(StatusResults) + async def UnitStatus(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~StatusResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Uniter', Request='UnitStatus', Version=4, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(StorageAttachmentIdsResults) + async def UnitStorageAttachments(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~StorageAttachmentIdsResult] + ''' + # map input types to rpc msg + params = dict() + 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): + ''' + relationunits : typing.Sequence[~RelationUnitSettings] + Returns -> typing.Sequence[~ErrorResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Uniter', Request='UpdateSettings', Version=4, Params=params) + params['RelationUnits'] = relationunits + 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='Uniter', Request='Watch', Version=4, Params=params) + params['Entities'] = entities + 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='Uniter', Request='WatchAPIHostPorts', Version=4, Params=params) + + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(StringsWatchResults) + async def WatchActionNotifications(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~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[~Entity] + Returns -> typing.Sequence[~StringsWatchResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Uniter', Request='WatchApplicationRelations', Version=4, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(NotifyWatchResults) + async def WatchConfigSettings(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~NotifyWatchResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Uniter', Request='WatchConfigSettings', Version=4, 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='Uniter', Request='WatchForModelConfigChanges', Version=4, Params=params) + + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(NotifyWatchResults) + async def WatchLeadershipSettings(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~NotifyWatchResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Uniter', Request='WatchLeadershipSettings', Version=4, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(NotifyWatchResults) + async def WatchMeterStatus(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~NotifyWatchResult] + ''' + # map input types to rpc msg + params = dict() + 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): + ''' + relationunits : typing.Sequence[~RelationUnit] + Returns -> typing.Sequence[~RelationUnitsWatchResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Uniter', Request='WatchRelationUnits', Version=4, Params=params) + params['RelationUnits'] = relationunits + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(NotifyWatchResults) + async def WatchStorageAttachments(self, ids): + ''' + ids : typing.Sequence[~StorageAttachmentId] + Returns -> typing.Sequence[~NotifyWatchResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Uniter', Request='WatchStorageAttachments', Version=4, Params=params) + params['ids'] = ids + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(NotifyWatchResults) + async def WatchUnitAddresses(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~NotifyWatchResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Uniter', Request='WatchUnitAddresses', Version=4, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(StringsWatchResults) + async def WatchUnitStorageAttachments(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~StringsWatchResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Uniter', Request='WatchUnitStorageAttachments', Version=4, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + +class Upgrader(Type): + name = 'Upgrader' + version = 1 + schema = {'definitions': {'Binary': {'additionalProperties': False, + 'properties': {'Arch': {'type': 'string'}, + 'Number': {'$ref': '#/definitions/Number'}, + 'Series': {'type': 'string'}}, + 'required': ['Number', 'Series', 'Arch'], + 'type': 'object'}, + 'Entities': {'additionalProperties': False, + 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'}, + 'type': 'array'}}, + 'required': ['Entities'], + 'type': 'object'}, + 'EntitiesVersion': {'additionalProperties': False, + 'properties': {'AgentTools': {'items': {'$ref': '#/definitions/EntityVersion'}, + 'type': 'array'}}, + 'required': ['AgentTools'], + 'type': 'object'}, + 'Entity': {'additionalProperties': False, + 'properties': {'Tag': {'type': 'string'}}, + 'required': ['Tag'], + 'type': 'object'}, + 'EntityVersion': {'additionalProperties': False, + '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'], + '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'}, + 'NotifyWatchResults': {'additionalProperties': False, + 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, + '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'}, + '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': {'DisableSSLHostnameVerification': {'type': 'boolean'}, + 'Error': {'$ref': '#/definitions/Error'}, + 'ToolsList': {'items': {'$ref': '#/definitions/Tools'}, + 'type': 'array'}}, + 'required': ['ToolsList', + 'DisableSSLHostnameVerification', + 'Error'], + 'type': 'object'}, + 'ToolsResults': {'additionalProperties': False, + 'properties': {'Results': {'items': {'$ref': '#/definitions/ToolsResult'}, + 'type': 'array'}}, + 'required': ['Results'], + 'type': 'object'}, + 'Version': {'additionalProperties': False, + 'properties': {'Version': {'$ref': '#/definitions/Binary'}}, + 'required': ['Version'], + 'type': 'object'}, + 'VersionResult': {'additionalProperties': False, + 'properties': {'Error': {'$ref': '#/definitions/Error'}, + 'Version': {'$ref': '#/definitions/Number'}}, + 'required': ['Version', 'Error'], + 'type': 'object'}, + 'VersionResults': {'additionalProperties': False, + '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'}}, + 'properties': {'DesiredVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/VersionResults'}}, + 'type': 'object'}, + 'SetTools': {'properties': {'Params': {'$ref': '#/definitions/EntitiesVersion'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'Tools': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/ToolsResults'}}, + 'type': 'object'}, + 'WatchAPIVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, + 'type': 'object'}}, + 'type': 'object'} + + + @ReturnMapping(VersionResults) + async def DesiredVersion(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~VersionResult] + ''' + # map input types to rpc msg + params = dict() + 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): + ''' + agenttools : typing.Sequence[~EntityVersion] + Returns -> typing.Sequence[~ErrorResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Upgrader', Request='SetTools', Version=1, Params=params) + params['AgentTools'] = agenttools + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ToolsResults) + async def Tools(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~ToolsResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Upgrader', Request='Tools', Version=1, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(NotifyWatchResults) + async def WatchAPIVersion(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~NotifyWatchResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='Upgrader', Request='WatchAPIVersion', Version=1, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + +class UserManager(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'], + 'type': 'object'}, + 'AddUserResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'secret-key': {'items': {'type': 'integer'}, + 'type': 'array'}, + 'tag': {'type': 'string'}}, + 'type': 'object'}, + 'AddUserResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/AddUserResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'AddUsers': {'additionalProperties': False, + 'properties': {'users': {'items': {'$ref': '#/definitions/AddUser'}, + 'type': 'array'}}, + 'required': ['users'], + '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'}, + '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'}, + 'MacaroonResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'$ref': '#/definitions/Macaroon'}}, + 'type': 'object'}, + 'MacaroonResults': {'additionalProperties': False, + 'properties': {'results': {'items': {'$ref': '#/definitions/MacaroonResult'}, + 'type': 'array'}}, + 'required': ['results'], + 'type': 'object'}, + 'UserInfo': {'additionalProperties': False, + 'properties': {'created-by': {'type': 'string'}, + 'date-created': {'format': 'date-time', + 'type': 'string'}, + 'disabled': {'type': 'boolean'}, + 'display-name': {'type': 'string'}, + 'last-connection': {'format': 'date-time', + 'type': 'string'}, + 'username': {'type': 'string'}}, + 'required': ['username', + 'display-name', + 'created-by', + 'date-created', + 'disabled'], + 'type': 'object'}, + 'UserInfoRequest': {'additionalProperties': False, + 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, + 'type': 'array'}, + 'include-disabled': {'type': 'boolean'}}, + 'required': ['entities', + 'include-disabled'], + 'type': 'object'}, + 'UserInfoResult': {'additionalProperties': False, + 'properties': {'error': {'$ref': '#/definitions/Error'}, + 'result': {'$ref': '#/definitions/UserInfo'}}, + 'type': 'object'}, + 'UserInfoResults': {'additionalProperties': False, + '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'}}, + 'properties': {'AddUser': {'properties': {'Params': {'$ref': '#/definitions/AddUsers'}, + 'Result': {'$ref': '#/definitions/AddUserResults'}}, + 'type': 'object'}, + 'CreateLocalLoginMacaroon': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/MacaroonResults'}}, + 'type': 'object'}, + 'DisableUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'EnableUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'SetPassword': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'}, + 'Result': {'$ref': '#/definitions/ErrorResults'}}, + 'type': 'object'}, + 'UserInfo': {'properties': {'Params': {'$ref': '#/definitions/UserInfoRequest'}, + 'Result': {'$ref': '#/definitions/UserInfoResults'}}, + 'type': 'object'}}, + 'type': 'object'} + + + @ReturnMapping(AddUserResults) + async def AddUser(self, users): + ''' + users : typing.Sequence[~AddUser] + Returns -> typing.Sequence[~AddUserResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='UserManager', Request='AddUser', Version=1, Params=params) + params['users'] = users + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(MacaroonResults) + async def CreateLocalLoginMacaroon(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~MacaroonResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='UserManager', Request='CreateLocalLoginMacaroon', Version=1, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def DisableUser(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~ErrorResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='UserManager', Request='DisableUser', Version=1, Params=params) + params['Entities'] = entities + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(ErrorResults) + async def EnableUser(self, entities): + ''' + entities : typing.Sequence[~Entity] + Returns -> typing.Sequence[~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 SetPassword(self, changes): + ''' + changes : typing.Sequence[~EntityPassword] + Returns -> typing.Sequence[~ErrorResult] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='UserManager', Request='SetPassword', Version=1, Params=params) + params['Changes'] = changes + reply = await self.rpc(msg) + return reply + + + + @ReturnMapping(UserInfoResults) + async def UserInfo(self, entities, include_disabled): + ''' + entities : typing.Sequence[~Entity] + include_disabled : bool + Returns -> typing.Sequence[~UserInfoResult] + ''' + # map input types to rpc msg + params = dict() + 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): + name = 'VolumeAttachmentsWatcher' + 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): + ''' + + Returns -> typing.Union[typing.Sequence[~MachineStorageId], _ForwardRef('Error')] + ''' + # map input types to rpc msg + params = dict() + msg = dict(Type='VolumeAttachmentsWatcher', Request='Next', Version=2, 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='VolumeAttachmentsWatcher', Request='Stop', Version=2, Params=params) + + reply = await self.rpc(msg) + return reply + + diff --git a/juju/client/client.py b/juju/client/client.py index da22f04..2fc8847 100644 --- a/juju/client/client.py +++ b/juju/client/client.py @@ -1,20301 +1,12 @@ +'''Replace auto-generated classes with our own, where necessary. -from juju.client.facade import Type, ReturnMapping - -class Action(Type): - _toSchema = {'name': 'name', 'parameters': 'parameters', 'tag': 'tag', 'receiver': 'receiver'} - _toPy = {'name': 'name', 'parameters': 'parameters', 'tag': 'tag', 'receiver': 'receiver'} - def __init__(self, name=None, parameters=None, receiver=None, tag=None): - ''' - name : str - parameters : typing.Mapping[str, typing.Any] - receiver : str - tag : str - ''' - self.name = name - self.parameters = parameters - self.receiver = receiver - self.tag = tag +''' +from . import _client +from . import overrides -class ActionResult(Type): - _toSchema = {'completed': 'completed', 'started': 'started', 'message': 'message', 'action': 'action', 'output': 'output', 'status': 'status', 'error': 'error', 'enqueued': 'enqueued'} - _toPy = {'completed': 'completed', 'started': 'started', 'message': 'message', 'action': 'action', 'output': 'output', 'status': 'status', 'error': 'error', 'enqueued': 'enqueued'} - def __init__(self, action=None, completed=None, enqueued=None, error=None, message=None, output=None, started=None, status=None): - ''' - action : Action - completed : str - enqueued : str - error : Error - message : str - output : typing.Mapping[str, typing.Any] - started : str - status : str - ''' - self.action = Action.from_json(action) if action else None - self.completed = completed - self.enqueued = enqueued - self.error = Error.from_json(error) if error else None - self.message = message - self.output = output - self.started = started - self.status = status - - -class ActionResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~ActionResult] - ''' - self.results = [ActionResult.from_json(o) for o in results or []] - - -class Actions(Type): - _toSchema = {'actions': 'actions'} - _toPy = {'actions': 'actions'} - def __init__(self, actions=None): - ''' - actions : typing.Sequence[~Action] - ''' - self.actions = [Action.from_json(o) for o in actions or []] - - -class ActionsByName(Type): - _toSchema = {'name': 'name', 'error': 'error', 'actions': 'actions'} - _toPy = {'name': 'name', 'error': 'error', 'actions': 'actions'} - def __init__(self, actions=None, error=None, name=None): - ''' - actions : typing.Sequence[~ActionResult] - error : Error - name : str - ''' - self.actions = [ActionResult.from_json(o) for o in actions or []] - self.error = Error.from_json(error) if error else None - self.name = name - - -class ActionsByNames(Type): - _toSchema = {'actions': 'actions'} - _toPy = {'actions': 'actions'} - def __init__(self, actions=None): - ''' - actions : typing.Sequence[~ActionsByName] - ''' - self.actions = [ActionsByName.from_json(o) for o in actions or []] - - -class ActionsByReceiver(Type): - _toSchema = {'error': 'error', 'actions': 'actions', 'receiver': 'receiver'} - _toPy = {'error': 'error', 'actions': 'actions', 'receiver': 'receiver'} - def __init__(self, actions=None, error=None, receiver=None): - ''' - actions : typing.Sequence[~ActionResult] - error : Error - receiver : str - ''' - self.actions = [ActionResult.from_json(o) for o in actions or []] - self.error = Error.from_json(error) if error else None - self.receiver = receiver - - -class ActionsByReceivers(Type): - _toSchema = {'actions': 'actions'} - _toPy = {'actions': 'actions'} - def __init__(self, actions=None): - ''' - actions : typing.Sequence[~ActionsByReceiver] - ''' - self.actions = [ActionsByReceiver.from_json(o) for o in actions or []] - - -class Entities(Type): - _toSchema = {'entities': 'Entities'} - _toPy = {'Entities': 'entities'} - def __init__(self, entities=None): - ''' - entities : typing.Sequence[~Entity] - ''' - self.entities = [Entity.from_json(o) for o in entities or []] - - -class Entity(Type): - _toSchema = {'tag': 'Tag'} - _toPy = {'Tag': 'tag'} - def __init__(self, tag=None): - ''' - tag : str - ''' - self.tag = tag - - -class Error(Type): - _toSchema = {'message': 'Message', 'code': 'Code', 'info': 'Info'} - _toPy = {'Code': 'code', 'Message': 'message', 'Info': 'info'} - 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 ErrorInfo(Type): - _toSchema = {'macaroon': 'Macaroon', 'macaroonpath': 'MacaroonPath'} - _toPy = {'MacaroonPath': 'macaroonpath', 'Macaroon': 'macaroon'} - def __init__(self, macaroon=None, macaroonpath=None): - ''' - macaroon : Macaroon - macaroonpath : str - ''' - self.macaroon = Macaroon.from_json(macaroon) if macaroon else None - self.macaroonpath = macaroonpath - - -class FindActionsByNames(Type): - _toSchema = {'names': 'names'} - _toPy = {'names': 'names'} - def __init__(self, names=None): - ''' - names : typing.Sequence[str] - ''' - self.names = names - - -class FindTags(Type): - _toSchema = {'prefixes': 'prefixes'} - _toPy = {'prefixes': 'prefixes'} - def __init__(self, prefixes=None): - ''' - prefixes : typing.Sequence[str] - ''' - self.prefixes = prefixes - - -class FindTagsResults(Type): - _toSchema = {'matches': 'matches'} - _toPy = {'matches': 'matches'} - def __init__(self, matches=None): - ''' - matches : typing.Sequence[~Entity] - ''' - self.matches = [Entity.from_json(o) for o in matches or []] - - -class Macaroon(Type): - _toSchema = {'caveats': 'caveats', 'data': 'data', 'location': 'location', 'id_': 'id', 'sig': 'sig'} - _toPy = {'caveats': 'caveats', 'data': 'data', 'sig': 'sig', 'location': 'location', 'id': 'id_'} - def __init__(self, caveats=None, data=None, id_=None, location=None, sig=None): - ''' - 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 - - -class RunParams(Type): - _toSchema = {'machines': 'Machines', 'timeout': 'Timeout', 'commands': 'Commands', 'services': 'Services', 'units': 'Units'} - _toPy = {'Services': 'services', 'Units': 'units', 'Timeout': 'timeout', 'Commands': 'commands', 'Machines': 'machines'} - def __init__(self, commands=None, machines=None, services=None, timeout=None, units=None): - ''' - commands : str - machines : typing.Sequence[str] - services : typing.Sequence[str] - timeout : int - units : typing.Sequence[str] - ''' - self.commands = commands - self.machines = machines - self.services = services - self.timeout = timeout - self.units = units - - -class ServiceCharmActionsResult(Type): - _toSchema = {'servicetag': 'servicetag', 'error': 'error', 'actions': 'actions'} - _toPy = {'servicetag': 'servicetag', 'error': 'error', 'actions': 'actions'} - def __init__(self, actions=None, error=None, servicetag=None): - ''' - actions : Actions - error : Error - servicetag : str - ''' - self.actions = Actions.from_json(actions) if actions else None - self.error = Error.from_json(error) if error else None - self.servicetag = servicetag - - -class ServicesCharmActionsResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~ServiceCharmActionsResult] - ''' - self.results = [ServiceCharmActionsResult.from_json(o) for o in results or []] - - -class caveat(Type): - _toSchema = {'verificationid': 'verificationId', 'caveatid': 'caveatId', 'location': 'location'} - _toPy = {'verificationId': 'verificationid', 'location': 'location', 'caveatId': 'caveatid'} - def __init__(self, caveatid=None, location=None, verificationid=None): - ''' - caveatid : packet - location : packet - verificationid : packet - ''' - 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 - - -class packet(Type): - _toSchema = {'headerlen': 'headerLen', 'start': 'start', 'totallen': 'totalLen'} - _toPy = {'start': 'start', 'totalLen': 'totallen', 'headerLen': 'headerlen'} - def __init__(self, headerlen=None, start=None, totallen=None): - ''' - headerlen : int - start : int - totallen : int - ''' - self.headerlen = headerlen - self.start = start - self.totallen = totallen - - -class BoolResult(Type): - _toSchema = {'error': 'Error', 'result': 'Result'} - _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 = {'error': 'Error', 'changes': 'Changes', 'entitywatcherid': 'EntityWatcherId'} - _toPy = {'Changes': 'changes', 'EntityWatcherId': 'entitywatcherid', 'Error': 'error'} - def __init__(self, changes=None, entitywatcherid=None, error=None): - ''' - changes : typing.Sequence[str] - entitywatcherid : str - error : Error - ''' - self.changes = changes - self.entitywatcherid = entitywatcherid - self.error = Error.from_json(error) if error else None - - -class ErrorResult(Type): - _toSchema = {'message': 'Message', 'code': 'Code', 'info': 'Info'} - _toPy = {'Code': 'code', 'Message': 'message', 'Info': 'info'} - 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 = {'jobs': 'Jobs', 'error': 'Error', 'containertype': 'ContainerType', 'life': 'Life'} - _toPy = {'Life': 'life', 'ContainerType': 'containertype', 'Jobs': 'jobs', 'Error': 'error'} - def __init__(self, containertype=None, error=None, jobs=None, life=None): - ''' - containertype : str - error : Error - jobs : typing.Sequence[str] - life : str - ''' - self.containertype = containertype - self.error = Error.from_json(error) if error else None - self.jobs = jobs - self.life = life - - -class AgentGetEntitiesResults(Type): - _toSchema = {'entities': 'Entities'} - _toPy = {'Entities': 'entities'} - def __init__(self, entities=None): - ''' - entities : typing.Sequence[~AgentGetEntitiesResult] - ''' - self.entities = [AgentGetEntitiesResult.from_json(o) for o in entities or []] - - -class EntityPassword(Type): - _toSchema = {'password': 'Password', 'tag': 'Tag'} - _toPy = {'Password': 'password', 'Tag': 'tag'} - def __init__(self, password=None, tag=None): - ''' - password : str - tag : str - ''' - self.password = password - self.tag = tag - - -class EntityPasswords(Type): - _toSchema = {'changes': 'Changes'} - _toPy = {'Changes': 'changes'} - def __init__(self, changes=None): - ''' - changes : typing.Sequence[~EntityPassword] - ''' - self.changes = [EntityPassword.from_json(o) for o in changes or []] - - -class ErrorResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~ErrorResult] - ''' - self.results = [ErrorResult.from_json(o) for o in results or []] - - -class IsMasterResult(Type): - _toSchema = {'master': 'Master'} - _toPy = {'Master': 'master'} - def __init__(self, master=None): - ''' - master : bool - ''' - self.master = master - - -class ModelConfigResult(Type): - _toSchema = {'config': 'Config'} - _toPy = {'Config': 'config'} - def __init__(self, config=None): - ''' - config : typing.Mapping[str, typing.Any] - ''' - self.config = config - - -class NotifyWatchResult(Type): - _toSchema = {'error': 'Error', 'notifywatcherid': 'NotifyWatcherId'} - _toPy = {'NotifyWatcherId': 'notifywatcherid', 'Error': 'error'} - def __init__(self, error=None, notifywatcherid=None): - ''' - error : Error - notifywatcherid : str - ''' - self.error = Error.from_json(error) if error else None - self.notifywatcherid = notifywatcherid - - -class StateServingInfo(Type): - _toSchema = {'stateport': 'StatePort', 'caprivatekey': 'CAPrivateKey', 'sharedsecret': 'SharedSecret', 'apiport': 'APIPort', 'privatekey': 'PrivateKey', 'cert': 'Cert', 'systemidentity': 'SystemIdentity'} - _toPy = {'CAPrivateKey': 'caprivatekey', 'Cert': 'cert', 'SystemIdentity': 'systemidentity', 'PrivateKey': 'privatekey', 'StatePort': 'stateport', 'SharedSecret': 'sharedsecret', 'APIPort': 'apiport'} - def __init__(self, apiport=None, caprivatekey=None, cert=None, privatekey=None, sharedsecret=None, stateport=None, systemidentity=None): - ''' - apiport : int - caprivatekey : str - cert : str - privatekey : str - sharedsecret : str - stateport : int - systemidentity : str - ''' - self.apiport = apiport - self.caprivatekey = caprivatekey - self.cert = cert - self.privatekey = privatekey - self.sharedsecret = sharedsecret - self.stateport = stateport - self.systemidentity = systemidentity - - -class AllWatcherNextResults(Type): - _toSchema = {'deltas': 'Deltas'} - _toPy = {'Deltas': 'deltas'} - def __init__(self, deltas=None): - ''' - deltas : typing.Sequence[~Delta] - ''' - self.deltas = [Delta.from_json(o) for o in deltas or []] - - -class Delta(Type): - _toSchema = {'removed': 'Removed'} - _toPy = {'Removed': 'removed'} - def __init__(self, removed=None): - ''' - removed : bool - ''' - self.removed = removed - - -class AnnotationsGetResult(Type): - _toSchema = {'error': 'Error', 'entitytag': 'EntityTag', 'annotations': 'Annotations'} - _toPy = {'EntityTag': 'entitytag', 'Error': 'error', 'Annotations': 'annotations'} - def __init__(self, annotations=None, entitytag=None, error=None): - ''' - annotations : typing.Mapping[str, str] - entitytag : str - error : ErrorResult - ''' - self.annotations = annotations - self.entitytag = entitytag - self.error = ErrorResult.from_json(error) if error else None - - -class AnnotationsGetResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~AnnotationsGetResult] - ''' - self.results = [AnnotationsGetResult.from_json(o) for o in results or []] - - -class AnnotationsSet(Type): - _toSchema = {'annotations': 'Annotations'} - _toPy = {'Annotations': 'annotations'} - def __init__(self, annotations=None): - ''' - annotations : typing.Sequence[~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): - ''' - annotations : typing.Mapping[str, str] - entitytag : str - ''' - self.annotations = annotations - self.entitytag = entitytag - - -class BackupsCreateArgs(Type): - _toSchema = {'notes': 'Notes'} - _toPy = {'Notes': 'notes'} - def __init__(self, notes=None): - ''' - notes : str - ''' - self.notes = notes - - -class BackupsInfoArgs(Type): - _toSchema = {'id_': 'ID'} - _toPy = {'ID': 'id_'} - def __init__(self, id_=None): - ''' - id_ : str - ''' - self.id_ = id_ - - -class BackupsListArgs(Type): - _toSchema = {} - _toPy = {} - def __init__(self): - ''' - - ''' - pass - - -class BackupsListResult(Type): - _toSchema = {'list_': 'List'} - _toPy = {'List': 'list_'} - def __init__(self, list_=None): - ''' - list_ : typing.Sequence[~BackupsMetadataResult] - ''' - self.list_ = [BackupsMetadataResult.from_json(o) for o in list_ or []] - - -class BackupsMetadataResult(Type): - _toSchema = {'cacert': 'CACert', 'finished': 'Finished', 'hostname': 'Hostname', 'model': 'Model', 'checksumformat': 'ChecksumFormat', 'checksum': 'Checksum', 'size': 'Size', 'notes': 'Notes', 'stored': 'Stored', 'started': 'Started', 'caprivatekey': 'CAPrivateKey', 'version': 'Version', 'id_': 'ID', 'machine': 'Machine'} - _toPy = {'CAPrivateKey': 'caprivatekey', 'ID': 'id_', 'Machine': 'machine', 'Notes': 'notes', 'Checksum': 'checksum', 'Version': 'version', 'Stored': 'stored', 'ChecksumFormat': 'checksumformat', 'Finished': 'finished', 'Hostname': 'hostname', 'Started': 'started', 'Size': 'size', 'CACert': 'cacert', 'Model': 'model'} - 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): - ''' - 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 - ''' - 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 - - -class BackupsRemoveArgs(Type): - _toSchema = {'id_': 'ID'} - _toPy = {'ID': 'id_'} - def __init__(self, id_=None): - ''' - id_ : str - ''' - self.id_ = id_ - - -class Number(Type): - _toSchema = {'build': 'Build', 'major': 'Major', 'tag': 'Tag', 'patch': 'Patch', 'minor': 'Minor'} - _toPy = {'Tag': 'tag', 'Build': 'build', 'Patch': 'patch', 'Major': 'major', 'Minor': 'minor'} - 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 RestoreArgs(Type): - _toSchema = {'backupid': 'BackupId'} - _toPy = {'BackupId': 'backupid'} - def __init__(self, backupid=None): - ''' - backupid : str - ''' - self.backupid = backupid - - -class Block(Type): - _toSchema = {'tag': 'tag', 'message': 'message', 'type_': 'type', 'id_': 'id'} - _toPy = {'id': 'id_', 'tag': 'tag', 'message': 'message', 'type': 'type_'} - def __init__(self, id_=None, message=None, tag=None, type_=None): - ''' - id_ : str - message : str - tag : str - type_ : str - ''' - self.id_ = id_ - self.message = message - self.tag = tag - self.type_ = type_ - - -class BlockResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None): - ''' - error : Error - result : Block - ''' - self.error = Error.from_json(error) if error else None - self.result = Block.from_json(result) if result else None - - -class BlockResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~BlockResult] - ''' - self.results = [BlockResult.from_json(o) for o in results or []] - - -class BlockSwitchParams(Type): - _toSchema = {'type_': 'type', 'message': 'message'} - _toPy = {'message': 'message', 'type': 'type_'} - def __init__(self, message=None, type_=None): - ''' - message : str - type_ : str - ''' - self.message = message - self.type_ = type_ - - -class CharmInfo(Type): - _toSchema = {'charmurl': 'CharmURL'} - _toPy = {'CharmURL': 'charmurl'} - def __init__(self, charmurl=None): - ''' - charmurl : str - ''' - self.charmurl = charmurl - - -class CharmsList(Type): - _toSchema = {'names': 'Names'} - _toPy = {'Names': 'names'} - def __init__(self, names=None): - ''' - names : typing.Sequence[str] - ''' - self.names = names - - -class CharmsListResult(Type): - _toSchema = {'charmurls': 'CharmURLs'} - _toPy = {'CharmURLs': 'charmurls'} - def __init__(self, charmurls=None): - ''' - charmurls : typing.Sequence[str] - ''' - self.charmurls = charmurls - - -class IsMeteredResult(Type): - _toSchema = {'metered': 'Metered'} - _toPy = {'Metered': 'metered'} - def __init__(self, metered=None): - ''' - metered : bool - ''' - self.metered = metered - - -class APIHostPortsResult(Type): - _toSchema = {'servers': 'Servers'} - _toPy = {'Servers': 'servers'} - def __init__(self, servers=None): - ''' - servers : typing.Sequence[~HostPort] - ''' - self.servers = [HostPort.from_json(o) for o in servers or []] - - -class AddCharm(Type): - _toSchema = {'channel': 'Channel', 'url': 'URL'} - _toPy = {'Channel': 'channel', 'URL': 'url'} - def __init__(self, channel=None, url=None): - ''' - channel : str - url : str - ''' - self.channel = channel - self.url = url - - -class AddCharmWithAuthorization(Type): - _toSchema = {'channel': 'Channel', 'charmstoremacaroon': 'CharmStoreMacaroon', 'url': 'URL'} - _toPy = {'Channel': 'channel', 'URL': 'url', 'CharmStoreMacaroon': 'charmstoremacaroon'} - def __init__(self, channel=None, charmstoremacaroon=None, url=None): - ''' - channel : str - charmstoremacaroon : Macaroon - url : str - ''' - self.channel = channel - self.charmstoremacaroon = Macaroon.from_json(charmstoremacaroon) if charmstoremacaroon else None - self.url = url - - -class AddMachineParams(Type): - _toSchema = {'series': 'Series', 'jobs': 'Jobs', 'disks': 'Disks', 'containertype': 'ContainerType', 'constraints': 'Constraints', 'instanceid': 'InstanceId', 'placement': 'Placement', 'parentid': 'ParentId', 'addrs': 'Addrs', 'hardwarecharacteristics': 'HardwareCharacteristics', 'nonce': 'Nonce'} - _toPy = {'Series': 'series', 'Placement': 'placement', 'Disks': 'disks', 'Addrs': 'addrs', 'Jobs': 'jobs', 'ParentId': 'parentid', 'InstanceId': 'instanceid', 'Nonce': 'nonce', 'ContainerType': 'containertype', 'HardwareCharacteristics': 'hardwarecharacteristics', 'Constraints': 'constraints'} - 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): - ''' - 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 = {'Machine': 'machine', 'Error': 'error'} - 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 = {'value': 'Value', 'type_': 'Type', 'scope': 'Scope', 'spacename': 'SpaceName'} - _toPy = {'Value': 'value', 'SpaceName': 'spacename', 'Type': 'type_', 'Scope': 'scope'} - def __init__(self, scope=None, spacename=None, type_=None, value=None): - ''' - scope : str - spacename : str - type_ : str - value : str - ''' - self.scope = scope - self.spacename = spacename - self.type_ = type_ - self.value = value - - -class AgentVersionResult(Type): - _toSchema = {'build': 'Build', 'major': 'Major', 'tag': 'Tag', 'patch': 'Patch', 'minor': 'Minor'} - _toPy = {'Tag': 'tag', 'Build': 'build', 'Patch': 'patch', 'Major': 'major', 'Minor': 'minor'} - 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 = {'Series': 'series', 'Arch': 'arch', 'Number': 'number'} - 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 = {'method': 'method', 'args': 'args', 'id_': 'id', 'requires': 'requires'} - _toPy = {'id': 'id_', 'requires': 'requires', 'args': 'args', 'method': 'method'} - 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 = {'size': 'Size', 'pool': 'Pool', 'count': 'Count'} - _toPy = {'Size': 'size', 'Count': 'count', 'Pool': 'pool'} - def __init__(self, count=None, pool=None, size=None): - ''' - count : int - pool : str - size : int - ''' - self.count = count - self.pool = pool - 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 = {'kind': 'Kind', 'since': 'Since', 'version': 'Version', 'data': 'Data', 'status': 'Status', 'info': 'Info', 'life': 'Life'} - _toPy = {'Life': 'life', 'Data': 'data', 'Info': 'info', 'Kind': 'kind', 'Version': 'version', 'Since': 'since', 'Status': 'status'} - def __init__(self, data=None, info=None, kind=None, life=None, since=None, status=None, version=None): - ''' - data : typing.Mapping[str, typing.Any] - info : str - kind : str - life : str - since : str - status : str - version : str - ''' - self.data = data - self.info = info - self.kind = kind - self.life = life - self.since = since - self.status = status - self.version = version - - -class EndpointStatus(Type): - _toSchema = {'name': 'Name', 'subordinate': 'Subordinate', 'role': 'Role', 'servicename': 'ServiceName'} - _toPy = {'Subordinate': 'subordinate', 'Name': 'name', 'Role': 'role', 'ServiceName': 'servicename'} - def __init__(self, name=None, role=None, servicename=None, subordinate=None): - ''' - name : str - role : str - servicename : str - subordinate : bool - ''' - self.name = name - self.role = role - self.servicename = servicename - self.subordinate = subordinate - - -class EntityStatus(Type): - _toSchema = {'data': 'Data', 'since': 'Since', 'status': 'Status', 'info': 'Info'} - _toPy = {'Since': 'since', 'Data': 'data', 'Status': 'status', 'Info': 'info'} - def __init__(self, data=None, info=None, since=None, status=None): - ''' - data : typing.Mapping[str, typing.Any] - info : str - since : str - status : str - ''' - self.data = data - self.info = info - self.since = since - self.status = status - - -class FindToolsParams(Type): - _toSchema = {'majorversion': 'MajorVersion', 'series': 'Series', 'arch': 'Arch', 'number': 'Number', 'minorversion': 'MinorVersion'} - _toPy = {'Series': 'series', 'MinorVersion': 'minorversion', 'MajorVersion': 'majorversion', 'Arch': 'arch', 'Number': 'number'} - def __init__(self, arch=None, majorversion=None, minorversion=None, number=None, series=None): - ''' - arch : str - majorversion : int - minorversion : int - number : Number - series : str - ''' - self.arch = arch - self.majorversion = majorversion - self.minorversion = minorversion - self.number = Number.from_json(number) if number else None - self.series = series - - -class FindToolsResult(Type): - _toSchema = {'error': 'Error', 'list_': 'List'} - _toPy = {'List': 'list_', 'Error': 'error'} - def __init__(self, error=None, list_=None): - ''' - error : Error - list_ : typing.Sequence[~Tools] - ''' - 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', 'services': 'Services', 'relations': 'Relations'} - _toPy = {'Services': 'services', 'ModelName': 'modelname', 'Relations': 'relations', 'AvailableVersion': 'availableversion', '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()} - - -class GetBundleChangesParams(Type): - _toSchema = {'yaml': 'yaml'} - _toPy = {'yaml': 'yaml'} - def __init__(self, yaml=None): - ''' - yaml : str - ''' - self.yaml = yaml - - -class GetBundleChangesResults(Type): - _toSchema = {'errors': 'errors', 'changes': 'changes'} - _toPy = {'errors': 'errors', 'changes': 'changes'} - def __init__(self, changes=None, errors=None): - ''' - changes : typing.Sequence[~BundleChangesChange] - errors : typing.Sequence[str] - ''' - self.changes = [BundleChangesChange.from_json(o) for o in changes or []] - self.errors = errors - - -class GetConstraintsResults(Type): - _toSchema = {'tags': 'tags', 'container': 'container', 'mem': 'mem', 'arch': 'arch', 'cpu_cores': 'cpu-cores', 'cpu_power': 'cpu-power', 'root_disk': 'root-disk', 'instance_type': 'instance-type', 'spaces': 'spaces', 'virt_type': 'virt-type'} - _toPy = {'tags': 'tags', 'container': 'container', 'instance-type': 'instance_type', 'mem': 'mem', 'virt-type': 'virt_type', 'cpu-cores': 'cpu_cores', 'arch': 'arch', 'spaces': 'spaces', 'root-disk': 'root_disk', 'cpu-power': 'cpu_power'} - 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 HardwareCharacteristics(Type): - _toSchema = {'tags': 'Tags', 'rootdisk': 'RootDisk', 'mem': 'Mem', 'availabilityzone': 'AvailabilityZone', 'cpupower': 'CpuPower', 'arch': 'Arch', 'cpucores': 'CpuCores'} - _toPy = {'CpuPower': 'cpupower', 'Arch': 'arch', 'AvailabilityZone': 'availabilityzone', 'Tags': 'tags', 'Mem': 'mem', 'RootDisk': 'rootdisk', 'CpuCores': 'cpucores'} - def __init__(self, arch=None, availabilityzone=None, cpucores=None, cpupower=None, mem=None, rootdisk=None, tags=None): - ''' - arch : str - availabilityzone : str - cpucores : int - cpupower : int - mem : int - rootdisk : int - tags : typing.Sequence[str] - ''' - self.arch = arch - self.availabilityzone = availabilityzone - self.cpucores = cpucores - self.cpupower = cpupower - self.mem = mem - self.rootdisk = rootdisk - self.tags = tags - - -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 MachineStatus(Type): - _toSchema = {'jobs': 'Jobs', 'hasvote': 'HasVote', 'hardware': 'Hardware', 'dnsname': 'DNSName', 'agentstatus': 'AgentStatus', 'wantsvote': 'WantsVote', 'instanceid': 'InstanceId', 'containers': 'Containers', 'series': 'Series', 'id_': 'Id', 'instancestatus': 'InstanceStatus'} - _toPy = {'Containers': 'containers', 'Series': 'series', 'InstanceStatus': 'instancestatus', 'Jobs': 'jobs', 'HasVote': 'hasvote', 'Id': 'id_', 'Hardware': 'hardware', 'DNSName': 'dnsname', 'InstanceId': 'instanceid', 'WantsVote': 'wantsvote', 'AgentStatus': 'agentstatus'} - 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): - ''' - 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 = {'Color': 'color', 'Message': 'message'} - def __init__(self, color=None, message=None): - ''' - color : str - message : str - ''' - 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 - - -class ModelInfo(Type): - _toSchema = {'name': 'Name', 'defaultseries': 'DefaultSeries', 'users': 'Users', 'uuid': 'UUID', 'serveruuid': 'ServerUUID', 'status': 'Status', 'ownertag': 'OwnerTag', 'life': 'Life', 'providertype': 'ProviderType'} - _toPy = {'Name': 'name', 'Life': 'life', 'OwnerTag': 'ownertag', 'UUID': 'uuid', 'ProviderType': 'providertype', 'DefaultSeries': 'defaultseries', 'Users': 'users', 'Status': 'status', 'ServerUUID': 'serveruuid'} - def __init__(self, defaultseries=None, life=None, name=None, ownertag=None, providertype=None, serveruuid=None, status=None, uuid=None, users=None): - ''' - defaultseries : str - life : str - name : str - ownertag : str - providertype : str - serveruuid : str - status : EntityStatus - uuid : str - users : typing.Sequence[~ModelUserInfo] - ''' - 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 []] - - -class ModelSet(Type): - _toSchema = {'config': 'Config'} - _toPy = {'Config': 'config'} - def __init__(self, config=None): - ''' - config : typing.Mapping[str, typing.Any] - ''' - self.config = config - - -class ModelUnset(Type): - _toSchema = {'keys': 'Keys'} - _toPy = {'Keys': 'keys'} - def __init__(self, keys=None): - ''' - keys : typing.Sequence[str] - ''' - self.keys = keys - - -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): - ''' - access : str - displayname : str - lastconnection : str - user : str - ''' - self.access = access - self.displayname = displayname - self.lastconnection = lastconnection - self.user = user - - -class ModelUserInfoResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None): - ''' - error : Error - result : ModelUserInfo - ''' - self.error = Error.from_json(error) if error else None - self.result = ModelUserInfo.from_json(result) if result else None - - -class ModelUserInfoResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~ModelUserInfoResult] - ''' - self.results = [ModelUserInfoResult.from_json(o) for o in results or []] - - -class Placement(Type): - _toSchema = {'scope': 'Scope', 'directive': 'Directive'} - _toPy = {'Directive': 'directive', 'Scope': 'scope'} - def __init__(self, directive=None, scope=None): - ''' - directive : str - scope : str - ''' - self.directive = directive - self.scope = scope - - -class PrivateAddress(Type): - _toSchema = {'target': 'Target'} - _toPy = {'Target': 'target'} - def __init__(self, target=None): - ''' - target : str - ''' - self.target = target - - -class PrivateAddressResults(Type): - _toSchema = {'privateaddress': 'PrivateAddress'} - _toPy = {'PrivateAddress': 'privateaddress'} - def __init__(self, privateaddress=None): - ''' - privateaddress : str - ''' - self.privateaddress = privateaddress - - -class ProvisioningScriptParams(Type): - _toSchema = {'datadir': 'DataDir', 'nonce': 'Nonce', 'disablepackagecommands': 'DisablePackageCommands', 'machineid': 'MachineId'} - _toPy = {'MachineId': 'machineid', 'Nonce': 'nonce', 'DataDir': 'datadir', 'DisablePackageCommands': 'disablepackagecommands'} - def __init__(self, datadir=None, disablepackagecommands=None, machineid=None, nonce=None): - ''' - datadir : str - disablepackagecommands : bool - machineid : str - nonce : str - ''' - self.datadir = datadir - self.disablepackagecommands = disablepackagecommands - self.machineid = machineid - self.nonce = nonce - - -class ProvisioningScriptResult(Type): - _toSchema = {'script': 'Script'} - _toPy = {'Script': 'script'} - def __init__(self, script=None): - ''' - script : str - ''' - self.script = script - - -class PublicAddress(Type): - _toSchema = {'target': 'Target'} - _toPy = {'Target': 'target'} - def __init__(self, target=None): - ''' - target : str - ''' - self.target = target - - -class PublicAddressResults(Type): - _toSchema = {'publicaddress': 'PublicAddress'} - _toPy = {'PublicAddress': 'publicaddress'} - def __init__(self, publicaddress=None): - ''' - publicaddress : str - ''' - self.publicaddress = publicaddress - - -class RelationStatus(Type): - _toSchema = {'scope': 'Scope', 'endpoints': 'Endpoints', 'key': 'Key', 'interface': 'Interface', 'id_': 'Id'} - _toPy = {'Id': 'id_', 'Scope': 'scope', 'Key': 'key', 'Endpoints': 'endpoints', 'Interface': 'interface'} - def __init__(self, endpoints=None, id_=None, interface=None, key=None, scope=None): - ''' - endpoints : typing.Sequence[~EndpointStatus] - id_ : int - interface : str - key : str - scope : str - ''' - self.endpoints = [EndpointStatus.from_json(o) for o in endpoints or []] - self.id_ = id_ - self.interface = interface - self.key = key - self.scope = scope - - -class ResolveCharmResult(Type): - _toSchema = {'error': 'Error', 'url': 'URL'} - _toPy = {'URL': 'url', 'Error': 'error'} - def __init__(self, error=None, url=None): - ''' - error : str - url : URL - ''' - self.error = error - self.url = URL.from_json(url) if url else None - - -class ResolveCharmResults(Type): - _toSchema = {'urls': 'URLs'} - _toPy = {'URLs': 'urls'} - def __init__(self, urls=None): - ''' - urls : typing.Sequence[~ResolveCharmResult] - ''' - self.urls = [ResolveCharmResult.from_json(o) for o in urls or []] - - -class ResolveCharms(Type): - _toSchema = {'references': 'References'} - _toPy = {'References': 'references'} - def __init__(self, references=None): - ''' - references : typing.Sequence[~URL] - ''' - self.references = [URL.from_json(o) for o in references or []] - - -class Resolved(Type): - _toSchema = {'unitname': 'UnitName', 'retry': 'Retry'} - _toPy = {'Retry': 'retry', 'UnitName': 'unitname'} - def __init__(self, retry=None, unitname=None): - ''' - retry : bool - unitname : str - ''' - self.retry = retry - self.unitname = unitname - - -class ServiceStatus(Type): - _toSchema = {'canupgradeto': 'CanUpgradeTo', 'relations': 'Relations', 'units': 'Units', 'charm': 'Charm', 'status': 'Status', 'meterstatuses': 'MeterStatuses', 'life': 'Life', 'subordinateto': 'SubordinateTo', 'exposed': 'Exposed'} - _toPy = {'Life': 'life', 'MeterStatuses': 'meterstatuses', 'Exposed': 'exposed', 'Relations': 'relations', 'Units': 'units', 'Status': 'status', 'CanUpgradeTo': 'canupgradeto', 'SubordinateTo': 'subordinateto', 'Charm': 'charm'} - def __init__(self, canupgradeto=None, charm=None, exposed=None, life=None, meterstatuses=None, relations=None, status=None, subordinateto=None, units=None): - ''' - canupgradeto : str - charm : str - exposed : bool - life : str - meterstatuses : typing.Mapping[str, ~MeterStatus] - relations : typing.Sequence[str] - status : DetailedStatus - subordinateto : typing.Sequence[str] - units : typing.Mapping[str, ~UnitStatus] - ''' - self.canupgradeto = canupgradeto - self.charm = charm - 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()} - - -class SetConstraints(Type): - _toSchema = {'servicename': 'ServiceName', 'constraints': 'Constraints'} - _toPy = {'ServiceName': 'servicename', 'Constraints': 'constraints'} - def __init__(self, constraints=None, servicename=None): - ''' - constraints : Value - servicename : str - ''' - self.constraints = Value.from_json(constraints) if constraints else None - self.servicename = servicename - - -class SetModelAgentVersion(Type): - _toSchema = {'build': 'Build', 'major': 'Major', 'tag': 'Tag', 'patch': 'Patch', 'minor': 'Minor'} - _toPy = {'Tag': 'tag', 'Build': 'build', 'Patch': 'patch', 'Major': 'major', 'Minor': 'minor'} - 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 StatusHistoryArgs(Type): - _toSchema = {'kind': 'Kind', 'name': 'Name', 'size': 'Size'} - _toPy = {'Kind': 'kind', 'Size': 'size', 'Name': 'name'} - def __init__(self, kind=None, name=None, size=None): - ''' - kind : str - name : str - size : int - ''' - self.kind = kind - self.name = name - self.size = size - - -class StatusHistoryResults(Type): - _toSchema = {'statuses': 'Statuses'} - _toPy = {'Statuses': 'statuses'} - def __init__(self, statuses=None): - ''' - statuses : typing.Sequence[~DetailedStatus] - ''' - self.statuses = [DetailedStatus.from_json(o) for o in statuses or []] - - -class StatusParams(Type): - _toSchema = {'patterns': 'Patterns'} - _toPy = {'Patterns': 'patterns'} - def __init__(self, patterns=None): - ''' - patterns : typing.Sequence[str] - ''' - self.patterns = patterns - - -class Tools(Type): - _toSchema = {'version': 'version', 'url': 'url', 'size': 'size', 'sha256': 'sha256'} - _toPy = {'version': 'version', 'url': 'url', 'size': 'size', 'sha256': 'sha256'} - def __init__(self, sha256=None, size=None, url=None, version=None): - ''' - sha256 : str - size : int - url : str - version : Binary - ''' - self.sha256 = sha256 - self.size = size - self.url = url - self.version = Binary.from_json(version) if version else None - - -class URL(Type): - _toSchema = {'name': 'Name', 'revision': 'Revision', 'series': 'Series', 'user': 'User', 'channel': 'Channel', 'schema': 'Schema'} - _toPy = {'Name': 'name', 'Channel': 'channel', 'Series': 'series', 'Revision': 'revision', 'User': 'user', 'Schema': 'schema'} - def __init__(self, channel=None, name=None, revision=None, schema=None, series=None, user=None): - ''' - channel : str - name : str - revision : int - schema : str - series : str - user : str - ''' - self.channel = channel - self.name = name - self.revision = revision - self.schema = schema - self.series = series - self.user = user - - -class UnitStatus(Type): - _toSchema = {'subordinates': 'Subordinates', 'charm': 'Charm', 'agentstatus': 'AgentStatus', 'publicaddress': 'PublicAddress', 'openedports': 'OpenedPorts', 'workloadstatus': 'WorkloadStatus', 'machine': 'Machine'} - _toPy = {'OpenedPorts': 'openedports', 'Subordinates': 'subordinates', 'WorkloadStatus': 'workloadstatus', 'Machine': 'machine', 'PublicAddress': 'publicaddress', 'AgentStatus': 'agentstatus', 'Charm': 'charm'} - 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 - ''' - 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 = {'tags': 'tags', 'container': 'container', 'mem': 'mem', 'arch': 'arch', 'cpu_cores': 'cpu-cores', 'cpu_power': 'cpu-power', 'root_disk': 'root-disk', 'instance_type': 'instance-type', 'spaces': 'spaces', 'virt_type': 'virt-type'} - _toPy = {'tags': 'tags', 'container': 'container', 'instance-type': 'instance_type', 'mem': 'mem', 'virt-type': 'virt_type', 'cpu-cores': 'cpu_cores', 'arch': 'arch', 'spaces': 'spaces', 'root-disk': 'root_disk', 'cpu-power': 'cpu_power'} - 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 - ''' - self.destroy_models = destroy_models - - -class InitiateModelMigrationArgs(Type): - _toSchema = {'specs': 'specs'} - _toPy = {'specs': 'specs'} - def __init__(self, specs=None): - ''' - specs : typing.Sequence[~ModelMigrationSpec] - ''' - self.specs = [ModelMigrationSpec.from_json(o) for o in specs or []] - - -class InitiateModelMigrationResult(Type): - _toSchema = {'model_tag': 'model-tag', 'error': 'error', 'id_': 'id'} - _toPy = {'model-tag': 'model_tag', 'id': 'id_', 'error': 'error'} - def __init__(self, error=None, id_=None, model_tag=None): - ''' - error : Error - id_ : str - model_tag : str - ''' - self.error = Error.from_json(error) if error else None - self.id_ = id_ - self.model_tag = model_tag - - -class InitiateModelMigrationResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~InitiateModelMigrationResult] - ''' - self.results = [InitiateModelMigrationResult.from_json(o) for o in results or []] - - -class Model(Type): - _toSchema = {'name': 'Name', 'uuid': 'UUID', 'ownertag': 'OwnerTag'} - _toPy = {'Name': 'name', 'OwnerTag': 'ownertag', 'UUID': 'uuid'} - def __init__(self, name=None, ownertag=None, uuid=None): - ''' - name : str - ownertag : str - uuid : str - ''' - self.name = name - self.ownertag = ownertag - self.uuid = uuid - - -class ModelBlockInfo(Type): - _toSchema = {'name': 'name', 'blocks': 'blocks', 'model_uuid': 'model-uuid', 'owner_tag': 'owner-tag'} - _toPy = {'name': 'name', 'blocks': 'blocks', 'owner-tag': 'owner_tag', 'model-uuid': 'model_uuid'} - def __init__(self, blocks=None, model_uuid=None, name=None, owner_tag=None): - ''' - blocks : typing.Sequence[str] - model_uuid : str - name : str - owner_tag : str - ''' - self.blocks = blocks - self.model_uuid = model_uuid - self.name = name - self.owner_tag = owner_tag - - -class ModelBlockInfoList(Type): - _toSchema = {'models': 'models'} - _toPy = {'models': 'models'} - def __init__(self, models=None): - ''' - models : typing.Sequence[~ModelBlockInfo] - ''' - self.models = [ModelBlockInfo.from_json(o) for o in models or []] - - -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): - ''' - model_tag : str - target_info : ModelMigrationTargetInfo - ''' - self.model_tag = model_tag - self.target_info = ModelMigrationTargetInfo.from_json(target_info) if target_info else None - - -class ModelMigrationTargetInfo(Type): - _toSchema = {'ca_cert': 'ca-cert', 'auth_tag': 'auth-tag', 'addrs': 'addrs', 'password': 'password', 'controller_tag': 'controller-tag'} - _toPy = {'ca-cert': 'ca_cert', 'auth-tag': 'auth_tag', 'addrs': 'addrs', 'password': 'password', 'controller-tag': 'controller_tag'} - def __init__(self, addrs=None, auth_tag=None, ca_cert=None, controller_tag=None, password=None): - ''' - addrs : typing.Sequence[str] - auth_tag : str - ca_cert : str - controller_tag : str - password : str - ''' - self.addrs = addrs - self.auth_tag = auth_tag - self.ca_cert = ca_cert - self.controller_tag = controller_tag - self.password = password - - -class ModelStatus(Type): - _toSchema = {'model_tag': 'model-tag', 'owner_tag': 'owner-tag', 'service_count': 'service-count', 'life': 'life', 'hosted_machine_count': 'hosted-machine-count'} - _toPy = {'model-tag': 'model_tag', 'owner-tag': 'owner_tag', 'life': 'life', 'hosted-machine-count': 'hosted_machine_count', 'service-count': 'service_count'} - def __init__(self, hosted_machine_count=None, life=None, model_tag=None, owner_tag=None, service_count=None): - ''' - hosted_machine_count : int - life : str - model_tag : str - owner_tag : str - service_count : int - ''' - 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 - - -class ModelStatusResults(Type): - _toSchema = {'models': 'models'} - _toPy = {'models': 'models'} - def __init__(self, models=None): - ''' - models : typing.Sequence[~ModelStatus] - ''' - self.models = [ModelStatus.from_json(o) for o in models or []] - - -class RemoveBlocksArgs(Type): - _toSchema = {'all_': 'all'} - _toPy = {'all': 'all_'} - def __init__(self, all_=None): - ''' - all_ : bool - ''' - self.all_ = all_ - - -class UserModel(Type): - _toSchema = {'model': 'Model', 'lastconnection': 'LastConnection'} - _toPy = {'Model': 'model', 'LastConnection': 'lastconnection'} - def __init__(self, lastconnection=None, model=None): - ''' - lastconnection : str - model : Model - ''' - self.lastconnection = lastconnection - self.model = Model.from_json(model) if model else None - - -class UserModelList(Type): - _toSchema = {'usermodels': 'UserModels'} - _toPy = {'UserModels': 'usermodels'} - def __init__(self, usermodels=None): - ''' - usermodels : typing.Sequence[~UserModel] - ''' - self.usermodels = [UserModel.from_json(o) for o in usermodels or []] - - -class BytesResult(Type): - _toSchema = {'result': 'Result'} - _toPy = {'Result': 'result'} - def __init__(self, result=None): - ''' - result : typing.Sequence[int] - ''' - self.result = result - - -class DeployerConnectionValues(Type): - _toSchema = {'stateaddresses': 'StateAddresses', 'apiaddresses': 'APIAddresses'} - _toPy = {'APIAddresses': 'apiaddresses', 'StateAddresses': 'stateaddresses'} - def __init__(self, apiaddresses=None, stateaddresses=None): - ''' - apiaddresses : typing.Sequence[str] - stateaddresses : typing.Sequence[str] - ''' - self.apiaddresses = apiaddresses - self.stateaddresses = stateaddresses - - -class LifeResult(Type): - _toSchema = {'error': 'Error', 'life': 'Life'} - _toPy = {'Life': 'life', 'Error': 'error'} - def __init__(self, error=None, life=None): - ''' - error : Error - life : str - ''' - self.error = Error.from_json(error) if error else None - self.life = life - - -class LifeResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~LifeResult] - ''' - self.results = [LifeResult.from_json(o) for o in results or []] - - -class StringResult(Type): - _toSchema = {'error': 'Error', 'result': 'Result'} - _toPy = {'Result': 'result', 'Error': 'error'} - def __init__(self, error=None, result=None): - ''' - error : Error - result : str - ''' - self.error = Error.from_json(error) if error else None - self.result = result - - -class StringsResult(Type): - _toSchema = {'error': 'Error', 'result': 'Result'} - _toPy = {'Result': 'result', 'Error': 'error'} - 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 StringsWatchResult(Type): - _toSchema = {'stringswatcherid': 'StringsWatcherId', 'error': 'Error', 'changes': 'Changes'} - _toPy = {'StringsWatcherId': 'stringswatcherid', 'Changes': 'changes', 'Error': 'error'} - def __init__(self, changes=None, error=None, stringswatcherid=None): - ''' - changes : typing.Sequence[str] - error : Error - stringswatcherid : str - ''' - self.changes = changes - self.error = Error.from_json(error) if error else None - self.stringswatcherid = stringswatcherid - - -class StringsWatchResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~StringsWatchResult] - ''' - self.results = [StringsWatchResult.from_json(o) for o in results or []] - - -class AddSubnetParams(Type): - _toSchema = {'subnettag': 'SubnetTag', 'zones': 'Zones', 'spacetag': 'SpaceTag', 'subnetproviderid': 'SubnetProviderId'} - _toPy = {'SubnetProviderId': 'subnetproviderid', 'Zones': 'zones', 'SubnetTag': 'subnettag', 'SpaceTag': 'spacetag'} - 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 AddSubnetsParams(Type): - _toSchema = {'subnets': 'Subnets'} - _toPy = {'Subnets': 'subnets'} - def __init__(self, subnets=None): - ''' - subnets : typing.Sequence[~AddSubnetParams] - ''' - self.subnets = [AddSubnetParams.from_json(o) for o in subnets or []] - - -class CreateSpaceParams(Type): - _toSchema = {'providerid': 'ProviderId', 'public': 'Public', 'spacetag': 'SpaceTag', 'subnettags': 'SubnetTags'} - _toPy = {'SubnetTags': 'subnettags', 'Public': 'public', 'ProviderId': 'providerid', 'SpaceTag': 'spacetag'} - def __init__(self, providerid=None, public=None, spacetag=None, subnettags=None): - ''' - providerid : str - public : bool - spacetag : str - subnettags : typing.Sequence[str] - ''' - self.providerid = providerid - self.public = public - self.spacetag = spacetag - self.subnettags = subnettags - - -class CreateSpacesParams(Type): - _toSchema = {'spaces': 'Spaces'} - _toPy = {'Spaces': 'spaces'} - def __init__(self, spaces=None): - ''' - spaces : typing.Sequence[~CreateSpaceParams] - ''' - self.spaces = [CreateSpaceParams.from_json(o) for o in spaces or []] - - -class DiscoverSpacesResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~ProviderSpace] - ''' - self.results = [ProviderSpace.from_json(o) for o in results or []] - - -class ListSubnetsResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~Subnet] - ''' - self.results = [Subnet.from_json(o) for o in results or []] - - -class ProviderSpace(Type): - _toSchema = {'name': 'Name', 'providerid': 'ProviderId', 'subnets': 'Subnets', 'error': 'Error'} - _toPy = {'Name': 'name', 'ProviderId': 'providerid', 'Error': 'error', 'Subnets': 'subnets'} - def __init__(self, error=None, name=None, providerid=None, subnets=None): - ''' - error : Error - name : str - providerid : str - subnets : typing.Sequence[~Subnet] - ''' - 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 []] - - -class Subnet(Type): - _toSchema = {'staticrangehighip': 'StaticRangeHighIP', 'vlantag': 'VLANTag', 'spacetag': 'SpaceTag', 'cidr': 'CIDR', 'providerid': 'ProviderId', 'status': 'Status', 'zones': 'Zones', 'life': 'Life', 'staticrangelowip': 'StaticRangeLowIP'} - _toPy = {'StaticRangeLowIP': 'staticrangelowip', 'Life': 'life', 'StaticRangeHighIP': 'staticrangehighip', 'ProviderId': 'providerid', 'SpaceTag': 'spacetag', 'VLANTag': 'vlantag', 'Zones': 'zones', 'CIDR': 'cidr', 'Status': 'status'} - def __init__(self, cidr=None, life=None, providerid=None, spacetag=None, staticrangehighip=None, staticrangelowip=None, status=None, vlantag=None, zones=None): - ''' - cidr : str - life : str - providerid : str - spacetag : str - staticrangehighip : typing.Sequence[int] - staticrangelowip : typing.Sequence[int] - status : str - vlantag : int - zones : typing.Sequence[str] - ''' - self.cidr = cidr - self.life = life - self.providerid = providerid - self.spacetag = spacetag - self.staticrangehighip = staticrangehighip - self.staticrangelowip = staticrangelowip - self.status = status - self.vlantag = vlantag - self.zones = zones - - -class SubnetsFilters(Type): - _toSchema = {'zone': 'Zone', 'spacetag': 'SpaceTag'} - _toPy = {'Zone': 'zone', 'SpaceTag': 'spacetag'} - def __init__(self, spacetag=None, zone=None): - ''' - spacetag : str - zone : str - ''' - self.spacetag = spacetag - self.zone = zone - - -class BlockDevice(Type): - _toSchema = {'uuid': 'UUID', 'devicename': 'DeviceName', 'busaddress': 'BusAddress', 'hardwareid': 'HardwareId', 'inuse': 'InUse', 'mountpoint': 'MountPoint', 'devicelinks': 'DeviceLinks', 'filesystemtype': 'FilesystemType', 'size': 'Size', 'label': 'Label'} - _toPy = {'Size': 'size', 'InUse': 'inuse', 'Label': 'label', 'FilesystemType': 'filesystemtype', 'UUID': 'uuid', 'BusAddress': 'busaddress', 'HardwareId': 'hardwareid', 'DeviceName': 'devicename', 'MountPoint': 'mountpoint', '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): - ''' - busaddress : str - devicelinks : typing.Sequence[str] - devicename : str - filesystemtype : str - hardwareid : str - inuse : bool - label : str - mountpoint : str - size : int - uuid : 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 - - -class MachineBlockDevices(Type): - _toSchema = {'blockdevices': 'blockdevices', 'machine': 'machine'} - _toPy = {'blockdevices': 'blockdevices', 'machine': 'machine'} - def __init__(self, blockdevices=None, machine=None): - ''' - blockdevices : typing.Sequence[~BlockDevice] - machine : str - ''' - self.blockdevices = [BlockDevice.from_json(o) for o in blockdevices or []] - self.machine = machine - - -class SetMachineBlockDevices(Type): - _toSchema = {'machineblockdevices': 'machineblockdevices'} - _toPy = {'machineblockdevices': 'machineblockdevices'} - def __init__(self, machineblockdevices=None): - ''' - machineblockdevices : typing.Sequence[~MachineBlockDevices] - ''' - self.machineblockdevices = [MachineBlockDevices.from_json(o) for o in machineblockdevices or []] - - -class MachineStorageId(Type): - _toSchema = {'machinetag': 'machinetag', 'attachmenttag': 'attachmenttag'} - _toPy = {'machinetag': 'machinetag', 'attachmenttag': 'attachmenttag'} - def __init__(self, attachmenttag=None, machinetag=None): - ''' - attachmenttag : str - machinetag : str - ''' - self.attachmenttag = attachmenttag - self.machinetag = machinetag - - -class MachineStorageIdsWatchResult(Type): - _toSchema = {'machinestorageidswatcherid': 'MachineStorageIdsWatcherId', 'error': 'Error', 'changes': 'Changes'} - _toPy = {'Changes': 'changes', 'MachineStorageIdsWatcherId': 'machinestorageidswatcherid', 'Error': 'error'} - def __init__(self, changes=None, error=None, machinestorageidswatcherid=None): - ''' - changes : typing.Sequence[~MachineStorageId] - error : Error - machinestorageidswatcherid : str - ''' - self.changes = [MachineStorageId.from_json(o) for o in changes or []] - self.error = Error.from_json(error) if error else None - self.machinestorageidswatcherid = machinestorageidswatcherid - - -class BoolResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~BoolResult] - ''' - self.results = [BoolResult.from_json(o) for o in results or []] - - -class MachinePortRange(Type): - _toSchema = {'unittag': 'UnitTag', 'portrange': 'PortRange', 'relationtag': 'RelationTag'} - _toPy = {'PortRange': 'portrange', 'UnitTag': 'unittag', 'RelationTag': 'relationtag'} - def __init__(self, portrange=None, relationtag=None, unittag=None): - ''' - portrange : PortRange - relationtag : str - unittag : str - ''' - self.portrange = PortRange.from_json(portrange) if portrange else None - self.relationtag = relationtag - self.unittag = unittag - - -class MachinePorts(Type): - _toSchema = {'subnettag': 'SubnetTag', 'machinetag': 'MachineTag'} - _toPy = {'MachineTag': 'machinetag', 'SubnetTag': 'subnettag'} - def __init__(self, machinetag=None, subnettag=None): - ''' - machinetag : str - subnettag : str - ''' - self.machinetag = machinetag - self.subnettag = subnettag - - -class MachinePortsParams(Type): - _toSchema = {'params': 'Params'} - _toPy = {'Params': 'params'} - def __init__(self, params=None): - ''' - params : typing.Sequence[~MachinePorts] - ''' - self.params = [MachinePorts.from_json(o) for o in params or []] - - -class MachinePortsResult(Type): - _toSchema = {'ports': 'Ports', 'error': 'Error'} - _toPy = {'Ports': 'ports', 'Error': 'error'} - def __init__(self, error=None, ports=None): - ''' - error : Error - ports : typing.Sequence[~MachinePortRange] - ''' - self.error = Error.from_json(error) if error else None - self.ports = [MachinePortRange.from_json(o) for o in ports or []] - - -class MachinePortsResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~MachinePortsResult] - ''' - self.results = [MachinePortsResult.from_json(o) for o in results or []] - - -class NotifyWatchResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~NotifyWatchResult] - ''' - self.results = [NotifyWatchResult.from_json(o) for o in results or []] - - -class PortRange(Type): - _toSchema = {'fromport': 'FromPort', 'protocol': 'Protocol', 'toport': 'ToPort'} - _toPy = {'Protocol': 'protocol', 'FromPort': 'fromport', 'ToPort': 'toport'} - def __init__(self, fromport=None, protocol=None, toport=None): - ''' - fromport : int - protocol : str - toport : int - ''' - self.fromport = fromport - self.protocol = protocol - self.toport = toport - - -class StringResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~StringResult] - ''' - self.results = [StringResult.from_json(o) for o in results or []] - - -class StringsResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~StringsResult] - ''' - self.results = [StringsResult.from_json(o) for o in results or []] - - -class ControllersChangeResult(Type): - _toSchema = {'error': 'Error', 'result': 'Result'} - _toPy = {'Result': 'result', 'Error': 'error'} - def __init__(self, error=None, result=None): - ''' - error : Error - result : ControllersChanges - ''' - self.error = Error.from_json(error) if error else None - self.result = ControllersChanges.from_json(result) if result else None - - -class ControllersChangeResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~ControllersChangeResult] - ''' - self.results = [ControllersChangeResult.from_json(o) for o in results or []] - - -class ControllersChanges(Type): - _toSchema = {'converted': 'converted', 'demoted': 'demoted', 'promoted': 'promoted', 'removed': 'removed', 'maintained': 'maintained', 'added': 'added'} - _toPy = {'converted': 'converted', 'demoted': 'demoted', 'promoted': 'promoted', 'removed': 'removed', 'maintained': 'maintained', 'added': 'added'} - def __init__(self, added=None, converted=None, demoted=None, maintained=None, promoted=None, removed=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] - ''' - self.added = added - self.converted = converted - self.demoted = demoted - self.maintained = maintained - self.promoted = promoted - self.removed = removed - - -class ControllersSpec(Type): - _toSchema = {'num_controllers': 'num-controllers', 'placement': 'placement', 'modeltag': 'ModelTag', 'series': 'series', 'constraints': 'constraints'} - _toPy = {'num-controllers': 'num_controllers', 'placement': 'placement', 'ModelTag': 'modeltag', 'series': 'series', 'constraints': 'constraints'} - 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 - ''' - self.modeltag = modeltag - self.constraints = Value.from_json(constraints) if constraints else None - self.num_controllers = num_controllers - self.placement = placement - self.series = series - - -class ControllersSpecs(Type): - _toSchema = {'specs': 'Specs'} - _toPy = {'Specs': 'specs'} - def __init__(self, specs=None): - ''' - specs : typing.Sequence[~ControllersSpec] - ''' - self.specs = [ControllersSpec.from_json(o) for o in specs or []] - - -class HAMember(Type): - _toSchema = {'series': 'Series', 'publicaddress': 'PublicAddress', 'tag': 'Tag'} - _toPy = {'Series': 'series', 'PublicAddress': 'publicaddress', 'Tag': 'tag'} - def __init__(self, publicaddress=None, series=None, tag=None): - ''' - publicaddress : Address - series : str - tag : str - ''' - self.publicaddress = Address.from_json(publicaddress) if publicaddress else None - self.series = series - self.tag = tag - - -class Member(Type): - _toSchema = {'priority': 'Priority', 'tags': 'Tags', 'buildindexes': 'BuildIndexes', 'arbiter': 'Arbiter', 'votes': 'Votes', 'slavedelay': 'SlaveDelay', 'hidden': 'Hidden', 'address': 'Address', 'id_': 'Id'} - _toPy = {'SlaveDelay': 'slavedelay', 'Priority': 'priority', 'Votes': 'votes', 'BuildIndexes': 'buildindexes', 'Tags': 'tags', 'Id': 'id_', 'Arbiter': 'arbiter', 'Hidden': 'hidden', 'Address': 'address'} - def __init__(self, address=None, arbiter=None, buildindexes=None, hidden=None, id_=None, priority=None, slavedelay=None, tags=None, votes=None): - ''' - address : str - arbiter : bool - buildindexes : bool - hidden : bool - id_ : int - priority : float - slavedelay : int - tags : typing.Mapping[str, str] - votes : int - ''' - 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 MongoUpgradeResults(Type): - _toSchema = {'master': 'Master', 'rsmembers': 'RsMembers', 'members': 'Members'} - _toPy = {'Master': 'master', 'RsMembers': 'rsmembers', 'Members': 'members'} - def __init__(self, master=None, members=None, rsmembers=None): - ''' - master : HAMember - members : typing.Sequence[~HAMember] - rsmembers : typing.Sequence[~Member] - ''' - 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 []] - - -class ResumeReplicationParams(Type): - _toSchema = {'members': 'Members'} - _toPy = {'Members': 'members'} - def __init__(self, members=None): - ''' - members : typing.Sequence[~Member] - ''' - self.members = [Member.from_json(o) for o in members or []] - - -class UpgradeMongoParams(Type): - _toSchema = {'major': 'Major', 'storageengine': 'StorageEngine', 'patch': 'Patch', 'minor': 'Minor'} - _toPy = {'StorageEngine': 'storageengine', 'Patch': 'patch', 'Major': 'major', 'Minor': 'minor'} - def __init__(self, major=None, minor=None, patch=None, storageengine=None): - ''' - major : int - minor : int - patch : str - storageengine : str - ''' - self.major = major - self.minor = minor - self.patch = patch - self.storageengine = storageengine - - -class Version(Type): - _toSchema = {'major': 'Major', 'storageengine': 'StorageEngine', 'patch': 'Patch', 'minor': 'Minor'} - _toPy = {'StorageEngine': 'storageengine', 'Patch': 'patch', 'Major': 'major', 'Minor': 'minor'} - def __init__(self, major=None, minor=None, patch=None, storageengine=None): - ''' - major : int - minor : int - patch : str - storageengine : str - ''' - self.major = major - self.minor = minor - self.patch = patch - self.storageengine = storageengine - - -class SSHHostKeySet(Type): - _toSchema = {'entity_keys': 'entity-keys'} - _toPy = {'entity-keys': 'entity_keys'} - def __init__(self, entity_keys=None): - ''' - entity_keys : typing.Sequence[~SSHHostKeys] - ''' - self.entity_keys = [SSHHostKeys.from_json(o) for o in entity_keys or []] - - -class SSHHostKeys(Type): - _toSchema = {'public_keys': 'public-keys', 'tag': 'tag'} - _toPy = {'tag': 'tag', 'public-keys': 'public_keys'} - def __init__(self, public_keys=None, tag=None): - ''' - public_keys : typing.Sequence[str] - tag : str - ''' - self.public_keys = public_keys - self.tag = tag - - -class ImageFilterParams(Type): - _toSchema = {'images': 'images'} - _toPy = {'images': 'images'} - def __init__(self, images=None): - ''' - images : typing.Sequence[~ImageSpec] - ''' - self.images = [ImageSpec.from_json(o) for o in images or []] - - -class ImageMetadata(Type): - _toSchema = {'kind': 'kind', 'series': 'series', 'arch': 'arch', 'created': 'created', 'url': 'url'} - _toPy = {'kind': 'kind', 'series': 'series', 'arch': 'arch', 'created': 'created', 'url': 'url'} - def __init__(self, arch=None, created=None, kind=None, series=None, url=None): - ''' - arch : str - created : str - kind : str - series : str - url : str - ''' - self.arch = arch - self.created = created - self.kind = kind - self.series = series - self.url = url - - -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): - ''' - arch : str - kind : str - series : str - ''' - self.arch = arch - self.kind = kind - self.series = series - - -class ListImageResult(Type): - _toSchema = {'result': 'result'} - _toPy = {'result': 'result'} - def __init__(self, result=None): - ''' - result : typing.Sequence[~ImageMetadata] - ''' - self.result = [ImageMetadata.from_json(o) for o in result or []] - - -class CloudImageMetadata(Type): - _toSchema = {'priority': 'priority', 'source': 'source', 'series': 'series', 'root_storage_type': 'root_storage_type', 'version': 'version', 'root_storage_size': 'root_storage_size', 'image_id': 'image_id', 'region': 'region', 'arch': 'arch', 'virt_type': 'virt_type', 'stream': 'stream'} - _toPy = {'priority': 'priority', 'source': 'source', 'series': 'series', 'root_storage_type': 'root_storage_type', 'version': 'version', 'root_storage_size': 'root_storage_size', 'image_id': 'image_id', 'region': 'region', 'arch': 'arch', 'virt_type': 'virt_type', 'stream': 'stream'} - 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): - ''' - 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.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 CloudImageMetadataList(Type): - _toSchema = {'metadata': 'metadata'} - _toPy = {'metadata': 'metadata'} - def __init__(self, metadata=None): - ''' - metadata : typing.Sequence[~CloudImageMetadata] - ''' - self.metadata = [CloudImageMetadata.from_json(o) for o in metadata or []] - - -class ImageMetadataFilter(Type): - _toSchema = {'series': 'series', 'stream': 'stream', 'root_storage_type': 'root-storage-type', 'arches': 'arches', 'region': 'region', 'virt_type': 'virt_type'} - _toPy = {'series': 'series', 'stream': 'stream', 'root-storage-type': 'root_storage_type', 'arches': 'arches', 'region': 'region', 'virt_type': 'virt_type'} - def __init__(self, arches=None, region=None, root_storage_type=None, series=None, stream=None, virt_type=None): - ''' - arches : typing.Sequence[str] - region : str - root_storage_type : str - series : typing.Sequence[str] - stream : str - virt_type : str - ''' - 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 ListCloudImageMetadataResult(Type): - _toSchema = {'result': 'result'} - _toPy = {'result': 'result'} - def __init__(self, result=None): - ''' - result : typing.Sequence[~CloudImageMetadata] - ''' - self.result = [CloudImageMetadata.from_json(o) for o in result or []] - - -class MetadataImageIds(Type): - _toSchema = {'image_ids': 'image_ids'} - _toPy = {'image_ids': 'image_ids'} - def __init__(self, image_ids=None): - ''' - image_ids : typing.Sequence[str] - ''' - self.image_ids = image_ids - - -class MetadataSaveParams(Type): - _toSchema = {'metadata': 'metadata'} - _toPy = {'metadata': 'metadata'} - def __init__(self, metadata=None): - ''' - metadata : typing.Sequence[~CloudImageMetadataList] - ''' - self.metadata = [CloudImageMetadataList.from_json(o) for o in metadata or []] - - -class EntityStatusArgs(Type): - _toSchema = {'data': 'Data', 'status': 'Status', 'tag': 'Tag', 'info': 'Info'} - _toPy = {'Tag': 'tag', 'Data': 'data', 'Status': 'status', 'Info': 'info'} - def __init__(self, data=None, info=None, status=None, tag=None): - ''' - data : typing.Mapping[str, typing.Any] - info : str - status : str - tag : str - ''' - self.data = data - self.info = info - self.status = status - self.tag = tag - - -class MachineAddresses(Type): - _toSchema = {'addresses': 'Addresses', 'tag': 'Tag'} - _toPy = {'Tag': 'tag', 'Addresses': 'addresses'} - def __init__(self, addresses=None, tag=None): - ''' - addresses : typing.Sequence[~Address] - tag : str - ''' - self.addresses = [Address.from_json(o) for o in addresses or []] - self.tag = tag - - -class MachineAddressesResult(Type): - _toSchema = {'addresses': 'Addresses', 'error': 'Error'} - _toPy = {'Addresses': 'addresses', 'Error': 'error'} - def __init__(self, addresses=None, error=None): - ''' - addresses : typing.Sequence[~Address] - error : Error - ''' - self.addresses = [Address.from_json(o) for o in addresses or []] - self.error = Error.from_json(error) if error else None - - -class MachineAddressesResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~MachineAddressesResult] - ''' - self.results = [MachineAddressesResult.from_json(o) for o in results or []] - - -class SetMachinesAddresses(Type): - _toSchema = {'machineaddresses': 'MachineAddresses'} - _toPy = {'MachineAddresses': 'machineaddresses'} - def __init__(self, machineaddresses=None): - ''' - machineaddresses : typing.Sequence[~MachineAddresses] - ''' - self.machineaddresses = [MachineAddresses.from_json(o) for o in machineaddresses or []] - - -class SetStatus(Type): - _toSchema = {'entities': 'Entities'} - _toPy = {'Entities': 'entities'} - def __init__(self, entities=None): - ''' - entities : typing.Sequence[~EntityStatusArgs] - ''' - self.entities = [EntityStatusArgs.from_json(o) for o in entities or []] - - -class StatusResult(Type): - _toSchema = {'since': 'Since', 'data': 'Data', 'status': 'Status', 'error': 'Error', 'info': 'Info', 'id_': 'Id', 'life': 'Life'} - _toPy = {'Life': 'life', 'Info': 'info', 'Id': 'id_', 'Since': 'since', 'Data': 'data', 'Status': 'status', 'Error': 'error'} - def __init__(self, data=None, error=None, id_=None, info=None, life=None, since=None, status=None): - ''' - data : typing.Mapping[str, typing.Any] - error : Error - id_ : str - info : str - life : str - since : str - status : 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 - - -class StatusResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~StatusResult] - ''' - self.results = [StatusResult.from_json(o) for o in results or []] - - -class ListSSHKeys(Type): - _toSchema = {'entities': 'Entities', 'mode': 'Mode'} - _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 - - -class ModifyUserSSHKeys(Type): - _toSchema = {'user': 'User', 'keys': 'Keys'} - _toPy = {'User': 'user', 'Keys': 'keys'} - def __init__(self, keys=None, user=None): - ''' - keys : typing.Sequence[str] - user : str - ''' - self.keys = keys - self.user = user - - -class ClaimLeadershipBulkParams(Type): - _toSchema = {'params': 'Params'} - _toPy = {'Params': 'params'} - def __init__(self, params=None): - ''' - params : typing.Sequence[~ClaimLeadershipParams] - ''' - self.params = [ClaimLeadershipParams.from_json(o) for o in params or []] - - -class ClaimLeadershipBulkResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~ErrorResult] - ''' - self.results = [ErrorResult.from_json(o) for o in results or []] - - -class ClaimLeadershipParams(Type): - _toSchema = {'servicetag': 'ServiceTag', 'unittag': 'UnitTag', 'durationseconds': 'DurationSeconds'} - _toPy = {'ServiceTag': 'servicetag', 'DurationSeconds': 'durationseconds', 'UnitTag': 'unittag'} - def __init__(self, durationseconds=None, servicetag=None, unittag=None): - ''' - durationseconds : float - servicetag : str - unittag : str - ''' - self.durationseconds = durationseconds - self.servicetag = servicetag - self.unittag = unittag - - -class ServiceTag(Type): - _toSchema = {'name': 'Name'} - _toPy = {'Name': 'name'} - def __init__(self, name=None): - ''' - name : str - ''' - self.name = name - - -class ActionExecutionResult(Type): - _toSchema = {'results': 'results', 'message': 'message', 'status': 'status', 'actiontag': 'actiontag'} - _toPy = {'results': 'results', 'message': 'message', 'status': 'status', 'actiontag': 'actiontag'} - def __init__(self, actiontag=None, message=None, results=None, status=None): - ''' - actiontag : str - message : str - results : typing.Mapping[str, typing.Any] - status : str - ''' - self.actiontag = actiontag - self.message = message - self.results = results - self.status = status - - -class ActionExecutionResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~ActionExecutionResult] - ''' - self.results = [ActionExecutionResult.from_json(o) for o in results or []] - - -class JobsResult(Type): - _toSchema = {'jobs': 'Jobs', 'error': 'Error'} - _toPy = {'Jobs': 'jobs', 'Error': 'error'} - def __init__(self, error=None, jobs=None): - ''' - error : Error - jobs : typing.Sequence[str] - ''' - self.error = Error.from_json(error) if error else None - self.jobs = jobs - - -class JobsResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~JobsResult] - ''' - self.results = [JobsResult.from_json(o) for o in results or []] - - -class NetworkConfig(Type): - _toSchema = {'interfacename': 'InterfaceName', 'macaddress': 'MACAddress', 'dnssearchdomains': 'DNSSearchDomains', 'providervlanid': 'ProviderVLANId', 'dnsservers': 'DNSServers', 'parentinterfacename': 'ParentInterfaceName', 'disabled': 'Disabled', 'mtu': 'MTU', 'configtype': 'ConfigType', 'provideraddressid': 'ProviderAddressId', 'address': 'Address', 'providerspaceid': 'ProviderSpaceId', 'cidr': 'CIDR', 'noautostart': 'NoAutoStart', 'providerid': 'ProviderId', 'gatewayaddress': 'GatewayAddress', 'deviceindex': 'DeviceIndex', 'providersubnetid': 'ProviderSubnetId', 'interfacetype': 'InterfaceType', 'vlantag': 'VLANTag'} - _toPy = {'CIDR': 'cidr', 'ProviderSpaceId': 'providerspaceid', 'ConfigType': 'configtype', 'DNSServers': 'dnsservers', 'NoAutoStart': 'noautostart', 'InterfaceName': 'interfacename', 'InterfaceType': 'interfacetype', 'Address': 'address', 'Disabled': 'disabled', 'ProviderSubnetId': 'providersubnetid', 'DeviceIndex': 'deviceindex', 'ProviderAddressId': 'provideraddressid', 'ParentInterfaceName': 'parentinterfacename', 'VLANTag': 'vlantag', 'MTU': 'mtu', 'ProviderVLANId': 'providervlanid', 'DNSSearchDomains': 'dnssearchdomains', 'MACAddress': 'macaddress', 'GatewayAddress': 'gatewayaddress', 'ProviderId': 'providerid'} - 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): - ''' - 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 - ''' - 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 - - -class SetMachineNetworkConfig(Type): - _toSchema = {'config': 'Config', 'tag': 'Tag'} - _toPy = {'Tag': 'tag', 'Config': 'config'} - def __init__(self, config=None, tag=None): - ''' - config : typing.Sequence[~NetworkConfig] - tag : str - ''' - self.config = [NetworkConfig.from_json(o) for o in config or []] - self.tag = tag - - -class MeterStatusResult(Type): - _toSchema = {'error': 'Error', 'code': 'Code', 'info': 'Info'} - _toPy = {'Code': 'code', 'Error': 'error', 'Info': 'info'} - def __init__(self, code=None, error=None, info=None): - ''' - code : str - error : Error - info : str - ''' - self.code = code - self.error = Error.from_json(error) if error else None - self.info = info - - -class MeterStatusResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~MeterStatusResult] - ''' - self.results = [MeterStatusResult.from_json(o) for o in results or []] - - -class Metric(Type): - _toSchema = {'key': 'Key', 'value': 'Value', 'time': 'Time'} - _toPy = {'Value': 'value', 'Key': 'key', 'Time': 'time'} - 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 MetricBatch(Type): - _toSchema = {'uuid': 'UUID', 'created': 'Created', 'charmurl': 'CharmURL', 'metrics': 'Metrics'} - _toPy = {'CharmURL': 'charmurl', 'Metrics': 'metrics', 'UUID': 'uuid', 'Created': 'created'} - def __init__(self, charmurl=None, created=None, metrics=None, uuid=None): - ''' - charmurl : str - created : str - metrics : typing.Sequence[~Metric] - uuid : str - ''' - self.charmurl = charmurl - self.created = created - self.metrics = [Metric.from_json(o) for o in metrics or []] - self.uuid = uuid - - -class MetricBatchParam(Type): - _toSchema = {'tag': 'Tag', 'batch': 'Batch'} - _toPy = {'Tag': 'tag', 'Batch': 'batch'} - def __init__(self, batch=None, tag=None): - ''' - batch : MetricBatch - tag : str - ''' - self.batch = MetricBatch.from_json(batch) if batch else None - self.tag = tag - - -class MetricBatchParams(Type): - _toSchema = {'batches': 'Batches'} - _toPy = {'Batches': 'batches'} - def __init__(self, batches=None): - ''' - batches : typing.Sequence[~MetricBatchParam] - ''' - self.batches = [MetricBatchParam.from_json(o) for o in batches or []] - - -class EntityMetrics(Type): - _toSchema = {'error': 'error', 'metrics': 'metrics'} - _toPy = {'error': 'error', 'metrics': 'metrics'} - def __init__(self, error=None, metrics=None): - ''' - error : Error - metrics : typing.Sequence[~MetricResult] - ''' - self.error = Error.from_json(error) if error else None - self.metrics = [MetricResult.from_json(o) for o in metrics or []] - - -class MeterStatusParam(Type): - _toSchema = {'tag': 'tag', 'code': 'code', 'info': 'info'} - _toPy = {'tag': 'tag', 'code': 'code', 'info': 'info'} - def __init__(self, code=None, info=None, tag=None): - ''' - code : str - info : str - tag : str - ''' - self.code = code - self.info = info - self.tag = tag - - -class MeterStatusParams(Type): - _toSchema = {'statues': 'statues'} - _toPy = {'statues': 'statues'} - def __init__(self, statues=None): - ''' - statues : typing.Sequence[~MeterStatusParam] - ''' - self.statues = [MeterStatusParam.from_json(o) for o in statues or []] - - -class MetricResult(Type): - _toSchema = {'key': 'key', 'value': 'value', 'time': 'time'} - _toPy = {'key': 'key', 'value': 'value', 'time': 'time'} - 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 MetricResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~EntityMetrics] - ''' - self.results = [EntityMetrics.from_json(o) for o in results or []] - - -class PhaseResult(Type): - _toSchema = {'error': 'Error', 'phase': 'phase'} - _toPy = {'Error': 'error', 'phase': 'phase'} - def __init__(self, error=None, phase=None): - ''' - error : Error - phase : str - ''' - self.error = Error.from_json(error) if error else None - self.phase = phase - - -class PhaseResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~PhaseResult] - ''' - self.results = [PhaseResult.from_json(o) for o in results or []] - - -class FullMigrationStatus(Type): - _toSchema = {'attempt': 'attempt', 'spec': 'spec', 'phase': 'phase'} - _toPy = {'attempt': 'attempt', 'spec': 'spec', 'phase': 'phase'} - def __init__(self, attempt=None, phase=None, spec=None): - ''' - attempt : int - phase : str - spec : ModelMigrationSpec - ''' - self.attempt = attempt - self.phase = phase - self.spec = ModelMigrationSpec.from_json(spec) if spec else None - - -class SerializedModel(Type): - _toSchema = {'bytes_': 'bytes'} - _toPy = {'bytes': 'bytes_'} - def __init__(self, bytes_=None): - ''' - bytes_ : typing.Sequence[int] - ''' - self.bytes_ = bytes_ - - -class SetMigrationPhaseArgs(Type): - _toSchema = {'phase': 'phase'} - _toPy = {'phase': 'phase'} - def __init__(self, phase=None): - ''' - phase : str - ''' - self.phase = phase - - -class MigrationStatus(Type): - _toSchema = {'phase': 'phase', 'attempt': 'attempt', 'source_api_addrs': 'source-api-addrs', 'source_ca_cert': 'source-ca-cert', 'target_api_addrs': 'target-api-addrs', 'target_ca_cert': 'target-ca-cert'} - _toPy = {'target-ca-cert': 'target_ca_cert', 'source-api-addrs': 'source_api_addrs', 'source-ca-cert': 'source_ca_cert', 'attempt': 'attempt', 'phase': 'phase', 'target-api-addrs': 'target_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): - ''' - attempt : int - phase : str - source_api_addrs : typing.Sequence[str] - source_ca_cert : str - target_api_addrs : typing.Sequence[str] - target_ca_cert : 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 - - -class ModelArgs(Type): - _toSchema = {'model_tag': 'model-tag'} - _toPy = {'model-tag': 'model_tag'} - def __init__(self, model_tag=None): - ''' - model_tag : str - ''' - self.model_tag = model_tag - - -class ModelCreateArgs(Type): - _toSchema = {'config': 'Config', 'ownertag': 'OwnerTag', 'account': 'Account'} - _toPy = {'OwnerTag': 'ownertag', 'Account': 'account', 'Config': 'config'} - def __init__(self, account=None, config=None, ownertag=None): - ''' - account : typing.Mapping[str, typing.Any] - config : typing.Mapping[str, typing.Any] - ownertag : str - ''' - self.account = account - self.config = config - self.ownertag = ownertag - - -class ModelInfoResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None): - ''' - error : Error - result : ModelInfo - ''' - self.error = Error.from_json(error) if error else None - self.result = ModelInfo.from_json(result) if result else None - - -class ModelInfoResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~ModelInfoResult] - ''' - self.results = [ModelInfoResult.from_json(o) for o in results or []] - - -class ModelSkeletonConfigArgs(Type): - _toSchema = {'provider': 'Provider', 'region': 'Region'} - _toPy = {'Provider': 'provider', 'Region': 'region'} - def __init__(self, provider=None, region=None): - ''' - provider : str - region : str - ''' - self.provider = provider - self.region = region - - -class ModifyModelAccess(Type): - _toSchema = {'model_tag': 'model-tag', 'access': 'access', 'user_tag': 'user-tag', 'action': 'action'} - _toPy = {'model-tag': 'model_tag', 'access': 'access', 'user-tag': 'user_tag', 'action': 'action'} - def __init__(self, access=None, action=None, model_tag=None, user_tag=None): - ''' - access : str - action : str - model_tag : str - user_tag : str - ''' - self.access = access - self.action = action - self.model_tag = model_tag - self.user_tag = user_tag - - -class ModifyModelAccessRequest(Type): - _toSchema = {'changes': 'changes'} - _toPy = {'changes': 'changes'} - def __init__(self, changes=None): - ''' - changes : typing.Sequence[~ModifyModelAccess] - ''' - self.changes = [ModifyModelAccess.from_json(o) for o in changes or []] - - -class ConstraintsResult(Type): - _toSchema = {'error': 'Error', 'constraints': 'Constraints'} - _toPy = {'Error': 'error', 'Constraints': 'constraints'} - def __init__(self, constraints=None, error=None): - ''' - constraints : Value - error : Error - ''' - self.constraints = Value.from_json(constraints) if constraints else None - self.error = Error.from_json(error) if error else None - - -class ConstraintsResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~ConstraintsResult] - ''' - self.results = [ConstraintsResult.from_json(o) for o in results or []] - - -class ContainerConfig(Type): - _toSchema = {'proxy': 'Proxy', 'sslhostnameverification': 'SSLHostnameVerification', 'aptmirror': 'AptMirror', 'allowlxcloopmounts': 'AllowLXCLoopMounts', 'authorizedkeys': 'AuthorizedKeys', 'aptproxy': 'AptProxy', 'preferipv6': 'PreferIPv6', 'updatebehavior': 'UpdateBehavior', 'providertype': 'ProviderType'} - _toPy = {'UpdateBehavior': 'updatebehavior', 'AptProxy': 'aptproxy', 'Proxy': 'proxy', 'AuthorizedKeys': 'authorizedkeys', 'ProviderType': 'providertype', 'AllowLXCLoopMounts': 'allowlxcloopmounts', 'PreferIPv6': 'preferipv6', 'SSLHostnameVerification': 'sslhostnameverification', 'AptMirror': 'aptmirror'} - 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 - ''' - 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 - - -class ContainerManagerConfig(Type): - _toSchema = {'managerconfig': 'ManagerConfig'} - _toPy = {'ManagerConfig': 'managerconfig'} - def __init__(self, managerconfig=None): - ''' - managerconfig : typing.Mapping[str, str] - ''' - self.managerconfig = managerconfig - - -class ContainerManagerConfigParams(Type): - _toSchema = {'type_': 'Type'} - _toPy = {'Type': 'type_'} - def __init__(self, type_=None): - ''' - type_ : str - ''' - self.type_ = type_ - - -class DistributionGroupResult(Type): - _toSchema = {'error': 'Error', 'result': 'Result'} - _toPy = {'Result': 'result', 'Error': 'error'} - 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 DistributionGroupResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~DistributionGroupResult] - ''' - self.results = [DistributionGroupResult.from_json(o) for o in results or []] - - -class InstanceInfo(Type): - _toSchema = {'characteristics': 'Characteristics', 'volumes': 'Volumes', 'networkconfig': 'NetworkConfig', 'volumeattachments': 'VolumeAttachments', 'instanceid': 'InstanceId', 'tag': 'Tag', 'nonce': 'Nonce'} - _toPy = {'Characteristics': 'characteristics', 'Volumes': 'volumes', 'NetworkConfig': 'networkconfig', 'InstanceId': 'instanceid', 'Nonce': 'nonce', 'Tag': 'tag', 'VolumeAttachments': 'volumeattachments'} - def __init__(self, characteristics=None, instanceid=None, networkconfig=None, nonce=None, tag=None, volumeattachments=None, volumes=None): - ''' - characteristics : HardwareCharacteristics - instanceid : str - networkconfig : typing.Sequence[~NetworkConfig] - nonce : str - tag : str - volumeattachments : typing.Mapping[str, ~VolumeAttachmentInfo] - volumes : typing.Sequence[~Volume] - ''' - 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 []] - - -class InstancesInfo(Type): - _toSchema = {'machines': 'Machines'} - _toPy = {'Machines': 'machines'} - def __init__(self, machines=None): - ''' - machines : typing.Sequence[~InstanceInfo] - ''' - self.machines = [InstanceInfo.from_json(o) for o in machines or []] - - -class MachineContainers(Type): - _toSchema = {'machinetag': 'MachineTag', 'containertypes': 'ContainerTypes'} - _toPy = {'MachineTag': 'machinetag', 'ContainerTypes': 'containertypes'} - def __init__(self, containertypes=None, machinetag=None): - ''' - containertypes : typing.Sequence[str] - machinetag : str - ''' - self.containertypes = containertypes - self.machinetag = machinetag - - -class MachineContainersParams(Type): - _toSchema = {'params': 'Params'} - _toPy = {'Params': 'params'} - def __init__(self, params=None): - ''' - params : typing.Sequence[~MachineContainers] - ''' - self.params = [MachineContainers.from_json(o) for o in params or []] - - -class MachineNetworkConfigResult(Type): - _toSchema = {'error': 'Error', 'info': 'Info'} - _toPy = {'Info': 'info', 'Error': 'error'} - def __init__(self, error=None, info=None): - ''' - error : Error - info : typing.Sequence[~NetworkConfig] - ''' - self.error = Error.from_json(error) if error else None - self.info = [NetworkConfig.from_json(o) for o in info or []] - - -class MachineNetworkConfigResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~MachineNetworkConfigResult] - ''' - self.results = [MachineNetworkConfigResult.from_json(o) for o in results or []] - - -class ProvisioningInfo(Type): - _toSchema = {'tags': 'Tags', 'imagemetadata': 'ImageMetadata', 'placement': 'Placement', 'volumes': 'Volumes', 'constraints': 'Constraints', 'jobs': 'Jobs', 'endpointbindings': 'EndpointBindings', 'series': 'Series', 'subnetstozones': 'SubnetsToZones'} - _toPy = {'SubnetsToZones': 'subnetstozones', 'Series': 'series', 'EndpointBindings': 'endpointbindings', 'Placement': 'placement', 'Jobs': 'jobs', 'Tags': 'tags', 'ImageMetadata': 'imagemetadata', 'Volumes': 'volumes', 'Constraints': 'constraints'} - def __init__(self, constraints=None, endpointbindings=None, imagemetadata=None, jobs=None, placement=None, series=None, subnetstozones=None, tags=None, volumes=None): - ''' - constraints : Value - endpointbindings : typing.Mapping[str, str] - imagemetadata : typing.Sequence[~CloudImageMetadata] - jobs : typing.Sequence[str] - placement : 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.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 = {'Result': 'result', 'Error': 'error'} - def __init__(self, error=None, result=None): - ''' - error : Error - result : ProvisioningInfo - ''' - self.error = Error.from_json(error) if error else None - self.result = ProvisioningInfo.from_json(result) if result else None - - -class ProvisioningInfoResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~ProvisioningInfoResult] - ''' - self.results = [ProvisioningInfoResult.from_json(o) for o in results or []] - - -class Settings(Type): - _toSchema = {'noproxy': 'NoProxy', 'http': 'Http', 'https': 'Https', 'ftp': 'Ftp'} - _toPy = {'Ftp': 'ftp', 'Https': 'https', 'Http': 'http', '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 = {'disablesslhostnameverification': 'DisableSSLHostnameVerification', 'error': 'Error', 'toolslist': 'ToolsList'} - _toPy = {'ToolsList': 'toolslist', 'DisableSSLHostnameVerification': 'disablesslhostnameverification', 'Error': 'error'} - def __init__(self, disablesslhostnameverification=None, error=None, toolslist=None): - ''' - disablesslhostnameverification : bool - error : Error - toolslist : typing.Sequence[~Tools] - ''' - self.disablesslhostnameverification = disablesslhostnameverification - self.error = Error.from_json(error) if error else None - self.toolslist = [Tools.from_json(o) for o in toolslist or []] - - -class ToolsResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~ToolsResult] - ''' - self.results = [ToolsResult.from_json(o) for o in results or []] - - -class UpdateBehavior(Type): - _toSchema = {'enableosupgrade': 'EnableOSUpgrade', 'enableosrefreshupdate': 'EnableOSRefreshUpdate'} - _toPy = {'EnableOSRefreshUpdate': 'enableosrefreshupdate', 'EnableOSUpgrade': 'enableosupgrade'} - def __init__(self, enableosrefreshupdate=None, enableosupgrade=None): - ''' - enableosrefreshupdate : bool - enableosupgrade : bool - ''' - self.enableosrefreshupdate = enableosrefreshupdate - self.enableosupgrade = enableosupgrade - - -class Volume(Type): - _toSchema = {'volumetag': 'volumetag', 'info': 'info'} - _toPy = {'volumetag': 'volumetag', 'info': 'info'} - def __init__(self, info=None, volumetag=None): - ''' - info : VolumeInfo - volumetag : str - ''' - self.info = VolumeInfo.from_json(info) if info else None - self.volumetag = volumetag - - -class VolumeAttachmentInfo(Type): - _toSchema = {'devicename': 'devicename', 'busaddress': 'busaddress', 'read_only': 'read-only', 'devicelink': 'devicelink'} - _toPy = {'devicename': 'devicename', 'busaddress': 'busaddress', 'read-only': 'read_only', 'devicelink': 'devicelink'} - def __init__(self, busaddress=None, devicelink=None, devicename=None, read_only=None): - ''' - busaddress : str - devicelink : str - devicename : str - read_only : bool - ''' - self.busaddress = busaddress - self.devicelink = devicelink - self.devicename = devicename - self.read_only = read_only - - -class VolumeAttachmentParams(Type): - _toSchema = {'provider': 'provider', 'machinetag': 'machinetag', 'instanceid': 'instanceid', 'volumetag': 'volumetag', 'volumeid': 'volumeid', 'read_only': 'read-only'} - _toPy = {'provider': 'provider', 'machinetag': 'machinetag', 'instanceid': 'instanceid', 'volumetag': 'volumetag', 'volumeid': 'volumeid', 'read-only': 'read_only'} - def __init__(self, instanceid=None, machinetag=None, provider=None, read_only=None, volumeid=None, volumetag=None): - ''' - instanceid : str - machinetag : str - provider : str - read_only : bool - volumeid : str - volumetag : str - ''' - self.instanceid = instanceid - self.machinetag = machinetag - self.provider = provider - self.read_only = read_only - self.volumeid = volumeid - self.volumetag = volumetag - - -class VolumeInfo(Type): - _toSchema = {'persistent': 'persistent', 'volumeid': 'volumeid', 'hardwareid': 'hardwareid', 'size': 'size'} - _toPy = {'persistent': 'persistent', 'volumeid': 'volumeid', 'hardwareid': 'hardwareid', 'size': 'size'} - def __init__(self, hardwareid=None, persistent=None, size=None, volumeid=None): - ''' - hardwareid : str - persistent : bool - size : int - volumeid : str - ''' - self.hardwareid = hardwareid - self.persistent = persistent - self.size = size - self.volumeid = volumeid - - -class VolumeParams(Type): - _toSchema = {'provider': 'provider', 'tags': 'tags', 'attributes': 'attributes', 'volumetag': 'volumetag', 'size': 'size', 'attachment': 'attachment'} - _toPy = {'provider': 'provider', 'tags': 'tags', 'attributes': 'attributes', 'volumetag': 'volumetag', 'size': 'size', 'attachment': 'attachment'} - def __init__(self, attachment=None, attributes=None, provider=None, size=None, tags=None, volumetag=None): - ''' - attachment : VolumeAttachmentParams - attributes : typing.Mapping[str, typing.Any] - provider : str - size : int - tags : typing.Mapping[str, str] - volumetag : str - ''' - 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 - - -class WatchContainer(Type): - _toSchema = {'machinetag': 'MachineTag', 'containertype': 'ContainerType'} - _toPy = {'MachineTag': 'machinetag', 'ContainerType': 'containertype'} - def __init__(self, containertype=None, machinetag=None): - ''' - containertype : str - machinetag : str - ''' - self.containertype = containertype - self.machinetag = machinetag - - -class WatchContainers(Type): - _toSchema = {'params': 'Params'} - _toPy = {'Params': 'params'} - def __init__(self, params=None): - ''' - params : typing.Sequence[~WatchContainer] - ''' - self.params = [WatchContainer.from_json(o) for o in params or []] - - -class ProxyConfig(Type): - _toSchema = {'noproxy': 'NoProxy', 'http': 'HTTP', 'https': 'HTTPS', 'ftp': 'FTP'} - _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 ProxyConfigResult(Type): - _toSchema = {'aptproxysettings': 'APTProxySettings', 'error': 'Error', 'proxysettings': 'ProxySettings'} - _toPy = {'APTProxySettings': 'aptproxysettings', 'Error': 'error', 'ProxySettings': 'proxysettings'} - def __init__(self, aptproxysettings=None, error=None, proxysettings=None): - ''' - aptproxysettings : ProxyConfig - error : Error - proxysettings : ProxyConfig - ''' - 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 - - -class ProxyConfigResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~ProxyConfigResult] - ''' - self.results = [ProxyConfigResult.from_json(o) for o in results or []] - - -class RebootActionResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None): - ''' - error : Error - result : str - ''' - self.error = Error.from_json(error) if error else None - self.result = result - - -class RebootActionResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~RebootActionResult] - ''' - self.results = [RebootActionResult.from_json(o) for o in results or []] - - -class RelationUnitsChange(Type): - _toSchema = {'changed': 'Changed', 'departed': 'Departed'} - _toPy = {'Departed': 'departed', 'Changed': 'changed'} - def __init__(self, changed=None, departed=None): - ''' - changed : typing.Mapping[str, ~UnitSettings] - departed : typing.Sequence[str] - ''' - self.changed = {k: UnitSettings.from_json(v) for k, v in (changed or dict()).items()} - self.departed = departed - - -class RelationUnitsWatchResult(Type): - _toSchema = {'error': 'Error', 'changes': 'Changes', 'relationunitswatcherid': 'RelationUnitsWatcherId'} - _toPy = {'Changes': 'changes', 'Error': 'error', 'RelationUnitsWatcherId': 'relationunitswatcherid'} - def __init__(self, changes=None, error=None, relationunitswatcherid=None): - ''' - changes : RelationUnitsChange - error : Error - relationunitswatcherid : str - ''' - self.changes = RelationUnitsChange.from_json(changes) if changes else None - self.error = Error.from_json(error) if error else None - self.relationunitswatcherid = relationunitswatcherid - - -class UnitSettings(Type): - _toSchema = {'version': 'Version'} - _toPy = {'Version': 'version'} - def __init__(self, version=None): - ''' - version : int - ''' - self.version = version - - -class RetryStrategy(Type): - _toSchema = {'maxretrytime': 'MaxRetryTime', 'minretrytime': 'MinRetryTime', 'shouldretry': 'ShouldRetry', 'jitterretrytime': 'JitterRetryTime', 'retrytimefactor': 'RetryTimeFactor'} - _toPy = {'RetryTimeFactor': 'retrytimefactor', 'ShouldRetry': 'shouldretry', 'MinRetryTime': 'minretrytime', 'JitterRetryTime': 'jitterretrytime', 'MaxRetryTime': 'maxretrytime'} - def __init__(self, jitterretrytime=None, maxretrytime=None, minretrytime=None, retrytimefactor=None, shouldretry=None): - ''' - jitterretrytime : bool - maxretrytime : int - minretrytime : int - retrytimefactor : int - shouldretry : bool - ''' - self.jitterretrytime = jitterretrytime - self.maxretrytime = maxretrytime - self.minretrytime = minretrytime - self.retrytimefactor = retrytimefactor - self.shouldretry = shouldretry - - -class RetryStrategyResult(Type): - _toSchema = {'error': 'Error', 'result': 'Result'} - _toPy = {'Result': 'result', 'Error': 'error'} - def __init__(self, error=None, result=None): - ''' - error : Error - result : RetryStrategy - ''' - 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'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~RetryStrategyResult] - ''' - 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 - - -class SSHAddressResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~SSHAddressResult] - ''' - self.results = [SSHAddressResult.from_json(o) for o in results or []] - - -class SSHProxyResult(Type): - _toSchema = {'use_proxy': 'use-proxy'} - _toPy = {'use-proxy': 'use_proxy'} - def __init__(self, use_proxy=None): - ''' - use_proxy : bool - ''' - self.use_proxy = use_proxy - - -class SSHPublicKeysResult(Type): - _toSchema = {'public_keys': 'public-keys', 'error': 'error'} - _toPy = {'error': 'error', 'public-keys': 'public_keys'} - def __init__(self, error=None, public_keys=None): - ''' - error : Error - public_keys : typing.Sequence[str] - ''' - self.error = Error.from_json(error) if error else None - self.public_keys = public_keys - - -class SSHPublicKeysResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~SSHPublicKeysResult] - ''' - self.results = [SSHPublicKeysResult.from_json(o) for o in results or []] - - -class AddRelation(Type): - _toSchema = {'endpoints': 'Endpoints'} - _toPy = {'Endpoints': 'endpoints'} - def __init__(self, endpoints=None): - ''' - endpoints : typing.Sequence[str] - ''' - self.endpoints = endpoints - - -class AddRelationResults(Type): - _toSchema = {'endpoints': 'Endpoints'} - _toPy = {'Endpoints': 'endpoints'} - def __init__(self, endpoints=None): - ''' - endpoints : typing.Mapping[str, ~Relation] - ''' - self.endpoints = {k: Relation.from_json(v) for k, v in (endpoints or dict()).items()} - - -class AddServiceUnits(Type): - _toSchema = {'numunits': 'NumUnits', 'placement': 'Placement', 'servicename': 'ServiceName'} - _toPy = {'ServiceName': 'servicename', 'Placement': 'placement', 'NumUnits': 'numunits'} - def __init__(self, numunits=None, placement=None, servicename=None): - ''' - numunits : int - placement : typing.Sequence[~Placement] - servicename : str - ''' - self.numunits = numunits - self.placement = [Placement.from_json(o) for o in placement or []] - self.servicename = servicename - - -class AddServiceUnitsResults(Type): - _toSchema = {'units': 'Units'} - _toPy = {'Units': 'units'} - def __init__(self, units=None): - ''' - units : typing.Sequence[str] - ''' - self.units = units - - -class DestroyRelation(Type): - _toSchema = {'endpoints': 'Endpoints'} - _toPy = {'Endpoints': 'endpoints'} - def __init__(self, endpoints=None): - ''' - endpoints : typing.Sequence[str] - ''' - self.endpoints = endpoints - - -class DestroyServiceUnits(Type): - _toSchema = {'unitnames': 'UnitNames'} - _toPy = {'UnitNames': 'unitnames'} - def __init__(self, unitnames=None): - ''' - unitnames : typing.Sequence[str] - ''' - self.unitnames = unitnames - - -class GetServiceConstraints(Type): - _toSchema = {'servicename': 'ServiceName'} - _toPy = {'ServiceName': 'servicename'} - def __init__(self, servicename=None): - ''' - servicename : str - ''' - self.servicename = servicename - - -class Relation(Type): - _toSchema = {'name': 'Name', 'limit': 'Limit', 'role': 'Role', 'optional': 'Optional', 'scope': 'Scope', 'interface': 'Interface'} - _toPy = {'Name': 'name', 'Limit': 'limit', 'Optional': 'optional', 'Role': 'role', 'Interface': 'interface', 'Scope': 'scope'} - def __init__(self, interface=None, limit=None, name=None, optional=None, role=None, scope=None): - ''' - 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 - - -class ServiceCharmRelations(Type): - _toSchema = {'servicename': 'ServiceName'} - _toPy = {'ServiceName': 'servicename'} - def __init__(self, servicename=None): - ''' - servicename : str - ''' - self.servicename = servicename - - -class ServiceCharmRelationsResults(Type): - _toSchema = {'charmrelations': 'CharmRelations'} - _toPy = {'CharmRelations': 'charmrelations'} - def __init__(self, charmrelations=None): - ''' - charmrelations : typing.Sequence[str] - ''' - self.charmrelations = charmrelations - - -class ServiceDeploy(Type): - _toSchema = {'config': 'Config', 'storage': 'Storage', 'numunits': 'NumUnits', 'endpointbindings': 'EndpointBindings', 'series': 'Series', 'charmurl': 'CharmUrl', 'configyaml': 'ConfigYAML', 'constraints': 'Constraints', 'placement': 'Placement', 'servicename': 'ServiceName', 'channel': 'Channel', 'resources': 'Resources'} - _toPy = {'Storage': 'storage', 'Series': 'series', 'Placement': 'placement', 'ServiceName': 'servicename', 'Resources': 'resources', 'Config': 'config', 'EndpointBindings': 'endpointbindings', 'Channel': 'channel', 'ConfigYAML': 'configyaml', 'CharmUrl': 'charmurl', 'Constraints': 'constraints', 'NumUnits': 'numunits'} - 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): - ''' - 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] - ''' - 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()} - - -class ServiceDestroy(Type): - _toSchema = {'servicename': 'ServiceName'} - _toPy = {'ServiceName': 'servicename'} - def __init__(self, servicename=None): - ''' - servicename : str - ''' - self.servicename = servicename - - -class ServiceExpose(Type): - _toSchema = {'servicename': 'ServiceName'} - _toPy = {'ServiceName': 'servicename'} - def __init__(self, servicename=None): - ''' - servicename : str - ''' - self.servicename = servicename - - -class ServiceGet(Type): - _toSchema = {'servicename': 'ServiceName'} - _toPy = {'ServiceName': 'servicename'} - def __init__(self, servicename=None): - ''' - servicename : str - ''' - self.servicename = servicename - - -class ServiceGetResults(Type): - _toSchema = {'config': 'Config', 'service': 'Service', 'constraints': 'Constraints', 'charm': 'Charm'} - _toPy = {'Service': 'service', 'Constraints': 'constraints', 'Charm': 'charm', 'Config': 'config'} - def __init__(self, charm=None, config=None, constraints=None, service=None): - ''' - charm : str - config : typing.Mapping[str, typing.Any] - constraints : Value - service : str - ''' - self.charm = charm - self.config = config - self.constraints = Value.from_json(constraints) if constraints else None - self.service = service - - -class ServiceMetricCredential(Type): - _toSchema = {'metriccredentials': 'MetricCredentials', 'servicename': 'ServiceName'} - _toPy = {'MetricCredentials': 'metriccredentials', 'ServiceName': 'servicename'} - def __init__(self, metriccredentials=None, servicename=None): - ''' - metriccredentials : typing.Sequence[int] - servicename : str - ''' - self.metriccredentials = metriccredentials - self.servicename = servicename - - -class ServiceMetricCredentials(Type): - _toSchema = {'creds': 'Creds'} - _toPy = {'Creds': 'creds'} - def __init__(self, creds=None): - ''' - creds : typing.Sequence[~ServiceMetricCredential] - ''' - self.creds = [ServiceMetricCredential.from_json(o) for o in creds or []] - - -class ServiceSet(Type): - _toSchema = {'options': 'Options', 'servicename': 'ServiceName'} - _toPy = {'ServiceName': 'servicename', 'Options': 'options'} - def __init__(self, options=None, servicename=None): - ''' - options : typing.Mapping[str, str] - servicename : str - ''' - self.options = options - self.servicename = servicename - - -class ServiceSetCharm(Type): - _toSchema = {'forceseries': 'forceseries', 'forceunits': 'forceunits', 'cs_channel': 'cs-channel', 'resourceids': 'resourceids', 'servicename': 'servicename', 'charmurl': 'charmurl'} - _toPy = {'forceseries': 'forceseries', 'forceunits': 'forceunits', 'servicename': 'servicename', 'cs-channel': 'cs_channel', 'charmurl': 'charmurl', 'resourceids': 'resourceids'} - def __init__(self, charmurl=None, cs_channel=None, forceseries=None, forceunits=None, resourceids=None, servicename=None): - ''' - charmurl : str - cs_channel : str - forceseries : bool - forceunits : bool - resourceids : typing.Mapping[str, str] - servicename : str - ''' - self.charmurl = charmurl - self.cs_channel = cs_channel - self.forceseries = forceseries - self.forceunits = forceunits - self.resourceids = resourceids - self.servicename = servicename - - -class ServiceUnexpose(Type): - _toSchema = {'servicename': 'ServiceName'} - _toPy = {'ServiceName': 'servicename'} - def __init__(self, servicename=None): - ''' - servicename : str - ''' - self.servicename = servicename - - -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 - ''' - self.options = options - self.servicename = servicename - - -class ServiceUpdate(Type): - _toSchema = {'minunits': 'MinUnits', 'forceseries': 'ForceSeries', 'settingsstrings': 'SettingsStrings', 'constraints': 'Constraints', 'forcecharmurl': 'ForceCharmUrl', 'settingsyaml': 'SettingsYAML', 'charmurl': 'CharmUrl', 'servicename': 'ServiceName'} - _toPy = {'ForceSeries': 'forceseries', 'ForceCharmUrl': 'forcecharmurl', 'SettingsYAML': 'settingsyaml', 'SettingsStrings': 'settingsstrings', 'ServiceName': 'servicename', 'CharmUrl': 'charmurl', 'MinUnits': 'minunits', 'Constraints': 'constraints'} - def __init__(self, charmurl=None, constraints=None, forcecharmurl=None, forceseries=None, minunits=None, servicename=None, settingsstrings=None, settingsyaml=None): - ''' - 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 - - -class ServicesDeploy(Type): - _toSchema = {'services': 'Services'} - _toPy = {'Services': 'services'} - def __init__(self, services=None): - ''' - services : typing.Sequence[~ServiceDeploy] - ''' - self.services = [ServiceDeploy.from_json(o) for o in services or []] - - -class SingularClaim(Type): - _toSchema = {'controllertag': 'ControllerTag', 'modeltag': 'ModelTag', 'duration': 'Duration'} - _toPy = {'ControllerTag': 'controllertag', 'ModelTag': 'modeltag', 'Duration': 'duration'} - def __init__(self, controllertag=None, duration=None, modeltag=None): - ''' - controllertag : str - duration : int - modeltag : str - ''' - self.controllertag = controllertag - self.duration = duration - self.modeltag = modeltag - - -class SingularClaims(Type): - _toSchema = {'claims': 'Claims'} - _toPy = {'Claims': 'claims'} - def __init__(self, claims=None): - ''' - claims : typing.Sequence[~SingularClaim] - ''' - self.claims = [SingularClaim.from_json(o) for o in claims or []] - - -class ListSpacesResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~Space] - ''' - self.results = [Space.from_json(o) for o in results or []] - - -class Space(Type): - _toSchema = {'name': 'Name', 'subnets': 'Subnets', 'error': 'Error'} - _toPy = {'Name': 'name', 'Error': 'error', 'Subnets': 'subnets'} - def __init__(self, error=None, name=None, subnets=None): - ''' - error : Error - name : str - subnets : typing.Sequence[~Subnet] - ''' - self.error = Error.from_json(error) if error else None - self.name = name - self.subnets = [Subnet.from_json(o) for o in subnets or []] - - -class StatusHistoryPruneArgs(Type): - _toSchema = {'maxlogsperentity': 'MaxLogsPerEntity'} - _toPy = {'MaxLogsPerEntity': 'maxlogsperentity'} - def __init__(self, maxlogsperentity=None): - ''' - maxlogsperentity : int - ''' - self.maxlogsperentity = maxlogsperentity - - -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): - ''' - mountpoint : str - read_only : bool - ''' - self.mountpoint = mountpoint - self.read_only = read_only - - -class FilesystemDetails(Type): - _toSchema = {'volumetag': 'volumetag', 'storage': 'storage', 'machineattachments': 'machineattachments', 'filesystemtag': 'filesystemtag', 'status': 'status', 'info': 'info'} - _toPy = {'volumetag': 'volumetag', 'storage': 'storage', 'machineattachments': 'machineattachments', 'filesystemtag': 'filesystemtag', 'status': 'status', 'info': 'info'} - def __init__(self, filesystemtag=None, info=None, machineattachments=None, status=None, storage=None, volumetag=None): - ''' - filesystemtag : str - info : FilesystemInfo - machineattachments : typing.Mapping[str, ~FilesystemAttachmentInfo] - status : EntityStatus - storage : StorageDetails - volumetag : str - ''' - 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 - - -class FilesystemDetailsListResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None): - ''' - error : Error - result : typing.Sequence[~FilesystemDetails] - ''' - self.error = Error.from_json(error) if error else None - self.result = [FilesystemDetails.from_json(o) for o in result or []] - - -class FilesystemDetailsListResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~FilesystemDetailsListResult] - ''' - 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): - ''' - machines : typing.Sequence[str] - ''' - self.machines = machines - - -class FilesystemFilters(Type): - _toSchema = {'filters': 'filters'} - _toPy = {'filters': 'filters'} - def __init__(self, filters=None): - ''' - filters : typing.Sequence[~FilesystemFilter] - ''' - self.filters = [FilesystemFilter.from_json(o) for o in filters or []] - - -class FilesystemInfo(Type): - _toSchema = {'filesystemid': 'filesystemid', 'size': 'size'} - _toPy = {'filesystemid': 'filesystemid', 'size': 'size'} - def __init__(self, filesystemid=None, size=None): - ''' - filesystemid : str - size : int - ''' - self.filesystemid = filesystemid - self.size = size - - -class StorageAddParams(Type): - _toSchema = {'storage': 'storage', 'unit': 'unit', 'storagename': 'StorageName'} - _toPy = {'StorageName': 'storagename', 'storage': 'storage', 'unit': 'unit'} - def __init__(self, storagename=None, storage=None, unit=None): - ''' - storagename : str - storage : StorageConstraints - unit : str - ''' - self.storagename = storagename - self.storage = StorageConstraints.from_json(storage) if storage else None - self.unit = unit - - -class StorageAttachmentDetails(Type): - _toSchema = {'machinetag': 'machinetag', 'unittag': 'unittag', 'storagetag': 'storagetag', 'location': 'location'} - _toPy = {'machinetag': 'machinetag', 'unittag': 'unittag', 'storagetag': 'storagetag', 'location': 'location'} - def __init__(self, location=None, machinetag=None, storagetag=None, unittag=None): - ''' - location : str - machinetag : str - storagetag : str - unittag : str - ''' - self.location = location - self.machinetag = machinetag - self.storagetag = storagetag - self.unittag = unittag - - -class StorageConstraints(Type): - _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 - pool : str - size : int - ''' - self.count = count - self.pool = pool - self.size = size - - -class StorageDetails(Type): - _toSchema = {'kind': 'kind', 'attachments': 'attachments', 'storagetag': 'storagetag', 'persistent': 'Persistent', 'ownertag': 'ownertag', 'status': 'status'} - _toPy = {'kind': 'kind', 'attachments': 'attachments', 'Persistent': 'persistent', 'storagetag': 'storagetag', 'status': 'status', 'ownertag': 'ownertag'} - def __init__(self, persistent=None, attachments=None, kind=None, ownertag=None, status=None, storagetag=None): - ''' - persistent : bool - attachments : typing.Mapping[str, ~StorageAttachmentDetails] - kind : int - ownertag : str - status : EntityStatus - storagetag : 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 - - -class StorageDetailsListResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None): - ''' - error : Error - result : typing.Sequence[~StorageDetails] - ''' - self.error = Error.from_json(error) if error else None - self.result = [StorageDetails.from_json(o) for o in result or []] - - -class StorageDetailsListResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~StorageDetailsListResult] - ''' - self.results = [StorageDetailsListResult.from_json(o) for o in results or []] - - -class StorageDetailsResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None): - ''' - error : Error - result : StorageDetails - ''' - self.error = Error.from_json(error) if error else None - self.result = StorageDetails.from_json(result) if result else None - - -class StorageDetailsResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~StorageDetailsResult] - ''' - self.results = [StorageDetailsResult.from_json(o) for o in results or []] - - -class StorageFilter(Type): - _toSchema = {} - _toPy = {} - def __init__(self): - ''' - - ''' - pass - - -class StorageFilters(Type): - _toSchema = {'filters': 'filters'} - _toPy = {'filters': 'filters'} - def __init__(self, filters=None): - ''' - filters : typing.Sequence[~StorageFilter] - ''' - self.filters = [StorageFilter.from_json(o) for o in filters or []] - - -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): - ''' - attrs : typing.Mapping[str, typing.Any] - name : str - provider : str - ''' - self.attrs = attrs - self.name = name - self.provider = provider - - -class StoragePoolFilter(Type): - _toSchema = {'providers': 'providers', 'names': 'names'} - _toPy = {'providers': 'providers', 'names': 'names'} - def __init__(self, names=None, providers=None): - ''' - names : typing.Sequence[str] - providers : typing.Sequence[str] - ''' - self.names = names - self.providers = providers - - -class StoragePoolFilters(Type): - _toSchema = {'filters': 'filters'} - _toPy = {'filters': 'filters'} - def __init__(self, filters=None): - ''' - filters : typing.Sequence[~StoragePoolFilter] - ''' - self.filters = [StoragePoolFilter.from_json(o) for o in filters or []] - - -class StoragePoolsResult(Type): - _toSchema = {'error': 'error', 'storagepools': 'storagepools'} - _toPy = {'error': 'error', 'storagepools': 'storagepools'} - def __init__(self, error=None, storagepools=None): - ''' - error : Error - storagepools : typing.Sequence[~StoragePool] - ''' - self.error = Error.from_json(error) if error else None - self.storagepools = [StoragePool.from_json(o) for o in storagepools or []] - - -class StoragePoolsResults(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] - ''' - self.storages = [StorageAddParams.from_json(o) for o in storages or []] - - -class VolumeDetails(Type): - _toSchema = {'machineattachments': 'machineattachments', 'status': 'status', 'storage': 'storage', 'info': 'info', 'volumetag': 'volumetag'} - _toPy = {'machineattachments': 'machineattachments', 'status': 'status', 'storage': 'storage', 'info': 'info', 'volumetag': 'volumetag'} - def __init__(self, info=None, machineattachments=None, status=None, storage=None, volumetag=None): - ''' - info : VolumeInfo - machineattachments : typing.Mapping[str, ~VolumeAttachmentInfo] - status : EntityStatus - storage : StorageDetails - volumetag : 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 - - -class VolumeDetailsListResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None): - ''' - error : Error - result : typing.Sequence[~VolumeDetails] - ''' - self.error = Error.from_json(error) if error else None - self.result = [VolumeDetails.from_json(o) for o in result or []] - - -class VolumeDetailsListResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~VolumeDetailsListResult] - ''' - self.results = [VolumeDetailsListResult.from_json(o) for o in results or []] - - -class VolumeFilter(Type): - _toSchema = {'machines': 'machines'} - _toPy = {'machines': 'machines'} - def __init__(self, machines=None): - ''' - machines : typing.Sequence[str] - ''' - self.machines = machines - - -class VolumeFilters(Type): - _toSchema = {'filters': 'filters'} - _toPy = {'filters': 'filters'} - def __init__(self, filters=None): - ''' - filters : typing.Sequence[~VolumeFilter] - ''' - self.filters = [VolumeFilter.from_json(o) for o in filters or []] - - -class BlockDeviceResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None): - ''' - error : Error - result : BlockDevice - ''' - self.error = Error.from_json(error) if error else None - self.result = BlockDevice.from_json(result) if result else None - - -class BlockDeviceResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~BlockDeviceResult] - ''' - self.results = [BlockDeviceResult.from_json(o) for o in results or []] - - -class Filesystem(Type): - _toSchema = {'filesystemtag': 'filesystemtag', 'volumetag': 'volumetag', 'info': 'info'} - _toPy = {'filesystemtag': 'filesystemtag', 'volumetag': 'volumetag', 'info': 'info'} - def __init__(self, filesystemtag=None, info=None, volumetag=None): - ''' - filesystemtag : str - info : FilesystemInfo - volumetag : str - ''' - self.filesystemtag = filesystemtag - self.info = FilesystemInfo.from_json(info) if info else None - self.volumetag = volumetag - - -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): - ''' - filesystemtag : str - info : FilesystemAttachmentInfo - machinetag : str - ''' - self.filesystemtag = filesystemtag - self.info = FilesystemAttachmentInfo.from_json(info) if info else None - self.machinetag = machinetag - - -class FilesystemAttachmentParams(Type): - _toSchema = {'filesystemid': 'filesystemid', 'machinetag': 'machinetag', 'provider': 'provider', 'instanceid': 'instanceid', 'filesystemtag': 'filesystemtag', 'mountpoint': 'mountpoint', 'read_only': 'read-only'} - _toPy = {'filesystemid': 'filesystemid', 'machinetag': 'machinetag', 'provider': 'provider', 'instanceid': 'instanceid', 'filesystemtag': 'filesystemtag', 'mountpoint': 'mountpoint', 'read-only': 'read_only'} - 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 - ''' - self.filesystemid = filesystemid - self.filesystemtag = filesystemtag - self.instanceid = instanceid - self.machinetag = machinetag - self.mountpoint = mountpoint - self.provider = provider - self.read_only = read_only - - -class FilesystemAttachmentParamsResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None): - ''' - error : Error - result : FilesystemAttachmentParams - ''' - self.error = Error.from_json(error) if error else None - self.result = FilesystemAttachmentParams.from_json(result) if result else None - - -class FilesystemAttachmentParamsResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~FilesystemAttachmentParamsResult] - ''' - self.results = [FilesystemAttachmentParamsResult.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): - ''' - error : Error - result : FilesystemAttachment - ''' - self.error = Error.from_json(error) if error else None - self.result = FilesystemAttachment.from_json(result) if result else None - - -class FilesystemAttachmentResults(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] - ''' - self.filesystemattachments = [FilesystemAttachment.from_json(o) for o in filesystemattachments or []] - - -class FilesystemParams(Type): - _toSchema = {'provider': 'provider', 'tags': 'tags', 'attributes': 'attributes', 'filesystemtag': 'filesystemtag', 'volumetag': 'volumetag', 'size': 'size', 'attachment': 'attachment'} - _toPy = {'provider': 'provider', 'tags': 'tags', 'attributes': 'attributes', 'filesystemtag': 'filesystemtag', 'volumetag': 'volumetag', 'size': 'size', 'attachment': 'attachment'} - def __init__(self, attachment=None, attributes=None, filesystemtag=None, provider=None, size=None, tags=None, volumetag=None): - ''' - attachment : FilesystemAttachmentParams - attributes : typing.Mapping[str, typing.Any] - filesystemtag : str - provider : str - size : int - tags : typing.Mapping[str, str] - volumetag : str - ''' - self.attachment = FilesystemAttachmentParams.from_json(attachment) if attachment else None - self.attributes = attributes - self.filesystemtag = filesystemtag - self.provider = provider - self.size = size - self.tags = tags - self.volumetag = volumetag - - -class FilesystemParamsResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None): - ''' - error : Error - result : FilesystemParams - ''' - self.error = Error.from_json(error) if error else None - self.result = FilesystemParams.from_json(result) if result else None - - -class FilesystemParamsResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~FilesystemParamsResult] - ''' - self.results = [FilesystemParamsResult.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): - ''' - error : Error - result : Filesystem - ''' - self.error = Error.from_json(error) if error else None - self.result = Filesystem.from_json(result) if result else None - - -class FilesystemResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~FilesystemResult] - ''' - self.results = [FilesystemResult.from_json(o) for o in results or []] - - -class Filesystems(Type): - _toSchema = {'filesystems': 'filesystems'} - _toPy = {'filesystems': 'filesystems'} - def __init__(self, filesystems=None): - ''' - filesystems : typing.Sequence[~Filesystem] - ''' - self.filesystems = [Filesystem.from_json(o) for o in filesystems or []] - - -class MachineStorageIds(Type): - _toSchema = {'ids': 'ids'} - _toPy = {'ids': 'ids'} - def __init__(self, ids=None): - ''' - ids : typing.Sequence[~MachineStorageId] - ''' - self.ids = [MachineStorageId.from_json(o) for o in ids or []] - - -class MachineStorageIdsWatchResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~MachineStorageIdsWatchResult] - ''' - self.results = [MachineStorageIdsWatchResult.from_json(o) for o in results or []] - - -class VolumeAttachment(Type): - _toSchema = {'machinetag': 'machinetag', 'volumetag': 'volumetag', 'info': 'info'} - _toPy = {'machinetag': 'machinetag', 'volumetag': 'volumetag', 'info': 'info'} - def __init__(self, info=None, machinetag=None, volumetag=None): - ''' - info : VolumeAttachmentInfo - machinetag : str - volumetag : str - ''' - self.info = VolumeAttachmentInfo.from_json(info) if info else None - self.machinetag = machinetag - self.volumetag = volumetag - - -class VolumeAttachmentParamsResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None): - ''' - error : Error - result : VolumeAttachmentParams - ''' - self.error = Error.from_json(error) if error else None - self.result = VolumeAttachmentParams.from_json(result) if result else None - - -class VolumeAttachmentParamsResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~VolumeAttachmentParamsResult] - ''' - self.results = [VolumeAttachmentParamsResult.from_json(o) for o in results or []] - - -class VolumeAttachmentResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None): - ''' - error : Error - result : VolumeAttachment - ''' - self.error = Error.from_json(error) if error else None - self.result = VolumeAttachment.from_json(result) if result else None - - -class VolumeAttachmentResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~VolumeAttachmentResult] - ''' - self.results = [VolumeAttachmentResult.from_json(o) for o in results or []] - - -class VolumeAttachments(Type): - _toSchema = {'volumeattachments': 'volumeattachments'} - _toPy = {'volumeattachments': 'volumeattachments'} - def __init__(self, volumeattachments=None): - ''' - volumeattachments : typing.Sequence[~VolumeAttachment] - ''' - self.volumeattachments = [VolumeAttachment.from_json(o) for o in volumeattachments or []] - - -class VolumeParamsResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None): - ''' - error : Error - result : VolumeParams - ''' - self.error = Error.from_json(error) if error else None - self.result = VolumeParams.from_json(result) if result else None - - -class VolumeParamsResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~VolumeParamsResult] - ''' - self.results = [VolumeParamsResult.from_json(o) for o in results or []] - - -class VolumeResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None): - ''' - error : Error - result : Volume - ''' - self.error = Error.from_json(error) if error else None - self.result = Volume.from_json(result) if result else None - - -class VolumeResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~VolumeResult] - ''' - self.results = [VolumeResult.from_json(o) for o in results or []] - - -class Volumes(Type): - _toSchema = {'volumes': 'volumes'} - _toPy = {'volumes': 'volumes'} - def __init__(self, volumes=None): - ''' - volumes : typing.Sequence[~Volume] - ''' - self.volumes = [Volume.from_json(o) for o in volumes or []] - - -class SpaceResult(Type): - _toSchema = {'tag': 'Tag', 'error': 'Error'} - _toPy = {'Tag': 'tag', 'Error': 'error'} - def __init__(self, error=None, tag=None): - ''' - error : Error - tag : str - ''' - self.error = Error.from_json(error) if error else None - self.tag = tag - - -class SpaceResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~SpaceResult] - ''' - self.results = [SpaceResult.from_json(o) for o in results or []] - - -class ZoneResult(Type): - _toSchema = {'name': 'Name', 'error': 'Error', 'available': 'Available'} - _toPy = {'Available': 'available', 'Error': 'error', 'Name': 'name'} - def __init__(self, available=None, error=None, name=None): - ''' - available : bool - error : Error - name : str - ''' - self.available = available - self.error = Error.from_json(error) if error else None - self.name = name - - -class ZoneResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~ZoneResult] - ''' - self.results = [ZoneResult.from_json(o) for o in results or []] - - -class UndertakerModelInfo(Type): - _toSchema = {'globalname': 'GlobalName', 'name': 'Name', 'uuid': 'UUID', 'issystem': 'IsSystem', 'life': 'Life'} - _toPy = {'IsSystem': 'issystem', 'GlobalName': 'globalname', 'Name': 'name', 'UUID': 'uuid', 'Life': 'life'} - 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 = {'Result': 'result', 'Error': 'error'} - def __init__(self, error=None, result=None): - ''' - error : Error - result : UndertakerModelInfo - ''' - 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 - - -class CharmURLs(Type): - _toSchema = {'urls': 'URLs'} - _toPy = {'URLs': 'urls'} - def __init__(self, urls=None): - ''' - urls : typing.Sequence[~CharmURL] - ''' - self.urls = [CharmURL.from_json(o) for o in urls or []] - - -class ConfigSettingsResult(Type): - _toSchema = {'error': 'Error', 'settings': 'Settings'} - _toPy = {'Settings': 'settings', 'Error': 'error'} - def __init__(self, error=None, settings=None): - ''' - error : Error - settings : typing.Mapping[str, typing.Any] - ''' - self.error = Error.from_json(error) if error else None - self.settings = settings - - -class ConfigSettingsResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~ConfigSettingsResult] - ''' - self.results = [ConfigSettingsResult.from_json(o) for o in results or []] - - -class Endpoint(Type): - _toSchema = {'servicename': 'ServiceName', 'relation': 'Relation'} - _toPy = {'Relation': 'relation', 'ServiceName': 'servicename'} - def __init__(self, relation=None, servicename=None): - ''' - relation : Relation - servicename : str - ''' - self.relation = Relation.from_json(relation) if relation else None - self.servicename = servicename - - -class EntitiesCharmURL(Type): - _toSchema = {'entities': 'Entities'} - _toPy = {'Entities': 'entities'} - def __init__(self, entities=None): - ''' - entities : typing.Sequence[~EntityCharmURL] - ''' - self.entities = [EntityCharmURL.from_json(o) for o in entities or []] - - -class EntitiesPortRanges(Type): - _toSchema = {'entities': 'Entities'} - _toPy = {'Entities': 'entities'} - def __init__(self, entities=None): - ''' - entities : typing.Sequence[~EntityPortRange] - ''' - self.entities = [EntityPortRange.from_json(o) for o in entities or []] - - -class EntityCharmURL(Type): - _toSchema = {'tag': 'Tag', 'charmurl': 'CharmURL'} - _toPy = {'CharmURL': 'charmurl', 'Tag': 'tag'} - def __init__(self, charmurl=None, tag=None): - ''' - charmurl : str - tag : str - ''' - self.charmurl = charmurl - self.tag = tag - - -class EntityPortRange(Type): - _toSchema = {'fromport': 'FromPort', 'protocol': 'Protocol', 'tag': 'Tag', 'toport': 'ToPort'} - _toPy = {'Protocol': 'protocol', 'Tag': 'tag', 'FromPort': 'fromport', 'ToPort': 'toport'} - def __init__(self, fromport=None, protocol=None, tag=None, toport=None): - ''' - fromport : int - protocol : str - tag : str - toport : int - ''' - self.fromport = fromport - self.protocol = protocol - self.tag = tag - self.toport = toport - - -class GetLeadershipSettingsBulkResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~GetLeadershipSettingsResult] - ''' - self.results = [GetLeadershipSettingsResult.from_json(o) for o in results or []] - - -class GetLeadershipSettingsResult(Type): - _toSchema = {'error': 'Error', 'settings': 'Settings'} - _toPy = {'Settings': 'settings', 'Error': 'error'} - 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 - - -class IntResult(Type): - _toSchema = {'error': 'Error', 'result': 'Result'} - _toPy = {'Result': 'result', 'Error': 'error'} - def __init__(self, error=None, result=None): - ''' - error : Error - result : int - ''' - 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 []] - - -class MergeLeadershipSettingsParam(Type): - _toSchema = {'servicetag': 'ServiceTag', 'settings': 'Settings'} - _toPy = {'Settings': 'settings', 'ServiceTag': 'servicetag'} - def __init__(self, servicetag=None, settings=None): - ''' - servicetag : str - settings : typing.Mapping[str, str] - ''' - self.servicetag = servicetag - self.settings = settings - - -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): - ''' - error : Error - name : str - uuid : str - ''' - self.error = Error.from_json(error) if error else None - self.name = name - self.uuid = uuid - - -class RelationIds(Type): - _toSchema = {'relationids': 'RelationIds'} - _toPy = {'RelationIds': 'relationids'} - def __init__(self, relationids=None): - ''' - relationids : typing.Sequence[int] - ''' - self.relationids = relationids - - -class RelationResult(Type): - _toSchema = {'key': 'Key', 'error': 'Error', 'id_': 'Id', 'endpoint': 'Endpoint', 'life': 'Life'} - _toPy = {'Id': 'id_', 'Endpoint': 'endpoint', 'Life': 'life', 'Key': 'key', 'Error': 'error'} - def __init__(self, endpoint=None, error=None, id_=None, key=None, life=None): - ''' - endpoint : Endpoint - error : Error - id_ : int - key : str - life : str - ''' - 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 - - -class RelationResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~RelationResult] - ''' - self.results = [RelationResult.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): - ''' - relation : str - unit : str - ''' - self.relation = relation - self.unit = unit - - -class RelationUnitPair(Type): - _toSchema = {'remoteunit': 'RemoteUnit', 'localunit': 'LocalUnit', 'relation': 'Relation'} - _toPy = {'LocalUnit': 'localunit', 'RemoteUnit': 'remoteunit', 'Relation': 'relation'} - def __init__(self, localunit=None, relation=None, remoteunit=None): - ''' - localunit : str - relation : str - remoteunit : str - ''' - self.localunit = localunit - self.relation = relation - self.remoteunit = remoteunit - - -class RelationUnitPairs(Type): - _toSchema = {'relationunitpairs': 'RelationUnitPairs'} - _toPy = {'RelationUnitPairs': 'relationunitpairs'} - def __init__(self, relationunitpairs=None): - ''' - relationunitpairs : typing.Sequence[~RelationUnitPair] - ''' - self.relationunitpairs = [RelationUnitPair.from_json(o) for o in relationunitpairs or []] - - -class RelationUnitSettings(Type): - _toSchema = {'unit': 'Unit', 'settings': 'Settings', 'relation': 'Relation'} - _toPy = {'Settings': 'settings', 'Relation': 'relation', 'Unit': 'unit'} - def __init__(self, relation=None, settings=None, unit=None): - ''' - relation : str - settings : typing.Mapping[str, str] - unit : str - ''' - self.relation = relation - self.settings = settings - self.unit = unit - - -class RelationUnits(Type): - _toSchema = {'relationunits': 'RelationUnits'} - _toPy = {'RelationUnits': 'relationunits'} - def __init__(self, relationunits=None): - ''' - relationunits : typing.Sequence[~RelationUnit] - ''' - self.relationunits = [RelationUnit.from_json(o) for o in relationunits or []] - - -class RelationUnitsSettings(Type): - _toSchema = {'relationunits': 'RelationUnits'} - _toPy = {'RelationUnits': 'relationunits'} - def __init__(self, relationunits=None): - ''' - relationunits : typing.Sequence[~RelationUnitSettings] - ''' - self.relationunits = [RelationUnitSettings.from_json(o) for o in relationunits or []] - - -class RelationUnitsWatchResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~RelationUnitsWatchResult] - ''' - self.results = [RelationUnitsWatchResult.from_json(o) for o in results or []] - - -class ResolvedModeResult(Type): - _toSchema = {'error': 'Error', 'mode': 'Mode'} - _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 ResolvedModeResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~ResolvedModeResult] - ''' - self.results = [ResolvedModeResult.from_json(o) for o in results or []] - - -class ServiceStatusResult(Type): - _toSchema = {'error': 'Error', 'service': 'Service', 'units': 'Units'} - _toPy = {'Service': 'service', 'Units': 'units', 'Error': 'error'} - def __init__(self, error=None, service=None, units=None): - ''' - error : Error - service : StatusResult - units : typing.Mapping[str, ~StatusResult] - ''' - 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()} - - -class ServiceStatusResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~ServiceStatusResult] - ''' - self.results = [ServiceStatusResult.from_json(o) for o in results or []] - - -class SettingsResult(Type): - _toSchema = {'error': 'Error', 'settings': 'Settings'} - _toPy = {'Settings': 'settings', 'Error': 'error'} - 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 - - -class SettingsResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~SettingsResult] - ''' - self.results = [SettingsResult.from_json(o) for o in results or []] - - -class StorageAttachment(Type): - _toSchema = {'kind': 'Kind', 'unittag': 'UnitTag', 'storagetag': 'StorageTag', 'ownertag': 'OwnerTag', 'life': 'Life', 'location': 'Location'} - _toPy = {'StorageTag': 'storagetag', 'Life': 'life', 'OwnerTag': 'ownertag', 'Kind': 'kind', 'Location': 'location', 'UnitTag': 'unittag'} - def __init__(self, kind=None, life=None, location=None, ownertag=None, storagetag=None, unittag=None): - ''' - kind : int - life : str - location : str - ownertag : str - storagetag : str - unittag : str - ''' - self.kind = kind - self.life = life - self.location = location - self.ownertag = ownertag - self.storagetag = storagetag - self.unittag = unittag - - -class StorageAttachmentId(Type): - _toSchema = {'unittag': 'unittag', 'storagetag': 'storagetag'} - _toPy = {'unittag': 'unittag', 'storagetag': 'storagetag'} - def __init__(self, storagetag=None, unittag=None): - ''' - storagetag : str - unittag : str - ''' - self.storagetag = storagetag - self.unittag = unittag - - -class StorageAttachmentIds(Type): - _toSchema = {'ids': 'ids'} - _toPy = {'ids': 'ids'} - def __init__(self, ids=None): - ''' - ids : typing.Sequence[~StorageAttachmentId] - ''' - self.ids = [StorageAttachmentId.from_json(o) for o in ids or []] - - -class StorageAttachmentIdsResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - 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 - - -class StorageAttachmentIdsResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~StorageAttachmentIdsResult] - ''' - self.results = [StorageAttachmentIdsResult.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): - ''' - error : Error - result : StorageAttachment - ''' - self.error = Error.from_json(error) if error else None - self.result = StorageAttachment.from_json(result) if result else None - - -class StorageAttachmentResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~StorageAttachmentResult] - ''' - self.results = [StorageAttachmentResult.from_json(o) for o in results or []] - - -class StringBoolResult(Type): - _toSchema = {'error': 'Error', 'result': 'Result', 'ok': 'Ok'} - _toPy = {'Result': 'result', 'Error': 'error', 'Ok': 'ok'} - def __init__(self, error=None, ok=None, result=None): - ''' - error : Error - ok : bool - result : str - ''' - self.error = Error.from_json(error) if error else None - self.ok = ok - self.result = result - - -class StringBoolResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~StringBoolResult] - ''' - self.results = [StringBoolResult.from_json(o) for o in results or []] - - -class UnitNetworkConfig(Type): - _toSchema = {'unittag': 'UnitTag', 'bindingname': 'BindingName'} - _toPy = {'BindingName': 'bindingname', 'UnitTag': 'unittag'} - def __init__(self, bindingname=None, unittag=None): - ''' - bindingname : str - unittag : str - ''' - self.bindingname = bindingname - self.unittag = unittag - - -class UnitNetworkConfigResult(Type): - _toSchema = {'error': 'Error', 'info': 'Info'} - _toPy = {'Info': 'info', 'Error': 'error'} - def __init__(self, error=None, info=None): - ''' - error : Error - info : typing.Sequence[~NetworkConfig] - ''' - self.error = Error.from_json(error) if error else None - self.info = [NetworkConfig.from_json(o) for o in info or []] - - -class UnitNetworkConfigResults(Type): - _toSchema = {'results': 'Results'} - _toPy = {'Results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~UnitNetworkConfigResult] - ''' - self.results = [UnitNetworkConfigResult.from_json(o) for o in results or []] - - -class UnitsNetworkConfig(Type): - _toSchema = {'args': 'Args'} - _toPy = {'Args': 'args'} - def __init__(self, args=None): - ''' - args : typing.Sequence[~UnitNetworkConfig] - ''' - self.args = [UnitNetworkConfig.from_json(o) for o in args or []] - - -class EntitiesVersion(Type): - _toSchema = {'agenttools': 'AgentTools'} - _toPy = {'AgentTools': 'agenttools'} - def __init__(self, agenttools=None): - ''' - agenttools : typing.Sequence[~EntityVersion] - ''' - self.agenttools = [EntityVersion.from_json(o) for o in agenttools or []] - - -class EntityVersion(Type): - _toSchema = {'tag': 'Tag', 'tools': 'Tools'} - _toPy = {'Tools': 'tools', 'Tag': 'tag'} - def __init__(self, tag=None, tools=None): - ''' - tag : str - tools : Version - ''' - self.tag = tag - self.tools = Version.from_json(tools) if tools else None - - -class VersionResult(Type): - _toSchema = {'version': 'Version', 'error': 'Error'} - _toPy = {'Version': 'version', 'Error': 'error'} - def __init__(self, error=None, version=None): - ''' - error : Error - version : Number - ''' - self.error = Error.from_json(error) if error else None - self.version = Number.from_json(version) if version else None - - -class VersionResults(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 = {'display_name': 'display-name', 'model_access_permission': 'model-access-permission', 'shared_model_tags': 'shared-model-tags', 'password': 'password', 'username': 'username'} - _toPy = {'model-access-permission': 'model_access_permission', 'password': 'password', 'shared-model-tags': 'shared_model_tags', 'display-name': 'display_name', 'username': 'username'} - 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 - ''' - 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 - - -class AddUserResult(Type): - _toSchema = {'tag': 'tag', 'error': 'error', 'secret_key': 'secret-key'} - _toPy = {'tag': 'tag', 'error': 'error', 'secret-key': 'secret_key'} - def __init__(self, error=None, secret_key=None, tag=None): - ''' - error : Error - secret_key : typing.Sequence[int] - tag : str - ''' - self.error = Error.from_json(error) if error else None - self.secret_key = secret_key - self.tag = tag - - -class AddUserResults(Type): - _toSchema = {'results': 'results'} - _toPy = {'results': 'results'} - def __init__(self, results=None): - ''' - results : typing.Sequence[~AddUserResult] - ''' - self.results = [AddUserResult.from_json(o) for o in results or []] - - -class AddUsers(Type): - _toSchema = {'users': 'users'} - _toPy = {'users': 'users'} - def __init__(self, users=None): - ''' - users : typing.Sequence[~AddUser] - ''' - self.users = [AddUser.from_json(o) for o in users or []] - - -class MacaroonResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - 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 - - -class MacaroonResults(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 = {'last_connection': 'last-connection', 'created_by': 'created-by', 'date_created': 'date-created', 'username': 'username', 'display_name': 'display-name', 'disabled': 'disabled'} - _toPy = {'created-by': 'created_by', 'date-created': 'date_created', 'display-name': 'display_name', 'disabled': 'disabled', 'last-connection': 'last_connection', 'username': 'username'} - 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 = {'entities': 'entities', 'include_disabled': 'include-disabled'} - _toPy = {'entities': 'entities', 'include-disabled': 'include_disabled'} - def __init__(self, entities=None, include_disabled=None): - ''' - entities : typing.Sequence[~Entity] - include_disabled : bool - ''' - self.entities = [Entity.from_json(o) for o in entities or []] - self.include_disabled = include_disabled - - -class UserInfoResult(Type): - _toSchema = {'error': 'error', 'result': 'result'} - _toPy = {'error': 'error', 'result': 'result'} - def __init__(self, error=None, result=None): - ''' - error : Error - result : UserInfo - ''' - 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[~UserInfoResult] - ''' - self.results = [UserInfoResult.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): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ActionResult] - ''' - # 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 - - - - @ReturnMapping(ActionResults) - async def Cancel(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ActionResult] - ''' - # 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 - - - - @ReturnMapping(ActionResults) - async def Enqueue(self, actions): - ''' - actions : typing.Sequence[~Action] - Returns -> typing.Sequence[~ActionResult] - ''' - # 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 - - - - @ReturnMapping(FindTagsResults) - async def FindActionTagsByPrefix(self, prefixes): - ''' - prefixes : typing.Sequence[str] - Returns -> typing.Sequence[~Entity] - ''' - # 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 - - - - @ReturnMapping(ActionsByNames) - async def FindActionsByNames(self, names): - ''' - names : typing.Sequence[str] - Returns -> typing.Sequence[~ActionsByName] - ''' - # 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 - - - - @ReturnMapping(ActionsByReceivers) - async def ListAll(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ActionsByReceiver] - ''' - # 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 - - - - @ReturnMapping(ActionsByReceivers) - async def ListCompleted(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ActionsByReceiver] - ''' - # 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 - - - - @ReturnMapping(ActionsByReceivers) - async def ListPending(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ActionsByReceiver] - ''' - # 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 - - - - @ReturnMapping(ActionsByReceivers) - async def ListRunning(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ActionsByReceiver] - ''' - # 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 - - - - @ReturnMapping(ActionResults) - async def Run(self, commands, machines, services, timeout, units): - ''' - commands : str - machines : typing.Sequence[str] - services : typing.Sequence[str] - timeout : int - units : typing.Sequence[str] - Returns -> typing.Sequence[~ActionResult] - ''' - # 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 - - - - @ReturnMapping(ActionResults) - async def RunOnAllMachines(self, commands, machines, services, timeout, units): - ''' - commands : str - machines : typing.Sequence[str] - services : typing.Sequence[str] - timeout : int - units : typing.Sequence[str] - Returns -> typing.Sequence[~ActionResult] - ''' - # 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 - - - - @ReturnMapping(ServicesCharmActionsResults) - async def ServicesCharmActions(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ServiceCharmActionsResult] - ''' - # 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 - - -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): - ''' - - Returns -> typing.Union[_ForwardRef('Error'), bool] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Addresser', Request='CanDeallocateAddresses', Version=2, Params=params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResult) - async def CleanupIPAddresses(self): - ''' - - Returns -> Error - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Addresser', Request='CleanupIPAddresses', Version=2, Params=params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(EntitiesWatchResult) - async def WatchIPAddresses(self): - ''' - - Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Addresser', Request='WatchIPAddresses', Version=2, Params=params) - - reply = await self.rpc(msg) - return reply - - -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): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ErrorResult] - ''' - # 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 - - - - @ReturnMapping(AgentGetEntitiesResults) - async def GetEntities(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~AgentGetEntitiesResult] - ''' - # 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 - - - - @ReturnMapping(IsMasterResult) - async def IsMaster(self): - ''' - - Returns -> bool - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Agent', Request='IsMaster', Version=2, Params=params) - - 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='Agent', Request='ModelConfig', Version=2, Params=params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetPasswords(self, changes): - ''' - changes : typing.Sequence[~EntityPassword] - Returns -> typing.Sequence[~ErrorResult] - ''' - # 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 - - - - @ReturnMapping(StateServingInfo) - async def StateServingInfo(self): - ''' - - Returns -> typing.Union[int, str] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Agent', Request='StateServingInfo', Version=2, Params=params) - - 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='Agent', Request='WatchForModelConfigChanges', Version=2, Params=params) - - reply = await self.rpc(msg) - return reply - - -class AgentTools(Type): - name = 'AgentTools' - version = 1 - schema = {'properties': {'UpdateToolsAvailable': {'type': 'object'}}, 'type': 'object'} - - - @ReturnMapping(None) - async def UpdateToolsAvailable(self): - ''' - - Returns -> None - ''' - # 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 - - -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): - ''' - - Returns -> typing.Sequence[~Delta] - ''' - # 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 - - - - @ReturnMapping(None) - async def Stop(self): - ''' - - Returns -> None - ''' - # 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 - - -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): - ''' - - Returns -> typing.Sequence[~Delta] - ''' - # 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 - - - - @ReturnMapping(None) - async def Stop(self): - ''' - - Returns -> None - ''' - # 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 - - -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): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~AnnotationsGetResult] - ''' - # 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 - - - - @ReturnMapping(ErrorResults) - async def Set(self, annotations): - ''' - annotations : typing.Sequence[~EntityAnnotations] - Returns -> typing.Sequence[~ErrorResult] - ''' - # 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 - - -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): - ''' - 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(None) - async def FinishRestore(self): - ''' - - Returns -> None - ''' - # 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 - - - - @ReturnMapping(BackupsMetadataResult) - async def Info(self, id_): - ''' - id_ : str - Returns -> typing.Union[str, int, _ForwardRef('Number')] - ''' - # 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 - - - - @ReturnMapping(BackupsListResult) - async def List(self): - ''' - - Returns -> typing.Sequence[~BackupsMetadataResult] - ''' - # 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 - - - - @ReturnMapping(None) - async def PrepareRestore(self): - ''' - - Returns -> None - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Backups', Request='PrepareRestore', Version=1, Params=params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(None) - async def Remove(self, id_): - ''' - id_ : str - Returns -> None - ''' - # 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 - - - - @ReturnMapping(None) - async def Restore(self, backupid): - ''' - backupid : str - Returns -> None - ''' - # 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 - - -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): - ''' - - Returns -> typing.Sequence[~BlockResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Block', Request='List', Version=2, Params=params) - - reply = await self.rpc(msg) - return reply - - - - @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_): - ''' - message : str - type_ : str - Returns -> Error - ''' - # 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 - - -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): - ''' - - Returns -> Error - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='CharmRevisionUpdater', Request='UpdateLatestRevisions', Version=1, Params=params) - - reply = await self.rpc(msg) - return reply - - -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): - ''' - charmurl : str - Returns -> str - ''' - # 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 - - - - @ReturnMapping(IsMeteredResult) - async def IsMetered(self, charmurl): - ''' - charmurl : str - Returns -> bool - ''' - # 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 - - - - @ReturnMapping(CharmsListResult) - async def List(self, names): - ''' - names : typing.Sequence[str] - Returns -> typing.Sequence[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 - - -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'} - - - @ReturnMapping(None) - async def Cleanup(self): - ''' - - Returns -> None - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Cleaner', Request='Cleanup', Version=2, Params=params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResult) - async def WatchCleanups(self): - ''' - - Returns -> typing.Union[_ForwardRef('Error'), str] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Cleaner', Request='WatchCleanups', Version=2, Params=params) - - reply = await self.rpc(msg) - return reply - - -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): - ''' - - Returns -> typing.Sequence[~HostPort] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Client', Request='APIHostPorts', Version=1, Params=params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(None) - async def AbortCurrentUpgrade(self): - ''' - - Returns -> None - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Client', Request='AbortCurrentUpgrade', Version=1, Params=params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(None) - async def AddCharm(self, channel, url): - ''' - channel : str - url : str - Returns -> None - ''' - # 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 - - - - @ReturnMapping(None) - async def AddCharmWithAuthorization(self, channel, charmstoremacaroon, url): - ''' - channel : str - charmstoremacaroon : Macaroon - url : str - Returns -> None - ''' - # 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 - - - - @ReturnMapping(AddMachinesResults) - async def AddMachines(self, machineparams): - ''' - machineparams : typing.Sequence[~AddMachineParams] - Returns -> typing.Sequence[~AddMachinesResult] - ''' - # 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 - - - - @ReturnMapping(AddMachinesResults) - async def AddMachinesV2(self, machineparams): - ''' - machineparams : typing.Sequence[~AddMachineParams] - Returns -> typing.Sequence[~AddMachinesResult] - ''' - # 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 - - - - @ReturnMapping(AgentVersionResult) - async def AgentVersion(self): - ''' - - Returns -> Number - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Client', Request='AgentVersion', Version=1, Params=params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(CharmInfo) - async def CharmInfo(self, charmurl): - ''' - charmurl : str - Returns -> str - ''' - # 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 - - - - @ReturnMapping(None) - async def DestroyMachines(self, force, machinenames): - ''' - force : bool - machinenames : typing.Sequence[str] - Returns -> None - ''' - # 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 - - - - @ReturnMapping(None) - async def DestroyModel(self): - ''' - - Returns -> None - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Client', Request='DestroyModel', Version=1, Params=params) - - reply = await self.rpc(msg) - return reply - - - - @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='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 - - - - @ReturnMapping(FullStatus) - async def FullStatus(self, patterns): - ''' - patterns : typing.Sequence[str] - Returns -> typing.Union[typing.Sequence[~RelationStatus], typing.Mapping[str, ~ServiceStatus]] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Client', Request='FullStatus', Version=1, Params=params) - params['Patterns'] = patterns - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(GetBundleChangesResults) - async def GetBundleChanges(self, yaml): - ''' - yaml : str - Returns -> typing.Sequence[~BundleChangesChange] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Client', Request='GetBundleChanges', Version=1, Params=params) - params['yaml'] = yaml - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(GetConstraintsResults) - async def GetModelConstraints(self): - ''' - - Returns -> Value - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Client', Request='GetModelConstraints', Version=1, Params=params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(AddMachinesResults) - async def InjectMachines(self, machineparams): - ''' - machineparams : typing.Sequence[~AddMachineParams] - Returns -> typing.Sequence[~AddMachinesResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Client', Request='InjectMachines', Version=1, Params=params) - params['MachineParams'] = machineparams - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ModelConfigResults) - async def ModelGet(self): - ''' - - Returns -> typing.Mapping[str, typing.Any] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Client', Request='ModelGet', Version=1, Params=params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ModelInfo) - async def ModelInfo(self): - ''' - - Returns -> typing.Union[_ForwardRef('EntityStatus'), typing.Sequence[~ModelUserInfo]] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Client', Request='ModelInfo', Version=1, Params=params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(None) - async def ModelSet(self, config): - ''' - config : typing.Mapping[str, typing.Any] - Returns -> None - ''' - # map input types to rpc msg - params = dict() - 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[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(ModelUserInfoResults) - async def ModelUserInfo(self): - ''' - - Returns -> typing.Sequence[~ModelUserInfoResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Client', Request='ModelUserInfo', Version=1, Params=params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(PrivateAddressResults) - async def PrivateAddress(self, target): - ''' - target : str - Returns -> str - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Client', Request='PrivateAddress', Version=1, Params=params) - params['Target'] = target - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ProvisioningScriptResult) - async def ProvisioningScript(self, datadir, disablepackagecommands, machineid, nonce): - ''' - datadir : str - disablepackagecommands : bool - machineid : str - nonce : str - Returns -> str - ''' - # 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 - reply = await self.rpc(msg) - return reply - - - - @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 - - - - @ReturnMapping(ResolveCharmResults) - async def ResolveCharms(self, references): - ''' - references : typing.Sequence[~URL] - Returns -> typing.Sequence[~ResolveCharmResult] - ''' - # map input types to rpc msg - params = dict() - 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, unitname): - ''' - retry : bool - unitname : 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['UnitName'] = unitname - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def RetryProvisioning(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Client', Request='RetryProvisioning', Version=1, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(None) - async def SetModelAgentVersion(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='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(None) - async def SetModelConstraints(self, constraints, servicename): - ''' - constraints : Value - servicename : str - Returns -> None - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Client', Request='SetModelConstraints', Version=1, Params=params) - params['Constraints'] = constraints - params['ServiceName'] = servicename - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StatusHistoryResults) - async def StatusHistory(self, kind, name, size): - ''' - kind : str - name : str - size : int - Returns -> typing.Sequence[~DetailedStatus] - ''' - # 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 - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(AllWatcherId) - async def WatchAll(self): - ''' - - Returns -> str - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Client', Request='WatchAll', Version=1, Params=params) - - 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): - ''' - - Returns -> typing.Sequence[~UserModel] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Controller', Request='AllModels', Version=2, Params=params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(None) - async def DestroyController(self, destroy_models): - ''' - destroy_models : bool - Returns -> None - ''' - # 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 - - - - @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 - - - - @ReturnMapping(ModelBlockInfoList) - async def ListBlockedModels(self): - ''' - - Returns -> typing.Sequence[~ModelBlockInfo] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Controller', Request='ListBlockedModels', Version=2, Params=params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ModelConfigResults) - async def ModelConfig(self): - ''' - - Returns -> typing.Mapping[str, typing.Any] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Controller', Request='ModelConfig', Version=2, Params=params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ModelStatusResults) - async def ModelStatus(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ModelStatus] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Controller', Request='ModelStatus', Version=2, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(None) - async def RemoveBlocks(self, all_): - ''' - all_ : bool - Returns -> None - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Controller', Request='RemoveBlocks', Version=2, Params=params) - params['all'] = all_ - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(AllWatcherId) - async def WatchAllModels(self): - ''' - - Returns -> str - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Controller', Request='WatchAllModels', Version=2, 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'}, - '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'}, - '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'}, - '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'], - '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'}}, - '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): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - 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[~EntityPassword] - Returns -> typing.Sequence[~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 - - - - @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'}, - 'type': 'array'}}, - 'required': ['SpaceTag'], - 'type': 'object'}, - 'AddSubnetsParams': {'additionalProperties': False, - 'properties': {'Subnets': {'items': {'$ref': '#/definitions/AddSubnetParams'}, - 'type': 'array'}}, - 'required': ['Subnets'], - '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'], - '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'], - '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'}, - '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'], - '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'], - 'type': 'object'}, - 'SubnetsFilters': {'additionalProperties': False, - 'properties': {'SpaceTag': {'type': 'string'}, - 'Zone': {'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': {'AddSubnets': {'properties': {'Params': {'$ref': '#/definitions/AddSubnetsParams'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - '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[~AddSubnetParams] - Returns -> typing.Sequence[~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[~CreateSpaceParams] - Returns -> typing.Sequence[~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[~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, spacetag, zone): - ''' - spacetag : str - zone : str - Returns -> typing.Sequence[~Subnet] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='DiscoverSpaces', Request='ListSubnets', Version=2, Params=params) - params['SpaceTag'] = spacetag - params['Zone'] = zone - 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='DiscoverSpaces', Request='ModelConfig', Version=2, Params=params) - - 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): - ''' - machineblockdevices : typing.Sequence[~MachineBlockDevices] - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='DiskManager', Request='SetMachineBlockDevices', Version=2, Params=params) - params['machineblockdevices'] = machineblockdevices - 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): - ''' - - Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='EntityWatcher', Request='Next', Version=2, 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='EntityWatcher', Request='Stop', Version=2, Params=params) - - 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): - ''' - - Returns -> typing.Union[typing.Sequence[~MachineStorageId], _ForwardRef('Error')] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='FilesystemAttachmentsWatcher', Request='Next', Version=2, 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='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 - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsResults) - async def GetMachineActiveSubnets(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~StringsResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Firewaller', Request='GetMachineActiveSubnets', Version=2, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(MachinePortsResults) - async def GetMachinePorts(self, params): - ''' - params : typing.Sequence[~MachinePorts] - Returns -> typing.Sequence[~MachinePortsResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Firewaller', Request='GetMachinePorts', Version=2, Params=params) - params['Params'] = params - 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='Firewaller', Request='InstanceId', 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='Firewaller', 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='Firewaller', Request='ModelConfig', Version=2, Params=params) - - 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='Firewaller', Request='Watch', 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='Firewaller', Request='WatchForModelConfigChanges', Version=2, Params=params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResult) - async def WatchModelMachines(self): - ''' - - Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Firewaller', Request='WatchModelMachines', Version=2, 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 - - - - @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='Firewaller', Request='WatchUnits', Version=2, Params=params) - params['Entities'] = entities - 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): - ''' - specs : typing.Sequence[~ControllersSpec] - Returns -> typing.Sequence[~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[~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[~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 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): - ''' - entity_keys : typing.Sequence[~SSHHostKeys] - Returns -> typing.Sequence[~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 ImageManager(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'}, - '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'}, - '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, - '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'}}, - '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[~ImageSpec] - Returns -> typing.Sequence[~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[~ImageSpec] - Returns -> typing.Sequence[~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 ImageMetadata(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'}, - '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'}, - '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'}}, - 'type': 'object'} - - - @ReturnMapping(ErrorResults) - async def Delete(self, image_ids): - ''' - image_ids : typing.Sequence[str] - Returns -> typing.Sequence[~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[str] - region : str - root_storage_type : str - series : typing.Sequence[str] - stream : str - virt_type : str - Returns -> typing.Sequence[~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[~CloudImageMetadataList] - Returns -> typing.Sequence[~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 InstancePoller(Type): - name = 'InstancePoller' - 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'], - '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'}, - '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'}, - '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'}}, - '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] - ''' - # 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] - ''' - # 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 - - - - @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): - ''' - - Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='InstancePoller', Request='WatchModelMachines', Version=2, Params=params) - - reply = await self.rpc(msg) - return reply - - -class KeyManager(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'}, - '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'], - 'type': 'object'}, - 'ModifyUserSSHKeys': {'additionalProperties': False, - 'properties': {'Keys': {'items': {'type': 'string'}, - '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'}}, - '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'}, - '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'}, - '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': {'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[~Entity] - Returns -> typing.Sequence[~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[~Entity] - Returns -> typing.Sequence[~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 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): - ''' - 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[~ClaimLeadershipParams] - Returns -> typing.Sequence[~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 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): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~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[~Entity] - Returns -> typing.Sequence[~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 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): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~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[~Entity] - Returns -> typing.Sequence[~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 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): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~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[~Entity] - Returns -> typing.Sequence[~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[~ActionExecutionResult] - Returns -> typing.Sequence[~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[~Entity] - Returns -> typing.Sequence[~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[~Entity] - Returns -> typing.Sequence[~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 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): - ''' - machineparams : typing.Sequence[~AddMachineParams] - Returns -> typing.Sequence[~AddMachinesResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='MachineManager', Request='AddMachines', Version=2, Params=params) - params['MachineParams'] = machineparams - 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): - ''' - - Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[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[~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[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[~Entity] - Returns -> typing.Sequence[~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[~Entity] - Returns -> typing.Sequence[~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[~Entity] - Returns -> typing.Sequence[~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, machineaddresses): - ''' - machineaddresses : typing.Sequence[~MachineAddresses] - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Machiner', Request='SetMachineAddresses', Version=1, Params=params) - params['MachineAddresses'] = machineaddresses - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(None) - async def SetObservedNetworkConfig(self, config, tag): - ''' - config : typing.Sequence[~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[~Entity] - Returns -> typing.Sequence[~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[~EntityStatusArgs] - Returns -> typing.Sequence[~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[~EntityStatusArgs] - Returns -> typing.Sequence[~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[~Entity] - Returns -> typing.Sequence[~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[_ForwardRef('Error'), str] - ''' - # 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 MeterStatus(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'}, - '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'}, - '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'}}, - '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[~Entity] - Returns -> typing.Sequence[~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[~Entity] - Returns -> typing.Sequence[~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 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): - ''' - batches : typing.Sequence[~MetricBatchParam] - Returns -> typing.Sequence[~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 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): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~EntityMetrics] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='MetricsDebug', Request='GetMetrics', Version=1, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetMeterStatus(self, statues): - ''' - statues : typing.Sequence[~MeterStatusParam] - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='MetricsDebug', Request='SetMeterStatus', Version=1, Params=params) - params['statues'] = statues - 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'}, - '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'}, - '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'}}, - '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[~Entity] - Returns -> typing.Sequence[~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[~Entity] - Returns -> typing.Sequence[~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 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): - ''' - - Returns -> typing.Sequence[int] - ''' - # 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(FullMigrationStatus) - async def GetMigrationStatus(self): - ''' - - Returns -> typing.Union[int, str, _ForwardRef('ModelMigrationSpec')] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='MigrationMaster', Request='GetMigrationStatus', 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(NotifyWatchResult) - async def Watch(self): - ''' - - Returns -> typing.Union[_ForwardRef('Error'), str] - ''' - # 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 - - -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): - ''' - - Returns -> typing.Union[_ForwardRef('Error'), str] - ''' - # 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 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): - ''' - - Returns -> typing.Union[int, typing.Sequence[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 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): - ''' - 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_): - ''' - bytes_ : typing.Sequence[int] - Returns -> None - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='MigrationTarget', Request='Import', Version=1, Params=params) - params['bytes'] = bytes_ - 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'}, - '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'}, - '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'}, - 'ModelConfigResult': {'additionalProperties': False, - 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}}, - 'required': ['Config'], - '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'], - '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'}}, - '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'}}, - 'type': 'object'}, - 'ModifyModelAccess': {'properties': {'Params': {'$ref': '#/definitions/ModifyModelAccessRequest'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(ModelConfigResult) - async def ConfigSkeleton(self, provider, region): - ''' - provider : str - region : str - Returns -> typing.Mapping[str, typing.Any] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='ModelManager', Request='ConfigSkeleton', Version=2, Params=params) - params['Provider'] = provider - params['Region'] = region - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(Model) - async def CreateModel(self, account, config, ownertag): - ''' - account : typing.Mapping[str, typing.Any] - config : typing.Mapping[str, typing.Any] - ownertag : str - Returns -> - ''' - # 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 - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(UserModelList) - async def ListModels(self, tag): - ''' - tag : str - Returns -> typing.Sequence[~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[~Entity] - Returns -> typing.Sequence[~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[~ModifyModelAccess] - Returns -> typing.Sequence[~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 NotifyWatcher(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 Pinger(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 Provisioner(Type): - name = 'Provisioner' - 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'], - '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'}, - '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'}, - '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'}, - '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'}, - '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'}, - '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'], - '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'], - 'type': 'object'}, - 'ToolsResult': {'additionalProperties': False, - 'properties': {'DisableSSLHostnameVerification': {'type': 'boolean'}, - 'Error': {'$ref': '#/definitions/Error'}, - 'ToolsList': {'items': {'$ref': '#/definitions/Tools'}, - 'type': 'array'}}, - 'required': ['ToolsList', - 'DisableSSLHostnameVerification', - 'Error'], - 'type': 'object'}, - 'ToolsResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/ToolsResult'}, - 'type': 'array'}}, - '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'}}, - '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'}}, - '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'}, - '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 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): - ''' - - Returns -> typing.Sequence[int] - ''' - # 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 - - - - @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): - ''' - - Returns -> typing.Union[bool, str, _ForwardRef('Settings'), _ForwardRef('Settings'), _ForwardRef('UpdateBehavior')] - ''' - # 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 - - - - @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 - - - - @ReturnMapping(DistributionGroupResults) - async def DistributionGroup(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~DistributionGroupResult] - ''' - # 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] - ''' - # 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 - - - - @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] - ''' - # 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] - ''' - # 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 - - - - @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 - - - - @ReturnMapping(StatusResults) - async def MachinesWithTransientErrors(self): - ''' - - Returns -> typing.Sequence[~StatusResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Provisioner', Request='MachinesWithTransientErrors', Version=2, Params=params) - - 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='Provisioner', Request='ModelConfig', Version=2, Params=params) - - 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='Provisioner', Request='ModelUUID', Version=2, Params=params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(MachineNetworkConfigResults) - async def PrepareContainerInterfaceInfo(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~MachineNetworkConfigResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Provisioner', Request='PrepareContainerInterfaceInfo', Version=2, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ProvisioningInfoResults) - async def ProvisioningInfo(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ProvisioningInfoResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Provisioner', Request='ProvisioningInfo', Version=2, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def ReleaseContainerAddresses(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Provisioner', Request='ReleaseContainerAddresses', Version=2, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def Remove(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Provisioner', Request='Remove', Version=2, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringResults) - async def Series(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~StringResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Provisioner', Request='Series', Version=2, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetInstanceInfo(self, machines): - ''' - machines : typing.Sequence[~InstanceInfo] - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Provisioner', Request='SetInstanceInfo', Version=2, Params=params) - params['Machines'] = machines - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetInstanceStatus(self, entities): - ''' - entities : typing.Sequence[~EntityStatusArgs] - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Provisioner', Request='SetInstanceStatus', Version=2, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetPasswords(self, changes): - ''' - changes : typing.Sequence[~EntityPassword] - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Provisioner', Request='SetPasswords', Version=2, Params=params) - params['Changes'] = changes - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetStatus(self, entities): - ''' - entities : typing.Sequence[~EntityStatusArgs] - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Provisioner', Request='SetStatus', Version=2, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetSupportedContainers(self, params): - ''' - params : typing.Sequence[~MachineContainers] - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Provisioner', Request='SetSupportedContainers', Version=2, Params=params) - params['Params'] = params - 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='Provisioner', Request='StateAddresses', Version=2, Params=params) - - reply = await self.rpc(msg) - return reply - - - - @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='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] - ''' - # 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 - - - - @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): - ''' - - Returns -> typing.Union[_ForwardRef('Error'), str] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Provisioner', Request='WatchAPIHostPorts', Version=2, Params=params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResults) - async def WatchAllContainers(self, params): - ''' - params : typing.Sequence[~WatchContainer] - Returns -> typing.Sequence[~StringsWatchResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Provisioner', Request='WatchAllContainers', Version=2, Params=params) - params['Params'] = params - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResults) - async def WatchContainers(self, params): - ''' - params : typing.Sequence[~WatchContainer] - Returns -> typing.Sequence[~StringsWatchResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Provisioner', Request='WatchContainers', Version=2, Params=params) - params['Params'] = params - 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='Provisioner', Request='WatchForModelConfigChanges', Version=2, Params=params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResult) - async def WatchMachineErrorRetry(self): - ''' - - Returns -> typing.Union[_ForwardRef('Error'), str] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Provisioner', Request='WatchMachineErrorRetry', Version=2, Params=params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResult) - async def WatchModelMachines(self): - ''' - - Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Provisioner', Request='WatchModelMachines', Version=2, Params=params) - - 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): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~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[~Entity] - Returns -> typing.Sequence[~NotifyWatchResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='ProxyUpdater', Request='WatchForProxyConfigAndAPIHostPortChanges', Version=1, Params=params) - params['Entities'] = entities - 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): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~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[~Entity] - Returns -> typing.Sequence[~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[~Entity] - Returns -> typing.Sequence[~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[_ForwardRef('Error'), str] - ''' - # 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 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): - ''' - - 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='RelationUnitsWatcher', Request='Stop', Version=1, Params=params) - - 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): - ''' - - Returns -> None - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Resumer', Request='ResumeTransactions', Version=2, 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): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~RetryStrategyResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='RetryStrategy', Request='RetryStrategy', Version=1, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResults) - async def WatchRetryStrategy(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~NotifyWatchResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='RetryStrategy', Request='WatchRetryStrategy', Version=1, 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): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~SSHAddressResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='SSHClient', Request='PrivateAddress', Version=1, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @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 - - - - @ReturnMapping(SSHAddressResults) - async def PublicAddress(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~SSHAddressResult] - ''' - # map input types to rpc msg - params = dict() - 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[~Entity] - Returns -> typing.Sequence[~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 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): - ''' - endpoints : typing.Sequence[str] - Returns -> typing.Mapping[str, ~Relation] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Service', Request='AddRelation', Version=3, Params=params) - params['Endpoints'] = endpoints - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(AddServiceUnitsResults) - async def AddUnits(self, numunits, placement, servicename): - ''' - numunits : int - placement : typing.Sequence[~Placement] - servicename : str - Returns -> typing.Sequence[str] - ''' - # 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 - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ServiceCharmRelationsResults) - async def CharmRelations(self, servicename): - ''' - servicename : str - Returns -> typing.Sequence[str] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Service', Request='CharmRelations', Version=3, Params=params) - params['ServiceName'] = servicename - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def Deploy(self, services): - ''' - services : typing.Sequence[~ServiceDeploy] - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Service', Request='Deploy', Version=3, Params=params) - params['Services'] = services - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(None) - async def Destroy(self, servicename): - ''' - servicename : str - Returns -> None - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Service', Request='Destroy', Version=3, Params=params) - params['ServiceName'] = servicename - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(None) - async def DestroyRelation(self, endpoints): - ''' - endpoints : typing.Sequence[str] - Returns -> None - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Service', Request='DestroyRelation', Version=3, Params=params) - params['Endpoints'] = endpoints - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(None) - async def DestroyUnits(self, unitnames): - ''' - unitnames : typing.Sequence[str] - Returns -> None - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Service', Request='DestroyUnits', Version=3, Params=params) - params['UnitNames'] = unitnames - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(None) - async def Expose(self, servicename): - ''' - servicename : str - Returns -> None - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Service', Request='Expose', Version=3, Params=params) - params['ServiceName'] = servicename - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ServiceGetResults) - async def Get(self, servicename): - ''' - servicename : str - Returns -> typing.Union[str, typing.Mapping[str, typing.Any], _ForwardRef('Value')] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Service', Request='Get', Version=3, Params=params) - params['ServiceName'] = servicename - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringResult) - async def GetCharmURL(self, servicename): - ''' - servicename : str - Returns -> typing.Union[_ForwardRef('Error'), str] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Service', Request='GetCharmURL', Version=3, Params=params) - params['ServiceName'] = servicename - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(GetConstraintsResults) - async def GetConstraints(self, servicename): - ''' - servicename : str - Returns -> Value - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Service', Request='GetConstraints', Version=3, Params=params) - params['ServiceName'] = servicename - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(None) - async def Set(self, options, servicename): - ''' - options : typing.Mapping[str, str] - servicename : str - Returns -> None - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Service', Request='Set', Version=3, Params=params) - params['Options'] = options - params['ServiceName'] = servicename - 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 - ''' - # 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 - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(None) - async def SetConstraints(self, constraints, servicename): - ''' - constraints : Value - servicename : str - Returns -> None - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Service', Request='SetConstraints', Version=3, Params=params) - params['Constraints'] = constraints - params['ServiceName'] = servicename - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetMetricCredentials(self, creds): - ''' - creds : typing.Sequence[~ServiceMetricCredential] - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Service', Request='SetMetricCredentials', Version=3, Params=params) - params['Creds'] = creds - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(None) - async def Unexpose(self, servicename): - ''' - 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 - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(None) - async def Unset(self, options, servicename): - ''' - options : typing.Sequence[str] - servicename : str - Returns -> None - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Service', Request='Unset', Version=3, Params=params) - params['Options'] = options - params['ServiceName'] = servicename - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(None) - async def Update(self, charmurl, constraints, forcecharmurl, forceseries, minunits, servicename, settingsstrings, settingsyaml): - ''' - charmurl : str - constraints : Value - forcecharmurl : bool - forceseries : bool - minunits : int - servicename : str - settingsstrings : typing.Mapping[str, str] - settingsyaml : str - Returns -> None - ''' - # 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 - reply = await self.rpc(msg) - return reply - - -class ServiceScaler(Type): - name = 'ServiceScaler' - 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'}, - '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'}}, - 'type': 'object'} - - - @ReturnMapping(ErrorResults) - async def Rescale(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='ServiceScaler', Request='Rescale', Version=1, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResult) - async def Watch(self): - ''' - - Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='ServiceScaler', Request='Watch', Version=1, Params=params) - - reply = await self.rpc(msg) - return reply - - -class Singular(Type): - name = 'Singular' - 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'}, - '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'}, - 'SingularClaim': {'additionalProperties': False, - 'properties': {'ControllerTag': {'type': 'string'}, - 'Duration': {'type': 'integer'}, - 'ModelTag': {'type': 'string'}}, - 'required': ['ModelTag', - 'ControllerTag', - 'Duration'], - 'type': 'object'}, - 'SingularClaims': {'additionalProperties': False, - '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'}}, - 'properties': {'Claim': {'properties': {'Params': {'$ref': '#/definitions/SingularClaims'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'Wait': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(ErrorResults) - async def Claim(self, claims): - ''' - claims : typing.Sequence[~SingularClaim] - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Singular', Request='Claim', Version=1, Params=params) - params['Claims'] = claims - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def Wait(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Singular', Request='Wait', Version=1, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - -class Spaces(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'], - 'type': 'object'}, - 'CreateSpacesParams': {'additionalProperties': False, - 'properties': {'Spaces': {'items': {'$ref': '#/definitions/CreateSpaceParams'}, - 'type': 'array'}}, - 'required': ['Spaces'], - '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'}, - 'ListSpacesResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/Space'}, - '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'}, - 'Space': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Name': {'type': 'string'}, - 'Subnets': {'items': {'$ref': '#/definitions/Subnet'}, - 'type': 'array'}}, - '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'}, - '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'], - 'type': 'object'}}, - 'properties': {'CreateSpaces': {'properties': {'Params': {'$ref': '#/definitions/CreateSpacesParams'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'ListSpaces': {'properties': {'Result': {'$ref': '#/definitions/ListSpacesResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(ErrorResults) - async def CreateSpaces(self, spaces): - ''' - spaces : typing.Sequence[~CreateSpaceParams] - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Spaces', Request='CreateSpaces', Version=2, Params=params) - params['Spaces'] = spaces - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ListSpacesResults) - async def ListSpaces(self): - ''' - - Returns -> typing.Sequence[~Space] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Spaces', Request='ListSpaces', Version=2, Params=params) - - reply = await self.rpc(msg) - return reply - - -class StatusHistory(Type): - name = 'StatusHistory' - version = 2 - schema = {'definitions': {'StatusHistoryPruneArgs': {'additionalProperties': False, - 'properties': {'MaxLogsPerEntity': {'type': 'integer'}}, - 'required': ['MaxLogsPerEntity'], - 'type': 'object'}}, - 'properties': {'Prune': {'properties': {'Params': {'$ref': '#/definitions/StatusHistoryPruneArgs'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(None) - async def Prune(self, maxlogsperentity): - ''' - maxlogsperentity : int - Returns -> None - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='StatusHistory', Request='Prune', Version=2, Params=params) - params['MaxLogsPerEntity'] = maxlogsperentity - reply = await self.rpc(msg) - return reply - - -class Storage(Type): - name = 'Storage' - 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', - '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'}, - 'FilesystemAttachmentInfo': {'additionalProperties': False, - 'properties': {'mountpoint': {'type': 'string'}, - 'read-only': {'type': 'boolean'}}, - 'type': 'object'}, - 'FilesystemDetails': {'additionalProperties': False, - 'properties': {'filesystemtag': {'type': 'string'}, - 'info': {'$ref': '#/definitions/FilesystemInfo'}, - 'machineattachments': {'patternProperties': {'.*': {'$ref': '#/definitions/FilesystemAttachmentInfo'}}, - 'type': 'object'}, - 'status': {'$ref': '#/definitions/EntityStatus'}, - 'storage': {'$ref': '#/definitions/StorageDetails'}, - 'volumetag': {'type': 'string'}}, - 'required': ['filesystemtag', - 'info', - 'status'], - 'type': 'object'}, - 'FilesystemDetailsListResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'items': {'$ref': '#/definitions/FilesystemDetails'}, - 'type': 'array'}}, - 'type': 'object'}, - 'FilesystemDetailsListResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemDetailsListResult'}, - 'type': 'array'}}, - 'type': 'object'}, - 'FilesystemFilter': {'additionalProperties': False, - 'properties': {'machines': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'type': 'object'}, - 'FilesystemFilters': {'additionalProperties': False, - 'properties': {'filters': {'items': {'$ref': '#/definitions/FilesystemFilter'}, - 'type': 'array'}}, - 'type': 'object'}, - 'FilesystemInfo': {'additionalProperties': False, - 'properties': {'filesystemid': {'type': 'string'}, - 'size': {'type': 'integer'}}, - 'required': ['filesystemid', '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'}, - 'StorageAddParams': {'additionalProperties': False, - 'properties': {'StorageName': {'type': 'string'}, - 'storage': {'$ref': '#/definitions/StorageConstraints'}, - 'unit': {'type': 'string'}}, - 'required': ['unit', - 'StorageName', - 'storage'], - 'type': 'object'}, - 'StorageAttachmentDetails': {'additionalProperties': False, - 'properties': {'location': {'type': 'string'}, - 'machinetag': {'type': 'string'}, - 'storagetag': {'type': 'string'}, - 'unittag': {'type': 'string'}}, - 'required': ['storagetag', - 'unittag', - 'machinetag'], - 'type': 'object'}, - 'StorageConstraints': {'additionalProperties': False, - 'properties': {'Count': {'type': 'integer'}, - 'Pool': {'type': 'string'}, - 'Size': {'type': 'integer'}}, - 'required': ['Pool', 'Size', 'Count'], - 'type': 'object'}, - 'StorageDetails': {'additionalProperties': False, - 'properties': {'Persistent': {'type': 'boolean'}, - 'attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/StorageAttachmentDetails'}}, - 'type': 'object'}, - 'kind': {'type': 'integer'}, - 'ownertag': {'type': 'string'}, - 'status': {'$ref': '#/definitions/EntityStatus'}, - 'storagetag': {'type': 'string'}}, - 'required': ['storagetag', - 'ownertag', - 'kind', - 'status', - 'Persistent'], - 'type': 'object'}, - 'StorageDetailsListResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'items': {'$ref': '#/definitions/StorageDetails'}, - 'type': 'array'}}, - 'type': 'object'}, - 'StorageDetailsListResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/StorageDetailsListResult'}, - 'type': 'array'}}, - 'type': 'object'}, - 'StorageDetailsResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'$ref': '#/definitions/StorageDetails'}}, - 'type': 'object'}, - 'StorageDetailsResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/StorageDetailsResult'}, - 'type': 'array'}}, - 'type': 'object'}, - 'StorageFilter': {'additionalProperties': False, - 'type': 'object'}, - 'StorageFilters': {'additionalProperties': False, - 'properties': {'filters': {'items': {'$ref': '#/definitions/StorageFilter'}, - 'type': 'array'}}, - 'type': 'object'}, - 'StoragePool': {'additionalProperties': False, - 'properties': {'attrs': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'name': {'type': 'string'}, - 'provider': {'type': 'string'}}, - 'required': ['name', 'provider', 'attrs'], - 'type': 'object'}, - 'StoragePoolFilter': {'additionalProperties': False, - 'properties': {'names': {'items': {'type': 'string'}, - 'type': 'array'}, - 'providers': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'type': 'object'}, - 'StoragePoolFilters': {'additionalProperties': False, - 'properties': {'filters': {'items': {'$ref': '#/definitions/StoragePoolFilter'}, - 'type': 'array'}}, - 'type': 'object'}, - 'StoragePoolsResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'storagepools': {'items': {'$ref': '#/definitions/StoragePool'}, - 'type': 'array'}}, - 'type': 'object'}, - 'StoragePoolsResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/StoragePoolsResult'}, - 'type': 'array'}}, - 'type': 'object'}, - 'StoragesAddParams': {'additionalProperties': False, - 'properties': {'storages': {'items': {'$ref': '#/definitions/StorageAddParams'}, - 'type': 'array'}}, - 'required': ['storages'], - 'type': 'object'}, - 'VolumeAttachmentInfo': {'additionalProperties': False, - 'properties': {'busaddress': {'type': 'string'}, - 'devicelink': {'type': 'string'}, - 'devicename': {'type': 'string'}, - 'read-only': {'type': 'boolean'}}, - 'type': 'object'}, - 'VolumeDetails': {'additionalProperties': False, - 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'}, - 'machineattachments': {'patternProperties': {'.*': {'$ref': '#/definitions/VolumeAttachmentInfo'}}, - 'type': 'object'}, - 'status': {'$ref': '#/definitions/EntityStatus'}, - 'storage': {'$ref': '#/definitions/StorageDetails'}, - 'volumetag': {'type': 'string'}}, - 'required': ['volumetag', 'info', 'status'], - 'type': 'object'}, - 'VolumeDetailsListResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'items': {'$ref': '#/definitions/VolumeDetails'}, - 'type': 'array'}}, - 'type': 'object'}, - 'VolumeDetailsListResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeDetailsListResult'}, - 'type': 'array'}}, - 'type': 'object'}, - 'VolumeFilter': {'additionalProperties': False, - 'properties': {'machines': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'type': 'object'}, - 'VolumeFilters': {'additionalProperties': False, - 'properties': {'filters': {'items': {'$ref': '#/definitions/VolumeFilter'}, - 'type': 'array'}}, - 'type': 'object'}, - 'VolumeInfo': {'additionalProperties': False, - 'properties': {'hardwareid': {'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'}}, - 'properties': {'AddToUnit': {'properties': {'Params': {'$ref': '#/definitions/StoragesAddParams'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'CreatePool': {'properties': {'Params': {'$ref': '#/definitions/StoragePool'}}, - 'type': 'object'}, - 'ListFilesystems': {'properties': {'Params': {'$ref': '#/definitions/FilesystemFilters'}, - 'Result': {'$ref': '#/definitions/FilesystemDetailsListResults'}}, - 'type': 'object'}, - 'ListPools': {'properties': {'Params': {'$ref': '#/definitions/StoragePoolFilters'}, - 'Result': {'$ref': '#/definitions/StoragePoolsResults'}}, - 'type': 'object'}, - 'ListStorageDetails': {'properties': {'Params': {'$ref': '#/definitions/StorageFilters'}, - 'Result': {'$ref': '#/definitions/StorageDetailsListResults'}}, - 'type': 'object'}, - 'ListVolumes': {'properties': {'Params': {'$ref': '#/definitions/VolumeFilters'}, - 'Result': {'$ref': '#/definitions/VolumeDetailsListResults'}}, - 'type': 'object'}, - 'StorageDetails': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StorageDetailsResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(ErrorResults) - async def AddToUnit(self, storages): - ''' - storages : typing.Sequence[~StorageAddParams] - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Storage', Request='AddToUnit', Version=2, Params=params) - params['storages'] = storages - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(None) - async def CreatePool(self, attrs, name, provider): - ''' - attrs : typing.Mapping[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) - params['attrs'] = attrs - params['name'] = name - params['provider'] = provider - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(FilesystemDetailsListResults) - async def ListFilesystems(self, filters): - ''' - filters : typing.Sequence[~FilesystemFilter] - Returns -> typing.Sequence[~FilesystemDetailsListResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Storage', Request='ListFilesystems', Version=2, Params=params) - params['filters'] = filters - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StoragePoolsResults) - async def ListPools(self, filters): - ''' - filters : typing.Sequence[~StoragePoolFilter] - Returns -> typing.Sequence[~StoragePoolsResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Storage', Request='ListPools', Version=2, Params=params) - params['filters'] = filters - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StorageDetailsListResults) - async def ListStorageDetails(self, filters): - ''' - filters : typing.Sequence[~StorageFilter] - Returns -> typing.Sequence[~StorageDetailsListResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Storage', Request='ListStorageDetails', Version=2, Params=params) - params['filters'] = filters - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(VolumeDetailsListResults) - async def ListVolumes(self, filters): - ''' - filters : typing.Sequence[~VolumeFilter] - Returns -> typing.Sequence[~VolumeDetailsListResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Storage', Request='ListVolumes', Version=2, Params=params) - params['filters'] = filters - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StorageDetailsResults) - async def StorageDetails(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~StorageDetailsResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Storage', Request='StorageDetails', Version=2, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - -class StorageProvisioner(Type): - name = 'StorageProvisioner' - 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'}, - 'BlockDeviceResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'$ref': '#/definitions/BlockDevice'}}, - 'required': ['result'], - 'type': 'object'}, - 'BlockDeviceResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/BlockDeviceResult'}, - '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'}, - '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'}, - 'Filesystem': {'additionalProperties': False, - 'properties': {'filesystemtag': {'type': 'string'}, - 'info': {'$ref': '#/definitions/FilesystemInfo'}, - 'volumetag': {'type': 'string'}}, - 'required': ['filesystemtag', 'info'], - 'type': 'object'}, - 'FilesystemAttachment': {'additionalProperties': False, - 'properties': {'filesystemtag': {'type': 'string'}, - 'info': {'$ref': '#/definitions/FilesystemAttachmentInfo'}, - 'machinetag': {'type': 'string'}}, - 'required': ['filesystemtag', - 'machinetag', - 'info'], - 'type': 'object'}, - 'FilesystemAttachmentInfo': {'additionalProperties': False, - 'properties': {'mountpoint': {'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'}, - 'provider': {'type': 'string'}, - 'read-only': {'type': 'boolean'}}, - 'required': ['filesystemtag', - 'machinetag', - 'provider'], - 'type': 'object'}, - 'FilesystemAttachmentParamsResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'$ref': '#/definitions/FilesystemAttachmentParams'}}, - 'required': ['result'], - 'type': 'object'}, - 'FilesystemAttachmentParamsResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemAttachmentParamsResult'}, - 'type': 'array'}}, - 'type': 'object'}, - 'FilesystemAttachmentResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'$ref': '#/definitions/FilesystemAttachment'}}, - 'required': ['result'], - 'type': 'object'}, - 'FilesystemAttachmentResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemAttachmentResult'}, - 'type': 'array'}}, - 'type': 'object'}, - 'FilesystemAttachments': {'additionalProperties': False, - 'properties': {'filesystemattachments': {'items': {'$ref': '#/definitions/FilesystemAttachment'}, - 'type': 'array'}}, - 'required': ['filesystemattachments'], - 'type': 'object'}, - 'FilesystemInfo': {'additionalProperties': False, - 'properties': {'filesystemid': {'type': 'string'}, - 'size': {'type': 'integer'}}, - 'required': ['filesystemid', 'size'], - 'type': 'object'}, - 'FilesystemParams': {'additionalProperties': False, - 'properties': {'attachment': {'$ref': '#/definitions/FilesystemAttachmentParams'}, - 'attributes': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}, - 'filesystemtag': {'type': 'string'}, - 'provider': {'type': 'string'}, - 'size': {'type': 'integer'}, - 'tags': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'volumetag': {'type': 'string'}}, - 'required': ['filesystemtag', - 'size', - 'provider'], - 'type': 'object'}, - 'FilesystemParamsResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'$ref': '#/definitions/FilesystemParams'}}, - 'required': ['result'], - 'type': 'object'}, - 'FilesystemParamsResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemParamsResult'}, - 'type': 'array'}}, - 'type': 'object'}, - 'FilesystemResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'$ref': '#/definitions/Filesystem'}}, - 'required': ['result'], - 'type': 'object'}, - 'FilesystemResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemResult'}, - 'type': 'array'}}, - 'type': 'object'}, - 'Filesystems': {'additionalProperties': False, - 'properties': {'filesystems': {'items': {'$ref': '#/definitions/Filesystem'}, - 'type': 'array'}}, - 'required': ['filesystems'], - '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'}, - 'MachineStorageId': {'additionalProperties': False, - 'properties': {'attachmenttag': {'type': 'string'}, - 'machinetag': {'type': 'string'}}, - 'required': ['machinetag', - 'attachmenttag'], - 'type': 'object'}, - 'MachineStorageIds': {'additionalProperties': False, - 'properties': {'ids': {'items': {'$ref': '#/definitions/MachineStorageId'}, - 'type': 'array'}}, - 'required': ['ids'], - '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'}, - 'MachineStorageIdsWatchResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/MachineStorageIdsWatchResult'}, - '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'}, - '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'}, - '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'}, - 'StringsWatchResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsWatchResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'Volume': {'additionalProperties': False, - 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'}, - 'volumetag': {'type': 'string'}}, - 'required': ['volumetag', 'info'], - 'type': 'object'}, - 'VolumeAttachment': {'additionalProperties': False, - 'properties': {'info': {'$ref': '#/definitions/VolumeAttachmentInfo'}, - 'machinetag': {'type': 'string'}, - 'volumetag': {'type': 'string'}}, - 'required': ['volumetag', - 'machinetag', - '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'}, - 'VolumeAttachmentParamsResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'$ref': '#/definitions/VolumeAttachmentParams'}}, - 'required': ['result'], - 'type': 'object'}, - 'VolumeAttachmentParamsResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeAttachmentParamsResult'}, - 'type': 'array'}}, - 'type': 'object'}, - 'VolumeAttachmentResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'$ref': '#/definitions/VolumeAttachment'}}, - 'required': ['result'], - 'type': 'object'}, - 'VolumeAttachmentResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeAttachmentResult'}, - 'type': 'array'}}, - 'type': 'object'}, - 'VolumeAttachments': {'additionalProperties': False, - 'properties': {'volumeattachments': {'items': {'$ref': '#/definitions/VolumeAttachment'}, - 'type': 'array'}}, - 'required': ['volumeattachments'], - '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'}, - 'VolumeParamsResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'$ref': '#/definitions/VolumeParams'}}, - 'required': ['result'], - 'type': 'object'}, - 'VolumeParamsResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeParamsResult'}, - 'type': 'array'}}, - 'type': 'object'}, - 'VolumeResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'$ref': '#/definitions/Volume'}}, - 'required': ['result'], - 'type': 'object'}, - 'VolumeResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeResult'}, - 'type': 'array'}}, - 'type': 'object'}, - 'Volumes': {'additionalProperties': False, - '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'}}, - 'properties': {'AttachmentLife': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'}, - 'Result': {'$ref': '#/definitions/LifeResults'}}, - 'type': 'object'}, - 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'FilesystemAttachmentParams': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'}, - 'Result': {'$ref': '#/definitions/FilesystemAttachmentParamsResults'}}, - 'type': 'object'}, - 'FilesystemAttachments': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'}, - 'Result': {'$ref': '#/definitions/FilesystemAttachmentResults'}}, - 'type': 'object'}, - 'FilesystemParams': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/FilesystemParamsResults'}}, - 'type': 'object'}, - 'Filesystems': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/FilesystemResults'}}, - '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'}, - 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'RemoveAttachment': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetFilesystemAttachmentInfo': {'properties': {'Params': {'$ref': '#/definitions/FilesystemAttachments'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetFilesystemInfo': {'properties': {'Params': {'$ref': '#/definitions/Filesystems'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetVolumeAttachmentInfo': {'properties': {'Params': {'$ref': '#/definitions/VolumeAttachments'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetVolumeInfo': {'properties': {'Params': {'$ref': '#/definitions/Volumes'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'VolumeAttachmentParams': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'}, - 'Result': {'$ref': '#/definitions/VolumeAttachmentParamsResults'}}, - 'type': 'object'}, - 'VolumeAttachments': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'}, - 'Result': {'$ref': '#/definitions/VolumeAttachmentResults'}}, - 'type': 'object'}, - 'VolumeBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'}, - 'Result': {'$ref': '#/definitions/BlockDeviceResults'}}, - 'type': 'object'}, - 'VolumeParams': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/VolumeParamsResults'}}, - 'type': 'object'}, - 'Volumes': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/VolumeResults'}}, - 'type': 'object'}, - 'WatchBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, - 'type': 'object'}, - 'WatchFilesystemAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResults'}}, - 'type': 'object'}, - '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'}, - 'WatchVolumeAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResults'}}, - 'type': 'object'}, - 'WatchVolumes': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(LifeResults) - async def AttachmentLife(self, ids): - ''' - ids : typing.Sequence[~MachineStorageId] - Returns -> typing.Sequence[~LifeResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='StorageProvisioner', Request='AttachmentLife', Version=2, Params=params) - params['ids'] = ids - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def EnsureDead(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='StorageProvisioner', Request='EnsureDead', Version=2, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(FilesystemAttachmentParamsResults) - async def FilesystemAttachmentParams(self, ids): - ''' - ids : typing.Sequence[~MachineStorageId] - Returns -> typing.Sequence[~FilesystemAttachmentParamsResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='StorageProvisioner', Request='FilesystemAttachmentParams', Version=2, Params=params) - params['ids'] = ids - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(FilesystemAttachmentResults) - async def FilesystemAttachments(self, ids): - ''' - ids : typing.Sequence[~MachineStorageId] - Returns -> typing.Sequence[~FilesystemAttachmentResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='StorageProvisioner', Request='FilesystemAttachments', Version=2, Params=params) - params['ids'] = ids - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(FilesystemParamsResults) - async def FilesystemParams(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~FilesystemParamsResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='StorageProvisioner', Request='FilesystemParams', Version=2, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(FilesystemResults) - async def Filesystems(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~FilesystemResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='StorageProvisioner', Request='Filesystems', 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='StorageProvisioner', Request='InstanceId', 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='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] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='StorageProvisioner', Request='ModelConfig', Version=2, Params=params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def Remove(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='StorageProvisioner', Request='Remove', Version=2, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def RemoveAttachment(self, ids): - ''' - ids : typing.Sequence[~MachineStorageId] - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='StorageProvisioner', Request='RemoveAttachment', Version=2, Params=params) - params['ids'] = ids - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetFilesystemAttachmentInfo(self, filesystemattachments): - ''' - filesystemattachments : typing.Sequence[~FilesystemAttachment] - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='StorageProvisioner', Request='SetFilesystemAttachmentInfo', Version=2, Params=params) - params['filesystemattachments'] = filesystemattachments - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetFilesystemInfo(self, filesystems): - ''' - filesystems : typing.Sequence[~Filesystem] - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='StorageProvisioner', Request='SetFilesystemInfo', Version=2, Params=params) - params['filesystems'] = filesystems - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetStatus(self, entities): - ''' - entities : typing.Sequence[~EntityStatusArgs] - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='StorageProvisioner', Request='SetStatus', Version=2, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetVolumeAttachmentInfo(self, volumeattachments): - ''' - volumeattachments : typing.Sequence[~VolumeAttachment] - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='StorageProvisioner', Request='SetVolumeAttachmentInfo', Version=2, Params=params) - params['volumeattachments'] = volumeattachments - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetVolumeInfo(self, volumes): - ''' - volumes : typing.Sequence[~Volume] - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='StorageProvisioner', Request='SetVolumeInfo', Version=2, Params=params) - params['volumes'] = volumes - reply = await self.rpc(msg) - return reply - - - - @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='StorageProvisioner', Request='UpdateStatus', Version=2, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(VolumeAttachmentParamsResults) - async def VolumeAttachmentParams(self, ids): - ''' - ids : typing.Sequence[~MachineStorageId] - Returns -> typing.Sequence[~VolumeAttachmentParamsResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='StorageProvisioner', Request='VolumeAttachmentParams', Version=2, Params=params) - params['ids'] = ids - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(VolumeAttachmentResults) - async def VolumeAttachments(self, ids): - ''' - ids : typing.Sequence[~MachineStorageId] - Returns -> typing.Sequence[~VolumeAttachmentResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='StorageProvisioner', Request='VolumeAttachments', Version=2, Params=params) - params['ids'] = ids - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(BlockDeviceResults) - async def VolumeBlockDevices(self, ids): - ''' - ids : typing.Sequence[~MachineStorageId] - Returns -> typing.Sequence[~BlockDeviceResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='StorageProvisioner', Request='VolumeBlockDevices', Version=2, Params=params) - params['ids'] = ids - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(VolumeParamsResults) - async def VolumeParams(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~VolumeParamsResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='StorageProvisioner', Request='VolumeParams', Version=2, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(VolumeResults) - async def Volumes(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~VolumeResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='StorageProvisioner', Request='Volumes', Version=2, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResults) - async def WatchBlockDevices(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~NotifyWatchResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='StorageProvisioner', Request='WatchBlockDevices', Version=2, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(MachineStorageIdsWatchResults) - async def WatchFilesystemAttachments(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~MachineStorageIdsWatchResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='StorageProvisioner', Request='WatchFilesystemAttachments', Version=2, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @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] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='StorageProvisioner', Request='WatchForModelConfigChanges', Version=2, Params=params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResults) - async def WatchMachines(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~NotifyWatchResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='StorageProvisioner', Request='WatchMachines', Version=2, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(MachineStorageIdsWatchResults) - async def WatchVolumeAttachments(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~MachineStorageIdsWatchResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='StorageProvisioner', Request='WatchVolumeAttachments', Version=2, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResults) - async def WatchVolumes(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~StringsWatchResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='StorageProvisioner', Request='WatchVolumes', Version=2, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - -class StringsWatcher(Type): - name = 'StringsWatcher' - 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'}, - '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': {'Next': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}}, - 'type': 'object'}, - 'Stop': {'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(StringsWatchResult) - async def Next(self): - ''' - - Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='StringsWatcher', 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='StringsWatcher', Request='Stop', Version=1, Params=params) - - reply = await self.rpc(msg) - return reply - - -class Subnets(Type): - name = 'Subnets' - version = 2 - schema = {'definitions': {'AddSubnetParams': {'additionalProperties': False, - 'properties': {'SpaceTag': {'type': 'string'}, - 'SubnetProviderId': {'type': 'string'}, - 'SubnetTag': {'type': 'string'}, - 'Zones': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['SpaceTag'], - 'type': 'object'}, - 'AddSubnetsParams': {'additionalProperties': False, - 'properties': {'Subnets': {'items': {'$ref': '#/definitions/AddSubnetParams'}, - 'type': 'array'}}, - 'required': ['Subnets'], - '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'}, - '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'}, - 'SpaceResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Tag': {'type': 'string'}}, - 'required': ['Error', 'Tag'], - 'type': 'object'}, - 'SpaceResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/SpaceResult'}, - 'type': 'array'}}, - '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'}, - 'type': 'array'}}, - 'required': ['CIDR', - 'VLANTag', - 'Life', - 'SpaceTag', - 'Zones'], - 'type': 'object'}, - 'SubnetsFilters': {'additionalProperties': False, - 'properties': {'SpaceTag': {'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'], - 'type': 'object'}, - 'ZoneResults': {'additionalProperties': False, - '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'}}, - 'properties': {'AddSubnets': {'properties': {'Params': {'$ref': '#/definitions/AddSubnetsParams'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'AllSpaces': {'properties': {'Result': {'$ref': '#/definitions/SpaceResults'}}, - 'type': 'object'}, - 'AllZones': {'properties': {'Result': {'$ref': '#/definitions/ZoneResults'}}, - 'type': 'object'}, - 'ListSubnets': {'properties': {'Params': {'$ref': '#/definitions/SubnetsFilters'}, - 'Result': {'$ref': '#/definitions/ListSubnetsResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(ErrorResults) - async def AddSubnets(self, subnets): - ''' - subnets : typing.Sequence[~AddSubnetParams] - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Subnets', Request='AddSubnets', Version=2, Params=params) - params['Subnets'] = subnets - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(SpaceResults) - async def AllSpaces(self): - ''' - - Returns -> typing.Sequence[~SpaceResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Subnets', Request='AllSpaces', Version=2, Params=params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ZoneResults) - async def AllZones(self): - ''' - - Returns -> typing.Sequence[~ZoneResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Subnets', Request='AllZones', Version=2, Params=params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ListSubnetsResults) - async def ListSubnets(self, spacetag, zone): - ''' - spacetag : str - zone : str - Returns -> typing.Sequence[~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 - reply = await self.rpc(msg) - return reply - - -class Undertaker(Type): - name = 'Undertaker' - version = 1 - schema = {'definitions': {'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'}, - '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'}, - 'NotifyWatchResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'SetStatus': {'additionalProperties': False, - 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'}, - 'type': 'array'}}, - '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'], - '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': {'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}}, - 'type': 'object'}, - 'ModelInfo': {'properties': {'Result': {'$ref': '#/definitions/UndertakerModelInfoResult'}}, - 'type': 'object'}, - 'ProcessDyingModel': {'type': 'object'}, - 'RemoveModel': {'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'}, - 'WatchModelResources': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(ModelConfigResult) - async def ModelConfig(self): - ''' - - Returns -> typing.Mapping[str, typing.Any] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Undertaker', Request='ModelConfig', Version=1, Params=params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(UndertakerModelInfoResult) - async def ModelInfo(self): - ''' - - Returns -> typing.Union[_ForwardRef('Error'), _ForwardRef('UndertakerModelInfo')] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Undertaker', Request='ModelInfo', Version=1, Params=params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(None) - async def ProcessDyingModel(self): - ''' - - Returns -> None - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Undertaker', Request='ProcessDyingModel', Version=1, Params=params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(None) - async def RemoveModel(self): - ''' - - Returns -> None - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Undertaker', Request='RemoveModel', Version=1, Params=params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetStatus(self, entities): - ''' - entities : typing.Sequence[~EntityStatusArgs] - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Undertaker', 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[~EntityStatusArgs] - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Undertaker', Request='UpdateStatus', Version=1, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResults) - async def WatchModelResources(self): - ''' - - Returns -> typing.Sequence[~NotifyWatchResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Undertaker', Request='WatchModelResources', Version=1, Params=params) - - reply = await self.rpc(msg) - return reply - - -class UnitAssigner(Type): - name = 'UnitAssigner' - 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'}, - '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'}, - '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'}, - 'SetStatus': {'additionalProperties': False, - 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'}, - 'type': 'array'}}, - 'required': ['Entities'], - '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': {'AssignUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetAgentStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'WatchUnitAssignments': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(ErrorResults) - async def AssignUnits(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='UnitAssigner', Request='AssignUnits', Version=1, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetAgentStatus(self, entities): - ''' - entities : typing.Sequence[~EntityStatusArgs] - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='UnitAssigner', Request='SetAgentStatus', Version=1, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResult) - async def WatchUnitAssignments(self): - ''' - - Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='UnitAssigner', Request='WatchUnitAssignments', Version=1, Params=params) - - reply = await self.rpc(msg) - return reply - - -class Uniter(Type): - name = 'Uniter' - version = 3 - schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False, - 'properties': {'Servers': {'items': {'items': {'$ref': '#/definitions/HostPort'}, - 'type': 'array'}, - 'type': 'array'}}, - 'required': ['Servers'], - 'type': 'object'}, - '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'}, - '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'}, - 'BytesResult': {'additionalProperties': False, - 'properties': {'Result': {'items': {'type': 'integer'}, - 'type': 'array'}}, - 'required': ['Result'], - 'type': 'object'}, - 'CharmURL': {'additionalProperties': False, - 'properties': {'URL': {'type': 'string'}}, - 'required': ['URL'], - 'type': 'object'}, - 'CharmURLs': {'additionalProperties': False, - 'properties': {'URLs': {'items': {'$ref': '#/definitions/CharmURL'}, - 'type': 'array'}}, - 'required': ['URLs'], - 'type': 'object'}, - 'ConfigSettingsResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Settings': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}}, - 'required': ['Error', 'Settings'], - 'type': 'object'}, - 'ConfigSettingsResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/ConfigSettingsResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'Endpoint': {'additionalProperties': False, - 'properties': {'Relation': {'$ref': '#/definitions/Relation'}, - 'ServiceName': {'type': 'string'}}, - 'required': ['ServiceName', 'Relation'], - 'type': 'object'}, - 'Entities': {'additionalProperties': False, - 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'}, - 'type': 'array'}}, - 'required': ['Entities'], - 'type': 'object'}, - 'EntitiesCharmURL': {'additionalProperties': False, - 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityCharmURL'}, - 'type': 'array'}}, - 'required': ['Entities'], - 'type': 'object'}, - 'EntitiesPortRanges': {'additionalProperties': False, - 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityPortRange'}, - 'type': 'array'}}, - 'required': ['Entities'], - 'type': 'object'}, - 'Entity': {'additionalProperties': False, - 'properties': {'Tag': {'type': 'string'}}, - 'required': ['Tag'], - 'type': 'object'}, - 'EntityCharmURL': {'additionalProperties': False, - 'properties': {'CharmURL': {'type': 'string'}, - 'Tag': {'type': 'string'}}, - 'required': ['Tag', 'CharmURL'], - 'type': 'object'}, - 'EntityPortRange': {'additionalProperties': False, - 'properties': {'FromPort': {'type': 'integer'}, - 'Protocol': {'type': 'string'}, - 'Tag': {'type': 'string'}, - 'ToPort': {'type': 'integer'}}, - 'required': ['Tag', - 'Protocol', - 'FromPort', - 'ToPort'], - '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'}, - 'GetLeadershipSettingsBulkResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/GetLeadershipSettingsResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'GetLeadershipSettingsResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Settings': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}}, - 'required': ['Settings', - 'Error'], - 'type': 'object'}, - 'HostPort': {'additionalProperties': False, - 'properties': {'Address': {'$ref': '#/definitions/Address'}, - 'Port': {'type': 'integer'}}, - 'required': ['Address', 'Port'], - 'type': 'object'}, - 'IntResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Result': {'type': 'integer'}}, - 'required': ['Error', 'Result'], - 'type': 'object'}, - 'IntResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/IntResult'}, - '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'}, - 'MachinePortRange': {'additionalProperties': False, - 'properties': {'PortRange': {'$ref': '#/definitions/PortRange'}, - 'RelationTag': {'type': 'string'}, - 'UnitTag': {'type': 'string'}}, - 'required': ['UnitTag', - 'RelationTag', - 'PortRange'], - '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'}, - 'MergeLeadershipSettingsBulkParams': {'additionalProperties': False, - 'properties': {'Params': {'items': {'$ref': '#/definitions/MergeLeadershipSettingsParam'}, - 'type': 'array'}}, - 'required': ['Params'], - 'type': 'object'}, - 'MergeLeadershipSettingsParam': {'additionalProperties': False, - 'properties': {'ServiceTag': {'type': 'string'}, - 'Settings': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}}, - 'required': ['ServiceTag', - 'Settings'], - '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'}, - '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'}, - 'ModelConfigResult': {'additionalProperties': False, - 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True, - 'type': 'object'}}, - 'type': 'object'}}, - 'required': ['Config'], - 'type': 'object'}, - 'ModelResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Name': {'type': 'string'}, - 'UUID': {'type': 'string'}}, - 'required': ['Error', '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'], - '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'}, - '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'], - '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'], - 'type': 'object'}, - 'RelationResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/RelationResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'RelationUnit': {'additionalProperties': False, - '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'], - 'type': 'object'}, - 'RelationUnitPairs': {'additionalProperties': False, - 'properties': {'RelationUnitPairs': {'items': {'$ref': '#/definitions/RelationUnitPair'}, - 'type': 'array'}}, - 'required': ['RelationUnitPairs'], - 'type': 'object'}, - 'RelationUnitSettings': {'additionalProperties': False, - 'properties': {'Relation': {'type': 'string'}, - 'Settings': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}, - 'Unit': {'type': 'string'}}, - 'required': ['Relation', - 'Unit', - 'Settings'], - 'type': 'object'}, - 'RelationUnits': {'additionalProperties': False, - 'properties': {'RelationUnits': {'items': {'$ref': '#/definitions/RelationUnit'}, - 'type': 'array'}}, - 'required': ['RelationUnits'], - 'type': 'object'}, - 'RelationUnitsChange': {'additionalProperties': False, - 'properties': {'Changed': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitSettings'}}, - 'type': 'object'}, - 'Departed': {'items': {'type': 'string'}, - 'type': 'array'}}, - 'required': ['Changed', 'Departed'], - 'type': 'object'}, - 'RelationUnitsSettings': {'additionalProperties': False, - 'properties': {'RelationUnits': {'items': {'$ref': '#/definitions/RelationUnitSettings'}, - 'type': 'array'}}, - 'required': ['RelationUnits'], - 'type': 'object'}, - 'RelationUnitsWatchResult': {'additionalProperties': False, - 'properties': {'Changes': {'$ref': '#/definitions/RelationUnitsChange'}, - 'Error': {'$ref': '#/definitions/Error'}, - 'RelationUnitsWatcherId': {'type': 'string'}}, - 'required': ['RelationUnitsWatcherId', - 'Changes', - 'Error'], - 'type': 'object'}, - 'RelationUnitsWatchResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/RelationUnitsWatchResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'ResolvedModeResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Mode': {'type': 'string'}}, - 'required': ['Error', 'Mode'], - 'type': 'object'}, - 'ResolvedModeResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/ResolvedModeResult'}, - 'type': 'array'}}, - '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'}, - 'type': 'array'}}, - 'required': ['Entities'], - 'type': 'object'}, - 'SettingsResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Settings': {'patternProperties': {'.*': {'type': 'string'}}, - 'type': 'object'}}, - 'required': ['Error', 'Settings'], - 'type': 'object'}, - 'SettingsResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/SettingsResult'}, - 'type': 'array'}}, - 'required': ['Results'], - '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'}, - 'StorageAddParams': {'additionalProperties': False, - 'properties': {'StorageName': {'type': 'string'}, - 'storage': {'$ref': '#/definitions/StorageConstraints'}, - 'unit': {'type': 'string'}}, - 'required': ['unit', - 'StorageName', - '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'], - 'type': 'object'}, - 'StorageAttachmentId': {'additionalProperties': False, - 'properties': {'storagetag': {'type': 'string'}, - 'unittag': {'type': 'string'}}, - 'required': ['storagetag', 'unittag'], - 'type': 'object'}, - 'StorageAttachmentIds': {'additionalProperties': False, - 'properties': {'ids': {'items': {'$ref': '#/definitions/StorageAttachmentId'}, - 'type': 'array'}}, - 'required': ['ids'], - 'type': 'object'}, - 'StorageAttachmentIdsResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'$ref': '#/definitions/StorageAttachmentIds'}}, - 'required': ['result'], - 'type': 'object'}, - 'StorageAttachmentIdsResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/StorageAttachmentIdsResult'}, - 'type': 'array'}}, - 'type': 'object'}, - 'StorageAttachmentResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'$ref': '#/definitions/StorageAttachment'}}, - 'required': ['result'], - 'type': 'object'}, - 'StorageAttachmentResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/StorageAttachmentResult'}, - 'type': 'array'}}, - 'type': 'object'}, - 'StorageConstraints': {'additionalProperties': False, - 'properties': {'Count': {'type': 'integer'}, - 'Pool': {'type': 'string'}, - 'Size': {'type': 'integer'}}, - 'required': ['Pool', 'Size', 'Count'], - 'type': 'object'}, - 'StoragesAddParams': {'additionalProperties': False, - 'properties': {'storages': {'items': {'$ref': '#/definitions/StorageAddParams'}, - 'type': 'array'}}, - 'required': ['storages'], - 'type': 'object'}, - 'StringBoolResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Ok': {'type': 'boolean'}, - 'Result': {'type': 'string'}}, - 'required': ['Error', 'Result', 'Ok'], - 'type': 'object'}, - 'StringBoolResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/StringBoolResult'}, - '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'}, - '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'}, - 'UnitNetworkConfig': {'additionalProperties': False, - 'properties': {'BindingName': {'type': 'string'}, - 'UnitTag': {'type': 'string'}}, - 'required': ['UnitTag', 'BindingName'], - 'type': 'object'}, - 'UnitNetworkConfigResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Info': {'items': {'$ref': '#/definitions/NetworkConfig'}, - 'type': 'array'}}, - 'required': ['Error', 'Info'], - 'type': 'object'}, - 'UnitNetworkConfigResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/UnitNetworkConfigResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'UnitSettings': {'additionalProperties': False, - 'properties': {'Version': {'type': 'integer'}}, - 'required': ['Version'], - 'type': 'object'}, - 'UnitsNetworkConfig': {'additionalProperties': False, - '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'}}, - 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}}, - 'type': 'object'}, - 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}}, - 'type': 'object'}, - 'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ActionResults'}}, - 'type': 'object'}, - 'AddMetricBatches': {'properties': {'Params': {'$ref': '#/definitions/MetricBatchParams'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'AddUnitStorage': {'properties': {'Params': {'$ref': '#/definitions/StoragesAddParams'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'AllMachinePorts': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/MachinePortsResults'}}, - 'type': 'object'}, - 'AssignedMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringResults'}}, - 'type': 'object'}, - 'AvailabilityZone': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringResults'}}, - 'type': 'object'}, - 'BeginActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}}, - 'type': 'object'}, - 'CharmArchiveSha256': {'properties': {'Params': {'$ref': '#/definitions/CharmURLs'}, - 'Result': {'$ref': '#/definitions/StringResults'}}, - 'type': 'object'}, - 'CharmModifiedVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/IntResults'}}, - 'type': 'object'}, - 'CharmURL': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringBoolResults'}}, - 'type': 'object'}, - 'ClearResolved': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'ClosePorts': {'properties': {'Params': {'$ref': '#/definitions/EntitiesPortRanges'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'ConfigSettings': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ConfigSettingsResults'}}, - 'type': 'object'}, - 'CurrentModel': {'properties': {'Result': {'$ref': '#/definitions/ModelResult'}}, - 'type': 'object'}, - 'Destroy': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'DestroyAllSubordinates': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'DestroyUnitStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'EnterScope': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'FinishActions': {'properties': {'Params': {'$ref': '#/definitions/ActionExecutionResults'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'GetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/MeterStatusResults'}}, - 'type': 'object'}, - 'GetPrincipal': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringBoolResults'}}, - 'type': 'object'}, - 'HasSubordinates': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/BoolResults'}}, - 'type': 'object'}, - 'JoinedRelations': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringsResults'}}, - 'type': 'object'}, - 'LeaveScope': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/LifeResults'}}, - 'type': 'object'}, - 'Merge': {'properties': {'Params': {'$ref': '#/definitions/MergeLeadershipSettingsBulkParams'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}}, - 'type': 'object'}, - 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}}, - 'type': 'object'}, - 'NetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/UnitsNetworkConfig'}, - 'Result': {'$ref': '#/definitions/UnitNetworkConfigResults'}}, - 'type': 'object'}, - 'OpenPorts': {'properties': {'Params': {'$ref': '#/definitions/EntitiesPortRanges'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringResults'}}, - 'type': 'object'}, - 'ProviderType': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}}, - 'type': 'object'}, - 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringResults'}}, - 'type': 'object'}, - 'Read': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/GetLeadershipSettingsBulkResults'}}, - 'type': 'object'}, - 'ReadRemoteSettings': {'properties': {'Params': {'$ref': '#/definitions/RelationUnitPairs'}, - 'Result': {'$ref': '#/definitions/SettingsResults'}}, - 'type': 'object'}, - 'ReadSettings': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'}, - 'Result': {'$ref': '#/definitions/SettingsResults'}}, - 'type': 'object'}, - 'Relation': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'}, - 'Result': {'$ref': '#/definitions/RelationResults'}}, - 'type': 'object'}, - 'RelationById': {'properties': {'Params': {'$ref': '#/definitions/RelationIds'}, - 'Result': {'$ref': '#/definitions/RelationResults'}}, - 'type': 'object'}, - 'RemoveStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'RequestReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - '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'}, - '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'}, - 'StorageAttachmentLife': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'}, - 'Result': {'$ref': '#/definitions/LifeResults'}}, - 'type': 'object'}, - 'StorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'}, - 'Result': {'$ref': '#/definitions/StorageAttachmentResults'}}, - 'type': 'object'}, - 'UnitStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StatusResults'}}, - 'type': 'object'}, - 'UnitStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StorageAttachmentIdsResults'}}, - 'type': 'object'}, - 'UpdateSettings': {'properties': {'Params': {'$ref': '#/definitions/RelationUnitsSettings'}, - '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'}, - 'WatchActionNotifications': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, - 'type': 'object'}, - 'WatchConfigSettings': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, - 'type': 'object'}, - 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, - 'type': 'object'}, - 'WatchLeadershipSettings': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, - 'type': 'object'}, - 'WatchMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, - 'type': 'object'}, - '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'}, - 'WatchUnitAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, - 'type': 'object'}, - 'WatchUnitStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, - '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='Uniter', Request='APIAddresses', Version=3, 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='Uniter', Request='APIHostPorts', Version=3, Params=params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ActionResults) - async def Actions(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ActionResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='Actions', Version=3, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def AddMetricBatches(self, batches): - ''' - batches : typing.Sequence[~MetricBatchParam] - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='AddMetricBatches', Version=3, Params=params) - params['Batches'] = batches - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def AddUnitStorage(self, storages): - ''' - storages : typing.Sequence[~StorageAddParams] - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='AddUnitStorage', Version=3, Params=params) - params['storages'] = storages - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(MachinePortsResults) - async def AllMachinePorts(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~MachinePortsResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='AllMachinePorts', Version=3, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringResults) - async def AssignedMachine(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~StringResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='AssignedMachine', Version=3, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringResults) - async def AvailabilityZone(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~StringResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='AvailabilityZone', Version=3, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def BeginActions(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='BeginActions', Version=3, Params=params) - params['Entities'] = entities - 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='Uniter', Request='CACert', Version=3, Params=params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringResults) - async def CharmArchiveSha256(self, urls): - ''' - urls : typing.Sequence[~CharmURL] - Returns -> typing.Sequence[~StringResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='CharmArchiveSha256', Version=3, Params=params) - params['URLs'] = urls - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(IntResults) - async def CharmModifiedVersion(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~IntResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='CharmModifiedVersion', Version=3, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringBoolResults) - async def CharmURL(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~StringBoolResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='CharmURL', Version=3, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def ClearResolved(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='ClearResolved', Version=3, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def ClosePorts(self, entities): - ''' - entities : typing.Sequence[~EntityPortRange] - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='ClosePorts', Version=3, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ConfigSettingsResults) - async def ConfigSettings(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ConfigSettingsResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='ConfigSettings', Version=3, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ModelResult) - async def CurrentModel(self): - ''' - - Returns -> typing.Union[_ForwardRef('Error'), str] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='CurrentModel', Version=3, Params=params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def Destroy(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='Destroy', Version=3, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def DestroyAllSubordinates(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='DestroyAllSubordinates', Version=3, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def DestroyUnitStorageAttachments(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='DestroyUnitStorageAttachments', Version=3, 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] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='EnsureDead', Version=3, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def EnterScope(self, relationunits): - ''' - relationunits : typing.Sequence[~RelationUnit] - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='EnterScope', Version=3, Params=params) - params['RelationUnits'] = relationunits - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def FinishActions(self, results): - ''' - results : typing.Sequence[~ActionExecutionResult] - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='FinishActions', Version=3, Params=params) - params['results'] = results - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(MeterStatusResults) - async def GetMeterStatus(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~MeterStatusResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='GetMeterStatus', Version=3, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringBoolResults) - async def GetPrincipal(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~StringBoolResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='GetPrincipal', Version=3, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(BoolResults) - async def HasSubordinates(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~BoolResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='HasSubordinates', Version=3, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsResults) - async def JoinedRelations(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~StringsResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='JoinedRelations', Version=3, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def LeaveScope(self, relationunits): - ''' - relationunits : typing.Sequence[~RelationUnit] - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='LeaveScope', Version=3, Params=params) - params['RelationUnits'] = relationunits - 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='Uniter', Request='Life', Version=3, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def Merge(self, params): - ''' - params : typing.Sequence[~MergeLeadershipSettingsParam] - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='Merge', Version=3, Params=params) - params['Params'] = params - 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='Uniter', Request='ModelConfig', Version=3, Params=params) - - 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='Uniter', Request='ModelUUID', Version=3, Params=params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(UnitNetworkConfigResults) - async def NetworkConfig(self, args): - ''' - args : typing.Sequence[~UnitNetworkConfig] - Returns -> typing.Sequence[~UnitNetworkConfigResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='NetworkConfig', Version=3, Params=params) - params['Args'] = args - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def OpenPorts(self, entities): - ''' - entities : typing.Sequence[~EntityPortRange] - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='OpenPorts', Version=3, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringResults) - async def PrivateAddress(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~StringResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='PrivateAddress', Version=3, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringResult) - async def ProviderType(self): - ''' - - Returns -> typing.Union[_ForwardRef('Error'), str] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='ProviderType', Version=3, Params=params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringResults) - async def PublicAddress(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~StringResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='PublicAddress', Version=3, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(GetLeadershipSettingsBulkResults) - async def Read(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~GetLeadershipSettingsResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='Read', Version=3, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(SettingsResults) - async def ReadRemoteSettings(self, relationunitpairs): - ''' - relationunitpairs : typing.Sequence[~RelationUnitPair] - Returns -> typing.Sequence[~SettingsResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='ReadRemoteSettings', Version=3, Params=params) - params['RelationUnitPairs'] = relationunitpairs - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(SettingsResults) - async def ReadSettings(self, relationunits): - ''' - relationunits : typing.Sequence[~RelationUnit] - Returns -> typing.Sequence[~SettingsResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='ReadSettings', Version=3, Params=params) - params['RelationUnits'] = relationunits - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(RelationResults) - async def Relation(self, relationunits): - ''' - relationunits : typing.Sequence[~RelationUnit] - Returns -> typing.Sequence[~RelationResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='Relation', Version=3, Params=params) - params['RelationUnits'] = relationunits - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(RelationResults) - async def RelationById(self, relationids): - ''' - relationids : typing.Sequence[int] - Returns -> typing.Sequence[~RelationResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='RelationById', Version=3, Params=params) - params['RelationIds'] = relationids - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def RemoveStorageAttachments(self, ids): - ''' - ids : typing.Sequence[~StorageAttachmentId] - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='RemoveStorageAttachments', Version=3, Params=params) - params['ids'] = ids - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def RequestReboot(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='RequestReboot', Version=3, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @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] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='ServiceOwner', Version=3, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ServiceStatusResults) - async def ServiceStatus(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ServiceStatusResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='ServiceStatus', Version=3, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetAgentStatus(self, entities): - ''' - entities : typing.Sequence[~EntityStatusArgs] - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='SetAgentStatus', Version=3, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetCharmURL(self, entities): - ''' - entities : typing.Sequence[~EntityCharmURL] - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='SetCharmURL', Version=3, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetServiceStatus(self, entities): - ''' - entities : typing.Sequence[~EntityStatusArgs] - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='SetServiceStatus', Version=3, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetStatus(self, entities): - ''' - entities : typing.Sequence[~EntityStatusArgs] - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='SetStatus', Version=3, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def SetUnitStatus(self, entities): - ''' - entities : typing.Sequence[~EntityStatusArgs] - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='SetUnitStatus', Version=3, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(LifeResults) - async def StorageAttachmentLife(self, ids): - ''' - ids : typing.Sequence[~StorageAttachmentId] - Returns -> typing.Sequence[~LifeResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='StorageAttachmentLife', Version=3, Params=params) - params['ids'] = ids - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StorageAttachmentResults) - async def StorageAttachments(self, ids): - ''' - ids : typing.Sequence[~StorageAttachmentId] - Returns -> typing.Sequence[~StorageAttachmentResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='StorageAttachments', Version=3, Params=params) - params['ids'] = ids - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StatusResults) - async def UnitStatus(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~StatusResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='UnitStatus', Version=3, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StorageAttachmentIdsResults) - async def UnitStorageAttachments(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~StorageAttachmentIdsResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='UnitStorageAttachments', Version=3, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def UpdateSettings(self, relationunits): - ''' - relationunits : typing.Sequence[~RelationUnitSettings] - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='UpdateSettings', Version=3, Params=params) - params['RelationUnits'] = relationunits - 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='Uniter', Request='Watch', Version=3, Params=params) - params['Entities'] = entities - 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='Uniter', Request='WatchAPIHostPorts', Version=3, Params=params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResults) - async def WatchActionNotifications(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~StringsWatchResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='WatchActionNotifications', Version=3, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResults) - async def WatchConfigSettings(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~NotifyWatchResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='WatchConfigSettings', Version=3, 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='Uniter', Request='WatchForModelConfigChanges', Version=3, Params=params) - - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResults) - async def WatchLeadershipSettings(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~NotifyWatchResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='WatchLeadershipSettings', Version=3, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResults) - async def WatchMeterStatus(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~NotifyWatchResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='WatchMeterStatus', Version=3, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(RelationUnitsWatchResults) - async def WatchRelationUnits(self, relationunits): - ''' - relationunits : typing.Sequence[~RelationUnit] - Returns -> typing.Sequence[~RelationUnitsWatchResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='WatchRelationUnits', Version=3, Params=params) - params['RelationUnits'] = relationunits - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResults) - async def WatchServiceRelations(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~StringsWatchResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='WatchServiceRelations', Version=3, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResults) - async def WatchStorageAttachments(self, ids): - ''' - ids : typing.Sequence[~StorageAttachmentId] - Returns -> typing.Sequence[~NotifyWatchResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='WatchStorageAttachments', Version=3, Params=params) - params['ids'] = ids - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResults) - async def WatchUnitAddresses(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~NotifyWatchResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='WatchUnitAddresses', Version=3, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(StringsWatchResults) - async def WatchUnitStorageAttachments(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~StringsWatchResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Uniter', Request='WatchUnitStorageAttachments', Version=3, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - -class Upgrader(Type): - name = 'Upgrader' - version = 1 - schema = {'definitions': {'Binary': {'additionalProperties': False, - 'properties': {'Arch': {'type': 'string'}, - 'Number': {'$ref': '#/definitions/Number'}, - 'Series': {'type': 'string'}}, - 'required': ['Number', 'Series', 'Arch'], - 'type': 'object'}, - 'Entities': {'additionalProperties': False, - 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'}, - 'type': 'array'}}, - 'required': ['Entities'], - 'type': 'object'}, - 'EntitiesVersion': {'additionalProperties': False, - 'properties': {'AgentTools': {'items': {'$ref': '#/definitions/EntityVersion'}, - 'type': 'array'}}, - 'required': ['AgentTools'], - 'type': 'object'}, - 'Entity': {'additionalProperties': False, - 'properties': {'Tag': {'type': 'string'}}, - 'required': ['Tag'], - 'type': 'object'}, - 'EntityVersion': {'additionalProperties': False, - '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'], - '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'}, - 'NotifyWatchResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, - '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'}, - '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': {'DisableSSLHostnameVerification': {'type': 'boolean'}, - 'Error': {'$ref': '#/definitions/Error'}, - 'ToolsList': {'items': {'$ref': '#/definitions/Tools'}, - 'type': 'array'}}, - 'required': ['ToolsList', - 'DisableSSLHostnameVerification', - 'Error'], - 'type': 'object'}, - 'ToolsResults': {'additionalProperties': False, - 'properties': {'Results': {'items': {'$ref': '#/definitions/ToolsResult'}, - 'type': 'array'}}, - 'required': ['Results'], - 'type': 'object'}, - 'Version': {'additionalProperties': False, - 'properties': {'Version': {'$ref': '#/definitions/Binary'}}, - 'required': ['Version'], - 'type': 'object'}, - 'VersionResult': {'additionalProperties': False, - 'properties': {'Error': {'$ref': '#/definitions/Error'}, - 'Version': {'$ref': '#/definitions/Number'}}, - 'required': ['Version', 'Error'], - 'type': 'object'}, - 'VersionResults': {'additionalProperties': False, - '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'}}, - 'properties': {'DesiredVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/VersionResults'}}, - 'type': 'object'}, - 'SetTools': {'properties': {'Params': {'$ref': '#/definitions/EntitiesVersion'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'Tools': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ToolsResults'}}, - 'type': 'object'}, - 'WatchAPIVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(VersionResults) - async def DesiredVersion(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~VersionResult] - ''' - # map input types to rpc msg - params = dict() - 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): - ''' - agenttools : typing.Sequence[~EntityVersion] - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Upgrader', Request='SetTools', Version=1, Params=params) - params['AgentTools'] = agenttools - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ToolsResults) - async def Tools(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ToolsResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Upgrader', Request='Tools', Version=1, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(NotifyWatchResults) - async def WatchAPIVersion(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~NotifyWatchResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='Upgrader', Request='WatchAPIVersion', Version=1, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - -class UserManager(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'], - 'type': 'object'}, - 'AddUserResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'secret-key': {'items': {'type': 'integer'}, - 'type': 'array'}, - 'tag': {'type': 'string'}}, - 'type': 'object'}, - 'AddUserResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/AddUserResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'AddUsers': {'additionalProperties': False, - 'properties': {'users': {'items': {'$ref': '#/definitions/AddUser'}, - 'type': 'array'}}, - 'required': ['users'], - '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'}, - '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'}, - 'MacaroonResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'$ref': '#/definitions/Macaroon'}}, - 'type': 'object'}, - 'MacaroonResults': {'additionalProperties': False, - 'properties': {'results': {'items': {'$ref': '#/definitions/MacaroonResult'}, - 'type': 'array'}}, - 'required': ['results'], - 'type': 'object'}, - 'UserInfo': {'additionalProperties': False, - 'properties': {'created-by': {'type': 'string'}, - 'date-created': {'format': 'date-time', - 'type': 'string'}, - 'disabled': {'type': 'boolean'}, - 'display-name': {'type': 'string'}, - 'last-connection': {'format': 'date-time', - 'type': 'string'}, - 'username': {'type': 'string'}}, - 'required': ['username', - 'display-name', - 'created-by', - 'date-created', - 'disabled'], - 'type': 'object'}, - 'UserInfoRequest': {'additionalProperties': False, - 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, - 'type': 'array'}, - 'include-disabled': {'type': 'boolean'}}, - 'required': ['entities', - 'include-disabled'], - 'type': 'object'}, - 'UserInfoResult': {'additionalProperties': False, - 'properties': {'error': {'$ref': '#/definitions/Error'}, - 'result': {'$ref': '#/definitions/UserInfo'}}, - 'type': 'object'}, - 'UserInfoResults': {'additionalProperties': False, - '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'}}, - 'properties': {'AddUser': {'properties': {'Params': {'$ref': '#/definitions/AddUsers'}, - 'Result': {'$ref': '#/definitions/AddUserResults'}}, - 'type': 'object'}, - 'CreateLocalLoginMacaroon': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/MacaroonResults'}}, - 'type': 'object'}, - 'DisableUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'EnableUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'SetPassword': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'}, - 'Result': {'$ref': '#/definitions/ErrorResults'}}, - 'type': 'object'}, - 'UserInfo': {'properties': {'Params': {'$ref': '#/definitions/UserInfoRequest'}, - 'Result': {'$ref': '#/definitions/UserInfoResults'}}, - 'type': 'object'}}, - 'type': 'object'} - - - @ReturnMapping(AddUserResults) - async def AddUser(self, users): - ''' - users : typing.Sequence[~AddUser] - Returns -> typing.Sequence[~AddUserResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='UserManager', Request='AddUser', Version=1, Params=params) - params['users'] = users - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(MacaroonResults) - async def CreateLocalLoginMacaroon(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~MacaroonResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='UserManager', Request='CreateLocalLoginMacaroon', Version=1, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def DisableUser(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='UserManager', Request='DisableUser', Version=1, Params=params) - params['Entities'] = entities - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(ErrorResults) - async def EnableUser(self, entities): - ''' - entities : typing.Sequence[~Entity] - Returns -> typing.Sequence[~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 SetPassword(self, changes): - ''' - changes : typing.Sequence[~EntityPassword] - Returns -> typing.Sequence[~ErrorResult] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='UserManager', Request='SetPassword', Version=1, Params=params) - params['Changes'] = changes - reply = await self.rpc(msg) - return reply - - - - @ReturnMapping(UserInfoResults) - async def UserInfo(self, entities, include_disabled): - ''' - entities : typing.Sequence[~Entity] - include_disabled : bool - Returns -> typing.Sequence[~UserInfoResult] - ''' - # map input types to rpc msg - params = dict() - 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): - name = 'VolumeAttachmentsWatcher' - 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): - ''' - - Returns -> typing.Union[typing.Sequence[~MachineStorageId], _ForwardRef('Error')] - ''' - # map input types to rpc msg - params = dict() - msg = dict(Type='VolumeAttachmentsWatcher', Request='Next', Version=2, 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='VolumeAttachmentsWatcher', Request='Stop', Version=2, Params=params) - - reply = await self.rpc(msg) - return reply +for o in overrides.__all__: + setattr(_client, o, getattr(overrides, o)) +from ._client import * # noqa diff --git a/juju/client/facade.py b/juju/client/facade.py index 5b7ac35..048e5c5 100644 --- a/juju/client/facade.py +++ b/juju/client/facade.py @@ -559,6 +559,9 @@ def generate_facacdes(options): schemas = json.loads(Path(options.schema).read_text("utf-8")) capture = codegen.CodeWriter() capture.write(""" +# DO NOT CHANGE THIS FILE! This file is auto-generated by facade.py. +# Changes will be overwritten/lost when the file is regenerated. + from juju.client.facade import Type, ReturnMapping """) schemas = [Schema(s) for s in schemas] diff --git a/juju/client/overrides.py b/juju/client/overrides.py new file mode 100644 index 0000000..1cce4da --- /dev/null +++ b/juju/client/overrides.py @@ -0,0 +1,20 @@ +from .facade import Type + +__all__ = [ + 'Delta', +] + + +class Delta(Type): + _toSchema = {'deltas': 'Deltas'} + _toPy = {'Deltas': 'deltas'} + + def __init__(self, deltas=None): + ''' + deltas : [str, str, object] + ''' + self.deltas = deltas + + @classmethod + def from_json(cls, data): + return cls(deltas=data) diff --git a/juju/client/schemas.json b/juju/client/schemas.json index b6d58f1..0c19648 100644 --- a/juju/client/schemas.json +++ b/juju/client/schemas.json @@ -1,7 +1,7 @@ [ { "Name": "Action", - "Version": 1, + "Version": 2, "Schema": { "type": "object", "properties": { @@ -16,6 +16,17 @@ } } }, + "ApplicationsCharmsActions": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ApplicationsCharmActionsResults" + } + } + }, "Cancel": { "type": "object", "properties": { @@ -125,17 +136,6 @@ "$ref": "#/definitions/ActionResults" } } - }, - "ServicesCharmActions": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ServicesCharmActionsResults" - } - } } }, "definitions": { @@ -219,17 +219,44 @@ }, "additionalProperties": false }, + "ActionSpec": { + "type": "object", + "properties": { + "Description": { + "type": "string" + }, + "Params": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "Description", + "Params" + ] + }, "Actions": { "type": "object", "properties": { - "actions": { - "type": "array", - "items": { - "$ref": "#/definitions/Action" + "ActionSpecs": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/ActionSpec" + } } } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "ActionSpecs" + ] }, "ActionsByName": { "type": "object", @@ -291,6 +318,33 @@ }, "additionalProperties": false }, + "ApplicationCharmActionsResult": { + "type": "object", + "properties": { + "ApplicationTag": { + "type": "string" + }, + "actions": { + "$ref": "#/definitions/Actions" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "ApplicationsCharmActionsResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationCharmActionsResult" + } + } + }, + "additionalProperties": false + }, "Entities": { "type": "object", "properties": { @@ -436,16 +490,16 @@ "RunParams": { "type": "object", "properties": { - "Commands": { - "type": "string" - }, - "Machines": { + "Applications": { "type": "array", "items": { "type": "string" } }, - "Services": { + "Commands": { + "type": "string" + }, + "Machines": { "type": "array", "items": { "type": "string" @@ -466,37 +520,10 @@ "Commands", "Timeout", "Machines", - "Services", + "Applications", "Units" ] }, - "ServiceCharmActionsResult": { - "type": "object", - "properties": { - "actions": { - "$ref": "#/definitions/Actions" - }, - "error": { - "$ref": "#/definitions/Error" - }, - "servicetag": { - "type": "string" - } - }, - "additionalProperties": false - }, - "ServicesCharmActionsResults": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ServiceCharmActionsResult" - } - } - }, - "additionalProperties": false - }, "caveat": { "type": "object", "properties": { @@ -1519,540 +1546,430 @@ } }, { - "Name": "Backups", + "Name": "Application", "Version": 1, "Schema": { "type": "object", "properties": { - "Create": { + "AddRelation": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/BackupsCreateArgs" + "$ref": "#/definitions/AddRelation" }, "Result": { - "$ref": "#/definitions/BackupsMetadataResult" + "$ref": "#/definitions/AddRelationResults" } } }, - "FinishRestore": { - "type": "object" - }, - "Info": { + "AddUnits": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/BackupsInfoArgs" + "$ref": "#/definitions/AddApplicationUnits" }, "Result": { - "$ref": "#/definitions/BackupsMetadataResult" + "$ref": "#/definitions/AddApplicationUnitsResults" } } }, - "List": { + "CharmRelations": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/BackupsListArgs" + "$ref": "#/definitions/ApplicationCharmRelations" }, "Result": { - "$ref": "#/definitions/BackupsListResult" + "$ref": "#/definitions/ApplicationCharmRelationsResults" } } }, - "PrepareRestore": { - "type": "object" - }, - "Remove": { + "Deploy": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/BackupsRemoveArgs" + "$ref": "#/definitions/ApplicationsDeploy" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" } } }, - "Restore": { + "Destroy": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/RestoreArgs" + "$ref": "#/definitions/ApplicationDestroy" } } - } - }, - "definitions": { - "BackupsCreateArgs": { + }, + "DestroyRelation": { "type": "object", "properties": { - "Notes": { - "type": "string" + "Params": { + "$ref": "#/definitions/DestroyRelation" } - }, - "additionalProperties": false, - "required": [ - "Notes" - ] + } }, - "BackupsInfoArgs": { + "DestroyUnits": { "type": "object", "properties": { - "ID": { - "type": "string" + "Params": { + "$ref": "#/definitions/DestroyApplicationUnits" } - }, - "additionalProperties": false, - "required": [ - "ID" - ] + } }, - "BackupsListArgs": { + "Expose": { "type": "object", - "additionalProperties": false + "properties": { + "Params": { + "$ref": "#/definitions/ApplicationExpose" + } + } }, - "BackupsListResult": { + "Get": { "type": "object", "properties": { - "List": { - "type": "array", - "items": { - "$ref": "#/definitions/BackupsMetadataResult" - } + "Params": { + "$ref": "#/definitions/ApplicationGet" + }, + "Result": { + "$ref": "#/definitions/ApplicationGetResults" } - }, - "additionalProperties": false, - "required": [ - "List" - ] + } }, - "BackupsMetadataResult": { + "GetCharmURL": { "type": "object", "properties": { - "CACert": { - "type": "string" - }, - "CAPrivateKey": { - "type": "string" - }, - "Checksum": { - "type": "string" - }, - "ChecksumFormat": { - "type": "string" - }, - "Finished": { - "type": "string", - "format": "date-time" - }, - "Hostname": { - "type": "string" - }, - "ID": { - "type": "string" - }, - "Machine": { - "type": "string" - }, - "Model": { - "type": "string" - }, - "Notes": { - "type": "string" - }, - "Size": { - "type": "integer" - }, - "Started": { - "type": "string", - "format": "date-time" - }, - "Stored": { - "type": "string", - "format": "date-time" + "Params": { + "$ref": "#/definitions/ApplicationGet" }, - "Version": { - "$ref": "#/definitions/Number" + "Result": { + "$ref": "#/definitions/StringResult" } - }, - "additionalProperties": false, - "required": [ - "ID", - "Checksum", - "ChecksumFormat", - "Size", - "Stored", - "Started", - "Finished", - "Notes", - "Model", - "Machine", - "Hostname", - "Version", - "CACert", - "CAPrivateKey" - ] + } }, - "BackupsRemoveArgs": { + "GetConstraints": { "type": "object", "properties": { - "ID": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "ID" - ] + "Params": { + "$ref": "#/definitions/GetApplicationConstraints" + }, + "Result": { + "$ref": "#/definitions/GetConstraintsResults" + } + } }, - "Number": { + "Set": { "type": "object", "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Patch": { - "type": "integer" - }, - "Tag": { - "type": "string" + "Params": { + "$ref": "#/definitions/ApplicationSet" } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" - ] + } }, - "RestoreArgs": { + "SetCharm": { "type": "object", "properties": { - "BackupId": { - "type": "string" + "Params": { + "$ref": "#/definitions/ApplicationSetCharm" } - }, - "additionalProperties": false, - "required": [ - "BackupId" - ] - } - } - } - }, - { - "Name": "Block", - "Version": 2, - "Schema": { - "type": "object", - "properties": { - "List": { + } + }, + "SetConstraints": { "type": "object", "properties": { - "Result": { - "$ref": "#/definitions/BlockResults" + "Params": { + "$ref": "#/definitions/SetConstraints" } } }, - "SwitchBlockOff": { + "SetMetricCredentials": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/BlockSwitchParams" + "$ref": "#/definitions/ApplicationMetricCredentials" }, "Result": { - "$ref": "#/definitions/ErrorResult" + "$ref": "#/definitions/ErrorResults" } } }, - "SwitchBlockOn": { + "Unexpose": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/BlockSwitchParams" - }, - "Result": { - "$ref": "#/definitions/ErrorResult" + "$ref": "#/definitions/ApplicationUnexpose" + } + } + }, + "Unset": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ApplicationUnset" + } + } + }, + "Update": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ApplicationUpdate" } } } }, "definitions": { - "Block": { + "AddApplicationUnits": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "message": { + "ApplicationName": { "type": "string" }, - "tag": { - "type": "string" + "NumUnits": { + "type": "integer" }, - "type": { - "type": "string" + "Placement": { + "type": "array", + "items": { + "$ref": "#/definitions/Placement" + } } }, "additionalProperties": false, "required": [ - "id", - "tag", - "type" + "ApplicationName", + "NumUnits", + "Placement" ] }, - "BlockResult": { + "AddApplicationUnitsResults": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" - }, - "result": { - "$ref": "#/definitions/Block" + "Units": { + "type": "array", + "items": { + "type": "string" + } } }, "additionalProperties": false, "required": [ - "result" + "Units" ] }, - "BlockResults": { + "AddRelation": { "type": "object", "properties": { - "results": { + "Endpoints": { "type": "array", "items": { - "$ref": "#/definitions/BlockResult" + "type": "string" } } }, - "additionalProperties": false - }, - "BlockSwitchParams": { - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "type": { - "type": "string" - } - }, "additionalProperties": false, "required": [ - "type" + "Endpoints" ] }, - "Error": { + "AddRelationResults": { "type": "object", "properties": { - "Code": { - "type": "string" - }, - "Info": { - "$ref": "#/definitions/ErrorInfo" - }, - "Message": { - "type": "string" + "Endpoints": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/Relation" + } + } } }, "additionalProperties": false, "required": [ - "Message", - "Code" + "Endpoints" ] }, - "ErrorInfo": { + "ApplicationCharmRelations": { "type": "object", "properties": { - "Macaroon": { - "$ref": "#/definitions/Macaroon" - }, - "MacaroonPath": { + "ApplicationName": { "type": "string" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "ApplicationName" + ] }, - "ErrorResult": { + "ApplicationCharmRelationsResults": { "type": "object", "properties": { - "Error": { - "$ref": "#/definitions/Error" + "CharmRelations": { + "type": "array", + "items": { + "type": "string" + } } }, "additionalProperties": false, "required": [ - "Error" + "CharmRelations" ] }, - "Macaroon": { + "ApplicationDeploy": { "type": "object", "properties": { - "caveats": { - "type": "array", - "items": { - "$ref": "#/definitions/caveat" + "ApplicationName": { + "type": "string" + }, + "Channel": { + "type": "string" + }, + "CharmUrl": { + "type": "string" + }, + "Config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } } }, - "data": { + "ConfigYAML": { + "type": "string" + }, + "Constraints": { + "$ref": "#/definitions/Value" + }, + "EndpointBindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "NumUnits": { + "type": "integer" + }, + "Placement": { "type": "array", "items": { - "type": "integer" + "$ref": "#/definitions/Placement" } }, - "id": { - "$ref": "#/definitions/packet" + "Resources": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } }, - "location": { - "$ref": "#/definitions/packet" + "Series": { + "type": "string" }, - "sig": { - "type": "array", - "items": { - "type": "integer" + "Storage": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/Constraints" + } } } }, "additionalProperties": false, "required": [ - "data", - "location", - "id", - "caveats", - "sig" - ] - }, - "caveat": { - "type": "object", + "ApplicationName", + "Series", + "CharmUrl", + "Channel", + "NumUnits", + "Config", + "ConfigYAML", + "Constraints", + "Placement", + "Storage", + "EndpointBindings", + "Resources" + ] + }, + "ApplicationDestroy": { + "type": "object", "properties": { - "caveatId": { - "$ref": "#/definitions/packet" - }, - "location": { - "$ref": "#/definitions/packet" - }, - "verificationId": { - "$ref": "#/definitions/packet" + "ApplicationName": { + "type": "string" } }, "additionalProperties": false, "required": [ - "location", - "caveatId", - "verificationId" + "ApplicationName" ] }, - "packet": { + "ApplicationExpose": { "type": "object", "properties": { - "headerLen": { - "type": "integer" - }, - "start": { - "type": "integer" - }, - "totalLen": { - "type": "integer" + "ApplicationName": { + "type": "string" } }, "additionalProperties": false, "required": [ - "start", - "totalLen", - "headerLen" + "ApplicationName" ] - } - } - } - }, - { - "Name": "CharmRevisionUpdater", - "Version": 1, - "Schema": { - "type": "object", - "properties": { - "UpdateLatestRevisions": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ErrorResult" - } - } - } - }, - "definitions": { - "Error": { + }, + "ApplicationGet": { "type": "object", "properties": { - "Code": { - "type": "string" - }, - "Info": { - "$ref": "#/definitions/ErrorInfo" - }, - "Message": { + "ApplicationName": { "type": "string" } }, "additionalProperties": false, "required": [ - "Message", - "Code" + "ApplicationName" ] }, - "ErrorInfo": { + "ApplicationGetResults": { "type": "object", "properties": { - "Macaroon": { - "$ref": "#/definitions/Macaroon" + "Application": { + "type": "string" }, - "MacaroonPath": { + "Charm": { "type": "string" - } - }, - "additionalProperties": false - }, - "ErrorResult": { - "type": "object", - "properties": { - "Error": { - "$ref": "#/definitions/Error" + }, + "Config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "Constraints": { + "$ref": "#/definitions/Value" } }, "additionalProperties": false, "required": [ - "Error" + "Application", + "Charm", + "Config", + "Constraints" ] }, - "Macaroon": { + "ApplicationMetricCredential": { "type": "object", "properties": { - "caveats": { - "type": "array", - "items": { - "$ref": "#/definitions/caveat" - } - }, - "data": { - "type": "array", - "items": { - "type": "integer" - } - }, - "id": { - "$ref": "#/definitions/packet" - }, - "location": { - "$ref": "#/definitions/packet" + "ApplicationName": { + "type": "string" }, - "sig": { + "MetricCredentials": { "type": "array", "items": { "type": "integer" @@ -2061,128 +1978,102 @@ }, "additionalProperties": false, "required": [ - "data", - "location", - "id", - "caveats", - "sig" + "ApplicationName", + "MetricCredentials" ] }, - "caveat": { + "ApplicationMetricCredentials": { "type": "object", "properties": { - "caveatId": { - "$ref": "#/definitions/packet" - }, - "location": { - "$ref": "#/definitions/packet" - }, - "verificationId": { - "$ref": "#/definitions/packet" + "Creds": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationMetricCredential" + } } }, "additionalProperties": false, "required": [ - "location", - "caveatId", - "verificationId" + "Creds" ] }, - "packet": { + "ApplicationSet": { "type": "object", "properties": { - "headerLen": { - "type": "integer" - }, - "start": { - "type": "integer" + "ApplicationName": { + "type": "string" }, - "totalLen": { - "type": "integer" + "Options": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } } }, "additionalProperties": false, "required": [ - "start", - "totalLen", - "headerLen" + "ApplicationName", + "Options" ] - } - } - } - }, - { - "Name": "Charms", - "Version": 2, - "Schema": { - "type": "object", - "properties": { - "CharmInfo": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CharmInfo" - }, - "Result": { - "$ref": "#/definitions/CharmInfo" - } - } }, - "IsMetered": { + "ApplicationSetCharm": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/CharmInfo" + "applicationname": { + "type": "string" }, - "Result": { - "$ref": "#/definitions/IsMeteredResult" - } - } - }, - "List": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/CharmsList" + "charmurl": { + "type": "string" }, - "Result": { - "$ref": "#/definitions/CharmsListResult" - } - } - } - }, - "definitions": { - "CharmInfo": { - "type": "object", - "properties": { - "CharmURL": { + "cs-channel": { "type": "string" + }, + "forceseries": { + "type": "boolean" + }, + "forceunits": { + "type": "boolean" + }, + "resourceids": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } } }, "additionalProperties": false, "required": [ - "CharmURL" + "applicationname", + "charmurl", + "cs-channel", + "forceunits", + "forceseries", + "resourceids" ] }, - "CharmsList": { + "ApplicationUnexpose": { "type": "object", "properties": { - "Names": { - "type": "array", - "items": { - "type": "string" - } + "ApplicationName": { + "type": "string" } }, "additionalProperties": false, "required": [ - "Names" + "ApplicationName" ] }, - "CharmsListResult": { + "ApplicationUnset": { "type": "object", "properties": { - "CharmURLs": { + "ApplicationName": { + "type": "string" + }, + "Options": { "type": "array", "items": { "type": "string" @@ -2191,43 +2082,120 @@ }, "additionalProperties": false, "required": [ - "CharmURLs" + "ApplicationName", + "Options" ] }, - "IsMeteredResult": { + "ApplicationUpdate": { "type": "object", "properties": { - "Metered": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "Metered" + "ApplicationName": { + "type": "string" + }, + "CharmUrl": { + "type": "string" + }, + "Constraints": { + "$ref": "#/definitions/Value" + }, + "ForceCharmUrl": { + "type": "boolean" + }, + "ForceSeries": { + "type": "boolean" + }, + "MinUnits": { + "type": "integer" + }, + "SettingsStrings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "SettingsYAML": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "ApplicationName", + "CharmUrl", + "ForceCharmUrl", + "ForceSeries", + "MinUnits", + "SettingsStrings", + "SettingsYAML", + "Constraints" ] - } - } - } - }, - { - "Name": "Cleaner", - "Version": 2, - "Schema": { - "type": "object", - "properties": { - "Cleanup": { - "type": "object" }, - "WatchCleanups": { + "ApplicationsDeploy": { "type": "object", "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" + "Applications": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationDeploy" + } } - } - } - }, - "definitions": { + }, + "additionalProperties": false, + "required": [ + "Applications" + ] + }, + "Constraints": { + "type": "object", + "properties": { + "Count": { + "type": "integer" + }, + "Pool": { + "type": "string" + }, + "Size": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "Pool", + "Size", + "Count" + ] + }, + "DestroyApplicationUnits": { + "type": "object", + "properties": { + "UnitNames": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "UnitNames" + ] + }, + "DestroyRelation": { + "type": "object", + "properties": { + "Endpoints": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "Endpoints" + ] + }, "Error": { "type": "object", "properties": { @@ -2259,6 +2227,57 @@ }, "additionalProperties": false }, + "ErrorResult": { + "type": "object", + "properties": { + "Error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "Error" + ] + }, + "ErrorResults": { + "type": "object", + "properties": { + "Results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "Results" + ] + }, + "GetApplicationConstraints": { + "type": "object", + "properties": { + "ApplicationName": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "ApplicationName" + ] + }, + "GetConstraintsResults": { + "type": "object", + "properties": { + "Constraints": { + "$ref": "#/definitions/Value" + } + }, + "additionalProperties": false, + "required": [ + "Constraints" + ] + }, "Macaroon": { "type": "object", "properties": { @@ -2296,1016 +2315,1131 @@ "sig" ] }, - "NotifyWatchResult": { + "Placement": { "type": "object", "properties": { - "Error": { - "$ref": "#/definitions/Error" + "Directive": { + "type": "string" }, - "NotifyWatcherId": { + "Scope": { "type": "string" } }, "additionalProperties": false, "required": [ - "NotifyWatcherId", - "Error" + "Scope", + "Directive" ] }, - "caveat": { + "Relation": { "type": "object", "properties": { - "caveatId": { - "$ref": "#/definitions/packet" + "Interface": { + "type": "string" }, - "location": { - "$ref": "#/definitions/packet" + "Limit": { + "type": "integer" }, - "verificationId": { - "$ref": "#/definitions/packet" + "Name": { + "type": "string" + }, + "Optional": { + "type": "boolean" + }, + "Role": { + "type": "string" + }, + "Scope": { + "type": "string" } }, "additionalProperties": false, "required": [ - "location", - "caveatId", - "verificationId" + "Name", + "Role", + "Interface", + "Optional", + "Limit", + "Scope" ] }, - "packet": { + "SetConstraints": { "type": "object", "properties": { - "headerLen": { - "type": "integer" - }, - "start": { - "type": "integer" + "ApplicationName": { + "type": "string" }, - "totalLen": { - "type": "integer" + "Constraints": { + "$ref": "#/definitions/Value" } }, "additionalProperties": false, "required": [ - "start", - "totalLen", - "headerLen" + "ApplicationName", + "Constraints" ] - } - } - } - }, - { - "Name": "Client", - "Version": 1, - "Schema": { - "type": "object", - "properties": { - "APIHostPorts": { + }, + "StringResult": { "type": "object", "properties": { + "Error": { + "$ref": "#/definitions/Error" + }, "Result": { - "$ref": "#/definitions/APIHostPortsResult" + "type": "string" } - } - }, - "AbortCurrentUpgrade": { - "type": "object" + }, + "additionalProperties": false, + "required": [ + "Error", + "Result" + ] }, - "AddCharm": { + "Value": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/AddCharm" - } - } + "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": { + "type": "array", + "items": { + "type": "string" + } + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "virt-type": { + "type": "string" + } + }, + "additionalProperties": false }, - "AddCharmWithAuthorization": { + "caveat": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/AddCharmWithAuthorization" + "caveatId": { + "$ref": "#/definitions/packet" + }, + "location": { + "$ref": "#/definitions/packet" + }, + "verificationId": { + "$ref": "#/definitions/packet" } - } + }, + "additionalProperties": false, + "required": [ + "location", + "caveatId", + "verificationId" + ] }, - "AddMachines": { + "packet": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/AddMachines" + "headerLen": { + "type": "integer" }, - "Result": { - "$ref": "#/definitions/AddMachinesResults" + "start": { + "type": "integer" + }, + "totalLen": { + "type": "integer" } - } - }, - "AddMachinesV2": { + }, + "additionalProperties": false, + "required": [ + "start", + "totalLen", + "headerLen" + ] + } + } + } + }, + { + "Name": "ApplicationScaler", + "Version": 1, + "Schema": { + "type": "object", + "properties": { + "Rescale": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/AddMachines" + "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/AddMachinesResults" + "$ref": "#/definitions/ErrorResults" } } }, - "AgentVersion": { + "Watch": { "type": "object", "properties": { "Result": { - "$ref": "#/definitions/AgentVersionResult" + "$ref": "#/definitions/StringsWatchResult" } } - }, - "CharmInfo": { + } + }, + "definitions": { + "Entities": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/CharmInfo" - }, - "Result": { - "$ref": "#/definitions/CharmInfo" + "Entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } } - } + }, + "additionalProperties": false, + "required": [ + "Entities" + ] }, - "DestroyMachines": { + "Entity": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/DestroyMachines" + "Tag": { + "type": "string" } - } - }, - "DestroyModel": { - "type": "object" + }, + "additionalProperties": false, + "required": [ + "Tag" + ] }, - "FindTools": { + "Error": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/FindToolsParams" + "Code": { + "type": "string" }, - "Result": { - "$ref": "#/definitions/FindToolsResult" + "Info": { + "$ref": "#/definitions/ErrorInfo" + }, + "Message": { + "type": "string" } - } + }, + "additionalProperties": false, + "required": [ + "Message", + "Code" + ] }, - "FullStatus": { + "ErrorInfo": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/StatusParams" + "Macaroon": { + "$ref": "#/definitions/Macaroon" }, - "Result": { - "$ref": "#/definitions/FullStatus" + "MacaroonPath": { + "type": "string" } - } + }, + "additionalProperties": false }, - "GetBundleChanges": { + "ErrorResult": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/GetBundleChangesParams" - }, - "Result": { - "$ref": "#/definitions/GetBundleChangesResults" + "Error": { + "$ref": "#/definitions/Error" } - } + }, + "additionalProperties": false, + "required": [ + "Error" + ] }, - "GetModelConstraints": { + "ErrorResults": { "type": "object", "properties": { - "Result": { - "$ref": "#/definitions/GetConstraintsResults" + "Results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } } - } + }, + "additionalProperties": false, + "required": [ + "Results" + ] }, - "InjectMachines": { + "Macaroon": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/AddMachines" + "caveats": { + "type": "array", + "items": { + "$ref": "#/definitions/caveat" + } }, - "Result": { - "$ref": "#/definitions/AddMachinesResults" + "data": { + "type": "array", + "items": { + "type": "integer" + } + }, + "id": { + "$ref": "#/definitions/packet" + }, + "location": { + "$ref": "#/definitions/packet" + }, + "sig": { + "type": "array", + "items": { + "type": "integer" + } } - } + }, + "additionalProperties": false, + "required": [ + "data", + "location", + "id", + "caveats", + "sig" + ] }, - "ModelGet": { + "StringsWatchResult": { "type": "object", "properties": { - "Result": { - "$ref": "#/definitions/ModelConfigResults" + "Changes": { + "type": "array", + "items": { + "type": "string" + } + }, + "Error": { + "$ref": "#/definitions/Error" + }, + "StringsWatcherId": { + "type": "string" } - } - }, - "ModelInfo": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelInfo" - } - } - }, - "ModelSet": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelSet" - } - } - }, - "ModelUnset": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelUnset" - } - } - }, - "ModelUserInfo": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelUserInfoResults" - } - } + }, + "additionalProperties": false, + "required": [ + "StringsWatcherId", + "Changes", + "Error" + ] }, - "PrivateAddress": { + "caveat": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/PrivateAddress" + "caveatId": { + "$ref": "#/definitions/packet" }, - "Result": { - "$ref": "#/definitions/PrivateAddressResults" + "location": { + "$ref": "#/definitions/packet" + }, + "verificationId": { + "$ref": "#/definitions/packet" } - } + }, + "additionalProperties": false, + "required": [ + "location", + "caveatId", + "verificationId" + ] }, - "ProvisioningScript": { + "packet": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/ProvisioningScriptParams" + "headerLen": { + "type": "integer" }, - "Result": { - "$ref": "#/definitions/ProvisioningScriptResult" + "start": { + "type": "integer" + }, + "totalLen": { + "type": "integer" } - } - }, - "PublicAddress": { + }, + "additionalProperties": false, + "required": [ + "start", + "totalLen", + "headerLen" + ] + } + } + } + }, + { + "Name": "Backups", + "Version": 1, + "Schema": { + "type": "object", + "properties": { + "Create": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/PublicAddress" + "$ref": "#/definitions/BackupsCreateArgs" }, "Result": { - "$ref": "#/definitions/PublicAddressResults" + "$ref": "#/definitions/BackupsMetadataResult" } } }, - "ResolveCharms": { + "FinishRestore": { + "type": "object" + }, + "Info": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/ResolveCharms" + "$ref": "#/definitions/BackupsInfoArgs" }, "Result": { - "$ref": "#/definitions/ResolveCharmResults" - } - } - }, - "Resolved": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Resolved" + "$ref": "#/definitions/BackupsMetadataResult" } } }, - "RetryProvisioning": { + "List": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/Entities" + "$ref": "#/definitions/BackupsListArgs" }, "Result": { - "$ref": "#/definitions/ErrorResults" + "$ref": "#/definitions/BackupsListResult" } } }, - "SetModelAgentVersion": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetModelAgentVersion" - } - } + "PrepareRestore": { + "type": "object" }, - "SetModelConstraints": { + "Remove": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/SetConstraints" + "$ref": "#/definitions/BackupsRemoveArgs" } } }, - "StatusHistory": { + "Restore": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/StatusHistoryArgs" - }, - "Result": { - "$ref": "#/definitions/StatusHistoryResults" - } - } - }, - "WatchAll": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/AllWatcherId" + "$ref": "#/definitions/RestoreArgs" } } } }, "definitions": { - "APIHostPortsResult": { + "BackupsCreateArgs": { "type": "object", "properties": { - "Servers": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/HostPort" - } - } + "Notes": { + "type": "string" } }, "additionalProperties": false, "required": [ - "Servers" + "Notes" ] }, - "AddCharm": { + "BackupsInfoArgs": { "type": "object", "properties": { - "Channel": { - "type": "string" - }, - "URL": { + "ID": { "type": "string" } }, "additionalProperties": false, "required": [ - "URL", - "Channel" + "ID" ] }, - "AddCharmWithAuthorization": { + "BackupsListArgs": { + "type": "object", + "additionalProperties": false + }, + "BackupsListResult": { "type": "object", "properties": { - "Channel": { - "type": "string" - }, - "CharmStoreMacaroon": { - "$ref": "#/definitions/Macaroon" - }, - "URL": { - "type": "string" + "List": { + "type": "array", + "items": { + "$ref": "#/definitions/BackupsMetadataResult" + } } }, "additionalProperties": false, "required": [ - "URL", - "Channel", - "CharmStoreMacaroon" + "List" ] }, - "AddMachineParams": { + "BackupsMetadataResult": { "type": "object", "properties": { - "Addrs": { - "type": "array", - "items": { - "$ref": "#/definitions/Address" - } + "CACert": { + "type": "string" }, - "Constraints": { - "$ref": "#/definitions/Value" + "CAPrivateKey": { + "type": "string" }, - "ContainerType": { + "Checksum": { "type": "string" }, - "Disks": { - "type": "array", - "items": { - "$ref": "#/definitions/Constraints" - } + "ChecksumFormat": { + "type": "string" }, - "HardwareCharacteristics": { - "$ref": "#/definitions/HardwareCharacteristics" + "Finished": { + "type": "string", + "format": "date-time" }, - "InstanceId": { + "Hostname": { "type": "string" }, - "Jobs": { - "type": "array", - "items": { - "type": "string" - } + "ID": { + "type": "string" }, - "Nonce": { + "Machine": { "type": "string" }, - "ParentId": { + "Model": { "type": "string" }, - "Placement": { - "$ref": "#/definitions/Placement" + "Notes": { + "type": "string" }, "Series": { "type": "string" + }, + "Size": { + "type": "integer" + }, + "Started": { + "type": "string", + "format": "date-time" + }, + "Stored": { + "type": "string", + "format": "date-time" + }, + "Version": { + "$ref": "#/definitions/Number" } }, "additionalProperties": false, "required": [ - "Series", - "Constraints", - "Jobs", - "Disks", - "Placement", - "ParentId", - "ContainerType", - "InstanceId", - "Nonce", - "HardwareCharacteristics", - "Addrs" + "ID", + "Checksum", + "ChecksumFormat", + "Size", + "Stored", + "Started", + "Finished", + "Notes", + "Model", + "Machine", + "Hostname", + "Version", + "Series", + "CACert", + "CAPrivateKey" ] }, - "AddMachines": { + "BackupsRemoveArgs": { "type": "object", "properties": { - "MachineParams": { - "type": "array", - "items": { - "$ref": "#/definitions/AddMachineParams" - } + "ID": { + "type": "string" } }, "additionalProperties": false, "required": [ - "MachineParams" + "ID" ] }, - "AddMachinesResult": { + "Number": { "type": "object", "properties": { - "Error": { - "$ref": "#/definitions/Error" + "Build": { + "type": "integer" }, - "Machine": { + "Major": { + "type": "integer" + }, + "Minor": { + "type": "integer" + }, + "Patch": { + "type": "integer" + }, + "Tag": { "type": "string" } }, "additionalProperties": false, "required": [ - "Machine", - "Error" + "Major", + "Minor", + "Tag", + "Patch", + "Build" ] }, - "AddMachinesResults": { + "RestoreArgs": { "type": "object", "properties": { - "Machines": { - "type": "array", - "items": { - "$ref": "#/definitions/AddMachinesResult" - } + "BackupId": { + "type": "string" } }, "additionalProperties": false, "required": [ - "Machines" + "BackupId" ] + } + } + } + }, + { + "Name": "Block", + "Version": 2, + "Schema": { + "type": "object", + "properties": { + "List": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/BlockResults" + } + } }, - "Address": { + "SwitchBlockOff": { "type": "object", "properties": { - "Scope": { + "Params": { + "$ref": "#/definitions/BlockSwitchParams" + }, + "Result": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "SwitchBlockOn": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/BlockSwitchParams" + }, + "Result": { + "$ref": "#/definitions/ErrorResult" + } + } + } + }, + "definitions": { + "Block": { + "type": "object", + "properties": { + "id": { "type": "string" }, - "SpaceName": { + "message": { "type": "string" }, - "Type": { + "tag": { "type": "string" }, - "Value": { + "type": { "type": "string" } }, "additionalProperties": false, "required": [ - "Value", - "Type", - "Scope" + "id", + "tag", + "type" ] }, - "AgentVersionResult": { + "BlockResult": { "type": "object", "properties": { - "Version": { - "$ref": "#/definitions/Number" + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/Block" } }, "additionalProperties": false, "required": [ - "Version" + "result" ] }, - "AllWatcherId": { + "BlockResults": { "type": "object", "properties": { - "AllWatcherId": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/BlockResult" + } + } + }, + "additionalProperties": false + }, + "BlockSwitchParams": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "type": { "type": "string" } }, "additionalProperties": false, "required": [ - "AllWatcherId" + "type" ] }, - "Binary": { + "Error": { "type": "object", "properties": { - "Arch": { + "Code": { "type": "string" }, - "Number": { - "$ref": "#/definitions/Number" + "Info": { + "$ref": "#/definitions/ErrorInfo" }, - "Series": { + "Message": { "type": "string" } }, "additionalProperties": false, "required": [ - "Number", - "Series", - "Arch" + "Message", + "Code" ] }, - "BundleChangesChange": { + "ErrorInfo": { "type": "object", "properties": { - "args": { + "Macaroon": { + "$ref": "#/definitions/Macaroon" + }, + "MacaroonPath": { + "type": "string" + } + }, + "additionalProperties": false + }, + "ErrorResult": { + "type": "object", + "properties": { + "Error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "Error" + ] + }, + "Macaroon": { + "type": "object", + "properties": { + "caveats": { "type": "array", "items": { - "type": "object", - "additionalProperties": true + "$ref": "#/definitions/caveat" + } + }, + "data": { + "type": "array", + "items": { + "type": "integer" } }, "id": { - "type": "string" + "$ref": "#/definitions/packet" }, - "method": { - "type": "string" + "location": { + "$ref": "#/definitions/packet" }, - "requires": { + "sig": { "type": "array", "items": { - "type": "string" + "type": "integer" } } }, "additionalProperties": false, "required": [ + "data", + "location", "id", - "method", - "args", - "requires" + "caveats", + "sig" ] }, - "CharmInfo": { + "caveat": { "type": "object", "properties": { - "CharmURL": { - "type": "string" + "caveatId": { + "$ref": "#/definitions/packet" + }, + "location": { + "$ref": "#/definitions/packet" + }, + "verificationId": { + "$ref": "#/definitions/packet" } }, "additionalProperties": false, "required": [ - "CharmURL" + "location", + "caveatId", + "verificationId" ] }, - "Constraints": { + "packet": { "type": "object", "properties": { - "Count": { + "headerLen": { "type": "integer" }, - "Pool": { - "type": "string" + "start": { + "type": "integer" }, - "Size": { + "totalLen": { "type": "integer" } }, "additionalProperties": false, "required": [ - "Pool", - "Size", - "Count" + "start", + "totalLen", + "headerLen" ] - }, - "DestroyMachines": { + } + } + } + }, + { + "Name": "CharmRevisionUpdater", + "Version": 2, + "Schema": { + "type": "object", + "properties": { + "UpdateLatestRevisions": { "type": "object", "properties": { - "Force": { - "type": "boolean" - }, - "MachineNames": { - "type": "array", - "items": { - "type": "string" - } + "Result": { + "$ref": "#/definitions/ErrorResult" } - }, - "additionalProperties": false, - "required": [ - "MachineNames", - "Force" - ] - }, - "DetailedStatus": { + } + } + }, + "definitions": { + "Error": { "type": "object", "properties": { - "Data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "Err": { - "type": "object", - "additionalProperties": true - }, - "Info": { - "type": "string" - }, - "Kind": { - "type": "string" - }, - "Life": { + "Code": { "type": "string" }, - "Since": { - "type": "string", - "format": "date-time" - }, - "Status": { - "type": "string" + "Info": { + "$ref": "#/definitions/ErrorInfo" }, - "Version": { + "Message": { "type": "string" } }, "additionalProperties": false, "required": [ - "Status", - "Info", - "Data", - "Since", - "Kind", - "Version", - "Life", - "Err" + "Message", + "Code" ] }, - "EndpointStatus": { + "ErrorInfo": { "type": "object", "properties": { - "Name": { - "type": "string" - }, - "Role": { - "type": "string" + "Macaroon": { + "$ref": "#/definitions/Macaroon" }, - "ServiceName": { + "MacaroonPath": { "type": "string" - }, - "Subordinate": { - "type": "boolean" } }, - "additionalProperties": false, - "required": [ - "ServiceName", - "Name", - "Role", - "Subordinate" - ] + "additionalProperties": false }, - "Entities": { + "ErrorResult": { "type": "object", "properties": { - "Entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } + "Error": { + "$ref": "#/definitions/Error" } }, "additionalProperties": false, "required": [ - "Entities" + "Error" ] }, - "Entity": { + "Macaroon": { "type": "object", "properties": { - "Tag": { - "type": "string" + "caveats": { + "type": "array", + "items": { + "$ref": "#/definitions/caveat" + } + }, + "data": { + "type": "array", + "items": { + "type": "integer" + } + }, + "id": { + "$ref": "#/definitions/packet" + }, + "location": { + "$ref": "#/definitions/packet" + }, + "sig": { + "type": "array", + "items": { + "type": "integer" + } } }, "additionalProperties": false, "required": [ - "Tag" + "data", + "location", + "id", + "caveats", + "sig" ] }, - "EntityStatus": { + "caveat": { "type": "object", "properties": { - "Data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "Info": { - "type": "string" + "caveatId": { + "$ref": "#/definitions/packet" }, - "Since": { - "type": "string", - "format": "date-time" + "location": { + "$ref": "#/definitions/packet" }, - "Status": { - "type": "string" + "verificationId": { + "$ref": "#/definitions/packet" } }, "additionalProperties": false, "required": [ - "Status", - "Info", - "Data", - "Since" + "location", + "caveatId", + "verificationId" ] }, - "Error": { + "packet": { "type": "object", "properties": { - "Code": { - "type": "string" + "headerLen": { + "type": "integer" }, - "Info": { - "$ref": "#/definitions/ErrorInfo" + "start": { + "type": "integer" }, - "Message": { - "type": "string" + "totalLen": { + "type": "integer" } }, "additionalProperties": false, "required": [ - "Message", - "Code" + "start", + "totalLen", + "headerLen" ] + } + } + } + }, + { + "Name": "Charms", + "Version": 2, + "Schema": { + "type": "object", + "properties": { + "CharmInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/CharmInfo" + }, + "Result": { + "$ref": "#/definitions/CharmInfo" + } + } }, - "ErrorInfo": { + "IsMetered": { "type": "object", "properties": { - "Macaroon": { - "$ref": "#/definitions/Macaroon" + "Params": { + "$ref": "#/definitions/CharmInfo" }, - "MacaroonPath": { - "type": "string" + "Result": { + "$ref": "#/definitions/IsMeteredResult" } - }, - "additionalProperties": false + } }, - "ErrorResult": { + "List": { "type": "object", "properties": { - "Error": { - "$ref": "#/definitions/Error" + "Params": { + "$ref": "#/definitions/CharmsList" + }, + "Result": { + "$ref": "#/definitions/CharmsListResult" + } + } + } + }, + "definitions": { + "CharmInfo": { + "type": "object", + "properties": { + "CharmURL": { + "type": "string" } }, "additionalProperties": false, "required": [ - "Error" + "CharmURL" ] }, - "ErrorResults": { + "CharmsList": { "type": "object", "properties": { - "Results": { + "Names": { "type": "array", "items": { - "$ref": "#/definitions/ErrorResult" + "type": "string" } } }, "additionalProperties": false, "required": [ - "Results" + "Names" ] }, - "FindToolsParams": { + "CharmsListResult": { "type": "object", "properties": { - "Arch": { - "type": "string" - }, - "MajorVersion": { - "type": "integer" - }, - "MinorVersion": { - "type": "integer" - }, - "Number": { - "$ref": "#/definitions/Number" - }, - "Series": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Number", - "MajorVersion", - "MinorVersion", - "Arch", - "Series" - ] - }, - "FindToolsResult": { - "type": "object", - "properties": { - "Error": { - "$ref": "#/definitions/Error" - }, - "List": { + "CharmURLs": { "type": "array", "items": { - "$ref": "#/definitions/Tools" + "type": "string" } } }, "additionalProperties": false, "required": [ - "List", - "Error" + "CharmURLs" ] }, - "FullStatus": { + "IsMeteredResult": { "type": "object", "properties": { - "AvailableVersion": { - "type": "string" - }, - "Machines": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/MachineStatus" - } - } - }, - "ModelName": { - "type": "string" - }, - "Relations": { - "type": "array", - "items": { - "$ref": "#/definitions/RelationStatus" - } - }, - "Services": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/ServiceStatus" - } - } + "Metered": { + "type": "boolean" } }, "additionalProperties": false, "required": [ - "ModelName", - "AvailableVersion", - "Machines", - "Services", - "Relations" + "Metered" ] + } + } + } + }, + { + "Name": "Cleaner", + "Version": 2, + "Schema": { + "type": "object", + "properties": { + "Cleanup": { + "type": "object" }, - "GetBundleChangesParams": { + "WatchCleanups": { "type": "object", "properties": { - "yaml": { - "type": "string" + "Result": { + "$ref": "#/definitions/NotifyWatchResult" } - }, - "additionalProperties": false, - "required": [ - "yaml" - ] - }, - "GetBundleChangesResults": { + } + } + }, + "definitions": { + "Error": { "type": "object", "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/BundleChangesChange" - } + "Code": { + "type": "string" }, - "errors": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "GetConstraintsResults": { - "type": "object", - "properties": { - "Constraints": { - "$ref": "#/definitions/Value" + "Info": { + "$ref": "#/definitions/ErrorInfo" + }, + "Message": { + "type": "string" } }, "additionalProperties": false, "required": [ - "Constraints" + "Message", + "Code" ] }, - "HardwareCharacteristics": { + "ErrorInfo": { "type": "object", "properties": { - "Arch": { - "type": "string" + "Macaroon": { + "$ref": "#/definitions/Macaroon" }, - "AvailabilityZone": { + "MacaroonPath": { "type": "string" - }, - "CpuCores": { - "type": "integer" - }, - "CpuPower": { - "type": "integer" - }, - "Mem": { - "type": "integer" - }, - "RootDisk": { - "type": "integer" - }, - "Tags": { - "type": "array", - "items": { - "type": "string" - } } }, "additionalProperties": false }, - "HostPort": { - "type": "object", - "properties": { - "Address": { - "$ref": "#/definitions/Address" - }, - "Port": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "Address", - "Port" - ] - }, "Macaroon": { "type": "object", "properties": { @@ -3343,464 +3477,565 @@ "sig" ] }, - "MachineStatus": { + "NotifyWatchResult": { "type": "object", "properties": { - "AgentStatus": { - "$ref": "#/definitions/DetailedStatus" - }, - "Containers": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/MachineStatus" - } - } - }, - "DNSName": { - "type": "string" - }, - "Hardware": { - "type": "string" - }, - "HasVote": { - "type": "boolean" - }, - "Id": { - "type": "string" - }, - "InstanceId": { - "type": "string" - }, - "InstanceStatus": { - "$ref": "#/definitions/DetailedStatus" - }, - "Jobs": { - "type": "array", - "items": { - "type": "string" - } + "Error": { + "$ref": "#/definitions/Error" }, - "Series": { + "NotifyWatcherId": { "type": "string" - }, - "WantsVote": { - "type": "boolean" } }, "additionalProperties": false, "required": [ - "AgentStatus", - "InstanceStatus", - "DNSName", - "InstanceId", - "Series", - "Id", - "Containers", - "Hardware", - "Jobs", - "HasVote", - "WantsVote" + "NotifyWatcherId", + "Error" ] }, - "MeterStatus": { + "caveat": { "type": "object", "properties": { - "Color": { - "type": "string" + "caveatId": { + "$ref": "#/definitions/packet" }, - "Message": { - "type": "string" + "location": { + "$ref": "#/definitions/packet" + }, + "verificationId": { + "$ref": "#/definitions/packet" } }, "additionalProperties": false, "required": [ - "Color", - "Message" + "location", + "caveatId", + "verificationId" ] }, - "ModelConfigResults": { + "packet": { "type": "object", "properties": { - "Config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } + "headerLen": { + "type": "integer" + }, + "start": { + "type": "integer" + }, + "totalLen": { + "type": "integer" } }, "additionalProperties": false, "required": [ - "Config" + "start", + "totalLen", + "headerLen" ] - }, - "ModelInfo": { + } + } + } + }, + { + "Name": "Client", + "Version": 1, + "Schema": { + "type": "object", + "properties": { + "APIHostPorts": { "type": "object", "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": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelUserInfo" - } + "Result": { + "$ref": "#/definitions/APIHostPortsResult" } - }, - "additionalProperties": false, - "required": [ - "Name", - "UUID", - "ServerUUID", - "ProviderType", - "DefaultSeries", - "OwnerTag", - "Life", - "Status", - "Users" - ] + } }, - "ModelSet": { + "AbortCurrentUpgrade": { + "type": "object" + }, + "AddCharm": { "type": "object", "properties": { - "Config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } + "Params": { + "$ref": "#/definitions/AddCharm" } - }, - "additionalProperties": false, - "required": [ - "Config" - ] + } }, - "ModelUnset": { + "AddCharmWithAuthorization": { "type": "object", "properties": { - "Keys": { - "type": "array", - "items": { - "type": "string" - } + "Params": { + "$ref": "#/definitions/AddCharmWithAuthorization" } - }, - "additionalProperties": false, - "required": [ - "Keys" - ] + } }, - "ModelUserInfo": { + "AddMachines": { "type": "object", "properties": { - "access": { - "type": "string" - }, - "displayname": { - "type": "string" - }, - "lastconnection": { - "type": "string", - "format": "date-time" + "Params": { + "$ref": "#/definitions/AddMachines" }, - "user": { - "type": "string" + "Result": { + "$ref": "#/definitions/AddMachinesResults" } - }, - "additionalProperties": false, - "required": [ - "user", - "displayname", - "lastconnection", - "access" - ] + } }, - "ModelUserInfoResult": { + "AddMachinesV2": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" + "Params": { + "$ref": "#/definitions/AddMachines" }, - "result": { - "$ref": "#/definitions/ModelUserInfo" + "Result": { + "$ref": "#/definitions/AddMachinesResults" } - }, - "additionalProperties": false + } }, - "ModelUserInfoResults": { + "AgentVersion": { "type": "object", "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelUserInfoResult" - } + "Result": { + "$ref": "#/definitions/AgentVersionResult" } - }, - "additionalProperties": false, - "required": [ - "results" - ] + } }, - "Number": { + "CharmInfo": { "type": "object", "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" - }, - "Minor": { - "type": "integer" - }, - "Patch": { - "type": "integer" + "Params": { + "$ref": "#/definitions/CharmInfo" }, - "Tag": { - "type": "string" + "Result": { + "$ref": "#/definitions/CharmInfo" } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" - ] + } }, - "Placement": { + "DestroyMachines": { "type": "object", "properties": { - "Directive": { - "type": "string" - }, - "Scope": { - "type": "string" + "Params": { + "$ref": "#/definitions/DestroyMachines" } - }, - "additionalProperties": false, - "required": [ - "Scope", - "Directive" - ] + } }, - "PrivateAddress": { + "DestroyModel": { + "type": "object" + }, + "FindTools": { "type": "object", "properties": { - "Target": { - "type": "string" + "Params": { + "$ref": "#/definitions/FindToolsParams" + }, + "Result": { + "$ref": "#/definitions/FindToolsResult" } - }, - "additionalProperties": false, - "required": [ - "Target" - ] + } }, - "PrivateAddressResults": { + "FullStatus": { "type": "object", "properties": { - "PrivateAddress": { - "type": "string" + "Params": { + "$ref": "#/definitions/StatusParams" + }, + "Result": { + "$ref": "#/definitions/FullStatus" } - }, - "additionalProperties": false, - "required": [ - "PrivateAddress" - ] + } }, - "ProvisioningScriptParams": { + "GetBundleChanges": { "type": "object", "properties": { - "DataDir": { - "type": "string" - }, - "DisablePackageCommands": { - "type": "boolean" - }, - "MachineId": { - "type": "string" + "Params": { + "$ref": "#/definitions/GetBundleChangesParams" }, - "Nonce": { - "type": "string" + "Result": { + "$ref": "#/definitions/GetBundleChangesResults" } - }, - "additionalProperties": false, - "required": [ - "MachineId", - "Nonce", - "DataDir", - "DisablePackageCommands" - ] + } }, - "ProvisioningScriptResult": { + "GetModelConstraints": { "type": "object", "properties": { - "Script": { - "type": "string" + "Result": { + "$ref": "#/definitions/GetConstraintsResults" } - }, - "additionalProperties": false, - "required": [ - "Script" - ] + } }, - "PublicAddress": { + "InjectMachines": { "type": "object", "properties": { - "Target": { - "type": "string" + "Params": { + "$ref": "#/definitions/AddMachines" + }, + "Result": { + "$ref": "#/definitions/AddMachinesResults" } - }, - "additionalProperties": false, - "required": [ - "Target" - ] + } }, - "PublicAddressResults": { + "ModelGet": { "type": "object", "properties": { - "PublicAddress": { - "type": "string" + "Result": { + "$ref": "#/definitions/ModelConfigResults" } - }, - "additionalProperties": false, - "required": [ - "PublicAddress" - ] + } }, - "RelationStatus": { + "ModelInfo": { "type": "object", "properties": { - "Endpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/EndpointStatus" - } + "Result": { + "$ref": "#/definitions/ModelInfo" + } + } + }, + "ModelSet": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModelSet" + } + } + }, + "ModelUnset": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModelUnset" + } + } + }, + "ModelUserInfo": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ModelUserInfoResults" + } + } + }, + "PrivateAddress": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/PrivateAddress" }, - "Id": { - "type": "integer" + "Result": { + "$ref": "#/definitions/PrivateAddressResults" + } + } + }, + "ProvisioningScript": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ProvisioningScriptParams" }, - "Interface": { - "type": "string" + "Result": { + "$ref": "#/definitions/ProvisioningScriptResult" + } + } + }, + "PublicAddress": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/PublicAddress" }, - "Key": { - "type": "string" + "Result": { + "$ref": "#/definitions/PublicAddressResults" + } + } + }, + "ResolveCharms": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ResolveCharms" }, - "Scope": { - "type": "string" + "Result": { + "$ref": "#/definitions/ResolveCharmResults" } - }, - "additionalProperties": false, - "required": [ - "Id", - "Key", - "Interface", - "Scope", - "Endpoints" - ] + } }, - "ResolveCharmResult": { + "Resolved": { "type": "object", "properties": { - "Error": { - "type": "string" + "Params": { + "$ref": "#/definitions/Resolved" + } + } + }, + "RetryProvisioning": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" }, - "URL": { - "$ref": "#/definitions/URL" + "Result": { + "$ref": "#/definitions/ErrorResults" } - }, - "additionalProperties": false + } }, - "ResolveCharmResults": { + "SetModelAgentVersion": { "type": "object", "properties": { - "URLs": { + "Params": { + "$ref": "#/definitions/SetModelAgentVersion" + } + } + }, + "SetModelConstraints": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetConstraints" + } + } + }, + "StatusHistory": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/StatusHistoryRequests" + }, + "Result": { + "$ref": "#/definitions/StatusHistoryResults" + } + } + }, + "WatchAll": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/AllWatcherId" + } + } + } + }, + "definitions": { + "APIHostPortsResult": { + "type": "object", + "properties": { + "Servers": { "type": "array", "items": { - "$ref": "#/definitions/ResolveCharmResult" + "type": "array", + "items": { + "$ref": "#/definitions/HostPort" + } } } }, "additionalProperties": false, "required": [ - "URLs" + "Servers" ] }, - "ResolveCharms": { + "AddCharm": { "type": "object", "properties": { - "References": { - "type": "array", - "items": { - "$ref": "#/definitions/URL" - } + "Channel": { + "type": "string" + }, + "URL": { + "type": "string" } }, "additionalProperties": false, "required": [ - "References" + "URL", + "Channel" ] }, - "Resolved": { + "AddCharmWithAuthorization": { "type": "object", "properties": { - "Retry": { - "type": "boolean" + "Channel": { + "type": "string" }, - "UnitName": { + "CharmStoreMacaroon": { + "$ref": "#/definitions/Macaroon" + }, + "URL": { "type": "string" } }, "additionalProperties": false, "required": [ - "UnitName", - "Retry" + "URL", + "Channel", + "CharmStoreMacaroon" ] }, - "ServiceStatus": { + "AddMachineParams": { "type": "object", "properties": { - "CanUpgradeTo": { - "type": "string" - }, - "Charm": { - "type": "string" + "Addrs": { + "type": "array", + "items": { + "$ref": "#/definitions/Address" + } }, - "Err": { - "type": "object", - "additionalProperties": true + "Constraints": { + "$ref": "#/definitions/Value" }, - "Exposed": { - "type": "boolean" + "ContainerType": { + "type": "string" + }, + "Disks": { + "type": "array", + "items": { + "$ref": "#/definitions/Constraints" + } + }, + "HardwareCharacteristics": { + "$ref": "#/definitions/HardwareCharacteristics" + }, + "InstanceId": { + "type": "string" + }, + "Jobs": { + "type": "array", + "items": { + "type": "string" + } + }, + "Nonce": { + "type": "string" + }, + "ParentId": { + "type": "string" + }, + "Placement": { + "$ref": "#/definitions/Placement" + }, + "Series": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Series", + "Constraints", + "Jobs", + "Disks", + "Placement", + "ParentId", + "ContainerType", + "InstanceId", + "Nonce", + "HardwareCharacteristics", + "Addrs" + ] + }, + "AddMachines": { + "type": "object", + "properties": { + "MachineParams": { + "type": "array", + "items": { + "$ref": "#/definitions/AddMachineParams" + } + } + }, + "additionalProperties": false, + "required": [ + "MachineParams" + ] + }, + "AddMachinesResult": { + "type": "object", + "properties": { + "Error": { + "$ref": "#/definitions/Error" + }, + "Machine": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Machine", + "Error" + ] + }, + "AddMachinesResults": { + "type": "object", + "properties": { + "Machines": { + "type": "array", + "items": { + "$ref": "#/definitions/AddMachinesResult" + } + } + }, + "additionalProperties": false, + "required": [ + "Machines" + ] + }, + "Address": { + "type": "object", + "properties": { + "Scope": { + "type": "string" + }, + "SpaceName": { + "type": "string" + }, + "Type": { + "type": "string" + }, + "Value": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Value", + "Type", + "Scope" + ] + }, + "AgentVersionResult": { + "type": "object", + "properties": { + "Version": { + "$ref": "#/definitions/Number" + } + }, + "additionalProperties": false, + "required": [ + "Version" + ] + }, + "AllWatcherId": { + "type": "object", + "properties": { + "AllWatcherId": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "AllWatcherId" + ] + }, + "ApplicationStatus": { + "type": "object", + "properties": { + "CanUpgradeTo": { + "type": "string" + }, + "Charm": { + "type": "string" + }, + "Err": { + "type": "object", + "additionalProperties": true + }, + "Exposed": { + "type": "boolean" }, "Life": { "type": "string" @@ -3856,73 +4091,96 @@ "Status" ] }, - "SetConstraints": { + "Binary": { "type": "object", "properties": { - "Constraints": { - "$ref": "#/definitions/Value" + "Arch": { + "type": "string" }, - "ServiceName": { + "Number": { + "$ref": "#/definitions/Number" + }, + "Series": { "type": "string" } }, "additionalProperties": false, "required": [ - "ServiceName", - "Constraints" + "Number", + "Series", + "Arch" ] }, - "SetModelAgentVersion": { + "BundleChangesChange": { "type": "object", "properties": { - "Version": { - "$ref": "#/definitions/Number" + "args": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + }, + "id": { + "type": "string" + }, + "method": { + "type": "string" + }, + "requires": { + "type": "array", + "items": { + "type": "string" + } } }, "additionalProperties": false, "required": [ - "Version" + "id", + "method", + "args", + "requires" ] }, - "StatusHistoryArgs": { + "CharmInfo": { "type": "object", "properties": { - "Kind": { - "type": "string" - }, - "Name": { + "CharmURL": { "type": "string" - }, - "Size": { - "type": "integer" } }, "additionalProperties": false, "required": [ - "Kind", - "Size", - "Name" + "CharmURL" ] }, - "StatusHistoryResults": { + "Constraints": { "type": "object", "properties": { - "Statuses": { - "type": "array", - "items": { - "$ref": "#/definitions/DetailedStatus" - } + "Count": { + "type": "integer" + }, + "Pool": { + "type": "string" + }, + "Size": { + "type": "integer" } }, "additionalProperties": false, "required": [ - "Statuses" + "Pool", + "Size", + "Count" ] }, - "StatusParams": { + "DestroyMachines": { "type": "object", "properties": { - "Patterns": { + "Force": { + "type": "boolean" + }, + "MachineNames": { "type": "array", "items": { "type": "string" @@ -3931,401 +4189,390 @@ }, "additionalProperties": false, "required": [ - "Patterns" + "MachineNames", + "Force" ] }, - "Tools": { + "DetailedStatus": { "type": "object", "properties": { - "sha256": { - "type": "string" + "Data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } }, - "size": { - "type": "integer" + "Err": { + "type": "object", + "additionalProperties": true }, - "url": { + "Info": { "type": "string" }, - "version": { - "$ref": "#/definitions/Binary" + "Kind": { + "type": "string" + }, + "Life": { + "type": "string" + }, + "Since": { + "type": "string", + "format": "date-time" + }, + "Status": { + "type": "string" + }, + "Version": { + "type": "string" } }, "additionalProperties": false, "required": [ - "version", - "url", - "size" + "Status", + "Info", + "Data", + "Since", + "Kind", + "Version", + "Life", + "Err" ] }, - "URL": { + "EndpointStatus": { "type": "object", "properties": { - "Channel": { + "ApplicationName": { "type": "string" }, "Name": { "type": "string" }, - "Revision": { - "type": "integer" - }, - "Schema": { - "type": "string" - }, - "Series": { + "Role": { "type": "string" }, - "User": { - "type": "string" + "Subordinate": { + "type": "boolean" } }, "additionalProperties": false, "required": [ - "Schema", - "User", + "ApplicationName", "Name", - "Revision", - "Series", - "Channel" + "Role", + "Subordinate" ] }, - "UnitStatus": { + "Entities": { "type": "object", "properties": { - "AgentStatus": { - "$ref": "#/definitions/DetailedStatus" - }, - "Charm": { - "type": "string" - }, - "Machine": { - "type": "string" - }, - "OpenedPorts": { + "Entities": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/Entity" } - }, - "PublicAddress": { + } + }, + "additionalProperties": false, + "required": [ + "Entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "Tag": { "type": "string" - }, - "Subordinates": { + } + }, + "additionalProperties": false, + "required": [ + "Tag" + ] + }, + "EntityStatus": { + "type": "object", + "properties": { + "Data": { "type": "object", "patternProperties": { ".*": { - "$ref": "#/definitions/UnitStatus" + "type": "object", + "additionalProperties": true } } }, - "WorkloadStatus": { - "$ref": "#/definitions/DetailedStatus" + "Info": { + "type": "string" + }, + "Since": { + "type": "string", + "format": "date-time" + }, + "Status": { + "type": "string" } }, "additionalProperties": false, "required": [ - "AgentStatus", - "WorkloadStatus", - "Machine", - "OpenedPorts", - "PublicAddress", - "Charm", - "Subordinates" + "Status", + "Info", + "Data", + "Since" ] }, - "Value": { + "Error": { "type": "object", "properties": { - "arch": { - "type": "string" - }, - "container": { + "Code": { "type": "string" }, - "cpu-cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" + "Info": { + "$ref": "#/definitions/ErrorInfo" }, - "instance-type": { + "Message": { "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Message", + "Code" + ] + }, + "ErrorInfo": { + "type": "object", + "properties": { + "Macaroon": { + "$ref": "#/definitions/Macaroon" }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "spaces": { - "type": "array", - "items": { - "type": "string" - } - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { + "MacaroonPath": { "type": "string" } }, "additionalProperties": false }, - "caveat": { + "ErrorResult": { "type": "object", "properties": { - "caveatId": { - "$ref": "#/definitions/packet" - }, - "location": { - "$ref": "#/definitions/packet" - }, - "verificationId": { - "$ref": "#/definitions/packet" + "Error": { + "$ref": "#/definitions/Error" } }, "additionalProperties": false, "required": [ - "location", - "caveatId", - "verificationId" + "Error" ] }, - "packet": { + "ErrorResults": { "type": "object", "properties": { - "headerLen": { - "type": "integer" + "Results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "Results" + ] + }, + "FindToolsParams": { + "type": "object", + "properties": { + "Arch": { + "type": "string" }, - "start": { + "MajorVersion": { "type": "integer" }, - "totalLen": { + "MinorVersion": { "type": "integer" + }, + "Number": { + "$ref": "#/definitions/Number" + }, + "Series": { + "type": "string" } }, "additionalProperties": false, "required": [ - "start", - "totalLen", - "headerLen" + "Number", + "MajorVersion", + "MinorVersion", + "Arch", + "Series" ] - } - } - } - }, - { - "Name": "Controller", - "Version": 2, - "Schema": { - "type": "object", - "properties": { - "AllModels": { + }, + "FindToolsResult": { "type": "object", "properties": { - "Result": { - "$ref": "#/definitions/UserModelList" + "Error": { + "$ref": "#/definitions/Error" + }, + "List": { + "type": "array", + "items": { + "$ref": "#/definitions/Tools" + } } - } + }, + "additionalProperties": false, + "required": [ + "List", + "Error" + ] }, - "DestroyController": { + "FullStatus": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/DestroyControllerArgs" - } - } - }, - "InitiateModelMigration": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/InitiateModelMigrationArgs" + "Applications": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/ApplicationStatus" + } + } }, - "Result": { - "$ref": "#/definitions/InitiateModelMigrationResults" - } - } - }, - "ListBlockedModels": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelBlockInfoList" - } - } - }, - "ModelConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelConfigResults" - } - } - }, - "ModelStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" + "AvailableVersion": { + "type": "string" }, - "Result": { - "$ref": "#/definitions/ModelStatusResults" - } - } - }, - "RemoveBlocks": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/RemoveBlocksArgs" - } - } - }, - "WatchAllModels": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/AllWatcherId" - } - } - } - }, - "definitions": { - "AllWatcherId": { - "type": "object", - "properties": { - "AllWatcherId": { + "Machines": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/MachineStatus" + } + } + }, + "ModelName": { "type": "string" + }, + "Relations": { + "type": "array", + "items": { + "$ref": "#/definitions/RelationStatus" + } } }, "additionalProperties": false, "required": [ - "AllWatcherId" + "ModelName", + "AvailableVersion", + "Machines", + "Applications", + "Relations" ] }, - "DestroyControllerArgs": { + "GetBundleChangesParams": { "type": "object", "properties": { - "destroy-models": { - "type": "boolean" + "yaml": { + "type": "string" } }, "additionalProperties": false, "required": [ - "destroy-models" + "yaml" ] }, - "Entities": { + "GetBundleChangesResults": { "type": "object", "properties": { - "Entities": { + "changes": { "type": "array", "items": { - "$ref": "#/definitions/Entity" + "$ref": "#/definitions/BundleChangesChange" + } + }, + "errors": { + "type": "array", + "items": { + "type": "string" } } }, - "additionalProperties": false, - "required": [ - "Entities" - ] + "additionalProperties": false }, - "Entity": { + "GetConstraintsResults": { "type": "object", "properties": { - "Tag": { - "type": "string" + "Constraints": { + "$ref": "#/definitions/Value" } }, "additionalProperties": false, "required": [ - "Tag" + "Constraints" ] }, - "Error": { + "HardwareCharacteristics": { "type": "object", "properties": { - "Code": { + "Arch": { "type": "string" }, - "Info": { - "$ref": "#/definitions/ErrorInfo" - }, - "Message": { + "AvailabilityZone": { "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Message", - "Code" - ] - }, - "ErrorInfo": { - "type": "object", - "properties": { - "Macaroon": { - "$ref": "#/definitions/Macaroon" }, - "MacaroonPath": { - "type": "string" - } - }, - "additionalProperties": false - }, - "InitiateModelMigrationArgs": { - "type": "object", - "properties": { - "specs": { + "CpuCores": { + "type": "integer" + }, + "CpuPower": { + "type": "integer" + }, + "Mem": { + "type": "integer" + }, + "RootDisk": { + "type": "integer" + }, + "Tags": { "type": "array", "items": { - "$ref": "#/definitions/ModelMigrationSpec" + "type": "string" } } }, - "additionalProperties": false, - "required": [ - "specs" - ] + "additionalProperties": false }, - "InitiateModelMigrationResult": { + "History": { "type": "object", "properties": { - "error": { + "Error": { "$ref": "#/definitions/Error" }, - "id": { - "type": "string" - }, - "model-tag": { - "type": "string" + "Statuses": { + "type": "array", + "items": { + "$ref": "#/definitions/DetailedStatus" + } } }, "additionalProperties": false, "required": [ - "model-tag", - "error", - "id" + "Statuses" ] }, - "InitiateModelMigrationResults": { + "HostPort": { "type": "object", "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/definitions/InitiateModelMigrationResult" - } + "Address": { + "$ref": "#/definitions/Address" + }, + "Port": { + "type": "integer" } }, "additionalProperties": false, "required": [ - "results" + "Address", + "Port" ] }, "Macaroon": { @@ -4365,64 +4612,81 @@ "sig" ] }, - "Model": { + "MachineStatus": { "type": "object", "properties": { - "Name": { + "AgentStatus": { + "$ref": "#/definitions/DetailedStatus" + }, + "Containers": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/MachineStatus" + } + } + }, + "DNSName": { "type": "string" }, - "OwnerTag": { + "Hardware": { "type": "string" }, - "UUID": { + "HasVote": { + "type": "boolean" + }, + "Id": { "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Name", - "UUID", - "OwnerTag" - ] - }, - "ModelBlockInfo": { - "type": "object", - "properties": { - "blocks": { + }, + "InstanceId": { + "type": "string" + }, + "InstanceStatus": { + "$ref": "#/definitions/DetailedStatus" + }, + "Jobs": { "type": "array", "items": { "type": "string" } }, - "model-uuid": { - "type": "string" - }, - "name": { + "Series": { "type": "string" }, - "owner-tag": { - "type": "string" + "WantsVote": { + "type": "boolean" } }, "additionalProperties": false, "required": [ - "name", - "model-uuid", - "owner-tag", - "blocks" + "AgentStatus", + "InstanceStatus", + "DNSName", + "InstanceId", + "Series", + "Id", + "Containers", + "Hardware", + "Jobs", + "HasVote", + "WantsVote" ] }, - "ModelBlockInfoList": { + "MeterStatus": { "type": "object", "properties": { - "models": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelBlockInfo" - } + "Color": { + "type": "string" + }, + "Message": { + "type": "string" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "Color", + "Message" + ] }, "ModelConfigResults": { "type": "object", @@ -4442,524 +4706,469 @@ "Config" ] }, - "ModelMigrationSpec": { + "ModelInfo": { "type": "object", "properties": { - "model-tag": { + "Cloud": { "type": "string" }, - "target-info": { - "$ref": "#/definitions/ModelMigrationTargetInfo" - } - }, - "additionalProperties": false, - "required": [ - "model-tag", - "target-info" - ] - }, - "ModelMigrationTargetInfo": { - "type": "object", - "properties": { - "addrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "auth-tag": { + "DefaultSeries": { "type": "string" }, - "ca-cert": { + "Life": { "type": "string" }, - "controller-tag": { + "Name": { "type": "string" }, - "password": { + "OwnerTag": { "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "controller-tag", - "addrs", - "ca-cert", - "auth-tag", - "password" - ] - }, - "ModelStatus": { - "type": "object", - "properties": { - "hosted-machine-count": { - "type": "integer" }, - "life": { + "ProviderType": { "type": "string" }, - "model-tag": { + "ServerUUID": { "type": "string" }, - "owner-tag": { + "Status": { + "$ref": "#/definitions/EntityStatus" + }, + "UUID": { "type": "string" }, - "service-count": { - "type": "integer" + "Users": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelUserInfo" + } } }, "additionalProperties": false, "required": [ - "model-tag", - "life", - "hosted-machine-count", - "service-count", - "owner-tag" + "Name", + "UUID", + "ServerUUID", + "ProviderType", + "DefaultSeries", + "Cloud", + "OwnerTag", + "Life", + "Status", + "Users" ] }, - "ModelStatusResults": { + "ModelSet": { "type": "object", "properties": { - "models": { - "type": "array", - "items": { - "$ref": "#/definitions/ModelStatus" + "Config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } } } }, "additionalProperties": false, "required": [ - "models" + "Config" ] }, - "RemoveBlocksArgs": { + "ModelUnset": { "type": "object", "properties": { - "all": { - "type": "boolean" + "Keys": { + "type": "array", + "items": { + "type": "string" + } } }, "additionalProperties": false, "required": [ - "all" + "Keys" ] }, - "UserModel": { + "ModelUserInfo": { "type": "object", "properties": { - "LastConnection": { + "access": { + "type": "string" + }, + "displayname": { + "type": "string" + }, + "lastconnection": { "type": "string", "format": "date-time" }, - "Model": { - "$ref": "#/definitions/Model" + "user": { + "type": "string" } }, "additionalProperties": false, "required": [ - "Model", - "LastConnection" + "user", + "displayname", + "lastconnection", + "access" ] }, - "UserModelList": { + "ModelUserInfoResult": { "type": "object", "properties": { - "UserModels": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/ModelUserInfo" + } + }, + "additionalProperties": false + }, + "ModelUserInfoResults": { + "type": "object", + "properties": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/UserModel" + "$ref": "#/definitions/ModelUserInfoResult" } } }, "additionalProperties": false, "required": [ - "UserModels" + "results" ] }, - "caveat": { + "Number": { "type": "object", "properties": { - "caveatId": { - "$ref": "#/definitions/packet" + "Build": { + "type": "integer" }, - "location": { - "$ref": "#/definitions/packet" + "Major": { + "type": "integer" }, - "verificationId": { - "$ref": "#/definitions/packet" + "Minor": { + "type": "integer" + }, + "Patch": { + "type": "integer" + }, + "Tag": { + "type": "string" } }, "additionalProperties": false, "required": [ - "location", - "caveatId", - "verificationId" + "Major", + "Minor", + "Tag", + "Patch", + "Build" ] }, - "packet": { + "Placement": { "type": "object", "properties": { - "headerLen": { - "type": "integer" - }, - "start": { - "type": "integer" + "Directive": { + "type": "string" }, - "totalLen": { - "type": "integer" + "Scope": { + "type": "string" } }, "additionalProperties": false, "required": [ - "start", - "totalLen", - "headerLen" + "Scope", + "Directive" ] - } - } - } - }, - { - "Name": "Deployer", - "Version": 1, - "Schema": { - "type": "object", - "properties": { - "APIAddresses": { + }, + "PrivateAddress": { "type": "object", "properties": { - "Result": { - "$ref": "#/definitions/StringsResult" + "Target": { + "type": "string" } - } + }, + "additionalProperties": false, + "required": [ + "Target" + ] }, - "APIHostPorts": { + "PrivateAddressResults": { "type": "object", "properties": { - "Result": { - "$ref": "#/definitions/APIHostPortsResult" + "PrivateAddress": { + "type": "string" } - } + }, + "additionalProperties": false, + "required": [ + "PrivateAddress" + ] }, - "CACert": { + "ProvisioningScriptParams": { "type": "object", "properties": { - "Result": { - "$ref": "#/definitions/BytesResult" - } - } - }, - "ConnectionInfo": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/DeployerConnectionValues" - } - } - }, - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" + "DataDir": { + "type": "string" }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - } - }, - "ModelUUID": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringResult" - } - } - }, - "Remove": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" + "DisablePackageCommands": { + "type": "boolean" }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - } - }, - "SetPasswords": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/EntityPasswords" + "MachineId": { + "type": "string" }, - "Result": { - "$ref": "#/definitions/ErrorResults" + "Nonce": { + "type": "string" } - } + }, + "additionalProperties": false, + "required": [ + "MachineId", + "Nonce", + "DataDir", + "DisablePackageCommands" + ] }, - "StateAddresses": { + "ProvisioningScriptResult": { "type": "object", "properties": { - "Result": { - "$ref": "#/definitions/StringsResult" + "Script": { + "type": "string" } - } + }, + "additionalProperties": false, + "required": [ + "Script" + ] }, - "WatchAPIHostPorts": { + "PublicAddress": { "type": "object", "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" + "Target": { + "type": "string" } - } + }, + "additionalProperties": false, + "required": [ + "Target" + ] }, - "WatchUnits": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - } - } - }, - "definitions": { - "APIHostPortsResult": { + "PublicAddressResults": { "type": "object", "properties": { - "Servers": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/HostPort" - } - } + "PublicAddress": { + "type": "string" } }, "additionalProperties": false, "required": [ - "Servers" + "PublicAddress" ] }, - "Address": { + "RelationStatus": { "type": "object", "properties": { - "Scope": { - "type": "string" + "Endpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/EndpointStatus" + } }, - "SpaceName": { + "Id": { + "type": "integer" + }, + "Interface": { "type": "string" }, - "Type": { + "Key": { "type": "string" }, - "Value": { + "Scope": { "type": "string" } }, "additionalProperties": false, "required": [ - "Value", - "Type", - "Scope" + "Id", + "Key", + "Interface", + "Scope", + "Endpoints" ] }, - "BytesResult": { + "ResolveCharmResult": { "type": "object", "properties": { - "Result": { - "type": "array", - "items": { - "type": "integer" - } + "Error": { + "type": "string" + }, + "URL": { + "$ref": "#/definitions/URL" } }, - "additionalProperties": false, - "required": [ - "Result" - ] + "additionalProperties": false }, - "DeployerConnectionValues": { + "ResolveCharmResults": { "type": "object", "properties": { - "APIAddresses": { - "type": "array", - "items": { - "type": "string" - } - }, - "StateAddresses": { + "URLs": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/ResolveCharmResult" } } }, "additionalProperties": false, "required": [ - "StateAddresses", - "APIAddresses" + "URLs" ] }, - "Entities": { + "ResolveCharms": { "type": "object", "properties": { - "Entities": { + "References": { "type": "array", "items": { - "$ref": "#/definitions/Entity" + "$ref": "#/definitions/URL" } } }, "additionalProperties": false, "required": [ - "Entities" + "References" ] }, - "Entity": { + "Resolved": { "type": "object", "properties": { - "Tag": { + "Retry": { + "type": "boolean" + }, + "UnitName": { "type": "string" } }, "additionalProperties": false, "required": [ - "Tag" + "UnitName", + "Retry" ] }, - "EntityPassword": { + "SetConstraints": { "type": "object", "properties": { - "Password": { + "ApplicationName": { "type": "string" }, - "Tag": { - "type": "string" + "Constraints": { + "$ref": "#/definitions/Value" } }, "additionalProperties": false, "required": [ - "Tag", - "Password" + "ApplicationName", + "Constraints" ] }, - "EntityPasswords": { + "SetModelAgentVersion": { "type": "object", "properties": { - "Changes": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityPassword" - } + "Version": { + "$ref": "#/definitions/Number" } }, "additionalProperties": false, "required": [ - "Changes" + "Version" ] }, - "Error": { + "StatusHistoryFilter": { "type": "object", "properties": { - "Code": { - "type": "string" + "Date": { + "type": "string", + "format": "date-time" }, - "Info": { - "$ref": "#/definitions/ErrorInfo" + "Delta": { + "type": "integer" }, - "Message": { - "type": "string" + "Size": { + "type": "integer" } }, "additionalProperties": false, "required": [ - "Message", - "Code" + "Size", + "Date", + "Delta" ] }, - "ErrorInfo": { + "StatusHistoryRequest": { "type": "object", "properties": { - "Macaroon": { - "$ref": "#/definitions/Macaroon" + "Filter": { + "$ref": "#/definitions/StatusHistoryFilter" }, - "MacaroonPath": { + "HistoryKind": { + "type": "string" + }, + "Size": { + "type": "integer" + }, + "Tag": { "type": "string" - } - }, - "additionalProperties": false - }, - "ErrorResult": { - "type": "object", - "properties": { - "Error": { - "$ref": "#/definitions/Error" } }, "additionalProperties": false, "required": [ - "Error" + "HistoryKind", + "Size", + "Filter", + "Tag" ] }, - "ErrorResults": { + "StatusHistoryRequests": { "type": "object", "properties": { - "Results": { + "Requests": { "type": "array", "items": { - "$ref": "#/definitions/ErrorResult" + "$ref": "#/definitions/StatusHistoryRequest" } } }, "additionalProperties": false, "required": [ - "Results" + "Requests" ] }, - "HostPort": { - "type": "object", - "properties": { - "Address": { - "$ref": "#/definitions/Address" - }, - "Port": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "Address", - "Port" - ] - }, - "LifeResult": { + "StatusHistoryResult": { "type": "object", "properties": { "Error": { "$ref": "#/definitions/Error" }, - "Life": { - "type": "string" + "History": { + "$ref": "#/definitions/History" } }, "additionalProperties": false, "required": [ - "Life", - "Error" + "History" ] }, - "LifeResults": { + "StatusHistoryResults": { "type": "object", "properties": { "Results": { "type": "array", "items": { - "$ref": "#/definitions/LifeResult" + "$ref": "#/definitions/StatusHistoryResult" } } }, @@ -4968,131 +5177,161 @@ "Results" ] }, - "Macaroon": { + "StatusParams": { "type": "object", "properties": { - "caveats": { - "type": "array", - "items": { - "$ref": "#/definitions/caveat" - } - }, - "data": { - "type": "array", - "items": { - "type": "integer" - } - }, - "id": { - "$ref": "#/definitions/packet" - }, - "location": { - "$ref": "#/definitions/packet" - }, - "sig": { + "Patterns": { "type": "array", "items": { - "type": "integer" + "type": "string" } } }, "additionalProperties": false, "required": [ - "data", - "location", - "id", - "caveats", - "sig" + "Patterns" ] }, - "NotifyWatchResult": { + "Tools": { "type": "object", "properties": { - "Error": { - "$ref": "#/definitions/Error" + "sha256": { + "type": "string" }, - "NotifyWatcherId": { + "size": { + "type": "integer" + }, + "url": { "type": "string" + }, + "version": { + "$ref": "#/definitions/Binary" } }, "additionalProperties": false, "required": [ - "NotifyWatcherId", - "Error" + "version", + "url", + "size" ] }, - "StringResult": { + "URL": { "type": "object", "properties": { - "Error": { - "$ref": "#/definitions/Error" + "Channel": { + "type": "string" }, - "Result": { + "Name": { + "type": "string" + }, + "Revision": { + "type": "integer" + }, + "Schema": { + "type": "string" + }, + "Series": { + "type": "string" + }, + "User": { "type": "string" } }, "additionalProperties": false, "required": [ - "Error", - "Result" + "Schema", + "User", + "Name", + "Revision", + "Series", + "Channel" ] }, - "StringsResult": { + "UnitStatus": { "type": "object", "properties": { - "Error": { - "$ref": "#/definitions/Error" + "AgentStatus": { + "$ref": "#/definitions/DetailedStatus" }, - "Result": { + "Charm": { + "type": "string" + }, + "Machine": { + "type": "string" + }, + "OpenedPorts": { "type": "array", "items": { "type": "string" } + }, + "PublicAddress": { + "type": "string" + }, + "Subordinates": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/UnitStatus" + } + } + }, + "WorkloadStatus": { + "$ref": "#/definitions/DetailedStatus" } }, "additionalProperties": false, "required": [ - "Error", - "Result" + "AgentStatus", + "WorkloadStatus", + "Machine", + "OpenedPorts", + "PublicAddress", + "Charm", + "Subordinates" ] }, - "StringsWatchResult": { + "Value": { "type": "object", "properties": { - "Changes": { + "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": { "type": "array", "items": { "type": "string" } }, - "Error": { - "$ref": "#/definitions/Error" - }, - "StringsWatcherId": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "StringsWatcherId", - "Changes", - "Error" - ] - }, - "StringsWatchResults": { - "type": "object", - "properties": { - "Results": { + "tags": { "type": "array", "items": { - "$ref": "#/definitions/StringsWatchResult" + "type": "string" } + }, + "virt-type": { + "type": "string" } }, - "additionalProperties": false, - "required": [ - "Results" - ] + "additionalProperties": false }, "caveat": { "type": "object", @@ -5138,155 +5377,132 @@ } }, { - "Name": "DiscoverSpaces", - "Version": 2, + "Name": "Controller", + "Version": 3, "Schema": { "type": "object", "properties": { - "AddSubnets": { + "AllModels": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/AddSubnetsParams" - }, "Result": { - "$ref": "#/definitions/ErrorResults" + "$ref": "#/definitions/UserModelList" } } }, - "CreateSpaces": { + "DestroyController": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/CreateSpacesParams" + "$ref": "#/definitions/DestroyControllerArgs" + } + } + }, + "InitiateModelMigration": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/InitiateModelMigrationArgs" }, "Result": { - "$ref": "#/definitions/ErrorResults" + "$ref": "#/definitions/InitiateModelMigrationResults" } } }, - "ListSpaces": { + "ListBlockedModels": { "type": "object", "properties": { "Result": { - "$ref": "#/definitions/DiscoverSpacesResults" + "$ref": "#/definitions/ModelBlockInfoList" } } }, - "ListSubnets": { + "ModelConfig": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ModelConfigResults" + } + } + }, + "ModelStatus": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/SubnetsFilters" + "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/ListSubnetsResults" + "$ref": "#/definitions/ModelStatusResults" } } }, - "ModelConfig": { + "RemoveBlocks": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/RemoveBlocksArgs" + } + } + }, + "WatchAllModels": { "type": "object", "properties": { "Result": { - "$ref": "#/definitions/ModelConfigResult" + "$ref": "#/definitions/AllWatcherId" } } } }, "definitions": { - "AddSubnetParams": { + "AllWatcherId": { "type": "object", "properties": { - "SpaceTag": { - "type": "string" - }, - "SubnetProviderId": { - "type": "string" - }, - "SubnetTag": { + "AllWatcherId": { "type": "string" - }, - "Zones": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "SpaceTag" - ] - }, - "AddSubnetsParams": { - "type": "object", - "properties": { - "Subnets": { - "type": "array", - "items": { - "$ref": "#/definitions/AddSubnetParams" - } } }, "additionalProperties": false, "required": [ - "Subnets" + "AllWatcherId" ] }, - "CreateSpaceParams": { + "DestroyControllerArgs": { "type": "object", "properties": { - "ProviderId": { - "type": "string" - }, - "Public": { + "destroy-models": { "type": "boolean" - }, - "SpaceTag": { - "type": "string" - }, - "SubnetTags": { - "type": "array", - "items": { - "type": "string" - } } }, "additionalProperties": false, "required": [ - "SubnetTags", - "SpaceTag", - "Public" + "destroy-models" ] }, - "CreateSpacesParams": { + "Entities": { "type": "object", "properties": { - "Spaces": { + "Entities": { "type": "array", "items": { - "$ref": "#/definitions/CreateSpaceParams" + "$ref": "#/definitions/Entity" } } }, "additionalProperties": false, "required": [ - "Spaces" + "Entities" ] }, - "DiscoverSpacesResults": { + "Entity": { "type": "object", "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/ProviderSpace" - } + "Tag": { + "type": "string" } }, "additionalProperties": false, "required": [ - "Results" + "Tag" ] }, "Error": { @@ -5320,46 +5536,54 @@ }, "additionalProperties": false }, - "ErrorResult": { + "InitiateModelMigrationArgs": { "type": "object", "properties": { - "Error": { - "$ref": "#/definitions/Error" + "specs": { + "type": "array", + "items": { + "$ref": "#/definitions/ModelMigrationSpec" + } } }, "additionalProperties": false, "required": [ - "Error" + "specs" ] }, - "ErrorResults": { + "InitiateModelMigrationResult": { "type": "object", "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } + "error": { + "$ref": "#/definitions/Error" + }, + "id": { + "type": "string" + }, + "model-tag": { + "type": "string" } }, "additionalProperties": false, "required": [ - "Results" + "model-tag", + "error", + "id" ] }, - "ListSubnetsResults": { + "InitiateModelMigrationResults": { "type": "object", "properties": { - "Results": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/Subnet" + "$ref": "#/definitions/InitiateModelMigrationResult" } } }, "additionalProperties": false, "required": [ - "Results" + "results" ] }, "Macaroon": { @@ -5399,350 +5623,215 @@ "sig" ] }, - "ModelConfigResult": { + "Model": { "type": "object", "properties": { - "Config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } + "Name": { + "type": "string" + }, + "OwnerTag": { + "type": "string" + }, + "UUID": { + "type": "string" } }, "additionalProperties": false, "required": [ - "Config" + "Name", + "UUID", + "OwnerTag" ] }, - "ProviderSpace": { + "ModelBlockInfo": { "type": "object", "properties": { - "Error": { - "$ref": "#/definitions/Error" + "blocks": { + "type": "array", + "items": { + "type": "string" + } }, - "Name": { + "model-uuid": { "type": "string" }, - "ProviderId": { + "name": { "type": "string" }, - "Subnets": { - "type": "array", - "items": { - "$ref": "#/definitions/Subnet" - } + "owner-tag": { + "type": "string" } }, "additionalProperties": false, "required": [ - "Name", - "ProviderId", - "Subnets" + "name", + "model-uuid", + "owner-tag", + "blocks" ] }, - "Subnet": { + "ModelBlockInfoList": { "type": "object", "properties": { - "CIDR": { - "type": "string" - }, - "Life": { - "type": "string" - }, - "ProviderId": { - "type": "string" - }, - "SpaceTag": { - "type": "string" - }, - "StaticRangeHighIP": { - "type": "array", - "items": { - "type": "integer" - } - }, - "StaticRangeLowIP": { + "models": { "type": "array", "items": { - "type": "integer" + "$ref": "#/definitions/ModelBlockInfo" } - }, - "Status": { - "type": "string" - }, - "VLANTag": { - "type": "integer" - }, - "Zones": { - "type": "array", - "items": { - "type": "string" + } + }, + "additionalProperties": false + }, + "ModelConfigResults": { + "type": "object", + "properties": { + "Config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } } } }, "additionalProperties": false, "required": [ - "CIDR", - "VLANTag", - "Life", - "SpaceTag", - "Zones" + "Config" ] }, - "SubnetsFilters": { + "ModelMigrationSpec": { "type": "object", "properties": { - "SpaceTag": { + "model-tag": { "type": "string" }, - "Zone": { - "type": "string" + "target-info": { + "$ref": "#/definitions/ModelMigrationTargetInfo" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "model-tag", + "target-info" + ] }, - "caveat": { + "ModelMigrationTargetInfo": { "type": "object", "properties": { - "caveatId": { - "$ref": "#/definitions/packet" + "addrs": { + "type": "array", + "items": { + "type": "string" + } }, - "location": { - "$ref": "#/definitions/packet" + "auth-tag": { + "type": "string" }, - "verificationId": { - "$ref": "#/definitions/packet" + "ca-cert": { + "type": "string" + }, + "controller-tag": { + "type": "string" + }, + "password": { + "type": "string" } }, "additionalProperties": false, "required": [ - "location", - "caveatId", - "verificationId" + "controller-tag", + "addrs", + "ca-cert", + "auth-tag", + "password" ] }, - "packet": { + "ModelStatus": { "type": "object", "properties": { - "headerLen": { + "application-count": { "type": "integer" }, - "start": { + "hosted-machine-count": { "type": "integer" }, - "totalLen": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "start", - "totalLen", - "headerLen" - ] - } - } - } - }, - { - "Name": "DiskManager", - "Version": 2, - "Schema": { - "type": "object", - "properties": { - "SetMachineBlockDevices": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetMachineBlockDevices" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - } - } - }, - "definitions": { - "BlockDevice": { - "type": "object", - "properties": { - "BusAddress": { - "type": "string" - }, - "DeviceLinks": { - "type": "array", - "items": { - "type": "string" - } - }, - "DeviceName": { - "type": "string" - }, - "FilesystemType": { - "type": "string" - }, - "HardwareId": { - "type": "string" - }, - "InUse": { - "type": "boolean" - }, - "Label": { - "type": "string" - }, - "MountPoint": { - "type": "string" - }, - "Size": { - "type": "integer" - }, - "UUID": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "DeviceName", - "DeviceLinks", - "Label", - "UUID", - "HardwareId", - "BusAddress", - "Size", - "FilesystemType", - "InUse", - "MountPoint" - ] - }, - "Error": { - "type": "object", - "properties": { - "Code": { + "life": { "type": "string" }, - "Info": { - "$ref": "#/definitions/ErrorInfo" - }, - "Message": { + "model-tag": { "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Message", - "Code" - ] - }, - "ErrorInfo": { - "type": "object", - "properties": { - "Macaroon": { - "$ref": "#/definitions/Macaroon" }, - "MacaroonPath": { + "owner-tag": { "type": "string" } }, - "additionalProperties": false - }, - "ErrorResult": { - "type": "object", - "properties": { - "Error": { - "$ref": "#/definitions/Error" - } - }, "additionalProperties": false, "required": [ - "Error" + "model-tag", + "life", + "hosted-machine-count", + "application-count", + "owner-tag" ] }, - "ErrorResults": { + "ModelStatusResults": { "type": "object", "properties": { - "Results": { + "models": { "type": "array", "items": { - "$ref": "#/definitions/ErrorResult" + "$ref": "#/definitions/ModelStatus" } } }, "additionalProperties": false, "required": [ - "Results" + "models" ] }, - "Macaroon": { + "RemoveBlocksArgs": { "type": "object", "properties": { - "caveats": { - "type": "array", - "items": { - "$ref": "#/definitions/caveat" - } - }, - "data": { - "type": "array", - "items": { - "type": "integer" - } - }, - "id": { - "$ref": "#/definitions/packet" - }, - "location": { - "$ref": "#/definitions/packet" - }, - "sig": { - "type": "array", - "items": { - "type": "integer" - } + "all": { + "type": "boolean" } }, "additionalProperties": false, "required": [ - "data", - "location", - "id", - "caveats", - "sig" + "all" ] }, - "MachineBlockDevices": { + "UserModel": { "type": "object", "properties": { - "blockdevices": { - "type": "array", - "items": { - "$ref": "#/definitions/BlockDevice" - } + "LastConnection": { + "type": "string", + "format": "date-time" }, - "machine": { - "type": "string" + "Model": { + "$ref": "#/definitions/Model" } }, "additionalProperties": false, "required": [ - "machine" + "Model", + "LastConnection" ] }, - "SetMachineBlockDevices": { + "UserModelList": { "type": "object", "properties": { - "machineblockdevices": { + "UserModels": { "type": "array", "items": { - "$ref": "#/definitions/MachineBlockDevices" + "$ref": "#/definitions/UserModel" } } }, "additionalProperties": false, "required": [ - "machineblockdevices" + "UserModels" ] }, "caveat": { @@ -5789,230 +5878,158 @@ } }, { - "Name": "EntityWatcher", - "Version": 2, + "Name": "Deployer", + "Version": 1, "Schema": { "type": "object", "properties": { - "Next": { + "APIAddresses": { "type": "object", "properties": { "Result": { - "$ref": "#/definitions/EntitiesWatchResult" + "$ref": "#/definitions/StringsResult" } } }, - "Stop": { - "type": "object" - } - }, - "definitions": { - "EntitiesWatchResult": { + "APIHostPorts": { "type": "object", "properties": { - "Changes": { - "type": "array", - "items": { - "type": "string" - } - }, - "EntityWatcherId": { - "type": "string" - }, - "Error": { - "$ref": "#/definitions/Error" + "Result": { + "$ref": "#/definitions/APIHostPortsResult" } - }, - "additionalProperties": false, - "required": [ - "EntityWatcherId", - "Changes", - "Error" - ] + } }, - "Error": { + "CACert": { "type": "object", "properties": { - "Code": { - "type": "string" - }, - "Info": { - "$ref": "#/definitions/ErrorInfo" - }, - "Message": { - "type": "string" + "Result": { + "$ref": "#/definitions/BytesResult" } - }, - "additionalProperties": false, - "required": [ - "Message", - "Code" - ] + } }, - "ErrorInfo": { + "ConnectionInfo": { "type": "object", "properties": { - "Macaroon": { - "$ref": "#/definitions/Macaroon" - }, - "MacaroonPath": { - "type": "string" + "Result": { + "$ref": "#/definitions/DeployerConnectionValues" } - }, - "additionalProperties": false + } }, - "Macaroon": { + "Life": { "type": "object", "properties": { - "caveats": { - "type": "array", - "items": { - "$ref": "#/definitions/caveat" - } - }, - "data": { - "type": "array", - "items": { - "type": "integer" - } - }, - "id": { - "$ref": "#/definitions/packet" - }, - "location": { - "$ref": "#/definitions/packet" + "Params": { + "$ref": "#/definitions/Entities" }, - "sig": { - "type": "array", - "items": { - "type": "integer" - } + "Result": { + "$ref": "#/definitions/LifeResults" } - }, - "additionalProperties": false, - "required": [ - "data", - "location", - "id", - "caveats", - "sig" - ] + } }, - "caveat": { + "ModelUUID": { "type": "object", "properties": { - "caveatId": { - "$ref": "#/definitions/packet" - }, - "location": { - "$ref": "#/definitions/packet" - }, - "verificationId": { - "$ref": "#/definitions/packet" + "Result": { + "$ref": "#/definitions/StringResult" } - }, - "additionalProperties": false, - "required": [ - "location", - "caveatId", - "verificationId" - ] + } }, - "packet": { + "Remove": { "type": "object", "properties": { - "headerLen": { - "type": "integer" + "Params": { + "$ref": "#/definitions/Entities" }, - "start": { - "type": "integer" + "Result": { + "$ref": "#/definitions/ErrorResults" + } + } + }, + "SetPasswords": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/EntityPasswords" }, - "totalLen": { - "type": "integer" + "Result": { + "$ref": "#/definitions/ErrorResults" } - }, - "additionalProperties": false, - "required": [ - "start", - "totalLen", - "headerLen" - ] - } - } - } - }, - { - "Name": "FilesystemAttachmentsWatcher", - "Version": 2, - "Schema": { - "type": "object", - "properties": { - "Next": { + } + }, + "StateAddresses": { "type": "object", "properties": { "Result": { - "$ref": "#/definitions/MachineStorageIdsWatchResult" + "$ref": "#/definitions/StringsResult" } } }, - "Stop": { - "type": "object" + "WatchAPIHostPorts": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + } + }, + "WatchUnits": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringsWatchResults" + } + } } }, "definitions": { - "Error": { + "APIHostPortsResult": { "type": "object", "properties": { - "Code": { - "type": "string" - }, - "Info": { - "$ref": "#/definitions/ErrorInfo" - }, - "Message": { - "type": "string" + "Servers": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/HostPort" + } + } } }, "additionalProperties": false, "required": [ - "Message", - "Code" + "Servers" ] }, - "ErrorInfo": { + "Address": { "type": "object", "properties": { - "Macaroon": { - "$ref": "#/definitions/Macaroon" + "Scope": { + "type": "string" }, - "MacaroonPath": { + "SpaceName": { + "type": "string" + }, + "Type": { + "type": "string" + }, + "Value": { "type": "string" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "Value", + "Type", + "Scope" + ] }, - "Macaroon": { + "BytesResult": { "type": "object", "properties": { - "caveats": { - "type": "array", - "items": { - "$ref": "#/definitions/caveat" - } - }, - "data": { - "type": "array", - "items": { - "type": "integer" - } - }, - "id": { - "$ref": "#/definitions/packet" - }, - "location": { - "$ref": "#/definitions/packet" - }, - "sig": { + "Result": { "type": "array", "items": { "type": "integer" @@ -6021,249 +6038,139 @@ }, "additionalProperties": false, "required": [ - "data", - "location", - "id", - "caveats", - "sig" + "Result" ] }, - "MachineStorageId": { + "DeployerConnectionValues": { "type": "object", "properties": { - "attachmenttag": { - "type": "string" + "APIAddresses": { + "type": "array", + "items": { + "type": "string" + } }, - "machinetag": { - "type": "string" + "StateAddresses": { + "type": "array", + "items": { + "type": "string" + } } }, "additionalProperties": false, "required": [ - "machinetag", - "attachmenttag" + "StateAddresses", + "APIAddresses" ] }, - "MachineStorageIdsWatchResult": { + "Entities": { "type": "object", "properties": { - "Changes": { + "Entities": { "type": "array", "items": { - "$ref": "#/definitions/MachineStorageId" + "$ref": "#/definitions/Entity" } - }, - "Error": { - "$ref": "#/definitions/Error" - }, - "MachineStorageIdsWatcherId": { - "type": "string" } }, "additionalProperties": false, "required": [ - "MachineStorageIdsWatcherId", - "Changes", - "Error" + "Entities" ] }, - "caveat": { + "Entity": { "type": "object", "properties": { - "caveatId": { - "$ref": "#/definitions/packet" - }, - "location": { - "$ref": "#/definitions/packet" - }, - "verificationId": { - "$ref": "#/definitions/packet" + "Tag": { + "type": "string" } }, "additionalProperties": false, "required": [ - "location", - "caveatId", - "verificationId" + "Tag" ] }, - "packet": { + "EntityPassword": { "type": "object", "properties": { - "headerLen": { - "type": "integer" - }, - "start": { - "type": "integer" + "Password": { + "type": "string" }, - "totalLen": { - "type": "integer" + "Tag": { + "type": "string" } }, "additionalProperties": false, "required": [ - "start", - "totalLen", - "headerLen" + "Tag", + "Password" ] - } - } - } - }, - { - "Name": "Firewaller", - "Version": 2, - "Schema": { - "type": "object", - "properties": { - "GetAssignedMachine": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - } - }, - "GetExposed": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/BoolResults" - } - } - }, - "GetMachineActiveSubnets": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsResults" - } - } - }, - "GetMachinePorts": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MachinePortsParams" - }, - "Result": { - "$ref": "#/definitions/MachinePortsResults" - } - } }, - "InstanceId": { + "EntityPasswords": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" + "Changes": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityPassword" + } } - } + }, + "additionalProperties": false, + "required": [ + "Changes" + ] }, - "Life": { + "Error": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/Entities" + "Code": { + "type": "string" }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - } - }, - "ModelConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelConfigResult" - } - } - }, - "Watch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" + "Info": { + "$ref": "#/definitions/ErrorInfo" }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - } - }, - "WatchForModelConfigChanges": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "WatchModelMachines": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" + "Message": { + "type": "string" } - } + }, + "additionalProperties": false, + "required": [ + "Message", + "Code" + ] }, - "WatchOpenedPorts": { + "ErrorInfo": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/Entities" + "Macaroon": { + "$ref": "#/definitions/Macaroon" }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" + "MacaroonPath": { + "type": "string" } - } + }, + "additionalProperties": false }, - "WatchUnits": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - } - } - }, - "definitions": { - "BoolResult": { + "ErrorResult": { "type": "object", "properties": { "Error": { "$ref": "#/definitions/Error" - }, - "Result": { - "type": "boolean" } }, "additionalProperties": false, "required": [ - "Error", - "Result" + "Error" ] }, - "BoolResults": { + "ErrorResults": { "type": "object", "properties": { "Results": { "type": "array", "items": { - "$ref": "#/definitions/BoolResult" + "$ref": "#/definitions/ErrorResult" } } }, @@ -6272,64 +6179,22 @@ "Results" ] }, - "Entities": { - "type": "object", - "properties": { - "Entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - } - }, - "additionalProperties": false, - "required": [ - "Entities" - ] - }, - "Entity": { - "type": "object", - "properties": { - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Tag" - ] - }, - "Error": { + "HostPort": { "type": "object", "properties": { - "Code": { - "type": "string" - }, - "Info": { - "$ref": "#/definitions/ErrorInfo" + "Address": { + "$ref": "#/definitions/Address" }, - "Message": { - "type": "string" + "Port": { + "type": "integer" } }, "additionalProperties": false, "required": [ - "Message", - "Code" + "Address", + "Port" ] }, - "ErrorInfo": { - "type": "object", - "properties": { - "Macaroon": { - "$ref": "#/definitions/Macaroon" - }, - "MacaroonPath": { - "type": "string" - } - }, - "additionalProperties": false - }, "LifeResult": { "type": "object", "properties": { @@ -6398,198 +6263,45 @@ "sig" ] }, - "MachinePortRange": { + "NotifyWatchResult": { "type": "object", "properties": { - "PortRange": { - "$ref": "#/definitions/PortRange" - }, - "RelationTag": { - "type": "string" + "Error": { + "$ref": "#/definitions/Error" }, - "UnitTag": { + "NotifyWatcherId": { "type": "string" } }, "additionalProperties": false, "required": [ - "UnitTag", - "RelationTag", - "PortRange" + "NotifyWatcherId", + "Error" ] }, - "MachinePorts": { + "StringResult": { "type": "object", "properties": { - "MachineTag": { - "type": "string" + "Error": { + "$ref": "#/definitions/Error" }, - "SubnetTag": { + "Result": { "type": "string" } }, "additionalProperties": false, "required": [ - "MachineTag", - "SubnetTag" + "Error", + "Result" ] }, - "MachinePortsParams": { + "StringsResult": { "type": "object", "properties": { - "Params": { - "type": "array", - "items": { - "$ref": "#/definitions/MachinePorts" - } - } - }, - "additionalProperties": false, - "required": [ - "Params" - ] - }, - "MachinePortsResult": { - "type": "object", - "properties": { - "Error": { - "$ref": "#/definitions/Error" - }, - "Ports": { - "type": "array", - "items": { - "$ref": "#/definitions/MachinePortRange" - } - } - }, - "additionalProperties": false, - "required": [ - "Error", - "Ports" - ] - }, - "MachinePortsResults": { - "type": "object", - "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/MachinePortsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "Results" - ] - }, - "ModelConfigResult": { - "type": "object", - "properties": { - "Config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - } - }, - "additionalProperties": false, - "required": [ - "Config" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "Error": { - "$ref": "#/definitions/Error" - }, - "NotifyWatcherId": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId", - "Error" - ] - }, - "NotifyWatchResults": { - "type": "object", - "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "Results" - ] - }, - "PortRange": { - "type": "object", - "properties": { - "FromPort": { - "type": "integer" - }, - "Protocol": { - "type": "string" - }, - "ToPort": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "FromPort", - "ToPort", - "Protocol" - ] - }, - "StringResult": { - "type": "object", - "properties": { - "Error": { - "$ref": "#/definitions/Error" - }, - "Result": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Error", - "Result" - ] - }, - "StringResults": { - "type": "object", - "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringResult" - } - } - }, - "additionalProperties": false, - "required": [ - "Results" - ] - }, - "StringsResult": { - "type": "object", - "properties": { - "Error": { - "$ref": "#/definitions/Error" - }, - "Result": { + "Error": { + "$ref": "#/definitions/Error" + }, + "Result": { "type": "array", "items": { "type": "string" @@ -6602,21 +6314,6 @@ "Result" ] }, - "StringsResults": { - "type": "object", - "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "Results" - ] - }, "StringsWatchResult": { "type": "object", "properties": { @@ -6699,185 +6396,155 @@ } }, { - "Name": "HighAvailability", + "Name": "DiscoverSpaces", "Version": 2, "Schema": { "type": "object", "properties": { - "EnableHA": { + "AddSubnets": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/ControllersSpecs" + "$ref": "#/definitions/AddSubnetsParams" }, "Result": { - "$ref": "#/definitions/ControllersChangeResults" + "$ref": "#/definitions/ErrorResults" } } }, - "ResumeHAReplicationAfterUpgrade": { + "CreateSpaces": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/ResumeReplicationParams" + "$ref": "#/definitions/CreateSpacesParams" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" } } }, - "StopHAReplicationForUpgrade": { + "ListSpaces": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/DiscoverSpacesResults" + } + } + }, + "ListSubnets": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/UpgradeMongoParams" + "$ref": "#/definitions/SubnetsFilters" }, "Result": { - "$ref": "#/definitions/MongoUpgradeResults" + "$ref": "#/definitions/ListSubnetsResults" + } + } + }, + "ModelConfig": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ModelConfigResult" } } } }, "definitions": { - "Address": { + "AddSubnetParams": { "type": "object", "properties": { - "Scope": { - "type": "string" - }, - "SpaceName": { - "type": "string" - }, - "SpaceProviderId": { + "SpaceTag": { "type": "string" }, - "Type": { + "SubnetProviderId": { "type": "string" }, - "Value": { + "SubnetTag": { "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Value", - "Type", - "Scope", - "SpaceName", - "SpaceProviderId" - ] - }, - "ControllersChangeResult": { - "type": "object", - "properties": { - "Error": { - "$ref": "#/definitions/Error" }, - "Result": { - "$ref": "#/definitions/ControllersChanges" + "Zones": { + "type": "array", + "items": { + "type": "string" + } } }, "additionalProperties": false, "required": [ - "Result", - "Error" + "SpaceTag" ] }, - "ControllersChangeResults": { + "AddSubnetsParams": { "type": "object", "properties": { - "Results": { + "Subnets": { "type": "array", "items": { - "$ref": "#/definitions/ControllersChangeResult" + "$ref": "#/definitions/AddSubnetParams" } } }, "additionalProperties": false, "required": [ - "Results" + "Subnets" ] }, - "ControllersChanges": { + "CreateSpaceParams": { "type": "object", "properties": { - "added": { - "type": "array", - "items": { - "type": "string" - } - }, - "converted": { - "type": "array", - "items": { - "type": "string" - } - }, - "demoted": { - "type": "array", - "items": { - "type": "string" - } + "ProviderId": { + "type": "string" }, - "maintained": { - "type": "array", - "items": { - "type": "string" - } + "Public": { + "type": "boolean" }, - "promoted": { - "type": "array", - "items": { - "type": "string" - } + "SpaceTag": { + "type": "string" }, - "removed": { + "SubnetTags": { "type": "array", "items": { "type": "string" } } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "SubnetTags", + "SpaceTag", + "Public" + ] }, - "ControllersSpec": { + "CreateSpacesParams": { "type": "object", "properties": { - "ModelTag": { - "type": "string" - }, - "constraints": { - "$ref": "#/definitions/Value" - }, - "num-controllers": { - "type": "integer" - }, - "placement": { + "Spaces": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/CreateSpaceParams" } - }, - "series": { - "type": "string" } }, "additionalProperties": false, "required": [ - "ModelTag", - "num-controllers" + "Spaces" ] }, - "ControllersSpecs": { + "DiscoverSpacesResults": { "type": "object", "properties": { - "Specs": { + "Results": { "type": "array", "items": { - "$ref": "#/definitions/ControllersSpec" + "$ref": "#/definitions/ProviderSpace" } } }, "additionalProperties": false, "required": [ - "Specs" + "Results" ] }, "Error": { @@ -6911,24 +6578,46 @@ }, "additionalProperties": false }, - "HAMember": { + "ErrorResult": { "type": "object", "properties": { - "PublicAddress": { - "$ref": "#/definitions/Address" - }, - "Series": { - "type": "string" - }, - "Tag": { - "type": "string" + "Error": { + "$ref": "#/definitions/Error" } }, "additionalProperties": false, "required": [ - "Tag", - "PublicAddress", - "Series" + "Error" + ] + }, + "ErrorResults": { + "type": "object", + "properties": { + "Results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "Results" + ] + }, + "ListSubnetsResults": { + "type": "object", + "properties": { + "Results": { + "type": "array", + "items": { + "$ref": "#/definitions/Subnet" + } + } + }, + "additionalProperties": false, + "required": [ + "Results" ] }, "Macaroon": { @@ -6968,174 +6657,111 @@ "sig" ] }, - "Member": { + "ModelConfigResult": { "type": "object", "properties": { - "Address": { - "type": "string" - }, - "Arbiter": { - "type": "boolean" - }, - "BuildIndexes": { - "type": "boolean" - }, - "Hidden": { - "type": "boolean" - }, - "Id": { - "type": "integer" - }, - "Priority": { - "type": "number" - }, - "SlaveDelay": { - "type": "integer" - }, - "Tags": { + "Config": { "type": "object", "patternProperties": { ".*": { - "type": "string" + "type": "object", + "additionalProperties": true } } - }, - "Votes": { - "type": "integer" } }, "additionalProperties": false, "required": [ - "Id", - "Address", - "Arbiter", - "BuildIndexes", - "Hidden", - "Priority", - "Tags", - "SlaveDelay", - "Votes" + "Config" ] }, - "MongoUpgradeResults": { + "ProviderSpace": { "type": "object", "properties": { - "Master": { - "$ref": "#/definitions/HAMember" + "Error": { + "$ref": "#/definitions/Error" }, - "Members": { - "type": "array", - "items": { - "$ref": "#/definitions/HAMember" - } + "Name": { + "type": "string" }, - "RsMembers": { - "type": "array", - "items": { - "$ref": "#/definitions/Member" - } - } - }, - "additionalProperties": false, - "required": [ - "RsMembers", - "Master", - "Members" - ] - }, - "ResumeReplicationParams": { - "type": "object", - "properties": { - "Members": { + "ProviderId": { + "type": "string" + }, + "Subnets": { "type": "array", "items": { - "$ref": "#/definitions/Member" + "$ref": "#/definitions/Subnet" } } }, "additionalProperties": false, "required": [ - "Members" - ] - }, - "UpgradeMongoParams": { - "type": "object", - "properties": { - "Target": { - "$ref": "#/definitions/Version" - } - }, - "additionalProperties": false, - "required": [ - "Target" + "Name", + "ProviderId", + "Subnets" ] }, - "Value": { + "Subnet": { "type": "object", "properties": { - "arch": { + "CIDR": { "type": "string" }, - "container": { + "Life": { "type": "string" }, - "cpu-cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "instance-type": { + "ProviderId": { "type": "string" }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" + "SpaceTag": { + "type": "string" }, - "spaces": { + "StaticRangeHighIP": { "type": "array", "items": { - "type": "string" + "type": "integer" } }, - "tags": { + "StaticRangeLowIP": { "type": "array", "items": { - "type": "string" + "type": "integer" } }, - "virt-type": { + "Status": { "type": "string" - } - }, - "additionalProperties": false - }, - "Version": { - "type": "object", - "properties": { - "Major": { - "type": "integer" }, - "Minor": { + "VLANTag": { "type": "integer" }, - "Patch": { - "type": "string" - }, - "StorageEngine": { - "type": "string" + "Zones": { + "type": "array", + "items": { + "type": "string" + } } }, "additionalProperties": false, "required": [ - "Major", - "Minor", - "Patch", - "StorageEngine" + "CIDR", + "VLANTag", + "Life", + "SpaceTag", + "Zones" ] }, + "SubnetsFilters": { + "type": "object", + "properties": { + "SpaceTag": { + "type": "string" + }, + "Zone": { + "type": "string" + } + }, + "additionalProperties": false + }, "caveat": { "type": "object", "properties": { @@ -7180,16 +6806,16 @@ } }, { - "Name": "HostKeyReporter", - "Version": 1, + "Name": "DiskManager", + "Version": 2, "Schema": { "type": "object", "properties": { - "ReportKeys": { + "SetMachineBlockDevices": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/SSHHostKeySet" + "$ref": "#/definitions/SetMachineBlockDevices" }, "Result": { "$ref": "#/definitions/ErrorResults" @@ -7198,6 +6824,57 @@ } }, "definitions": { + "BlockDevice": { + "type": "object", + "properties": { + "BusAddress": { + "type": "string" + }, + "DeviceLinks": { + "type": "array", + "items": { + "type": "string" + } + }, + "DeviceName": { + "type": "string" + }, + "FilesystemType": { + "type": "string" + }, + "HardwareId": { + "type": "string" + }, + "InUse": { + "type": "boolean" + }, + "Label": { + "type": "string" + }, + "MountPoint": { + "type": "string" + }, + "Size": { + "type": "integer" + }, + "UUID": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "DeviceName", + "DeviceLinks", + "Label", + "UUID", + "HardwareId", + "BusAddress", + "Size", + "FilesystemType", + "InUse", + "MountPoint" + ] + }, "Error": { "type": "object", "properties": { @@ -7293,38 +6970,37 @@ "sig" ] }, - "SSHHostKeySet": { + "MachineBlockDevices": { "type": "object", "properties": { - "entity-keys": { + "blockdevices": { "type": "array", "items": { - "$ref": "#/definitions/SSHHostKeys" + "$ref": "#/definitions/BlockDevice" } + }, + "machine": { + "type": "string" } }, "additionalProperties": false, "required": [ - "entity-keys" + "machine" ] }, - "SSHHostKeys": { + "SetMachineBlockDevices": { "type": "object", "properties": { - "public-keys": { + "machineblockdevices": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/MachineBlockDevices" } - }, - "tag": { - "type": "string" } }, "additionalProperties": false, "required": [ - "tag", - "public-keys" + "machineblockdevices" ] }, "caveat": { @@ -7371,171 +7047,77 @@ } }, { - "Name": "ImageManager", + "Name": "EntityWatcher", "Version": 2, "Schema": { "type": "object", "properties": { - "DeleteImages": { + "Next": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/ImageFilterParams" - }, "Result": { - "$ref": "#/definitions/ErrorResults" + "$ref": "#/definitions/EntitiesWatchResult" } } }, - "ListImages": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ImageFilterParams" - }, - "Result": { - "$ref": "#/definitions/ListImageResult" - } - } + "Stop": { + "type": "object" } }, "definitions": { - "Error": { + "EntitiesWatchResult": { "type": "object", "properties": { - "Code": { - "type": "string" - }, - "Info": { - "$ref": "#/definitions/ErrorInfo" + "Changes": { + "type": "array", + "items": { + "type": "string" + } }, - "Message": { + "EntityWatcherId": { "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Message", - "Code" - ] - }, - "ErrorInfo": { - "type": "object", - "properties": { - "Macaroon": { - "$ref": "#/definitions/Macaroon" }, - "MacaroonPath": { - "type": "string" - } - }, - "additionalProperties": false - }, - "ErrorResult": { - "type": "object", - "properties": { "Error": { "$ref": "#/definitions/Error" } }, "additionalProperties": false, "required": [ + "EntityWatcherId", + "Changes", "Error" ] }, - "ErrorResults": { - "type": "object", - "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "Results" - ] - }, - "ImageFilterParams": { - "type": "object", - "properties": { - "images": { - "type": "array", - "items": { - "$ref": "#/definitions/ImageSpec" - } - } - }, - "additionalProperties": false, - "required": [ - "images" - ] - }, - "ImageMetadata": { + "Error": { "type": "object", "properties": { - "arch": { - "type": "string" - }, - "created": { - "type": "string", - "format": "date-time" - }, - "kind": { + "Code": { "type": "string" }, - "series": { - "type": "string" + "Info": { + "$ref": "#/definitions/ErrorInfo" }, - "url": { + "Message": { "type": "string" } }, "additionalProperties": false, "required": [ - "kind", - "arch", - "series", - "url", - "created" + "Message", + "Code" ] }, - "ImageSpec": { + "ErrorInfo": { "type": "object", "properties": { - "arch": { - "type": "string" - }, - "kind": { - "type": "string" + "Macaroon": { + "$ref": "#/definitions/Macaroon" }, - "series": { + "MacaroonPath": { "type": "string" } }, - "additionalProperties": false, - "required": [ - "kind", - "arch", - "series" - ] - }, - "ListImageResult": { - "type": "object", - "properties": { - "result": { - "type": "array", - "items": { - "$ref": "#/definitions/ImageMetadata" - } - } - }, - "additionalProperties": false, - "required": [ - "result" - ] + "additionalProperties": false }, "Macaroon": { "type": "object", @@ -7618,109 +7200,24 @@ } }, { - "Name": "ImageMetadata", + "Name": "FilesystemAttachmentsWatcher", "Version": 2, "Schema": { "type": "object", "properties": { - "Delete": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/MetadataImageIds" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - } - }, - "List": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ImageMetadataFilter" - }, - "Result": { - "$ref": "#/definitions/ListCloudImageMetadataResult" - } - } - }, - "Save": { + "Next": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/MetadataSaveParams" - }, "Result": { - "$ref": "#/definitions/ErrorResults" + "$ref": "#/definitions/MachineStorageIdsWatchResult" } } }, - "UpdateFromPublishedImages": { + "Stop": { "type": "object" } }, "definitions": { - "CloudImageMetadata": { - "type": "object", - "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" - } - }, - "additionalProperties": false, - "required": [ - "image_id", - "region", - "version", - "series", - "arch", - "source", - "priority" - ] - }, - "CloudImageMetadataList": { - "type": "object", - "properties": { - "metadata": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudImageMetadata" - } - } - }, - "additionalProperties": false - }, "Error": { "type": "object", "properties": { @@ -7752,78 +7249,6 @@ }, "additionalProperties": false }, - "ErrorResult": { - "type": "object", - "properties": { - "Error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "Error" - ] - }, - "ErrorResults": { - "type": "object", - "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "Results" - ] - }, - "ImageMetadataFilter": { - "type": "object", - "properties": { - "arches": { - "type": "array", - "items": { - "type": "string" - } - }, - "region": { - "type": "string" - }, - "root-storage-type": { - "type": "string" - }, - "series": { - "type": "array", - "items": { - "type": "string" - } - }, - "stream": { - "type": "string" - }, - "virt_type": { - "type": "string" - } - }, - "additionalProperties": false - }, - "ListCloudImageMetadataResult": { - "type": "object", - "properties": { - "result": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudImageMetadata" - } - } - }, - "additionalProperties": false, - "required": [ - "result" - ] - }, "Macaroon": { "type": "object", "properties": { @@ -7861,32 +7286,44 @@ "sig" ] }, - "MetadataImageIds": { + "MachineStorageId": { "type": "object", "properties": { - "image_ids": { - "type": "array", - "items": { - "type": "string" - } + "attachmenttag": { + "type": "string" + }, + "machinetag": { + "type": "string" } }, "additionalProperties": false, "required": [ - "image_ids" + "machinetag", + "attachmenttag" ] }, - "MetadataSaveParams": { + "MachineStorageIdsWatchResult": { "type": "object", "properties": { - "metadata": { + "Changes": { "type": "array", "items": { - "$ref": "#/definitions/CloudImageMetadataList" + "$ref": "#/definitions/MachineStorageId" } + }, + "Error": { + "$ref": "#/definitions/Error" + }, + "MachineStorageIdsWatcherId": { + "type": "string" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "MachineStorageIdsWatcherId", + "Changes", + "Error" + ] }, "caveat": { "type": "object", @@ -7932,104 +7369,93 @@ } }, { - "Name": "InstancePoller", - "Version": 2, + "Name": "Firewaller", + "Version": 3, "Schema": { "type": "object", "properties": { - "AreManuallyProvisioned": { + "GetAssignedMachine": { "type": "object", "properties": { "Params": { "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/BoolResults" + "$ref": "#/definitions/StringResults" } } }, - "InstanceId": { + "GetExposed": { "type": "object", "properties": { "Params": { "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/StringResults" + "$ref": "#/definitions/BoolResults" } } }, - "InstanceStatus": { + "GetMachineActiveSubnets": { "type": "object", "properties": { "Params": { "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/StatusResults" + "$ref": "#/definitions/StringsResults" } } }, - "Life": { + "GetMachinePorts": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/Entities" + "$ref": "#/definitions/MachinePortsParams" }, "Result": { - "$ref": "#/definitions/LifeResults" - } - } - }, - "ModelConfig": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/ModelConfigResult" + "$ref": "#/definitions/MachinePortsResults" } } }, - "ProviderAddresses": { + "InstanceId": { "type": "object", "properties": { "Params": { "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/MachineAddressesResults" + "$ref": "#/definitions/StringResults" } } }, - "SetInstanceStatus": { + "Life": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/SetStatus" + "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/ErrorResults" + "$ref": "#/definitions/LifeResults" } } }, - "SetProviderAddresses": { + "ModelConfig": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/SetMachinesAddresses" - }, "Result": { - "$ref": "#/definitions/ErrorResults" + "$ref": "#/definitions/ModelConfigResult" } } }, - "Status": { + "Watch": { "type": "object", "properties": { "Params": { "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/StatusResults" + "$ref": "#/definitions/NotifyWatchResults" } } }, @@ -8048,32 +7474,31 @@ "$ref": "#/definitions/StringsWatchResult" } } - } - }, - "definitions": { - "Address": { + }, + "WatchOpenedPorts": { "type": "object", "properties": { - "Scope": { - "type": "string" - }, - "SpaceName": { - "type": "string" - }, - "Type": { - "type": "string" + "Params": { + "$ref": "#/definitions/Entities" }, - "Value": { - "type": "string" + "Result": { + "$ref": "#/definitions/StringsWatchResults" } - }, - "additionalProperties": false, - "required": [ - "Value", - "Type", - "Scope" - ] + } }, + "WatchUnits": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringsWatchResults" + } + } + } + }, + "definitions": { "BoolResult": { "type": "object", "properties": { @@ -8132,36 +7557,6 @@ "Tag" ] }, - "EntityStatusArgs": { - "type": "object", - "properties": { - "Data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "Info": { - "type": "string" - }, - "Status": { - "type": "string" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Tag", - "Status", - "Info", - "Data" - ] - }, "Error": { "type": "object", "properties": { @@ -8193,33 +7588,6 @@ }, "additionalProperties": false }, - "ErrorResult": { - "type": "object", - "properties": { - "Error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "Error" - ] - }, - "ErrorResults": { - "type": "object", - "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "Results" - ] - }, "LifeResult": { "type": "object", "properties": { @@ -8288,51 +7656,83 @@ "sig" ] }, - "MachineAddresses": { + "MachinePortRange": { "type": "object", "properties": { - "Addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/Address" - } + "PortRange": { + "$ref": "#/definitions/PortRange" }, - "Tag": { + "RelationTag": { + "type": "string" + }, + "UnitTag": { "type": "string" } }, "additionalProperties": false, "required": [ - "Tag", - "Addresses" + "UnitTag", + "RelationTag", + "PortRange" ] }, - "MachineAddressesResult": { + "MachinePorts": { "type": "object", "properties": { - "Addresses": { + "MachineTag": { + "type": "string" + }, + "SubnetTag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "MachineTag", + "SubnetTag" + ] + }, + "MachinePortsParams": { + "type": "object", + "properties": { + "Params": { "type": "array", "items": { - "$ref": "#/definitions/Address" + "$ref": "#/definitions/MachinePorts" } - }, + } + }, + "additionalProperties": false, + "required": [ + "Params" + ] + }, + "MachinePortsResult": { + "type": "object", + "properties": { "Error": { "$ref": "#/definitions/Error" + }, + "Ports": { + "type": "array", + "items": { + "$ref": "#/definitions/MachinePortRange" + } } }, "additionalProperties": false, "required": [ "Error", - "Addresses" + "Ports" ] }, - "MachineAddressesResults": { + "MachinePortsResults": { "type": "object", "properties": { "Results": { "type": "array", "items": { - "$ref": "#/definitions/MachineAddressesResult" + "$ref": "#/definitions/MachinePortsResult" } } }, @@ -8375,86 +7775,64 @@ "Error" ] }, - "SetMachinesAddresses": { + "NotifyWatchResults": { "type": "object", "properties": { - "MachineAddresses": { + "Results": { "type": "array", "items": { - "$ref": "#/definitions/MachineAddresses" + "$ref": "#/definitions/NotifyWatchResult" } } }, "additionalProperties": false, "required": [ - "MachineAddresses" + "Results" ] }, - "SetStatus": { + "PortRange": { "type": "object", "properties": { - "Entities": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityStatusArgs" - } + "FromPort": { + "type": "integer" + }, + "Protocol": { + "type": "string" + }, + "ToPort": { + "type": "integer" } }, "additionalProperties": false, "required": [ - "Entities" + "FromPort", + "ToPort", + "Protocol" ] }, - "StatusResult": { + "StringResult": { "type": "object", "properties": { - "Data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, "Error": { "$ref": "#/definitions/Error" }, - "Id": { - "type": "string" - }, - "Info": { - "type": "string" - }, - "Life": { - "type": "string" - }, - "Since": { - "type": "string", - "format": "date-time" - }, - "Status": { + "Result": { "type": "string" } }, "additionalProperties": false, "required": [ "Error", - "Id", - "Life", - "Status", - "Info", - "Data", - "Since" + "Result" ] }, - "StatusResults": { + "StringResults": { "type": "object", "properties": { "Results": { "type": "array", "items": { - "$ref": "#/definitions/StatusResult" + "$ref": "#/definitions/StringResult" } } }, @@ -8463,14 +7841,17 @@ "Results" ] }, - "StringResult": { + "StringsResult": { "type": "object", "properties": { "Error": { "$ref": "#/definitions/Error" }, "Result": { - "type": "string" + "type": "array", + "items": { + "type": "string" + } } }, "additionalProperties": false, @@ -8479,13 +7860,13 @@ "Result" ] }, - "StringResults": { + "StringsResults": { "type": "object", "properties": { "Results": { "type": "array", "items": { - "$ref": "#/definitions/StringResult" + "$ref": "#/definitions/StringsResult" } } }, @@ -8517,6 +7898,21 @@ "Error" ] }, + "StringsWatchResults": { + "type": "object", + "properties": { + "Results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringsWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "Results" + ] + }, "caveat": { "type": "object", "properties": { @@ -8561,82 +7957,185 @@ } }, { - "Name": "KeyManager", - "Version": 1, + "Name": "HighAvailability", + "Version": 2, "Schema": { "type": "object", "properties": { - "AddKeys": { + "EnableHA": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/ModifyUserSSHKeys" + "$ref": "#/definitions/ControllersSpecs" }, "Result": { - "$ref": "#/definitions/ErrorResults" + "$ref": "#/definitions/ControllersChangeResults" } } }, - "DeleteKeys": { + "ResumeHAReplicationAfterUpgrade": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/ModifyUserSSHKeys" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" + "$ref": "#/definitions/ResumeReplicationParams" } } }, - "ImportKeys": { + "StopHAReplicationForUpgrade": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/ModifyUserSSHKeys" + "$ref": "#/definitions/UpgradeMongoParams" }, "Result": { - "$ref": "#/definitions/ErrorResults" + "$ref": "#/definitions/MongoUpgradeResults" } } + } + }, + "definitions": { + "Address": { + "type": "object", + "properties": { + "Scope": { + "type": "string" + }, + "SpaceName": { + "type": "string" + }, + "SpaceProviderId": { + "type": "string" + }, + "Type": { + "type": "string" + }, + "Value": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Value", + "Type", + "Scope", + "SpaceName", + "SpaceProviderId" + ] }, - "ListKeys": { + "ControllersChangeResult": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/ListSSHKeys" + "Error": { + "$ref": "#/definitions/Error" }, "Result": { - "$ref": "#/definitions/StringsResults" + "$ref": "#/definitions/ControllersChanges" } - } - } - }, - "definitions": { - "Entities": { + }, + "additionalProperties": false, + "required": [ + "Result", + "Error" + ] + }, + "ControllersChangeResults": { "type": "object", "properties": { - "Entities": { + "Results": { "type": "array", "items": { - "$ref": "#/definitions/Entity" + "$ref": "#/definitions/ControllersChangeResult" } } }, "additionalProperties": false, "required": [ - "Entities" + "Results" ] }, - "Entity": { + "ControllersChanges": { "type": "object", "properties": { - "Tag": { + "added": { + "type": "array", + "items": { + "type": "string" + } + }, + "converted": { + "type": "array", + "items": { + "type": "string" + } + }, + "demoted": { + "type": "array", + "items": { + "type": "string" + } + }, + "maintained": { + "type": "array", + "items": { + "type": "string" + } + }, + "promoted": { + "type": "array", + "items": { + "type": "string" + } + }, + "removed": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "ControllersSpec": { + "type": "object", + "properties": { + "ModelTag": { + "type": "string" + }, + "constraints": { + "$ref": "#/definitions/Value" + }, + "num-controllers": { + "type": "integer" + }, + "placement": { + "type": "array", + "items": { + "type": "string" + } + }, + "series": { "type": "string" } }, "additionalProperties": false, "required": [ - "Tag" + "ModelTag", + "num-controllers" + ] + }, + "ControllersSpecs": { + "type": "object", + "properties": { + "Specs": { + "type": "array", + "items": { + "$ref": "#/definitions/ControllersSpec" + } + } + }, + "additionalProperties": false, + "required": [ + "Specs" ] }, "Error": { @@ -8670,47 +8169,24 @@ }, "additionalProperties": false }, - "ErrorResult": { - "type": "object", - "properties": { - "Error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "Error" - ] - }, - "ErrorResults": { - "type": "object", - "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "Results" - ] - }, - "ListSSHKeys": { + "HAMember": { "type": "object", "properties": { - "Entities": { - "$ref": "#/definitions/Entities" + "PublicAddress": { + "$ref": "#/definitions/Address" }, - "Mode": { - "type": "boolean" + "Series": { + "type": "string" + }, + "Tag": { + "type": "string" } }, "additionalProperties": false, "required": [ - "Entities", - "Mode" + "Tag", + "PublicAddress", + "Series" ] }, "Macaroon": { @@ -8750,57 +8226,172 @@ "sig" ] }, - "ModifyUserSSHKeys": { + "Member": { "type": "object", "properties": { - "Keys": { - "type": "array", - "items": { - "type": "string" + "Address": { + "type": "string" + }, + "Arbiter": { + "type": "boolean" + }, + "BuildIndexes": { + "type": "boolean" + }, + "Hidden": { + "type": "boolean" + }, + "Id": { + "type": "integer" + }, + "Priority": { + "type": "number" + }, + "SlaveDelay": { + "type": "integer" + }, + "Tags": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } } }, - "User": { - "type": "string" + "Votes": { + "type": "integer" } }, "additionalProperties": false, "required": [ - "User", - "Keys" + "Id", + "Address", + "Arbiter", + "BuildIndexes", + "Hidden", + "Priority", + "Tags", + "SlaveDelay", + "Votes" ] }, - "StringsResult": { + "MongoUpgradeResults": { "type": "object", "properties": { - "Error": { - "$ref": "#/definitions/Error" + "Master": { + "$ref": "#/definitions/HAMember" }, - "Result": { + "Members": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/HAMember" + } + }, + "RsMembers": { + "type": "array", + "items": { + "$ref": "#/definitions/Member" } } }, "additionalProperties": false, "required": [ - "Error", - "Result" + "RsMembers", + "Master", + "Members" ] }, - "StringsResults": { + "ResumeReplicationParams": { "type": "object", "properties": { - "Results": { + "Members": { "type": "array", "items": { - "$ref": "#/definitions/StringsResult" + "$ref": "#/definitions/Member" } } }, "additionalProperties": false, "required": [ - "Results" + "Members" + ] + }, + "UpgradeMongoParams": { + "type": "object", + "properties": { + "Target": { + "$ref": "#/definitions/Version" + } + }, + "additionalProperties": false, + "required": [ + "Target" + ] + }, + "Value": { + "type": "object", + "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": { + "type": "array", + "items": { + "type": "string" + } + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "virt-type": { + "type": "string" + } + }, + "additionalProperties": false + }, + "Version": { + "type": "object", + "properties": { + "Major": { + "type": "integer" + }, + "Minor": { + "type": "integer" + }, + "Patch": { + "type": "string" + }, + "StorageEngine": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Major", + "Minor", + "Patch", + "StorageEngine" ] }, "caveat": { @@ -8847,62 +8438,24 @@ } }, { - "Name": "KeyUpdater", + "Name": "HostKeyReporter", "Version": 1, "Schema": { "type": "object", "properties": { - "AuthorisedKeys": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsResults" - } - } - }, - "WatchAuthorisedKeys": { + "ReportKeys": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/Entities" + "$ref": "#/definitions/SSHHostKeySet" }, "Result": { - "$ref": "#/definitions/NotifyWatchResults" + "$ref": "#/definitions/ErrorResults" } } } }, "definitions": { - "Entities": { - "type": "object", - "properties": { - "Entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } - } - }, - "additionalProperties": false, - "required": [ - "Entities" - ] - }, - "Entity": { - "type": "object", - "properties": { - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Tag" - ] - }, "Error": { "type": "object", "properties": { @@ -8934,6 +8487,33 @@ }, "additionalProperties": false }, + "ErrorResult": { + "type": "object", + "properties": { + "Error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "Error" + ] + }, + "ErrorResults": { + "type": "object", + "properties": { + "Results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } + }, + "additionalProperties": false, + "required": [ + "Results" + ] + }, "Macaroon": { "type": "object", "properties": { @@ -8971,69 +8551,38 @@ "sig" ] }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "Error": { - "$ref": "#/definitions/Error" - }, - "NotifyWatcherId": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId", - "Error" - ] - }, - "NotifyWatchResults": { + "SSHHostKeySet": { "type": "object", "properties": { - "Results": { + "entity-keys": { "type": "array", "items": { - "$ref": "#/definitions/NotifyWatchResult" + "$ref": "#/definitions/SSHHostKeys" } } }, "additionalProperties": false, "required": [ - "Results" + "entity-keys" ] }, - "StringsResult": { + "SSHHostKeys": { "type": "object", "properties": { - "Error": { - "$ref": "#/definitions/Error" - }, - "Result": { + "public-keys": { "type": "array", "items": { "type": "string" } + }, + "tag": { + "type": "string" } }, "additionalProperties": false, "required": [ - "Error", - "Result" - ] - }, - "StringsResults": { - "type": "object", - "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsResult" - } - } - }, - "additionalProperties": false, - "required": [ - "Results" + "tag", + "public-keys" ] }, "caveat": { @@ -9080,126 +8629,170 @@ } }, { - "Name": "LeadershipService", + "Name": "ImageManager", "Version": 2, "Schema": { "type": "object", "properties": { - "BlockUntilLeadershipReleased": { + "DeleteImages": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/ServiceTag" + "$ref": "#/definitions/ImageFilterParams" }, "Result": { - "$ref": "#/definitions/ErrorResult" + "$ref": "#/definitions/ErrorResults" } } }, - "ClaimLeadership": { + "ListImages": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/ClaimLeadershipBulkParams" + "$ref": "#/definitions/ImageFilterParams" }, "Result": { - "$ref": "#/definitions/ClaimLeadershipBulkResults" + "$ref": "#/definitions/ListImageResult" } } } }, "definitions": { - "ClaimLeadershipBulkParams": { + "Error": { "type": "object", "properties": { - "Params": { - "type": "array", - "items": { - "$ref": "#/definitions/ClaimLeadershipParams" - } + "Code": { + "type": "string" + }, + "Info": { + "$ref": "#/definitions/ErrorInfo" + }, + "Message": { + "type": "string" } }, "additionalProperties": false, "required": [ - "Params" + "Message", + "Code" ] }, - "ClaimLeadershipBulkResults": { + "ErrorInfo": { "type": "object", "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } + "Macaroon": { + "$ref": "#/definitions/Macaroon" + }, + "MacaroonPath": { + "type": "string" + } + }, + "additionalProperties": false + }, + "ErrorResult": { + "type": "object", + "properties": { + "Error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "Error" + ] + }, + "ErrorResults": { + "type": "object", + "properties": { + "Results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } + } }, "additionalProperties": false, "required": [ "Results" ] }, - "ClaimLeadershipParams": { + "ImageFilterParams": { "type": "object", "properties": { - "DurationSeconds": { - "type": "number" - }, - "ServiceTag": { - "type": "string" - }, - "UnitTag": { - "type": "string" + "images": { + "type": "array", + "items": { + "$ref": "#/definitions/ImageSpec" + } } }, "additionalProperties": false, "required": [ - "ServiceTag", - "UnitTag", - "DurationSeconds" + "images" ] }, - "Error": { + "ImageMetadata": { "type": "object", "properties": { - "Code": { + "arch": { "type": "string" }, - "Info": { - "$ref": "#/definitions/ErrorInfo" + "created": { + "type": "string", + "format": "date-time" }, - "Message": { + "kind": { + "type": "string" + }, + "series": { + "type": "string" + }, + "url": { "type": "string" } }, "additionalProperties": false, "required": [ - "Message", - "Code" + "kind", + "arch", + "series", + "url", + "created" ] }, - "ErrorInfo": { + "ImageSpec": { "type": "object", "properties": { - "Macaroon": { - "$ref": "#/definitions/Macaroon" + "arch": { + "type": "string" }, - "MacaroonPath": { + "kind": { + "type": "string" + }, + "series": { "type": "string" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "kind", + "arch", + "series" + ] }, - "ErrorResult": { + "ListImageResult": { "type": "object", "properties": { - "Error": { - "$ref": "#/definitions/Error" + "result": { + "type": "array", + "items": { + "$ref": "#/definitions/ImageMetadata" + } } }, "additionalProperties": false, "required": [ - "Error" + "result" ] }, "Macaroon": { @@ -9239,18 +8832,6 @@ "sig" ] }, - "ServiceTag": { - "type": "object", - "properties": { - "Name": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Name" - ] - }, "caveat": { "type": "object", "properties": { @@ -9295,61 +8876,108 @@ } }, { - "Name": "LifeFlag", - "Version": 1, + "Name": "ImageMetadata", + "Version": 2, "Schema": { "type": "object", "properties": { - "Life": { + "Delete": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/Entities" + "$ref": "#/definitions/MetadataImageIds" }, "Result": { - "$ref": "#/definitions/LifeResults" + "$ref": "#/definitions/ErrorResults" } } }, - "Watch": { + "List": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/Entities" + "$ref": "#/definitions/ImageMetadataFilter" }, "Result": { - "$ref": "#/definitions/NotifyWatchResults" + "$ref": "#/definitions/ListCloudImageMetadataResult" + } + } + }, + "Save": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/MetadataSaveParams" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" } } + }, + "UpdateFromPublishedImages": { + "type": "object" } }, "definitions": { - "Entities": { + "CloudImageMetadata": { "type": "object", "properties": { - "Entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } + "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" } }, "additionalProperties": false, "required": [ - "Entities" + "image_id", + "region", + "version", + "series", + "arch", + "source", + "priority" ] }, - "Entity": { + "CloudImageMetadataList": { "type": "object", "properties": { - "Tag": { - "type": "string" + "metadata": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudImageMetadata" + } } }, - "additionalProperties": false, - "required": [ - "Tag" - ] + "additionalProperties": false }, "Error": { "type": "object", @@ -9382,29 +9010,25 @@ }, "additionalProperties": false }, - "LifeResult": { + "ErrorResult": { "type": "object", "properties": { "Error": { "$ref": "#/definitions/Error" - }, - "Life": { - "type": "string" } }, "additionalProperties": false, "required": [ - "Life", "Error" ] }, - "LifeResults": { + "ErrorResults": { "type": "object", "properties": { "Results": { "type": "array", "items": { - "$ref": "#/definitions/LifeResult" + "$ref": "#/definitions/ErrorResult" } } }, @@ -9413,74 +9037,115 @@ "Results" ] }, - "Macaroon": { + "ImageMetadataFilter": { "type": "object", "properties": { - "caveats": { + "arches": { "type": "array", "items": { - "$ref": "#/definitions/caveat" + "type": "string" } }, - "data": { + "region": { + "type": "string" + }, + "root-storage-type": { + "type": "string" + }, + "series": { "type": "array", "items": { - "type": "integer" + "type": "string" } }, - "id": { - "$ref": "#/definitions/packet" - }, - "location": { - "$ref": "#/definitions/packet" + "stream": { + "type": "string" }, - "sig": { + "virt_type": { + "type": "string" + } + }, + "additionalProperties": false + }, + "ListCloudImageMetadataResult": { + "type": "object", + "properties": { + "result": { "type": "array", "items": { - "type": "integer" + "$ref": "#/definitions/CloudImageMetadata" } } }, "additionalProperties": false, "required": [ - "data", - "location", - "id", - "caveats", - "sig" + "result" ] }, - "NotifyWatchResult": { + "Macaroon": { "type": "object", "properties": { - "Error": { - "$ref": "#/definitions/Error" + "caveats": { + "type": "array", + "items": { + "$ref": "#/definitions/caveat" + } }, - "NotifyWatcherId": { - "type": "string" + "data": { + "type": "array", + "items": { + "type": "integer" + } + }, + "id": { + "$ref": "#/definitions/packet" + }, + "location": { + "$ref": "#/definitions/packet" + }, + "sig": { + "type": "array", + "items": { + "type": "integer" + } } }, "additionalProperties": false, "required": [ - "NotifyWatcherId", - "Error" + "data", + "location", + "id", + "caveats", + "sig" ] }, - "NotifyWatchResults": { + "MetadataImageIds": { "type": "object", "properties": { - "Results": { + "image_ids": { "type": "array", "items": { - "$ref": "#/definitions/NotifyWatchResult" + "type": "string" } } }, "additionalProperties": false, "required": [ - "Results" + "image_ids" ] }, + "MetadataSaveParams": { + "type": "object", + "properties": { + "metadata": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudImageMetadataList" + } + } + }, + "additionalProperties": false + }, "caveat": { "type": "object", "properties": { @@ -9525,12 +9190,23 @@ } }, { - "Name": "Logger", - "Version": 1, + "Name": "InstancePoller", + "Version": 3, "Schema": { "type": "object", "properties": { - "LoggingConfig": { + "AreManuallyProvisioned": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/BoolResults" + } + } + }, + "InstanceId": { "type": "object", "properties": { "Params": { @@ -9541,137 +9217,144 @@ } } }, - "WatchLoggingConfig": { + "InstanceStatus": { "type": "object", "properties": { "Params": { "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/NotifyWatchResults" + "$ref": "#/definitions/StatusResults" } } - } - }, - "definitions": { - "Entities": { + }, + "Life": { "type": "object", "properties": { - "Entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/LifeResults" } - }, - "additionalProperties": false, - "required": [ - "Entities" - ] + } }, - "Entity": { + "ModelConfig": { "type": "object", "properties": { - "Tag": { - "type": "string" + "Result": { + "$ref": "#/definitions/ModelConfigResult" } - }, - "additionalProperties": false, - "required": [ - "Tag" - ] + } }, - "Error": { + "ProviderAddresses": { "type": "object", "properties": { - "Code": { - "type": "string" + "Params": { + "$ref": "#/definitions/Entities" }, - "Info": { - "$ref": "#/definitions/ErrorInfo" + "Result": { + "$ref": "#/definitions/MachineAddressesResults" + } + } + }, + "SetInstanceStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetStatus" }, - "Message": { - "type": "string" + "Result": { + "$ref": "#/definitions/ErrorResults" } - }, - "additionalProperties": false, - "required": [ - "Message", - "Code" - ] + } }, - "ErrorInfo": { + "SetProviderAddresses": { "type": "object", "properties": { - "Macaroon": { - "$ref": "#/definitions/Macaroon" + "Params": { + "$ref": "#/definitions/SetMachinesAddresses" }, - "MacaroonPath": { - "type": "string" + "Result": { + "$ref": "#/definitions/ErrorResults" } - }, - "additionalProperties": false + } }, - "Macaroon": { + "Status": { "type": "object", "properties": { - "caveats": { - "type": "array", - "items": { - "$ref": "#/definitions/caveat" - } + "Params": { + "$ref": "#/definitions/Entities" }, - "data": { - "type": "array", - "items": { - "type": "integer" - } + "Result": { + "$ref": "#/definitions/StatusResults" + } + } + }, + "WatchForModelConfigChanges": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + } + }, + "WatchModelMachines": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringsWatchResult" + } + } + } + }, + "definitions": { + "Address": { + "type": "object", + "properties": { + "Scope": { + "type": "string" }, - "id": { - "$ref": "#/definitions/packet" + "SpaceName": { + "type": "string" }, - "location": { - "$ref": "#/definitions/packet" + "Type": { + "type": "string" }, - "sig": { - "type": "array", - "items": { - "type": "integer" - } + "Value": { + "type": "string" } }, "additionalProperties": false, "required": [ - "data", - "location", - "id", - "caveats", - "sig" + "Value", + "Type", + "Scope" ] }, - "NotifyWatchResult": { + "BoolResult": { "type": "object", "properties": { "Error": { "$ref": "#/definitions/Error" }, - "NotifyWatcherId": { - "type": "string" + "Result": { + "type": "boolean" } }, "additionalProperties": false, "required": [ - "NotifyWatcherId", - "Error" + "Error", + "Result" ] }, - "NotifyWatchResults": { + "BoolResults": { "type": "object", "properties": { "Results": { "type": "array", "items": { - "$ref": "#/definitions/NotifyWatchResult" + "$ref": "#/definitions/BoolResult" } } }, @@ -9680,370 +9363,356 @@ "Results" ] }, - "StringResult": { + "Entities": { "type": "object", "properties": { - "Error": { - "$ref": "#/definitions/Error" - }, - "Result": { - "type": "string" + "Entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } } }, "additionalProperties": false, "required": [ - "Error", - "Result" + "Entities" ] }, - "StringResults": { + "Entity": { "type": "object", "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringResult" - } + "Tag": { + "type": "string" } }, "additionalProperties": false, "required": [ - "Results" + "Tag" ] }, - "caveat": { + "EntityStatusArgs": { "type": "object", "properties": { - "caveatId": { - "$ref": "#/definitions/packet" + "Data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } }, - "location": { - "$ref": "#/definitions/packet" + "Info": { + "type": "string" }, - "verificationId": { - "$ref": "#/definitions/packet" + "Status": { + "type": "string" + }, + "Tag": { + "type": "string" } }, "additionalProperties": false, "required": [ - "location", - "caveatId", - "verificationId" + "Tag", + "Status", + "Info", + "Data" ] }, - "packet": { + "Error": { "type": "object", "properties": { - "headerLen": { - "type": "integer" + "Code": { + "type": "string" }, - "start": { - "type": "integer" + "Info": { + "$ref": "#/definitions/ErrorInfo" }, - "totalLen": { - "type": "integer" + "Message": { + "type": "string" } }, "additionalProperties": false, "required": [ - "start", - "totalLen", - "headerLen" + "Message", + "Code" ] - } - } - } - }, - { - "Name": "MachineActions", - "Version": 1, - "Schema": { - "type": "object", - "properties": { - "Actions": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ActionResults" - } - } - }, - "BeginActions": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - } }, - "FinishActions": { + "ErrorInfo": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/ActionExecutionResults" + "Macaroon": { + "$ref": "#/definitions/Macaroon" }, - "Result": { - "$ref": "#/definitions/ErrorResults" + "MacaroonPath": { + "type": "string" } - } + }, + "additionalProperties": false }, - "RunningActions": { + "ErrorResult": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ActionsByReceivers" + "Error": { + "$ref": "#/definitions/Error" } - } + }, + "additionalProperties": false, + "required": [ + "Error" + ] }, - "WatchActionNotifications": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - } - } - }, - "definitions": { - "Action": { + "ErrorResults": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "parameters": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } + "Results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" } - }, - "receiver": { - "type": "string" - }, - "tag": { - "type": "string" } }, "additionalProperties": false, "required": [ - "tag", - "receiver", - "name" + "Results" ] }, - "ActionExecutionResult": { + "LifeResult": { "type": "object", "properties": { - "actiontag": { - "type": "string" - }, - "message": { - "type": "string" - }, - "results": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } + "Error": { + "$ref": "#/definitions/Error" }, - "status": { + "Life": { "type": "string" } }, "additionalProperties": false, "required": [ - "actiontag", - "status" + "Life", + "Error" ] }, - "ActionExecutionResults": { + "LifeResults": { "type": "object", "properties": { - "results": { + "Results": { "type": "array", "items": { - "$ref": "#/definitions/ActionExecutionResult" + "$ref": "#/definitions/LifeResult" } } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "Results" + ] }, - "ActionResult": { + "Macaroon": { "type": "object", "properties": { - "action": { - "$ref": "#/definitions/Action" - }, - "completed": { - "type": "string", - "format": "date-time" + "caveats": { + "type": "array", + "items": { + "$ref": "#/definitions/caveat" + } }, - "enqueued": { - "type": "string", - "format": "date-time" + "data": { + "type": "array", + "items": { + "type": "integer" + } }, - "error": { - "$ref": "#/definitions/Error" + "id": { + "$ref": "#/definitions/packet" }, - "message": { - "type": "string" + "location": { + "$ref": "#/definitions/packet" }, - "output": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } + "sig": { + "type": "array", + "items": { + "type": "integer" } - }, - "started": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "data", + "location", + "id", + "caveats", + "sig" + ] }, - "ActionResults": { + "MachineAddresses": { "type": "object", "properties": { - "results": { + "Addresses": { "type": "array", "items": { - "$ref": "#/definitions/ActionResult" + "$ref": "#/definitions/Address" } + }, + "Tag": { + "type": "string" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "Tag", + "Addresses" + ] }, - "ActionsByReceiver": { + "MachineAddressesResult": { "type": "object", "properties": { - "actions": { + "Addresses": { "type": "array", "items": { - "$ref": "#/definitions/ActionResult" + "$ref": "#/definitions/Address" } }, - "error": { + "Error": { "$ref": "#/definitions/Error" - }, - "receiver": { - "type": "string" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "Error", + "Addresses" + ] }, - "ActionsByReceivers": { + "MachineAddressesResults": { "type": "object", "properties": { - "actions": { + "Results": { "type": "array", "items": { - "$ref": "#/definitions/ActionsByReceiver" + "$ref": "#/definitions/MachineAddressesResult" } } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "Results" + ] }, - "Entities": { + "ModelConfigResult": { "type": "object", "properties": { - "Entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" + "Config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } } } }, "additionalProperties": false, "required": [ - "Entities" + "Config" ] }, - "Entity": { + "NotifyWatchResult": { "type": "object", "properties": { - "Tag": { + "Error": { + "$ref": "#/definitions/Error" + }, + "NotifyWatcherId": { "type": "string" } }, "additionalProperties": false, "required": [ - "Tag" + "NotifyWatcherId", + "Error" ] }, - "Error": { + "SetMachinesAddresses": { "type": "object", "properties": { - "Code": { - "type": "string" - }, - "Info": { - "$ref": "#/definitions/ErrorInfo" - }, - "Message": { - "type": "string" + "MachineAddresses": { + "type": "array", + "items": { + "$ref": "#/definitions/MachineAddresses" + } } }, "additionalProperties": false, "required": [ - "Message", - "Code" + "MachineAddresses" ] }, - "ErrorInfo": { + "SetStatus": { "type": "object", "properties": { - "Macaroon": { - "$ref": "#/definitions/Macaroon" - }, - "MacaroonPath": { - "type": "string" + "Entities": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityStatusArgs" + } } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "Entities" + ] }, - "ErrorResult": { + "StatusResult": { "type": "object", "properties": { + "Data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, "Error": { "$ref": "#/definitions/Error" + }, + "Id": { + "type": "string" + }, + "Info": { + "type": "string" + }, + "Life": { + "type": "string" + }, + "Since": { + "type": "string", + "format": "date-time" + }, + "Status": { + "type": "string" } }, "additionalProperties": false, "required": [ - "Error" + "Error", + "Id", + "Life", + "Status", + "Info", + "Data", + "Since" ] }, - "ErrorResults": { + "StatusResults": { "type": "object", "properties": { "Results": { "type": "array", "items": { - "$ref": "#/definitions/ErrorResult" + "$ref": "#/definitions/StatusResult" } } }, @@ -10052,41 +9721,35 @@ "Results" ] }, - "Macaroon": { + "StringResult": { "type": "object", "properties": { - "caveats": { - "type": "array", - "items": { - "$ref": "#/definitions/caveat" - } - }, - "data": { - "type": "array", - "items": { - "type": "integer" - } - }, - "id": { - "$ref": "#/definitions/packet" - }, - "location": { - "$ref": "#/definitions/packet" + "Error": { + "$ref": "#/definitions/Error" }, - "sig": { + "Result": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Error", + "Result" + ] + }, + "StringResults": { + "type": "object", + "properties": { + "Results": { "type": "array", "items": { - "type": "integer" + "$ref": "#/definitions/StringResult" } } }, "additionalProperties": false, "required": [ - "data", - "location", - "id", - "caveats", - "sig" + "Results" ] }, "StringsWatchResult": { @@ -10112,21 +9775,6 @@ "Error" ] }, - "StringsWatchResults": { - "type": "object", - "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" - } - } - }, - "additionalProperties": false, - "required": [ - "Results" - ] - }, "caveat": { "type": "object", "properties": { @@ -10171,235 +9819,158 @@ } }, { - "Name": "MachineManager", - "Version": 2, + "Name": "KeyManager", + "Version": 1, "Schema": { "type": "object", "properties": { - "AddMachines": { + "AddKeys": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/AddMachines" + "$ref": "#/definitions/ModifyUserSSHKeys" }, "Result": { - "$ref": "#/definitions/AddMachinesResults" + "$ref": "#/definitions/ErrorResults" + } + } + }, + "DeleteKeys": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModifyUserSSHKeys" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + } + }, + "ImportKeys": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModifyUserSSHKeys" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + } + }, + "ListKeys": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ListSSHKeys" + }, + "Result": { + "$ref": "#/definitions/StringsResults" } } } }, "definitions": { - "AddMachineParams": { + "Entities": { "type": "object", "properties": { - "Addrs": { + "Entities": { "type": "array", "items": { - "$ref": "#/definitions/Address" + "$ref": "#/definitions/Entity" } - }, - "Constraints": { - "$ref": "#/definitions/Value" - }, - "ContainerType": { + } + }, + "additionalProperties": false, + "required": [ + "Entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "Tag": { "type": "string" - }, - "Disks": { - "type": "array", - "items": { - "$ref": "#/definitions/Constraints" - } - }, - "HardwareCharacteristics": { - "$ref": "#/definitions/HardwareCharacteristics" - }, - "InstanceId": { - "type": "string" - }, - "Jobs": { - "type": "array", - "items": { - "type": "string" - } - }, - "Nonce": { - "type": "string" - }, - "ParentId": { - "type": "string" - }, - "Placement": { - "$ref": "#/definitions/Placement" - }, - "Series": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Series", - "Constraints", - "Jobs", - "Disks", - "Placement", - "ParentId", - "ContainerType", - "InstanceId", - "Nonce", - "HardwareCharacteristics", - "Addrs" - ] - }, - "AddMachines": { - "type": "object", - "properties": { - "MachineParams": { - "type": "array", - "items": { - "$ref": "#/definitions/AddMachineParams" - } } }, "additionalProperties": false, "required": [ - "MachineParams" + "Tag" ] }, - "AddMachinesResult": { + "Error": { "type": "object", "properties": { - "Error": { - "$ref": "#/definitions/Error" + "Code": { + "type": "string" }, - "Machine": { + "Info": { + "$ref": "#/definitions/ErrorInfo" + }, + "Message": { "type": "string" } }, "additionalProperties": false, "required": [ - "Machine", - "Error" + "Message", + "Code" ] }, - "AddMachinesResults": { + "ErrorInfo": { "type": "object", "properties": { - "Machines": { - "type": "array", - "items": { - "$ref": "#/definitions/AddMachinesResult" - } + "Macaroon": { + "$ref": "#/definitions/Macaroon" + }, + "MacaroonPath": { + "type": "string" } }, - "additionalProperties": false, - "required": [ - "Machines" - ] + "additionalProperties": false }, - "Address": { + "ErrorResult": { "type": "object", "properties": { - "Scope": { - "type": "string" - }, - "SpaceName": { - "type": "string" - }, - "Type": { - "type": "string" - }, - "Value": { - "type": "string" + "Error": { + "$ref": "#/definitions/Error" } }, "additionalProperties": false, "required": [ - "Value", - "Type", - "Scope" + "Error" ] }, - "Constraints": { + "ErrorResults": { "type": "object", "properties": { - "Count": { - "type": "integer" - }, - "Pool": { - "type": "string" - }, - "Size": { - "type": "integer" + "Results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } } }, "additionalProperties": false, "required": [ - "Pool", - "Size", - "Count" + "Results" ] }, - "Error": { + "ListSSHKeys": { "type": "object", "properties": { - "Code": { - "type": "string" - }, - "Info": { - "$ref": "#/definitions/ErrorInfo" + "Entities": { + "$ref": "#/definitions/Entities" }, - "Message": { - "type": "string" + "Mode": { + "type": "boolean" } }, "additionalProperties": false, "required": [ - "Message", - "Code" + "Entities", + "Mode" ] }, - "ErrorInfo": { - "type": "object", - "properties": { - "Macaroon": { - "$ref": "#/definitions/Macaroon" - }, - "MacaroonPath": { - "type": "string" - } - }, - "additionalProperties": false - }, - "HardwareCharacteristics": { - "type": "object", - "properties": { - "Arch": { - "type": "string" - }, - "AvailabilityZone": { - "type": "string" - }, - "CpuCores": { - "type": "integer" - }, - "CpuPower": { - "type": "integer" - }, - "Mem": { - "type": "integer" - }, - "RootDisk": { - "type": "integer" - }, - "Tags": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, "Macaroon": { "type": "object", "properties": { @@ -10437,63 +10008,58 @@ "sig" ] }, - "Placement": { + "ModifyUserSSHKeys": { "type": "object", "properties": { - "Directive": { - "type": "string" + "Keys": { + "type": "array", + "items": { + "type": "string" + } }, - "Scope": { + "User": { "type": "string" } }, "additionalProperties": false, "required": [ - "Scope", - "Directive" + "User", + "Keys" ] }, - "Value": { + "StringsResult": { "type": "object", "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" + "Error": { + "$ref": "#/definitions/Error" }, - "spaces": { + "Result": { "type": "array", "items": { "type": "string" } - }, - "tags": { + } + }, + "additionalProperties": false, + "required": [ + "Error", + "Result" + ] + }, + "StringsResults": { + "type": "object", + "properties": { + "Results": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/StringsResult" } - }, - "virt-type": { - "type": "string" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "Results" + ] }, "caveat": { "type": "object", @@ -10539,205 +10105,35 @@ } }, { - "Name": "Machiner", + "Name": "KeyUpdater", "Version": 1, "Schema": { "type": "object", "properties": { - "APIAddresses": { + "AuthorisedKeys": { "type": "object", "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, "Result": { - "$ref": "#/definitions/StringsResult" + "$ref": "#/definitions/StringsResults" } } }, - "APIHostPorts": { + "WatchAuthorisedKeys": { "type": "object", "properties": { - "Result": { - "$ref": "#/definitions/APIHostPortsResult" - } - } - }, - "CACert": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/BytesResult" - } - } - }, - "EnsureDead": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - } - }, - "Jobs": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/JobsResults" - } - } - }, - "Life": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/LifeResults" - } - } - }, - "ModelUUID": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringResult" - } - } - }, - "SetMachineAddresses": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetMachinesAddresses" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - } - }, - "SetObservedNetworkConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetMachineNetworkConfig" - } - } - }, - "SetProviderNetworkConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - } - }, - "SetStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - } - }, - "UpdateStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - } - }, - "Watch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, + "Params": { + "$ref": "#/definitions/Entities" + }, "Result": { "$ref": "#/definitions/NotifyWatchResults" } } - }, - "WatchAPIHostPorts": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - } } }, "definitions": { - "APIHostPortsResult": { - "type": "object", - "properties": { - "Servers": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/HostPort" - } - } - } - }, - "additionalProperties": false, - "required": [ - "Servers" - ] - }, - "Address": { - "type": "object", - "properties": { - "Scope": { - "type": "string" - }, - "SpaceName": { - "type": "string" - }, - "Type": { - "type": "string" - }, - "Value": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Value", - "Type", - "Scope" - ] - }, - "BytesResult": { - "type": "object", - "properties": { - "Result": { - "type": "array", - "items": { - "type": "integer" - } - } - }, - "additionalProperties": false, - "required": [ - "Result" - ] - }, "Entities": { "type": "object", "properties": { @@ -10765,36 +10161,6 @@ "Tag" ] }, - "EntityStatusArgs": { - "type": "object", - "properties": { - "Data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "Info": { - "type": "string" - }, - "Status": { - "type": "string" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Tag", - "Status", - "Info", - "Data" - ] - }, "Error": { "type": "object", "properties": { @@ -10826,25 +10192,66 @@ }, "additionalProperties": false }, - "ErrorResult": { + "Macaroon": { + "type": "object", + "properties": { + "caveats": { + "type": "array", + "items": { + "$ref": "#/definitions/caveat" + } + }, + "data": { + "type": "array", + "items": { + "type": "integer" + } + }, + "id": { + "$ref": "#/definitions/packet" + }, + "location": { + "$ref": "#/definitions/packet" + }, + "sig": { + "type": "array", + "items": { + "type": "integer" + } + } + }, + "additionalProperties": false, + "required": [ + "data", + "location", + "id", + "caveats", + "sig" + ] + }, + "NotifyWatchResult": { "type": "object", "properties": { "Error": { "$ref": "#/definitions/Error" + }, + "NotifyWatcherId": { + "type": "string" } }, "additionalProperties": false, "required": [ + "NotifyWatcherId", "Error" ] }, - "ErrorResults": { + "NotifyWatchResults": { "type": "object", "properties": { "Results": { "type": "array", "items": { - "$ref": "#/definitions/ErrorResult" + "$ref": "#/definitions/NotifyWatchResult" } } }, @@ -10853,48 +10260,147 @@ "Results" ] }, - "HostPort": { + "StringsResult": { "type": "object", "properties": { - "Address": { - "$ref": "#/definitions/Address" + "Error": { + "$ref": "#/definitions/Error" }, - "Port": { + "Result": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "Error", + "Result" + ] + }, + "StringsResults": { + "type": "object", + "properties": { + "Results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringsResult" + } + } + }, + "additionalProperties": false, + "required": [ + "Results" + ] + }, + "caveat": { + "type": "object", + "properties": { + "caveatId": { + "$ref": "#/definitions/packet" + }, + "location": { + "$ref": "#/definitions/packet" + }, + "verificationId": { + "$ref": "#/definitions/packet" + } + }, + "additionalProperties": false, + "required": [ + "location", + "caveatId", + "verificationId" + ] + }, + "packet": { + "type": "object", + "properties": { + "headerLen": { + "type": "integer" + }, + "start": { + "type": "integer" + }, + "totalLen": { "type": "integer" } }, "additionalProperties": false, "required": [ - "Address", - "Port" + "start", + "totalLen", + "headerLen" ] + } + } + } + }, + { + "Name": "LeadershipService", + "Version": 2, + "Schema": { + "type": "object", + "properties": { + "BlockUntilLeadershipReleased": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ApplicationTag" + }, + "Result": { + "$ref": "#/definitions/ErrorResult" + } + } }, - "JobsResult": { + "ClaimLeadership": { "type": "object", "properties": { - "Error": { - "$ref": "#/definitions/Error" + "Params": { + "$ref": "#/definitions/ClaimLeadershipBulkParams" }, - "Jobs": { + "Result": { + "$ref": "#/definitions/ClaimLeadershipBulkResults" + } + } + } + }, + "definitions": { + "ApplicationTag": { + "type": "object", + "properties": { + "Name": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Name" + ] + }, + "ClaimLeadershipBulkParams": { + "type": "object", + "properties": { + "Params": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/ClaimLeadershipParams" } } }, "additionalProperties": false, "required": [ - "Jobs", - "Error" + "Params" ] }, - "JobsResults": { + "ClaimLeadershipBulkResults": { "type": "object", "properties": { "Results": { "type": "array", "items": { - "$ref": "#/definitions/JobsResult" + "$ref": "#/definitions/ErrorResult" } } }, @@ -10903,35 +10409,67 @@ "Results" ] }, - "LifeResult": { + "ClaimLeadershipParams": { "type": "object", "properties": { - "Error": { - "$ref": "#/definitions/Error" + "ApplicationTag": { + "type": "string" }, - "Life": { + "DurationSeconds": { + "type": "number" + }, + "UnitTag": { "type": "string" } }, "additionalProperties": false, "required": [ - "Life", - "Error" + "ApplicationTag", + "UnitTag", + "DurationSeconds" ] }, - "LifeResults": { + "Error": { "type": "object", "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } + "Code": { + "type": "string" + }, + "Info": { + "$ref": "#/definitions/ErrorInfo" + }, + "Message": { + "type": "string" } }, "additionalProperties": false, "required": [ - "Results" + "Message", + "Code" + ] + }, + "ErrorInfo": { + "type": "object", + "properties": { + "Macaroon": { + "$ref": "#/definitions/Macaroon" + }, + "MacaroonPath": { + "type": "string" + } + }, + "additionalProperties": false + }, + "ErrorResult": { + "type": "object", + "properties": { + "Error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "Error" ] }, "Macaroon": { @@ -10971,226 +10509,234 @@ "sig" ] }, - "MachineAddresses": { + "caveat": { "type": "object", "properties": { - "Addresses": { - "type": "array", - "items": { - "$ref": "#/definitions/Address" - } + "caveatId": { + "$ref": "#/definitions/packet" }, - "Tag": { - "type": "string" + "location": { + "$ref": "#/definitions/packet" + }, + "verificationId": { + "$ref": "#/definitions/packet" } }, "additionalProperties": false, "required": [ - "Tag", - "Addresses" + "location", + "caveatId", + "verificationId" ] }, - "NetworkConfig": { + "packet": { "type": "object", "properties": { - "Address": { - "type": "string" - }, - "CIDR": { - "type": "string" - }, - "ConfigType": { - "type": "string" - }, - "DNSSearchDomains": { - "type": "array", - "items": { - "type": "string" - } - }, - "DNSServers": { - "type": "array", - "items": { - "type": "string" - } - }, - "DeviceIndex": { + "headerLen": { "type": "integer" }, - "Disabled": { - "type": "boolean" - }, - "GatewayAddress": { - "type": "string" - }, - "InterfaceName": { - "type": "string" - }, - "InterfaceType": { - "type": "string" - }, - "MACAddress": { - "type": "string" - }, - "MTU": { + "start": { "type": "integer" }, - "NoAutoStart": { - "type": "boolean" - }, - "ParentInterfaceName": { - "type": "string" - }, - "ProviderAddressId": { - "type": "string" - }, - "ProviderId": { - "type": "string" - }, - "ProviderSpaceId": { - "type": "string" - }, - "ProviderSubnetId": { - "type": "string" - }, - "ProviderVLANId": { - "type": "string" - }, - "VLANTag": { + "totalLen": { "type": "integer" } }, "additionalProperties": false, "required": [ - "DeviceIndex", - "MACAddress", - "CIDR", - "MTU", - "ProviderId", - "ProviderSubnetId", - "ProviderSpaceId", - "ProviderAddressId", - "ProviderVLANId", - "VLANTag", - "InterfaceName", - "ParentInterfaceName", - "InterfaceType", - "Disabled" + "start", + "totalLen", + "headerLen" ] + } + } + } + }, + { + "Name": "LifeFlag", + "Version": 1, + "Schema": { + "type": "object", + "properties": { + "Life": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/LifeResults" + } + } }, - "NotifyWatchResult": { + "Watch": { "type": "object", "properties": { - "Error": { - "$ref": "#/definitions/Error" + "Params": { + "$ref": "#/definitions/Entities" }, - "NotifyWatcherId": { + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + } + } + }, + "definitions": { + "Entities": { + "type": "object", + "properties": { + "Entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "Entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "Tag": { "type": "string" } }, "additionalProperties": false, "required": [ - "NotifyWatcherId", - "Error" + "Tag" ] }, - "NotifyWatchResults": { + "Error": { "type": "object", "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } + "Code": { + "type": "string" + }, + "Info": { + "$ref": "#/definitions/ErrorInfo" + }, + "Message": { + "type": "string" } }, "additionalProperties": false, "required": [ - "Results" + "Message", + "Code" ] }, - "SetMachineNetworkConfig": { + "ErrorInfo": { "type": "object", "properties": { - "Config": { - "type": "array", - "items": { - "$ref": "#/definitions/NetworkConfig" - } + "Macaroon": { + "$ref": "#/definitions/Macaroon" }, - "Tag": { + "MacaroonPath": { + "type": "string" + } + }, + "additionalProperties": false + }, + "LifeResult": { + "type": "object", + "properties": { + "Error": { + "$ref": "#/definitions/Error" + }, + "Life": { "type": "string" } }, "additionalProperties": false, "required": [ - "Tag", - "Config" + "Life", + "Error" ] }, - "SetMachinesAddresses": { + "LifeResults": { "type": "object", "properties": { - "MachineAddresses": { + "Results": { "type": "array", "items": { - "$ref": "#/definitions/MachineAddresses" + "$ref": "#/definitions/LifeResult" } } }, "additionalProperties": false, "required": [ - "MachineAddresses" + "Results" ] }, - "SetStatus": { + "Macaroon": { "type": "object", "properties": { - "Entities": { + "caveats": { "type": "array", "items": { - "$ref": "#/definitions/EntityStatusArgs" + "$ref": "#/definitions/caveat" + } + }, + "data": { + "type": "array", + "items": { + "type": "integer" + } + }, + "id": { + "$ref": "#/definitions/packet" + }, + "location": { + "$ref": "#/definitions/packet" + }, + "sig": { + "type": "array", + "items": { + "type": "integer" } } }, "additionalProperties": false, "required": [ - "Entities" + "data", + "location", + "id", + "caveats", + "sig" ] }, - "StringResult": { + "NotifyWatchResult": { "type": "object", "properties": { "Error": { "$ref": "#/definitions/Error" }, - "Result": { + "NotifyWatcherId": { "type": "string" } }, "additionalProperties": false, "required": [ - "Error", - "Result" + "NotifyWatcherId", + "Error" ] }, - "StringsResult": { + "NotifyWatchResults": { "type": "object", "properties": { - "Error": { - "$ref": "#/definitions/Error" - }, - "Result": { + "Results": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/NotifyWatchResult" } } }, "additionalProperties": false, "required": [ - "Error", - "Result" + "Results" ] }, "caveat": { @@ -11237,23 +10783,23 @@ } }, { - "Name": "MeterStatus", + "Name": "Logger", "Version": 1, "Schema": { "type": "object", "properties": { - "GetMeterStatus": { + "LoggingConfig": { "type": "object", "properties": { "Params": { "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/MeterStatusResults" + "$ref": "#/definitions/StringResults" } } }, - "WatchMeterStatus": { + "WatchLoggingConfig": { "type": "object", "properties": { "Params": { @@ -11361,33 +10907,29 @@ "sig" ] }, - "MeterStatusResult": { + "NotifyWatchResult": { "type": "object", "properties": { - "Code": { - "type": "string" - }, "Error": { "$ref": "#/definitions/Error" }, - "Info": { + "NotifyWatcherId": { "type": "string" } }, "additionalProperties": false, "required": [ - "Code", - "Info", + "NotifyWatcherId", "Error" ] }, - "MeterStatusResults": { + "NotifyWatchResults": { "type": "object", "properties": { "Results": { "type": "array", "items": { - "$ref": "#/definitions/MeterStatusResult" + "$ref": "#/definitions/NotifyWatchResult" } } }, @@ -11396,29 +10938,29 @@ "Results" ] }, - "NotifyWatchResult": { + "StringResult": { "type": "object", "properties": { "Error": { "$ref": "#/definitions/Error" }, - "NotifyWatcherId": { + "Result": { "type": "string" } }, "additionalProperties": false, "required": [ - "NotifyWatcherId", - "Error" + "Error", + "Result" ] }, - "NotifyWatchResults": { + "StringResults": { "type": "object", "properties": { "Results": { "type": "array", "items": { - "$ref": "#/definitions/NotifyWatchResult" + "$ref": "#/definitions/StringResult" } } }, @@ -11471,44 +11013,265 @@ } }, { - "Name": "MetricsAdder", - "Version": 2, + "Name": "MachineActions", + "Version": 1, "Schema": { "type": "object", "properties": { - "AddMetricBatches": { + "Actions": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/MetricBatchParams" + "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/ErrorResults" + "$ref": "#/definitions/ActionResults" } } - } - }, - "definitions": { - "Error": { + }, + "BeginActions": { "type": "object", "properties": { - "Code": { - "type": "string" - }, - "Info": { - "$ref": "#/definitions/ErrorInfo" + "Params": { + "$ref": "#/definitions/Entities" }, - "Message": { - "type": "string" + "Result": { + "$ref": "#/definitions/ErrorResults" } - }, - "additionalProperties": false, - "required": [ - "Message", - "Code" - ] + } }, - "ErrorInfo": { + "FinishActions": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ActionExecutionResults" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + } + }, + "RunningActions": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ActionsByReceivers" + } + } + }, + "WatchActionNotifications": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringsWatchResults" + } + } + } + }, + "definitions": { + "Action": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "parameters": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "receiver": { + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "tag", + "receiver", + "name" + ] + }, + "ActionExecutionResult": { + "type": "object", + "properties": { + "actiontag": { + "type": "string" + }, + "message": { + "type": "string" + }, + "results": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "actiontag", + "status" + ] + }, + "ActionExecutionResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ActionExecutionResult" + } + } + }, + "additionalProperties": false + }, + "ActionResult": { + "type": "object", + "properties": { + "action": { + "$ref": "#/definitions/Action" + }, + "completed": { + "type": "string", + "format": "date-time" + }, + "enqueued": { + "type": "string", + "format": "date-time" + }, + "error": { + "$ref": "#/definitions/Error" + }, + "message": { + "type": "string" + }, + "output": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "started": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "string" + } + }, + "additionalProperties": false + }, + "ActionResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/ActionResult" + } + } + }, + "additionalProperties": false + }, + "ActionsByReceiver": { + "type": "object", + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/definitions/ActionResult" + } + }, + "error": { + "$ref": "#/definitions/Error" + }, + "receiver": { + "type": "string" + } + }, + "additionalProperties": false + }, + "ActionsByReceivers": { + "type": "object", + "properties": { + "actions": { + "type": "array", + "items": { + "$ref": "#/definitions/ActionsByReceiver" + } + } + }, + "additionalProperties": false + }, + "Entities": { + "type": "object", + "properties": { + "Entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "Entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "Tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Tag" + ] + }, + "Error": { + "type": "object", + "properties": { + "Code": { + "type": "string" + }, + "Info": { + "$ref": "#/definitions/ErrorInfo" + }, + "Message": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Message", + "Code" + ] + }, + "ErrorInfo": { "type": "object", "properties": { "Macaroon": { @@ -11584,84 +11347,42 @@ "sig" ] }, - "Metric": { + "StringsWatchResult": { "type": "object", "properties": { - "Key": { - "type": "string" + "Changes": { + "type": "array", + "items": { + "type": "string" + } }, - "Time": { - "type": "string", - "format": "date-time" + "Error": { + "$ref": "#/definitions/Error" }, - "Value": { + "StringsWatcherId": { "type": "string" } }, "additionalProperties": false, "required": [ - "Key", - "Value", - "Time" + "StringsWatcherId", + "Changes", + "Error" ] }, - "MetricBatch": { + "StringsWatchResults": { "type": "object", "properties": { - "CharmURL": { - "type": "string" - }, - "Created": { - "type": "string", - "format": "date-time" - }, - "Metrics": { - "type": "array", - "items": { - "$ref": "#/definitions/Metric" - } - }, - "UUID": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "UUID", - "CharmURL", - "Created", - "Metrics" - ] - }, - "MetricBatchParam": { - "type": "object", - "properties": { - "Batch": { - "$ref": "#/definitions/MetricBatch" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Tag", - "Batch" - ] - }, - "MetricBatchParams": { - "type": "object", - "properties": { - "Batches": { + "Results": { "type": "array", "items": { - "$ref": "#/definitions/MetricBatchParam" + "$ref": "#/definitions/StringsWatchResult" } } }, "additionalProperties": false, "required": [ - "Batches" + "Results" ] }, "caveat": { @@ -11708,76 +11429,173 @@ } }, { - "Name": "MetricsDebug", - "Version": 1, + "Name": "MachineManager", + "Version": 2, "Schema": { "type": "object", "properties": { - "GetMetrics": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/MetricResults" - } - } - }, - "SetMeterStatus": { + "AddMachines": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/MeterStatusParams" + "$ref": "#/definitions/AddMachines" }, "Result": { - "$ref": "#/definitions/ErrorResults" + "$ref": "#/definitions/AddMachinesResults" } } } }, "definitions": { - "Entities": { + "AddMachineParams": { "type": "object", "properties": { - "Entities": { + "Addrs": { "type": "array", "items": { - "$ref": "#/definitions/Entity" + "$ref": "#/definitions/Address" + } + }, + "Constraints": { + "$ref": "#/definitions/Value" + }, + "ContainerType": { + "type": "string" + }, + "Disks": { + "type": "array", + "items": { + "$ref": "#/definitions/Constraints" + } + }, + "HardwareCharacteristics": { + "$ref": "#/definitions/HardwareCharacteristics" + }, + "InstanceId": { + "type": "string" + }, + "Jobs": { + "type": "array", + "items": { + "type": "string" } + }, + "Nonce": { + "type": "string" + }, + "ParentId": { + "type": "string" + }, + "Placement": { + "$ref": "#/definitions/Placement" + }, + "Series": { + "type": "string" } }, "additionalProperties": false, "required": [ - "Entities" + "Series", + "Constraints", + "Jobs", + "Disks", + "Placement", + "ParentId", + "ContainerType", + "InstanceId", + "Nonce", + "HardwareCharacteristics", + "Addrs" ] }, - "Entity": { + "AddMachines": { "type": "object", "properties": { - "Tag": { - "type": "string" + "MachineParams": { + "type": "array", + "items": { + "$ref": "#/definitions/AddMachineParams" + } } }, "additionalProperties": false, "required": [ - "Tag" + "MachineParams" ] }, - "EntityMetrics": { + "AddMachinesResult": { "type": "object", "properties": { - "error": { + "Error": { "$ref": "#/definitions/Error" }, - "metrics": { + "Machine": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Machine", + "Error" + ] + }, + "AddMachinesResults": { + "type": "object", + "properties": { + "Machines": { "type": "array", "items": { - "$ref": "#/definitions/MetricResult" + "$ref": "#/definitions/AddMachinesResult" } } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "Machines" + ] + }, + "Address": { + "type": "object", + "properties": { + "Scope": { + "type": "string" + }, + "SpaceName": { + "type": "string" + }, + "Type": { + "type": "string" + }, + "Value": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Value", + "Type", + "Scope" + ] + }, + "Constraints": { + "type": "object", + "properties": { + "Count": { + "type": "integer" + }, + "Pool": { + "type": "string" + }, + "Size": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "Pool", + "Size", + "Count" + ] }, "Error": { "type": "object", @@ -11810,32 +11628,35 @@ }, "additionalProperties": false }, - "ErrorResult": { - "type": "object", - "properties": { - "Error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "Error" - ] - }, - "ErrorResults": { + "HardwareCharacteristics": { "type": "object", "properties": { - "Results": { + "Arch": { + "type": "string" + }, + "AvailabilityZone": { + "type": "string" + }, + "CpuCores": { + "type": "integer" + }, + "CpuPower": { + "type": "integer" + }, + "Mem": { + "type": "integer" + }, + "RootDisk": { + "type": "integer" + }, + "Tags": { "type": "array", "items": { - "$ref": "#/definitions/ErrorResult" + "type": "string" } } }, - "additionalProperties": false, - "required": [ - "Results" - ] + "additionalProperties": false }, "Macaroon": { "type": "object", @@ -11874,76 +11695,63 @@ "sig" ] }, - "MeterStatusParam": { + "Placement": { "type": "object", "properties": { - "code": { - "type": "string" - }, - "info": { + "Directive": { "type": "string" }, - "tag": { + "Scope": { "type": "string" } }, "additionalProperties": false, "required": [ - "tag", - "code", - "info" - ] - }, - "MeterStatusParams": { - "type": "object", - "properties": { - "statues": { - "type": "array", - "items": { - "$ref": "#/definitions/MeterStatusParam" - } - } - }, - "additionalProperties": false, - "required": [ - "statues" + "Scope", + "Directive" ] }, - "MetricResult": { + "Value": { "type": "object", "properties": { - "key": { + "arch": { "type": "string" }, - "time": { - "type": "string", - "format": "date-time" + "container": { + "type": "string" }, - "value": { + "cpu-cores": { + "type": "integer" + }, + "cpu-power": { + "type": "integer" + }, + "instance-type": { "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "time", - "key", - "value" - ] - }, - "MetricResults": { - "type": "object", - "properties": { - "results": { + }, + "mem": { + "type": "integer" + }, + "root-disk": { + "type": "integer" + }, + "spaces": { "type": "array", "items": { - "$ref": "#/definitions/EntityMetrics" + "type": "string" + } + }, + "tags": { + "type": "array", + "items": { + "type": "string" } + }, + "virt-type": { + "type": "string" } }, - "additionalProperties": false, - "required": [ - "results" - ] + "additionalProperties": false }, "caveat": { "type": "object", @@ -11989,12 +11797,36 @@ } }, { - "Name": "MetricsManager", + "Name": "Machiner", "Version": 1, "Schema": { "type": "object", "properties": { - "CleanupOldMetrics": { + "APIAddresses": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringsResult" + } + } + }, + "APIHostPorts": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/APIHostPortsResult" + } + } + }, + "CACert": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/BytesResult" + } + } + }, + "EnsureDead": { "type": "object", "properties": { "Params": { @@ -12005,214 +11837,165 @@ } } }, - "SendMetrics": { + "Jobs": { "type": "object", "properties": { "Params": { "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/ErrorResults" + "$ref": "#/definitions/JobsResults" } } - } - }, - "definitions": { - "Entities": { + }, + "Life": { "type": "object", "properties": { - "Entities": { - "type": "array", - "items": { - "$ref": "#/definitions/Entity" - } + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/LifeResults" } - }, - "additionalProperties": false, - "required": [ - "Entities" - ] + } }, - "Entity": { + "ModelUUID": { "type": "object", "properties": { - "Tag": { - "type": "string" + "Result": { + "$ref": "#/definitions/StringResult" } - }, - "additionalProperties": false, - "required": [ - "Tag" - ] + } }, - "Error": { + "SetMachineAddresses": { "type": "object", "properties": { - "Code": { - "type": "string" + "Params": { + "$ref": "#/definitions/SetMachinesAddresses" }, - "Info": { - "$ref": "#/definitions/ErrorInfo" + "Result": { + "$ref": "#/definitions/ErrorResults" + } + } + }, + "SetObservedNetworkConfig": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetMachineNetworkConfig" + } + } + }, + "SetProviderNetworkConfig": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" }, - "Message": { - "type": "string" + "Result": { + "$ref": "#/definitions/ErrorResults" } - }, - "additionalProperties": false, - "required": [ - "Message", - "Code" - ] + } }, - "ErrorInfo": { + "SetStatus": { "type": "object", "properties": { - "Macaroon": { - "$ref": "#/definitions/Macaroon" + "Params": { + "$ref": "#/definitions/SetStatus" }, - "MacaroonPath": { - "type": "string" + "Result": { + "$ref": "#/definitions/ErrorResults" } - }, - "additionalProperties": false + } }, - "ErrorResult": { + "UpdateStatus": { "type": "object", "properties": { - "Error": { - "$ref": "#/definitions/Error" + "Params": { + "$ref": "#/definitions/SetStatus" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" } - }, - "additionalProperties": false, - "required": [ - "Error" - ] + } }, - "ErrorResults": { + "Watch": { "type": "object", "properties": { - "Results": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" + } + } + }, + "WatchAPIHostPorts": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + } + } + }, + "definitions": { + "APIHostPortsResult": { + "type": "object", + "properties": { + "Servers": { "type": "array", "items": { - "$ref": "#/definitions/ErrorResult" + "type": "array", + "items": { + "$ref": "#/definitions/HostPort" + } } } }, "additionalProperties": false, "required": [ - "Results" + "Servers" ] }, - "Macaroon": { + "Address": { "type": "object", "properties": { - "caveats": { - "type": "array", - "items": { - "$ref": "#/definitions/caveat" - } + "Scope": { + "type": "string" }, - "data": { - "type": "array", - "items": { - "type": "integer" - } + "SpaceName": { + "type": "string" }, - "id": { - "$ref": "#/definitions/packet" + "Type": { + "type": "string" }, - "location": { - "$ref": "#/definitions/packet" - }, - "sig": { - "type": "array", - "items": { - "type": "integer" - } - } - }, - "additionalProperties": false, - "required": [ - "data", - "location", - "id", - "caveats", - "sig" - ] - }, - "caveat": { - "type": "object", - "properties": { - "caveatId": { - "$ref": "#/definitions/packet" - }, - "location": { - "$ref": "#/definitions/packet" - }, - "verificationId": { - "$ref": "#/definitions/packet" + "Value": { + "type": "string" } }, "additionalProperties": false, "required": [ - "location", - "caveatId", - "verificationId" + "Value", + "Type", + "Scope" ] }, - "packet": { + "BytesResult": { "type": "object", "properties": { - "headerLen": { - "type": "integer" - }, - "start": { - "type": "integer" - }, - "totalLen": { - "type": "integer" + "Result": { + "type": "array", + "items": { + "type": "integer" + } } }, "additionalProperties": false, "required": [ - "start", - "totalLen", - "headerLen" + "Result" ] - } - } - } - }, - { - "Name": "MigrationFlag", - "Version": 1, - "Schema": { - "type": "object", - "properties": { - "Phase": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/PhaseResults" - } - } }, - "Watch": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - } - } - }, - "definitions": { "Entities": { "type": "object", "properties": { @@ -12240,6 +12023,36 @@ "Tag" ] }, + "EntityStatusArgs": { + "type": "object", + "properties": { + "Data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "Info": { + "type": "string" + }, + "Status": { + "type": "string" + }, + "Tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Tag", + "Status", + "Info", + "Data" + ] + }, "Error": { "type": "object", "properties": { @@ -12271,66 +12084,75 @@ }, "additionalProperties": false }, - "Macaroon": { + "ErrorResult": { "type": "object", "properties": { - "caveats": { - "type": "array", - "items": { - "$ref": "#/definitions/caveat" - } - }, - "data": { + "Error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false, + "required": [ + "Error" + ] + }, + "ErrorResults": { + "type": "object", + "properties": { + "Results": { "type": "array", "items": { - "type": "integer" + "$ref": "#/definitions/ErrorResult" } + } + }, + "additionalProperties": false, + "required": [ + "Results" + ] + }, + "HostPort": { + "type": "object", + "properties": { + "Address": { + "$ref": "#/definitions/Address" }, - "id": { - "$ref": "#/definitions/packet" - }, - "location": { - "$ref": "#/definitions/packet" - }, - "sig": { - "type": "array", - "items": { - "type": "integer" - } + "Port": { + "type": "integer" } }, "additionalProperties": false, "required": [ - "data", - "location", - "id", - "caveats", - "sig" + "Address", + "Port" ] }, - "NotifyWatchResult": { + "JobsResult": { "type": "object", "properties": { "Error": { "$ref": "#/definitions/Error" }, - "NotifyWatcherId": { - "type": "string" + "Jobs": { + "type": "array", + "items": { + "type": "string" + } } }, "additionalProperties": false, "required": [ - "NotifyWatcherId", + "Jobs", "Error" ] }, - "NotifyWatchResults": { + "JobsResults": { "type": "object", "properties": { "Results": { "type": "array", "items": { - "$ref": "#/definitions/NotifyWatchResult" + "$ref": "#/definitions/JobsResult" } } }, @@ -12339,29 +12161,29 @@ "Results" ] }, - "PhaseResult": { + "LifeResult": { "type": "object", "properties": { "Error": { "$ref": "#/definitions/Error" }, - "phase": { + "Life": { "type": "string" } }, "additionalProperties": false, "required": [ - "phase", + "Life", "Error" ] }, - "PhaseResults": { + "LifeResults": { "type": "object", "properties": { "Results": { "type": "array", "items": { - "$ref": "#/definitions/PhaseResult" + "$ref": "#/definitions/LifeResult" } } }, @@ -12370,265 +12192,263 @@ "Results" ] }, - "caveat": { + "Macaroon": { "type": "object", "properties": { - "caveatId": { + "caveats": { + "type": "array", + "items": { + "$ref": "#/definitions/caveat" + } + }, + "data": { + "type": "array", + "items": { + "type": "integer" + } + }, + "id": { "$ref": "#/definitions/packet" }, "location": { "$ref": "#/definitions/packet" }, - "verificationId": { - "$ref": "#/definitions/packet" + "sig": { + "type": "array", + "items": { + "type": "integer" + } } }, "additionalProperties": false, "required": [ + "data", "location", - "caveatId", - "verificationId" + "id", + "caveats", + "sig" ] }, - "packet": { + "MachineAddresses": { "type": "object", "properties": { - "headerLen": { - "type": "integer" - }, - "start": { - "type": "integer" + "Addresses": { + "type": "array", + "items": { + "$ref": "#/definitions/Address" + } }, - "totalLen": { - "type": "integer" + "Tag": { + "type": "string" } }, "additionalProperties": false, "required": [ - "start", - "totalLen", - "headerLen" + "Tag", + "Addresses" ] - } - } - } - }, - { - "Name": "MigrationMaster", - "Version": 1, - "Schema": { - "type": "object", - "properties": { - "Export": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/SerializedModel" - } - } - }, - "GetMigrationStatus": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/FullMigrationStatus" - } - } - }, - "SetPhase": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SetMigrationPhaseArgs" - } - } }, - "Watch": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - } - }, - "definitions": { - "Error": { + "NetworkConfig": { "type": "object", "properties": { - "Code": { + "Address": { "type": "string" }, - "Info": { - "$ref": "#/definitions/ErrorInfo" + "CIDR": { + "type": "string" }, - "Message": { + "ConfigType": { + "type": "string" + }, + "DNSSearchDomains": { + "type": "array", + "items": { + "type": "string" + } + }, + "DNSServers": { + "type": "array", + "items": { + "type": "string" + } + }, + "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" } }, "additionalProperties": false, "required": [ - "Message", - "Code" + "DeviceIndex", + "MACAddress", + "CIDR", + "MTU", + "ProviderId", + "ProviderSubnetId", + "ProviderSpaceId", + "ProviderAddressId", + "ProviderVLANId", + "VLANTag", + "InterfaceName", + "ParentInterfaceName", + "InterfaceType", + "Disabled" ] }, - "ErrorInfo": { + "NotifyWatchResult": { "type": "object", "properties": { - "Macaroon": { - "$ref": "#/definitions/Macaroon" + "Error": { + "$ref": "#/definitions/Error" }, - "MacaroonPath": { + "NotifyWatcherId": { "type": "string" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "NotifyWatcherId", + "Error" + ] }, - "FullMigrationStatus": { + "NotifyWatchResults": { "type": "object", "properties": { - "attempt": { - "type": "integer" - }, - "phase": { - "type": "string" - }, - "spec": { - "$ref": "#/definitions/ModelMigrationSpec" + "Results": { + "type": "array", + "items": { + "$ref": "#/definitions/NotifyWatchResult" + } } }, "additionalProperties": false, "required": [ - "spec", - "attempt", - "phase" + "Results" ] }, - "Macaroon": { + "SetMachineNetworkConfig": { "type": "object", "properties": { - "caveats": { - "type": "array", - "items": { - "$ref": "#/definitions/caveat" - } - }, - "data": { + "Config": { "type": "array", "items": { - "type": "integer" + "$ref": "#/definitions/NetworkConfig" } }, - "id": { - "$ref": "#/definitions/packet" - }, - "location": { - "$ref": "#/definitions/packet" - }, - "sig": { - "type": "array", - "items": { - "type": "integer" - } + "Tag": { + "type": "string" } }, "additionalProperties": false, "required": [ - "data", - "location", - "id", - "caveats", - "sig" + "Tag", + "Config" ] }, - "ModelMigrationSpec": { + "SetMachinesAddresses": { "type": "object", "properties": { - "model-tag": { - "type": "string" - }, - "target-info": { - "$ref": "#/definitions/ModelMigrationTargetInfo" + "MachineAddresses": { + "type": "array", + "items": { + "$ref": "#/definitions/MachineAddresses" + } } }, "additionalProperties": false, "required": [ - "model-tag", - "target-info" + "MachineAddresses" ] }, - "ModelMigrationTargetInfo": { + "SetStatus": { "type": "object", "properties": { - "addrs": { + "Entities": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/EntityStatusArgs" } - }, - "auth-tag": { - "type": "string" - }, - "ca-cert": { - "type": "string" - }, - "controller-tag": { - "type": "string" - }, - "password": { - "type": "string" } }, "additionalProperties": false, "required": [ - "controller-tag", - "addrs", - "ca-cert", - "auth-tag", - "password" + "Entities" ] }, - "NotifyWatchResult": { + "StringResult": { "type": "object", "properties": { "Error": { "$ref": "#/definitions/Error" }, - "NotifyWatcherId": { + "Result": { "type": "string" } }, "additionalProperties": false, "required": [ - "NotifyWatcherId", - "Error" + "Error", + "Result" ] }, - "SerializedModel": { + "StringsResult": { "type": "object", "properties": { - "bytes": { + "Error": { + "$ref": "#/definitions/Error" + }, + "Result": { "type": "array", "items": { - "type": "integer" + "type": "string" } } }, "additionalProperties": false, "required": [ - "bytes" - ] - }, - "SetMigrationPhaseArgs": { - "type": "object", - "properties": { - "phase": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "phase" + "Error", + "Result" ] }, "caveat": { @@ -12675,21 +12495,62 @@ } }, { - "Name": "MigrationMinion", + "Name": "MeterStatus", "Version": 1, "Schema": { "type": "object", "properties": { - "Watch": { + "GetMeterStatus": { "type": "object", "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, "Result": { - "$ref": "#/definitions/NotifyWatchResult" + "$ref": "#/definitions/MeterStatusResults" + } + } + }, + "WatchMeterStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/NotifyWatchResults" } } } }, "definitions": { + "Entities": { + "type": "object", + "properties": { + "Entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } + } + }, + "additionalProperties": false, + "required": [ + "Entities" + ] + }, + "Entity": { + "type": "object", + "properties": { + "Tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Tag" + ] + }, "Error": { "type": "object", "properties": { @@ -12758,6 +12619,41 @@ "sig" ] }, + "MeterStatusResult": { + "type": "object", + "properties": { + "Code": { + "type": "string" + }, + "Error": { + "$ref": "#/definitions/Error" + }, + "Info": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Code", + "Info", + "Error" + ] + }, + "MeterStatusResults": { + "type": "object", + "properties": { + "Results": { + "type": "array", + "items": { + "$ref": "#/definitions/MeterStatusResult" + } + } + }, + "additionalProperties": false, + "required": [ + "Results" + ] + }, "NotifyWatchResult": { "type": "object", "properties": { @@ -12774,6 +12670,21 @@ "Error" ] }, + "NotifyWatchResults": { + "type": "object", + "properties": { + "Results": { + "type": "array", + "items": { + "$ref": "#/definitions/NotifyWatchResult" + } + } + }, + "additionalProperties": false, + "required": [ + "Results" + ] + }, "caveat": { "type": "object", "properties": { @@ -12818,182 +12729,264 @@ } }, { - "Name": "MigrationStatusWatcher", - "Version": 1, + "Name": "MetricsAdder", + "Version": 2, "Schema": { "type": "object", "properties": { - "Next": { + "AddMetricBatches": { "type": "object", "properties": { + "Params": { + "$ref": "#/definitions/MetricBatchParams" + }, "Result": { - "$ref": "#/definitions/MigrationStatus" + "$ref": "#/definitions/ErrorResults" } } - }, - "Stop": { - "type": "object" } }, "definitions": { - "MigrationStatus": { + "Error": { "type": "object", "properties": { - "attempt": { - "type": "integer" - }, - "phase": { - "type": "string" - }, - "source-api-addrs": { - "type": "array", - "items": { - "type": "string" - } - }, - "source-ca-cert": { + "Code": { "type": "string" }, - "target-api-addrs": { - "type": "array", - "items": { - "type": "string" - } + "Info": { + "$ref": "#/definitions/ErrorInfo" }, - "target-ca-cert": { + "Message": { "type": "string" } }, "additionalProperties": false, "required": [ - "attempt", - "phase", - "source-api-addrs", - "source-ca-cert", - "target-api-addrs", - "target-ca-cert" + "Message", + "Code" ] - } - } - } - }, - { - "Name": "MigrationTarget", - "Version": 1, - "Schema": { - "type": "object", - "properties": { - "Abort": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ModelArgs" - } - } }, - "Activate": { + "ErrorInfo": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/ModelArgs" + "Macaroon": { + "$ref": "#/definitions/Macaroon" + }, + "MacaroonPath": { + "type": "string" } - } + }, + "additionalProperties": false }, - "Import": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/SerializedModel" - } - } - } - }, - "definitions": { - "ModelArgs": { + "ErrorResult": { "type": "object", "properties": { - "model-tag": { - "type": "string" + "Error": { + "$ref": "#/definitions/Error" } }, "additionalProperties": false, "required": [ - "model-tag" + "Error" ] }, - "SerializedModel": { + "ErrorResults": { "type": "object", "properties": { - "bytes": { + "Results": { "type": "array", "items": { - "type": "integer" + "$ref": "#/definitions/ErrorResult" } } }, "additionalProperties": false, "required": [ - "bytes" + "Results" ] - } - } - } - }, - { - "Name": "ModelManager", - "Version": 2, - "Schema": { - "type": "object", - "properties": { - "ConfigSkeleton": { + }, + "Macaroon": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/ModelSkeletonConfigArgs" + "caveats": { + "type": "array", + "items": { + "$ref": "#/definitions/caveat" + } }, - "Result": { - "$ref": "#/definitions/ModelConfigResult" + "data": { + "type": "array", + "items": { + "type": "integer" + } + }, + "id": { + "$ref": "#/definitions/packet" + }, + "location": { + "$ref": "#/definitions/packet" + }, + "sig": { + "type": "array", + "items": { + "type": "integer" + } } - } + }, + "additionalProperties": false, + "required": [ + "data", + "location", + "id", + "caveats", + "sig" + ] }, - "CreateModel": { + "Metric": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/ModelCreateArgs" + "Key": { + "type": "string" }, - "Result": { - "$ref": "#/definitions/Model" + "Time": { + "type": "string", + "format": "date-time" + }, + "Value": { + "type": "string" } - } + }, + "additionalProperties": false, + "required": [ + "Key", + "Value", + "Time" + ] }, - "ListModels": { + "MetricBatch": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/Entity" + "CharmURL": { + "type": "string" }, - "Result": { - "$ref": "#/definitions/UserModelList" + "Created": { + "type": "string", + "format": "date-time" + }, + "Metrics": { + "type": "array", + "items": { + "$ref": "#/definitions/Metric" + } + }, + "UUID": { + "type": "string" } - } + }, + "additionalProperties": false, + "required": [ + "UUID", + "CharmURL", + "Created", + "Metrics" + ] }, - "ModelInfo": { + "MetricBatchParam": { + "type": "object", + "properties": { + "Batch": { + "$ref": "#/definitions/MetricBatch" + }, + "Tag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "Tag", + "Batch" + ] + }, + "MetricBatchParams": { + "type": "object", + "properties": { + "Batches": { + "type": "array", + "items": { + "$ref": "#/definitions/MetricBatchParam" + } + } + }, + "additionalProperties": false, + "required": [ + "Batches" + ] + }, + "caveat": { + "type": "object", + "properties": { + "caveatId": { + "$ref": "#/definitions/packet" + }, + "location": { + "$ref": "#/definitions/packet" + }, + "verificationId": { + "$ref": "#/definitions/packet" + } + }, + "additionalProperties": false, + "required": [ + "location", + "caveatId", + "verificationId" + ] + }, + "packet": { + "type": "object", + "properties": { + "headerLen": { + "type": "integer" + }, + "start": { + "type": "integer" + }, + "totalLen": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "start", + "totalLen", + "headerLen" + ] + } + } + } + }, + { + "Name": "MetricsDebug", + "Version": 2, + "Schema": { + "type": "object", + "properties": { + "GetMetrics": { "type": "object", "properties": { "Params": { "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/ModelInfoResults" + "$ref": "#/definitions/MetricResults" } } }, - "ModifyModelAccess": { + "SetMeterStatus": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/ModifyModelAccessRequest" + "$ref": "#/definitions/MeterStatusParams" }, "Result": { "$ref": "#/definitions/ErrorResults" @@ -13029,36 +13022,20 @@ "Tag" ] }, - "EntityStatus": { + "EntityMetrics": { "type": "object", "properties": { - "Data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "Info": { - "type": "string" - }, - "Since": { - "type": "string", - "format": "date-time" + "error": { + "$ref": "#/definitions/Error" }, - "Status": { - "type": "string" + "metrics": { + "type": "array", + "items": { + "$ref": "#/definitions/MetricResult" + } } }, - "additionalProperties": false, - "required": [ - "Status", - "Info", - "Data", - "Since" - ] + "additionalProperties": false }, "Error": { "type": "object", @@ -13155,260 +13132,270 @@ "sig" ] }, - "Model": { + "MeterStatusParam": { "type": "object", "properties": { - "Name": { + "code": { "type": "string" }, - "OwnerTag": { + "info": { "type": "string" }, - "UUID": { + "tag": { "type": "string" } }, "additionalProperties": false, "required": [ - "Name", - "UUID", - "OwnerTag" + "tag", + "code", + "info" ] }, - "ModelConfigResult": { + "MeterStatusParams": { "type": "object", "properties": { - "Config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } + "statues": { + "type": "array", + "items": { + "$ref": "#/definitions/MeterStatusParam" } } }, "additionalProperties": false, "required": [ - "Config" + "statues" ] }, - "ModelCreateArgs": { + "MetricResult": { "type": "object", "properties": { - "Account": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } + "key": { + "type": "string" }, - "Config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } + "time": { + "type": "string", + "format": "date-time" }, - "OwnerTag": { + "value": { "type": "string" } }, "additionalProperties": false, "required": [ - "OwnerTag", - "Account", - "Config" + "time", + "key", + "value" ] }, - "ModelInfo": { + "MetricResults": { "type": "object", "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": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/ModelUserInfo" + "$ref": "#/definitions/EntityMetrics" } } }, "additionalProperties": false, "required": [ - "Name", - "UUID", - "ServerUUID", - "ProviderType", - "DefaultSeries", - "OwnerTag", - "Life", - "Status", - "Users" + "results" ] }, - "ModelInfoResult": { + "caveat": { "type": "object", "properties": { - "error": { - "$ref": "#/definitions/Error" + "caveatId": { + "$ref": "#/definitions/packet" }, - "result": { - "$ref": "#/definitions/ModelInfo" + "location": { + "$ref": "#/definitions/packet" + }, + "verificationId": { + "$ref": "#/definitions/packet" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "location", + "caveatId", + "verificationId" + ] }, - "ModelInfoResults": { + "packet": { "type": "object", "properties": { - "results": { + "headerLen": { + "type": "integer" + }, + "start": { + "type": "integer" + }, + "totalLen": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "start", + "totalLen", + "headerLen" + ] + } + } + } + }, + { + "Name": "MetricsManager", + "Version": 1, + "Schema": { + "type": "object", + "properties": { + "CleanupOldMetrics": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + } + }, + "SendMetrics": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + } + } + }, + "definitions": { + "Entities": { + "type": "object", + "properties": { + "Entities": { "type": "array", "items": { - "$ref": "#/definitions/ModelInfoResult" + "$ref": "#/definitions/Entity" } } }, "additionalProperties": false, "required": [ - "results" + "Entities" ] }, - "ModelSkeletonConfigArgs": { + "Entity": { "type": "object", "properties": { - "Provider": { - "type": "string" - }, - "Region": { + "Tag": { "type": "string" } }, "additionalProperties": false, "required": [ - "Provider", - "Region" + "Tag" ] }, - "ModelUserInfo": { + "Error": { "type": "object", "properties": { - "access": { - "type": "string" - }, - "displayname": { + "Code": { "type": "string" }, - "lastconnection": { - "type": "string", - "format": "date-time" + "Info": { + "$ref": "#/definitions/ErrorInfo" }, - "user": { + "Message": { "type": "string" } }, "additionalProperties": false, "required": [ - "user", - "displayname", - "lastconnection", - "access" + "Message", + "Code" ] }, - "ModifyModelAccess": { + "ErrorInfo": { "type": "object", "properties": { - "access": { - "type": "string" - }, - "action": { - "type": "string" - }, - "model-tag": { - "type": "string" + "Macaroon": { + "$ref": "#/definitions/Macaroon" }, - "user-tag": { + "MacaroonPath": { "type": "string" } }, - "additionalProperties": false, - "required": [ - "user-tag", - "action", - "access", - "model-tag" - ] + "additionalProperties": false }, - "ModifyModelAccessRequest": { + "ErrorResult": { "type": "object", "properties": { - "changes": { - "type": "array", - "items": { - "$ref": "#/definitions/ModifyModelAccess" - } + "Error": { + "$ref": "#/definitions/Error" } }, "additionalProperties": false, "required": [ - "changes" + "Error" ] }, - "UserModel": { + "ErrorResults": { "type": "object", "properties": { - "LastConnection": { - "type": "string", - "format": "date-time" - }, - "Model": { - "$ref": "#/definitions/Model" + "Results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" + } } }, "additionalProperties": false, "required": [ - "Model", - "LastConnection" + "Results" ] }, - "UserModelList": { + "Macaroon": { "type": "object", "properties": { - "UserModels": { + "caveats": { "type": "array", "items": { - "$ref": "#/definitions/UserModel" + "$ref": "#/definitions/caveat" + } + }, + "data": { + "type": "array", + "items": { + "type": "integer" + } + }, + "id": { + "$ref": "#/definitions/packet" + }, + "location": { + "$ref": "#/definitions/packet" + }, + "sig": { + "type": "array", + "items": { + "type": "integer" } } }, "additionalProperties": false, "required": [ - "UserModels" + "data", + "location", + "id", + "caveats", + "sig" ] }, "caveat": { @@ -13455,665 +13442,824 @@ } }, { - "Name": "NotifyWatcher", - "Version": 1, - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object" - }, - "Stop": { - "type": "object" - } - } - } - }, - { - "Name": "Pinger", + "Name": "MigrationFlag", "Version": 1, "Schema": { "type": "object", "properties": { - "Ping": { - "type": "object" - }, - "Stop": { - "type": "object" - } - } - } - }, - { - "Name": "Provisioner", - "Version": 2, - "Schema": { - "type": "object", - "properties": { - "APIAddresses": { + "Phase": { "type": "object", "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, "Result": { - "$ref": "#/definitions/StringsResult" + "$ref": "#/definitions/PhaseResults" } } }, - "APIHostPorts": { + "Watch": { "type": "object", "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, "Result": { - "$ref": "#/definitions/APIHostPortsResult" + "$ref": "#/definitions/NotifyWatchResults" } } - }, - "CACert": { + } + }, + "definitions": { + "Entities": { "type": "object", "properties": { - "Result": { - "$ref": "#/definitions/BytesResult" - } - } - }, - "Constraints": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ConstraintsResults" + "Entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } } - } + }, + "additionalProperties": false, + "required": [ + "Entities" + ] }, - "ContainerConfig": { + "Entity": { "type": "object", "properties": { - "Result": { - "$ref": "#/definitions/ContainerConfig" + "Tag": { + "type": "string" } - } + }, + "additionalProperties": false, + "required": [ + "Tag" + ] }, - "ContainerManagerConfig": { + "Error": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/ContainerManagerConfigParams" + "Code": { + "type": "string" }, - "Result": { - "$ref": "#/definitions/ContainerManagerConfig" + "Info": { + "$ref": "#/definitions/ErrorInfo" + }, + "Message": { + "type": "string" } - } + }, + "additionalProperties": false, + "required": [ + "Message", + "Code" + ] }, - "DistributionGroup": { + "ErrorInfo": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/Entities" + "Macaroon": { + "$ref": "#/definitions/Macaroon" }, - "Result": { - "$ref": "#/definitions/DistributionGroupResults" + "MacaroonPath": { + "type": "string" } - } + }, + "additionalProperties": false }, - "EnsureDead": { + "Macaroon": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/Entities" + "caveats": { + "type": "array", + "items": { + "$ref": "#/definitions/caveat" + } }, - "Result": { - "$ref": "#/definitions/ErrorResults" + "data": { + "type": "array", + "items": { + "type": "integer" + } + }, + "id": { + "$ref": "#/definitions/packet" + }, + "location": { + "$ref": "#/definitions/packet" + }, + "sig": { + "type": "array", + "items": { + "type": "integer" + } } - } + }, + "additionalProperties": false, + "required": [ + "data", + "location", + "id", + "caveats", + "sig" + ] }, - "FindTools": { + "NotifyWatchResult": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/FindToolsParams" + "Error": { + "$ref": "#/definitions/Error" }, - "Result": { - "$ref": "#/definitions/FindToolsResult" + "NotifyWatcherId": { + "type": "string" } - } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId", + "Error" + ] }, - "GetContainerInterfaceInfo": { + "NotifyWatchResults": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/MachineNetworkConfigResults" + "Results": { + "type": "array", + "items": { + "$ref": "#/definitions/NotifyWatchResult" + } } - } + }, + "additionalProperties": false, + "required": [ + "Results" + ] }, - "InstanceId": { + "PhaseResult": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/Entities" + "Error": { + "$ref": "#/definitions/Error" }, - "Result": { - "$ref": "#/definitions/StringResults" + "phase": { + "type": "string" } - } + }, + "additionalProperties": false, + "required": [ + "phase", + "Error" + ] }, - "InstanceStatus": { + "PhaseResults": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StatusResults" + "Results": { + "type": "array", + "items": { + "$ref": "#/definitions/PhaseResult" + } } - } + }, + "additionalProperties": false, + "required": [ + "Results" + ] }, - "Life": { + "caveat": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/Entities" + "caveatId": { + "$ref": "#/definitions/packet" }, - "Result": { - "$ref": "#/definitions/LifeResults" + "location": { + "$ref": "#/definitions/packet" + }, + "verificationId": { + "$ref": "#/definitions/packet" } - } + }, + "additionalProperties": false, + "required": [ + "location", + "caveatId", + "verificationId" + ] }, - "MachinesWithTransientErrors": { + "packet": { "type": "object", "properties": { - "Result": { - "$ref": "#/definitions/StatusResults" + "headerLen": { + "type": "integer" + }, + "start": { + "type": "integer" + }, + "totalLen": { + "type": "integer" } - } - }, - "ModelConfig": { + }, + "additionalProperties": false, + "required": [ + "start", + "totalLen", + "headerLen" + ] + } + } + } + }, + { + "Name": "MigrationMaster", + "Version": 1, + "Schema": { + "type": "object", + "properties": { + "Export": { "type": "object", "properties": { "Result": { - "$ref": "#/definitions/ModelConfigResult" + "$ref": "#/definitions/SerializedModel" } } }, - "ModelUUID": { + "GetMigrationStatus": { "type": "object", "properties": { "Result": { - "$ref": "#/definitions/StringResult" + "$ref": "#/definitions/FullMigrationStatus" } } }, - "PrepareContainerInterfaceInfo": { + "SetPhase": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/MachineNetworkConfigResults" + "$ref": "#/definitions/SetMigrationPhaseArgs" } } }, - "ProvisioningInfo": { + "Watch": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, "Result": { - "$ref": "#/definitions/ProvisioningInfoResults" + "$ref": "#/definitions/NotifyWatchResult" } } - }, - "ReleaseContainerAddresses": { + } + }, + "definitions": { + "Error": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/Entities" + "Code": { + "type": "string" }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - } - }, - "Remove": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" + "Info": { + "$ref": "#/definitions/ErrorInfo" }, - "Result": { - "$ref": "#/definitions/ErrorResults" + "Message": { + "type": "string" } - } + }, + "additionalProperties": false, + "required": [ + "Message", + "Code" + ] }, - "Series": { + "ErrorInfo": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/Entities" + "Macaroon": { + "$ref": "#/definitions/Macaroon" }, - "Result": { - "$ref": "#/definitions/StringResults" + "MacaroonPath": { + "type": "string" } - } + }, + "additionalProperties": false }, - "SetInstanceInfo": { + "FullMigrationStatus": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/InstancesInfo" + "attempt": { + "type": "integer" }, - "Result": { - "$ref": "#/definitions/ErrorResults" + "phase": { + "type": "string" + }, + "spec": { + "$ref": "#/definitions/ModelMigrationSpec" } - } + }, + "additionalProperties": false, + "required": [ + "spec", + "attempt", + "phase" + ] }, - "SetInstanceStatus": { + "Macaroon": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" + "caveats": { + "type": "array", + "items": { + "$ref": "#/definitions/caveat" + } }, - "Result": { - "$ref": "#/definitions/ErrorResults" + "data": { + "type": "array", + "items": { + "type": "integer" + } + }, + "id": { + "$ref": "#/definitions/packet" + }, + "location": { + "$ref": "#/definitions/packet" + }, + "sig": { + "type": "array", + "items": { + "type": "integer" + } } - } + }, + "additionalProperties": false, + "required": [ + "data", + "location", + "id", + "caveats", + "sig" + ] }, - "SetPasswords": { + "ModelMigrationSpec": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/EntityPasswords" + "model-tag": { + "type": "string" }, - "Result": { - "$ref": "#/definitions/ErrorResults" + "target-info": { + "$ref": "#/definitions/ModelMigrationTargetInfo" } - } + }, + "additionalProperties": false, + "required": [ + "model-tag", + "target-info" + ] }, - "SetStatus": { + "ModelMigrationTargetInfo": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" + "addrs": { + "type": "array", + "items": { + "type": "string" + } }, - "Result": { - "$ref": "#/definitions/ErrorResults" + "auth-tag": { + "type": "string" + }, + "ca-cert": { + "type": "string" + }, + "controller-tag": { + "type": "string" + }, + "password": { + "type": "string" } - } + }, + "additionalProperties": false, + "required": [ + "controller-tag", + "addrs", + "ca-cert", + "auth-tag", + "password" + ] }, - "SetSupportedContainers": { + "NotifyWatchResult": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/MachineContainersParams" + "Error": { + "$ref": "#/definitions/Error" }, - "Result": { - "$ref": "#/definitions/ErrorResults" + "NotifyWatcherId": { + "type": "string" } - } + }, + "additionalProperties": false, + "required": [ + "NotifyWatcherId", + "Error" + ] }, - "StateAddresses": { + "SerializedModel": { "type": "object", "properties": { - "Result": { - "$ref": "#/definitions/StringsResult" + "bytes": { + "type": "array", + "items": { + "type": "integer" + } } - } + }, + "additionalProperties": false, + "required": [ + "bytes" + ] }, - "Status": { + "SetMigrationPhaseArgs": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StatusResults" + "phase": { + "type": "string" } - } + }, + "additionalProperties": false, + "required": [ + "phase" + ] }, - "Tools": { + "caveat": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/Entities" + "caveatId": { + "$ref": "#/definitions/packet" }, - "Result": { - "$ref": "#/definitions/ToolsResults" + "location": { + "$ref": "#/definitions/packet" + }, + "verificationId": { + "$ref": "#/definitions/packet" } - } + }, + "additionalProperties": false, + "required": [ + "location", + "caveatId", + "verificationId" + ] }, - "UpdateStatus": { + "packet": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/SetStatus" + "headerLen": { + "type": "integer" }, - "Result": { - "$ref": "#/definitions/ErrorResults" + "start": { + "type": "integer" + }, + "totalLen": { + "type": "integer" } - } - }, - "WatchAPIHostPorts": { + }, + "additionalProperties": false, + "required": [ + "start", + "totalLen", + "headerLen" + ] + } + } + } + }, + { + "Name": "MigrationMinion", + "Version": 1, + "Schema": { + "type": "object", + "properties": { + "Watch": { "type": "object", "properties": { "Result": { "$ref": "#/definitions/NotifyWatchResult" } } - }, - "WatchAllContainers": { + } + }, + "definitions": { + "Error": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/WatchContainers" + "Code": { + "type": "string" }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - } - }, - "WatchContainers": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/WatchContainers" + "Info": { + "$ref": "#/definitions/ErrorInfo" }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - } - }, - "WatchForModelConfigChanges": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" + "Message": { + "type": "string" } - } + }, + "additionalProperties": false, + "required": [ + "Message", + "Code" + ] }, - "WatchMachineErrorRetry": { + "ErrorInfo": { "type": "object", "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" + "Macaroon": { + "$ref": "#/definitions/Macaroon" + }, + "MacaroonPath": { + "type": "string" } - } + }, + "additionalProperties": false }, - "WatchModelMachines": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/StringsWatchResult" - } - } - } - }, - "definitions": { - "APIHostPortsResult": { + "Macaroon": { "type": "object", "properties": { - "Servers": { + "caveats": { "type": "array", "items": { - "type": "array", - "items": { - "$ref": "#/definitions/HostPort" - } + "$ref": "#/definitions/caveat" + } + }, + "data": { + "type": "array", + "items": { + "type": "integer" + } + }, + "id": { + "$ref": "#/definitions/packet" + }, + "location": { + "$ref": "#/definitions/packet" + }, + "sig": { + "type": "array", + "items": { + "type": "integer" } } }, "additionalProperties": false, "required": [ - "Servers" + "data", + "location", + "id", + "caveats", + "sig" ] }, - "Address": { + "NotifyWatchResult": { "type": "object", "properties": { - "Scope": { - "type": "string" - }, - "SpaceName": { - "type": "string" - }, - "Type": { - "type": "string" + "Error": { + "$ref": "#/definitions/Error" }, - "Value": { + "NotifyWatcherId": { "type": "string" } }, "additionalProperties": false, "required": [ - "Value", - "Type", - "Scope" + "NotifyWatcherId", + "Error" ] }, - "Binary": { + "caveat": { "type": "object", "properties": { - "Arch": { - "type": "string" + "caveatId": { + "$ref": "#/definitions/packet" }, - "Number": { - "$ref": "#/definitions/Number" + "location": { + "$ref": "#/definitions/packet" }, - "Series": { - "type": "string" + "verificationId": { + "$ref": "#/definitions/packet" } }, "additionalProperties": false, "required": [ - "Number", - "Series", - "Arch" + "location", + "caveatId", + "verificationId" ] }, - "BytesResult": { + "packet": { "type": "object", "properties": { - "Result": { - "type": "array", - "items": { - "type": "integer" - } + "headerLen": { + "type": "integer" + }, + "start": { + "type": "integer" + }, + "totalLen": { + "type": "integer" } }, "additionalProperties": false, "required": [ - "Result" + "start", + "totalLen", + "headerLen" ] + } + } + } + }, + { + "Name": "MigrationStatusWatcher", + "Version": 1, + "Schema": { + "type": "object", + "properties": { + "Next": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/MigrationStatus" + } + } }, - "CloudImageMetadata": { + "Stop": { + "type": "object" + } + }, + "definitions": { + "MigrationStatus": { "type": "object", "properties": { - "arch": { - "type": "string" - }, - "image_id": { - "type": "string" - }, - "priority": { - "type": "integer" - }, - "region": { - "type": "string" - }, - "root_storage_size": { + "attempt": { "type": "integer" }, - "root_storage_type": { - "type": "string" - }, - "series": { + "phase": { "type": "string" }, - "source": { - "type": "string" + "source-api-addrs": { + "type": "array", + "items": { + "type": "string" + } }, - "stream": { + "source-ca-cert": { "type": "string" }, - "version": { - "type": "string" + "target-api-addrs": { + "type": "array", + "items": { + "type": "string" + } }, - "virt_type": { + "target-ca-cert": { "type": "string" } }, "additionalProperties": false, "required": [ - "image_id", - "region", - "version", - "series", - "arch", - "source", - "priority" + "attempt", + "phase", + "source-api-addrs", + "source-ca-cert", + "target-api-addrs", + "target-ca-cert" ] - }, - "ConstraintsResult": { + } + } + } + }, + { + "Name": "MigrationTarget", + "Version": 1, + "Schema": { + "type": "object", + "properties": { + "Abort": { "type": "object", "properties": { - "Constraints": { - "$ref": "#/definitions/Value" - }, - "Error": { - "$ref": "#/definitions/Error" + "Params": { + "$ref": "#/definitions/ModelArgs" } - }, - "additionalProperties": false, - "required": [ - "Error", - "Constraints" - ] + } }, - "ConstraintsResults": { + "Activate": { "type": "object", "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/ConstraintsResult" - } + "Params": { + "$ref": "#/definitions/ModelArgs" } - }, - "additionalProperties": false, - "required": [ - "Results" - ] + } }, - "ContainerConfig": { + "Import": { "type": "object", "properties": { - "AllowLXCLoopMounts": { - "type": "boolean" - }, - "AptMirror": { - "type": "string" - }, - "AptProxy": { - "$ref": "#/definitions/Settings" - }, - "AuthorizedKeys": { - "type": "string" - }, - "PreferIPv6": { - "type": "boolean" - }, - "ProviderType": { + "Params": { + "$ref": "#/definitions/SerializedModel" + } + } + } + }, + "definitions": { + "ModelArgs": { + "type": "object", + "properties": { + "model-tag": { "type": "string" - }, - "Proxy": { - "$ref": "#/definitions/Settings" - }, - "SSLHostnameVerification": { - "type": "boolean" - }, - "UpdateBehavior": { - "$ref": "#/definitions/UpdateBehavior" } }, "additionalProperties": false, "required": [ - "ProviderType", - "AuthorizedKeys", - "SSLHostnameVerification", - "Proxy", - "AptProxy", - "AptMirror", - "PreferIPv6", - "AllowLXCLoopMounts", - "UpdateBehavior" + "model-tag" ] }, - "ContainerManagerConfig": { + "SerializedModel": { "type": "object", "properties": { - "ManagerConfig": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } + "bytes": { + "type": "array", + "items": { + "type": "integer" } } }, "additionalProperties": false, "required": [ - "ManagerConfig" + "bytes" ] + } + } + } + }, + { + "Name": "ModelManager", + "Version": 2, + "Schema": { + "type": "object", + "properties": { + "ConfigSkeleton": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModelSkeletonConfigArgs" + }, + "Result": { + "$ref": "#/definitions/ModelConfigResult" + } + } }, - "ContainerManagerConfigParams": { + "CreateModel": { "type": "object", "properties": { - "Type": { - "type": "string" + "Params": { + "$ref": "#/definitions/ModelCreateArgs" + }, + "Result": { + "$ref": "#/definitions/Model" } - }, - "additionalProperties": false, - "required": [ - "Type" - ] + } }, - "DistributionGroupResult": { + "ListModels": { "type": "object", "properties": { - "Error": { - "$ref": "#/definitions/Error" + "Params": { + "$ref": "#/definitions/Entity" }, "Result": { - "type": "array", - "items": { - "type": "string" - } + "$ref": "#/definitions/UserModelList" } - }, - "additionalProperties": false, - "required": [ - "Error", - "Result" - ] + } }, - "DistributionGroupResults": { + "ModelInfo": { "type": "object", "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/DistributionGroupResult" - } + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ModelInfoResults" } - }, - "additionalProperties": false, - "required": [ - "Results" - ] + } }, + "ModifyModelAccess": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ModifyModelAccessRequest" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + } + } + }, + "definitions": { "Entities": { "type": "object", "properties": { @@ -14141,38 +14287,7 @@ "Tag" ] }, - "EntityPassword": { - "type": "object", - "properties": { - "Password": { - "type": "string" - }, - "Tag": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Tag", - "Password" - ] - }, - "EntityPasswords": { - "type": "object", - "properties": { - "Changes": { - "type": "array", - "items": { - "$ref": "#/definitions/EntityPassword" - } - } - }, - "additionalProperties": false, - "required": [ - "Changes" - ] - }, - "EntityStatusArgs": { + "EntityStatus": { "type": "object", "properties": { "Data": { @@ -14187,19 +14302,20 @@ "Info": { "type": "string" }, - "Status": { - "type": "string" + "Since": { + "type": "string", + "format": "date-time" }, - "Tag": { + "Status": { "type": "string" } }, "additionalProperties": false, "required": [ - "Tag", "Status", "Info", - "Data" + "Data", + "Since" ] }, "Error": { @@ -14260,1140 +14376,1333 @@ "Results" ] }, - "FindToolsParams": { + "Macaroon": { "type": "object", "properties": { - "Arch": { - "type": "string" + "caveats": { + "type": "array", + "items": { + "$ref": "#/definitions/caveat" + } }, - "MajorVersion": { - "type": "integer" + "data": { + "type": "array", + "items": { + "type": "integer" + } }, - "MinorVersion": { - "type": "integer" + "id": { + "$ref": "#/definitions/packet" }, - "Number": { - "$ref": "#/definitions/Number" + "location": { + "$ref": "#/definitions/packet" }, - "Series": { - "type": "string" + "sig": { + "type": "array", + "items": { + "type": "integer" + } } }, "additionalProperties": false, "required": [ - "Number", - "MajorVersion", - "MinorVersion", - "Arch", - "Series" + "data", + "location", + "id", + "caveats", + "sig" ] }, - "FindToolsResult": { + "Model": { "type": "object", "properties": { - "Error": { - "$ref": "#/definitions/Error" + "Name": { + "type": "string" }, - "List": { - "type": "array", - "items": { - "$ref": "#/definitions/Tools" - } + "OwnerTag": { + "type": "string" + }, + "UUID": { + "type": "string" } }, "additionalProperties": false, "required": [ - "List", - "Error" + "Name", + "UUID", + "OwnerTag" ] }, - "HardwareCharacteristics": { + "ModelConfigResult": { "type": "object", "properties": { - "Arch": { - "type": "string" - }, - "AvailabilityZone": { - "type": "string" - }, - "CpuCores": { - "type": "integer" - }, - "CpuPower": { - "type": "integer" - }, - "Mem": { - "type": "integer" - }, - "RootDisk": { - "type": "integer" - }, - "Tags": { - "type": "array", - "items": { - "type": "string" + "Config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } } } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "Config" + ] }, - "HostPort": { + "ModelCreateArgs": { "type": "object", "properties": { - "Address": { - "$ref": "#/definitions/Address" + "Account": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } }, - "Port": { - "type": "integer" + "Config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "OwnerTag": { + "type": "string" } }, "additionalProperties": false, "required": [ - "Address", - "Port" + "OwnerTag", + "Account", + "Config" ] }, - "InstanceInfo": { + "ModelInfo": { "type": "object", "properties": { - "Characteristics": { - "$ref": "#/definitions/HardwareCharacteristics" + "Cloud": { + "type": "string" }, - "InstanceId": { + "DefaultSeries": { "type": "string" }, - "NetworkConfig": { - "type": "array", - "items": { - "$ref": "#/definitions/NetworkConfig" - } + "Life": { + "type": "string" }, - "Nonce": { + "Name": { "type": "string" }, - "Tag": { + "OwnerTag": { "type": "string" }, - "VolumeAttachments": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/VolumeAttachmentInfo" - } - } + "ProviderType": { + "type": "string" }, - "Volumes": { + "ServerUUID": { + "type": "string" + }, + "Status": { + "$ref": "#/definitions/EntityStatus" + }, + "UUID": { + "type": "string" + }, + "Users": { "type": "array", "items": { - "$ref": "#/definitions/Volume" + "$ref": "#/definitions/ModelUserInfo" } } }, "additionalProperties": false, "required": [ - "Tag", - "InstanceId", - "Nonce", - "Characteristics", - "Volumes", - "VolumeAttachments", - "NetworkConfig" + "Name", + "UUID", + "ServerUUID", + "ProviderType", + "DefaultSeries", + "Cloud", + "OwnerTag", + "Life", + "Status", + "Users" ] }, - "InstancesInfo": { + "ModelInfoResult": { "type": "object", "properties": { - "Machines": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "$ref": "#/definitions/ModelInfo" + } + }, + "additionalProperties": false + }, + "ModelInfoResults": { + "type": "object", + "properties": { + "results": { "type": "array", "items": { - "$ref": "#/definitions/InstanceInfo" + "$ref": "#/definitions/ModelInfoResult" } } }, "additionalProperties": false, "required": [ - "Machines" + "results" ] }, - "LifeResult": { + "ModelSkeletonConfigArgs": { "type": "object", "properties": { - "Error": { - "$ref": "#/definitions/Error" + "Provider": { + "type": "string" }, - "Life": { + "Region": { "type": "string" } }, "additionalProperties": false, "required": [ - "Life", - "Error" + "Provider", + "Region" ] }, - "LifeResults": { + "ModelUserInfo": { "type": "object", "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/LifeResult" - } + "access": { + "type": "string" + }, + "displayname": { + "type": "string" + }, + "lastconnection": { + "type": "string", + "format": "date-time" + }, + "user": { + "type": "string" } }, "additionalProperties": false, "required": [ - "Results" + "user", + "displayname", + "lastconnection", + "access" ] }, - "Macaroon": { + "ModifyModelAccess": { "type": "object", "properties": { - "caveats": { - "type": "array", - "items": { - "$ref": "#/definitions/caveat" - } - }, - "data": { - "type": "array", - "items": { - "type": "integer" - } + "access": { + "type": "string" }, - "id": { - "$ref": "#/definitions/packet" + "action": { + "type": "string" }, - "location": { - "$ref": "#/definitions/packet" + "model-tag": { + "type": "string" }, - "sig": { - "type": "array", - "items": { - "type": "integer" - } + "user-tag": { + "type": "string" } }, "additionalProperties": false, "required": [ - "data", - "location", - "id", - "caveats", - "sig" + "user-tag", + "action", + "access", + "model-tag" ] }, - "MachineContainers": { + "ModifyModelAccessRequest": { "type": "object", "properties": { - "ContainerTypes": { + "changes": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/ModifyModelAccess" } - }, - "MachineTag": { - "type": "string" } }, "additionalProperties": false, "required": [ - "MachineTag", - "ContainerTypes" + "changes" ] }, - "MachineContainersParams": { + "UserModel": { "type": "object", "properties": { - "Params": { - "type": "array", - "items": { - "$ref": "#/definitions/MachineContainers" - } + "LastConnection": { + "type": "string", + "format": "date-time" + }, + "Model": { + "$ref": "#/definitions/Model" } }, "additionalProperties": false, "required": [ - "Params" + "Model", + "LastConnection" ] }, - "MachineNetworkConfigResult": { + "UserModelList": { "type": "object", "properties": { - "Error": { - "$ref": "#/definitions/Error" - }, - "Info": { + "UserModels": { "type": "array", "items": { - "$ref": "#/definitions/NetworkConfig" + "$ref": "#/definitions/UserModel" } } }, "additionalProperties": false, "required": [ - "Error", - "Info" + "UserModels" ] }, - "MachineNetworkConfigResults": { - "type": "object", - "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/MachineNetworkConfigResult" - } - } - }, - "additionalProperties": false, - "required": [ - "Results" - ] - }, - "ModelConfigResult": { + "caveat": { "type": "object", "properties": { - "Config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } + "caveatId": { + "$ref": "#/definitions/packet" + }, + "location": { + "$ref": "#/definitions/packet" + }, + "verificationId": { + "$ref": "#/definitions/packet" } }, "additionalProperties": false, "required": [ - "Config" + "location", + "caveatId", + "verificationId" ] }, - "NetworkConfig": { + "packet": { "type": "object", "properties": { - "Address": { - "type": "string" - }, - "CIDR": { - "type": "string" - }, - "ConfigType": { - "type": "string" - }, - "DNSSearchDomains": { - "type": "array", - "items": { - "type": "string" - } - }, - "DNSServers": { - "type": "array", - "items": { - "type": "string" - } - }, - "DeviceIndex": { + "headerLen": { "type": "integer" }, - "Disabled": { - "type": "boolean" - }, - "GatewayAddress": { - "type": "string" - }, - "InterfaceName": { - "type": "string" - }, - "InterfaceType": { - "type": "string" - }, - "MACAddress": { - "type": "string" - }, - "MTU": { + "start": { "type": "integer" }, - "NoAutoStart": { - "type": "boolean" - }, - "ParentInterfaceName": { - "type": "string" - }, - "ProviderAddressId": { - "type": "string" - }, - "ProviderId": { - "type": "string" - }, - "ProviderSpaceId": { - "type": "string" - }, - "ProviderSubnetId": { - "type": "string" - }, - "ProviderVLANId": { - "type": "string" - }, - "VLANTag": { + "totalLen": { "type": "integer" } }, "additionalProperties": false, "required": [ - "DeviceIndex", - "MACAddress", - "CIDR", - "MTU", - "ProviderId", - "ProviderSubnetId", - "ProviderSpaceId", - "ProviderAddressId", - "ProviderVLANId", - "VLANTag", - "InterfaceName", - "ParentInterfaceName", - "InterfaceType", - "Disabled" + "start", + "totalLen", + "headerLen" ] + } + } + } + }, + { + "Name": "NotifyWatcher", + "Version": 1, + "Schema": { + "type": "object", + "properties": { + "Next": { + "type": "object" }, - "NotifyWatchResult": { + "Stop": { + "type": "object" + } + } + } + }, + { + "Name": "Pinger", + "Version": 1, + "Schema": { + "type": "object", + "properties": { + "Ping": { + "type": "object" + }, + "Stop": { + "type": "object" + } + } + } + }, + { + "Name": "Provisioner", + "Version": 3, + "Schema": { + "type": "object", + "properties": { + "APIAddresses": { "type": "object", "properties": { - "Error": { - "$ref": "#/definitions/Error" - }, - "NotifyWatcherId": { - "type": "string" + "Result": { + "$ref": "#/definitions/StringsResult" } - }, - "additionalProperties": false, - "required": [ - "NotifyWatcherId", - "Error" - ] + } }, - "Number": { + "APIHostPorts": { "type": "object", "properties": { - "Build": { - "type": "integer" - }, - "Major": { - "type": "integer" + "Result": { + "$ref": "#/definitions/APIHostPortsResult" + } + } + }, + "CACert": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/BytesResult" + } + } + }, + "Constraints": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" }, - "Minor": { - "type": "integer" + "Result": { + "$ref": "#/definitions/ConstraintsResults" + } + } + }, + "ContainerConfig": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ContainerConfig" + } + } + }, + "ContainerManagerConfig": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/ContainerManagerConfigParams" }, - "Patch": { - "type": "integer" + "Result": { + "$ref": "#/definitions/ContainerManagerConfig" + } + } + }, + "DistributionGroup": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" }, - "Tag": { - "type": "string" + "Result": { + "$ref": "#/definitions/DistributionGroupResults" } - }, - "additionalProperties": false, - "required": [ - "Major", - "Minor", - "Tag", - "Patch", - "Build" - ] + } }, - "ProvisioningInfo": { + "EnsureDead": { "type": "object", "properties": { - "Constraints": { - "$ref": "#/definitions/Value" + "Params": { + "$ref": "#/definitions/Entities" }, - "EndpointBindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } + "Result": { + "$ref": "#/definitions/ErrorResults" + } + } + }, + "FindTools": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/FindToolsParams" }, - "ImageMetadata": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudImageMetadata" - } + "Result": { + "$ref": "#/definitions/FindToolsResult" + } + } + }, + "GetContainerInterfaceInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" }, - "Jobs": { - "type": "array", - "items": { - "type": "string" - } + "Result": { + "$ref": "#/definitions/MachineNetworkConfigResults" + } + } + }, + "InstanceId": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" }, - "Placement": { - "type": "string" + "Result": { + "$ref": "#/definitions/StringResults" + } + } + }, + "InstanceStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" }, - "Series": { - "type": "string" + "Result": { + "$ref": "#/definitions/StatusResults" + } + } + }, + "Life": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" }, - "SubnetsToZones": { - "type": "object", - "patternProperties": { - ".*": { - "type": "array", - "items": { - "type": "string" - } - } - } + "Result": { + "$ref": "#/definitions/LifeResults" + } + } + }, + "MachinesWithTransientErrors": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StatusResults" + } + } + }, + "ModelConfig": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/ModelConfigResult" + } + } + }, + "ModelUUID": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringResult" + } + } + }, + "PrepareContainerInterfaceInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" }, - "Tags": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } + "Result": { + "$ref": "#/definitions/MachineNetworkConfigResults" + } + } + }, + "ProvisioningInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" }, - "Volumes": { - "type": "array", - "items": { - "$ref": "#/definitions/VolumeParams" - } + "Result": { + "$ref": "#/definitions/ProvisioningInfoResults" } - }, - "additionalProperties": false, - "required": [ - "Constraints", - "Series", - "Placement", - "Jobs", - "Volumes", - "Tags", - "SubnetsToZones", - "ImageMetadata", - "EndpointBindings" - ] + } }, - "ProvisioningInfoResult": { + "ReleaseContainerAddresses": { "type": "object", "properties": { - "Error": { - "$ref": "#/definitions/Error" + "Params": { + "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/ProvisioningInfo" + "$ref": "#/definitions/ErrorResults" } - }, - "additionalProperties": false, - "required": [ - "Error", - "Result" - ] + } }, - "ProvisioningInfoResults": { + "Remove": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + } + }, + "Series": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringResults" + } + } + }, + "SetInstanceInfo": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/InstancesInfo" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + } + }, + "SetInstanceStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetStatus" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + } + }, + "SetPasswords": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/EntityPasswords" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + } + }, + "SetStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetStatus" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + } + }, + "SetSupportedContainers": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/MachineContainersParams" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + } + }, + "StateAddresses": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/StringsResult" + } + } + }, + "Status": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StatusResults" + } + } + }, + "Tools": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ToolsResults" + } + } + }, + "UpdateStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/SetStatus" + }, + "Result": { + "$ref": "#/definitions/ErrorResults" + } + } + }, + "WatchAPIHostPorts": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + } + }, + "WatchAllContainers": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/WatchContainers" + }, + "Result": { + "$ref": "#/definitions/StringsWatchResults" + } + } + }, + "WatchContainers": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/WatchContainers" + }, + "Result": { + "$ref": "#/definitions/StringsWatchResults" + } + } + }, + "WatchForModelConfigChanges": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + } + }, + "WatchMachineErrorRetry": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/NotifyWatchResult" + } + } + }, + "WatchModelMachines": { "type": "object", "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/ProvisioningInfoResult" - } + "Result": { + "$ref": "#/definitions/StringsWatchResult" } - }, - "additionalProperties": false, - "required": [ - "Results" - ] - }, - "SetStatus": { + } + } + }, + "definitions": { + "APIHostPortsResult": { "type": "object", "properties": { - "Entities": { + "Servers": { "type": "array", "items": { - "$ref": "#/definitions/EntityStatusArgs" + "type": "array", + "items": { + "$ref": "#/definitions/HostPort" + } } } }, "additionalProperties": false, "required": [ - "Entities" + "Servers" ] }, - "Settings": { + "Address": { "type": "object", "properties": { - "Ftp": { + "Scope": { "type": "string" }, - "Http": { + "SpaceName": { "type": "string" }, - "Https": { + "Type": { "type": "string" }, - "NoProxy": { + "Value": { "type": "string" } }, "additionalProperties": false, "required": [ - "Http", - "Https", - "Ftp", - "NoProxy" + "Value", + "Type", + "Scope" ] }, - "StatusResult": { + "Binary": { "type": "object", "properties": { - "Data": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "Error": { - "$ref": "#/definitions/Error" - }, - "Id": { - "type": "string" - }, - "Info": { - "type": "string" - }, - "Life": { + "Arch": { "type": "string" }, - "Since": { - "type": "string", - "format": "date-time" + "Number": { + "$ref": "#/definitions/Number" }, - "Status": { + "Series": { "type": "string" } }, "additionalProperties": false, "required": [ - "Error", - "Id", - "Life", - "Status", - "Info", - "Data", - "Since" + "Number", + "Series", + "Arch" ] }, - "StatusResults": { + "BytesResult": { "type": "object", "properties": { - "Results": { + "Result": { "type": "array", "items": { - "$ref": "#/definitions/StatusResult" + "type": "integer" } } }, "additionalProperties": false, "required": [ - "Results" + "Result" ] }, - "StringResult": { + "CloudImageMetadata": { "type": "object", "properties": { - "Error": { - "$ref": "#/definitions/Error" + "arch": { + "type": "string" }, - "Result": { + "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" } }, "additionalProperties": false, "required": [ - "Error", - "Result" + "image_id", + "region", + "version", + "series", + "arch", + "source", + "priority" ] }, - "StringResults": { + "ConstraintsResult": { "type": "object", "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringResult" - } + "Constraints": { + "$ref": "#/definitions/Value" + }, + "Error": { + "$ref": "#/definitions/Error" } }, "additionalProperties": false, "required": [ - "Results" + "Error", + "Constraints" ] }, - "StringsResult": { + "ConstraintsResults": { "type": "object", "properties": { - "Error": { - "$ref": "#/definitions/Error" - }, - "Result": { + "Results": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/ConstraintsResult" } } }, "additionalProperties": false, "required": [ - "Error", - "Result" + "Results" ] }, - "StringsWatchResult": { + "ContainerConfig": { "type": "object", "properties": { - "Changes": { - "type": "array", - "items": { - "type": "string" - } + "AllowLXCLoopMounts": { + "type": "boolean" }, - "Error": { - "$ref": "#/definitions/Error" + "AptMirror": { + "type": "string" }, - "StringsWatcherId": { + "AptProxy": { + "$ref": "#/definitions/Settings" + }, + "AuthorizedKeys": { + "type": "string" + }, + "ProviderType": { "type": "string" + }, + "Proxy": { + "$ref": "#/definitions/Settings" + }, + "SSLHostnameVerification": { + "type": "boolean" + }, + "UpdateBehavior": { + "$ref": "#/definitions/UpdateBehavior" } }, "additionalProperties": false, "required": [ - "StringsWatcherId", - "Changes", - "Error" + "ProviderType", + "AuthorizedKeys", + "SSLHostnameVerification", + "Proxy", + "AptProxy", + "AptMirror", + "AllowLXCLoopMounts", + "UpdateBehavior" ] }, - "StringsWatchResults": { + "ContainerManagerConfig": { "type": "object", "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/StringsWatchResult" + "ManagerConfig": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } } } }, "additionalProperties": false, "required": [ - "Results" + "ManagerConfig" ] }, - "Tools": { + "ContainerManagerConfigParams": { "type": "object", "properties": { - "sha256": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "url": { + "Type": { "type": "string" - }, - "version": { - "$ref": "#/definitions/Binary" } }, "additionalProperties": false, "required": [ - "version", - "url", - "size" + "Type" ] }, - "ToolsResult": { + "DistributionGroupResult": { "type": "object", "properties": { - "DisableSSLHostnameVerification": { - "type": "boolean" - }, "Error": { "$ref": "#/definitions/Error" }, - "ToolsList": { + "Result": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "Error", + "Result" + ] + }, + "DistributionGroupResults": { + "type": "object", + "properties": { + "Results": { "type": "array", "items": { - "$ref": "#/definitions/Tools" + "$ref": "#/definitions/DistributionGroupResult" } } }, "additionalProperties": false, "required": [ - "ToolsList", - "DisableSSLHostnameVerification", - "Error" + "Results" ] }, - "ToolsResults": { + "Entities": { "type": "object", "properties": { - "Results": { + "Entities": { "type": "array", "items": { - "$ref": "#/definitions/ToolsResult" + "$ref": "#/definitions/Entity" } } }, "additionalProperties": false, "required": [ - "Results" + "Entities" ] }, - "UpdateBehavior": { + "Entity": { "type": "object", "properties": { - "EnableOSRefreshUpdate": { - "type": "boolean" - }, - "EnableOSUpgrade": { - "type": "boolean" + "Tag": { + "type": "string" } }, "additionalProperties": false, "required": [ - "EnableOSRefreshUpdate", - "EnableOSUpgrade" + "Tag" ] }, - "Value": { + "EntityPassword": { "type": "object", "properties": { - "arch": { - "type": "string" - }, - "container": { - "type": "string" - }, - "cpu-cores": { - "type": "integer" - }, - "cpu-power": { - "type": "integer" - }, - "instance-type": { + "Password": { "type": "string" }, - "mem": { - "type": "integer" - }, - "root-disk": { - "type": "integer" - }, - "spaces": { - "type": "array", - "items": { - "type": "string" - } - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "virt-type": { + "Tag": { "type": "string" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "Tag", + "Password" + ] }, - "Volume": { + "EntityPasswords": { "type": "object", "properties": { - "info": { - "$ref": "#/definitions/VolumeInfo" - }, - "volumetag": { - "type": "string" + "Changes": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityPassword" + } } }, "additionalProperties": false, "required": [ - "volumetag", - "info" + "Changes" ] }, - "VolumeAttachmentInfo": { + "EntityStatusArgs": { "type": "object", "properties": { - "busaddress": { - "type": "string" + "Data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } }, - "devicelink": { + "Info": { "type": "string" }, - "devicename": { + "Status": { "type": "string" }, - "read-only": { - "type": "boolean" + "Tag": { + "type": "string" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "Tag", + "Status", + "Info", + "Data" + ] }, - "VolumeAttachmentParams": { + "Error": { "type": "object", "properties": { - "instanceid": { - "type": "string" - }, - "machinetag": { - "type": "string" - }, - "provider": { + "Code": { "type": "string" }, - "read-only": { - "type": "boolean" - }, - "volumeid": { - "type": "string" + "Info": { + "$ref": "#/definitions/ErrorInfo" }, - "volumetag": { + "Message": { "type": "string" } }, "additionalProperties": false, "required": [ - "volumetag", - "machinetag", - "provider" + "Message", + "Code" ] }, - "VolumeInfo": { + "ErrorInfo": { "type": "object", "properties": { - "hardwareid": { - "type": "string" - }, - "persistent": { - "type": "boolean" - }, - "size": { - "type": "integer" + "Macaroon": { + "$ref": "#/definitions/Macaroon" }, - "volumeid": { + "MacaroonPath": { "type": "string" } }, + "additionalProperties": false + }, + "ErrorResult": { + "type": "object", + "properties": { + "Error": { + "$ref": "#/definitions/Error" + } + }, "additionalProperties": false, "required": [ - "volumeid", - "size", - "persistent" + "Error" ] }, - "VolumeParams": { + "ErrorResults": { "type": "object", "properties": { - "attachment": { - "$ref": "#/definitions/VolumeAttachmentParams" - }, - "attributes": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "provider": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "tags": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } + "Results": { + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResult" } - }, - "volumetag": { - "type": "string" } }, "additionalProperties": false, "required": [ - "volumetag", - "size", - "provider" + "Results" ] }, - "WatchContainer": { + "FindToolsParams": { "type": "object", "properties": { - "ContainerType": { + "Arch": { "type": "string" }, - "MachineTag": { + "MajorVersion": { + "type": "integer" + }, + "MinorVersion": { + "type": "integer" + }, + "Number": { + "$ref": "#/definitions/Number" + }, + "Series": { "type": "string" } }, "additionalProperties": false, "required": [ - "MachineTag", - "ContainerType" + "Number", + "MajorVersion", + "MinorVersion", + "Arch", + "Series" ] }, - "WatchContainers": { + "FindToolsResult": { "type": "object", "properties": { - "Params": { + "Error": { + "$ref": "#/definitions/Error" + }, + "List": { "type": "array", "items": { - "$ref": "#/definitions/WatchContainer" + "$ref": "#/definitions/Tools" } } }, "additionalProperties": false, "required": [ - "Params" + "List", + "Error" ] }, - "caveat": { + "HardwareCharacteristics": { "type": "object", "properties": { - "caveatId": { - "$ref": "#/definitions/packet" + "Arch": { + "type": "string" }, - "location": { - "$ref": "#/definitions/packet" + "AvailabilityZone": { + "type": "string" + }, + "CpuCores": { + "type": "integer" + }, + "CpuPower": { + "type": "integer" + }, + "Mem": { + "type": "integer" + }, + "RootDisk": { + "type": "integer" }, - "verificationId": { - "$ref": "#/definitions/packet" + "Tags": { + "type": "array", + "items": { + "type": "string" + } } }, - "additionalProperties": false, - "required": [ - "location", - "caveatId", - "verificationId" - ] + "additionalProperties": false }, - "packet": { + "HostPort": { "type": "object", "properties": { - "headerLen": { - "type": "integer" - }, - "start": { - "type": "integer" + "Address": { + "$ref": "#/definitions/Address" }, - "totalLen": { + "Port": { "type": "integer" } }, "additionalProperties": false, "required": [ - "start", - "totalLen", - "headerLen" + "Address", + "Port" ] - } - } - } - }, - { - "Name": "ProxyUpdater", - "Version": 1, - "Schema": { - "type": "object", - "properties": { - "ProxyConfig": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ProxyConfigResults" - } - } }, - "WatchForProxyConfigAndAPIHostPortChanges": { + "InstanceInfo": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/Entities" + "Characteristics": { + "$ref": "#/definitions/HardwareCharacteristics" }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - } - } - }, - "definitions": { - "Entities": { - "type": "object", - "properties": { - "Entities": { + "InstanceId": { + "type": "string" + }, + "NetworkConfig": { "type": "array", "items": { - "$ref": "#/definitions/Entity" + "$ref": "#/definitions/NetworkConfig" + } + }, + "Nonce": { + "type": "string" + }, + "Tag": { + "type": "string" + }, + "VolumeAttachments": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/VolumeAttachmentInfo" + } + } + }, + "Volumes": { + "type": "array", + "items": { + "$ref": "#/definitions/Volume" } } }, "additionalProperties": false, "required": [ - "Entities" + "Tag", + "InstanceId", + "Nonce", + "Characteristics", + "Volumes", + "VolumeAttachments", + "NetworkConfig" ] }, - "Entity": { + "InstancesInfo": { "type": "object", "properties": { - "Tag": { - "type": "string" + "Machines": { + "type": "array", + "items": { + "$ref": "#/definitions/InstanceInfo" + } } }, "additionalProperties": false, "required": [ - "Tag" + "Machines" ] }, - "Error": { + "LifeResult": { "type": "object", "properties": { - "Code": { - "type": "string" - }, - "Info": { - "$ref": "#/definitions/ErrorInfo" + "Error": { + "$ref": "#/definitions/Error" }, - "Message": { + "Life": { "type": "string" } }, "additionalProperties": false, "required": [ - "Message", - "Code" + "Life", + "Error" ] }, - "ErrorInfo": { + "LifeResults": { "type": "object", "properties": { - "Macaroon": { - "$ref": "#/definitions/Macaroon" - }, - "MacaroonPath": { - "type": "string" + "Results": { + "type": "array", + "items": { + "$ref": "#/definitions/LifeResult" + } } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "Results" + ] }, "Macaroon": { "type": "object", @@ -15432,29 +15741,66 @@ "sig" ] }, - "NotifyWatchResult": { + "MachineContainers": { + "type": "object", + "properties": { + "ContainerTypes": { + "type": "array", + "items": { + "type": "string" + } + }, + "MachineTag": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "MachineTag", + "ContainerTypes" + ] + }, + "MachineContainersParams": { + "type": "object", + "properties": { + "Params": { + "type": "array", + "items": { + "$ref": "#/definitions/MachineContainers" + } + } + }, + "additionalProperties": false, + "required": [ + "Params" + ] + }, + "MachineNetworkConfigResult": { "type": "object", "properties": { "Error": { "$ref": "#/definitions/Error" }, - "NotifyWatcherId": { - "type": "string" + "Info": { + "type": "array", + "items": { + "$ref": "#/definitions/NetworkConfig" + } } }, "additionalProperties": false, "required": [ - "NotifyWatcherId", - "Error" + "Error", + "Info" ] }, - "NotifyWatchResults": { + "MachineNetworkConfigResults": { "type": "object", "properties": { "Results": { "type": "array", "items": { - "$ref": "#/definitions/NotifyWatchResult" + "$ref": "#/definitions/MachineNetworkConfigResult" } } }, @@ -15463,233 +15809,250 @@ "Results" ] }, - "ProxyConfig": { + "ModelConfigResult": { "type": "object", "properties": { - "FTP": { + "Config": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "additionalProperties": false, + "required": [ + "Config" + ] + }, + "NetworkConfig": { + "type": "object", + "properties": { + "Address": { + "type": "string" + }, + "CIDR": { + "type": "string" + }, + "ConfigType": { + "type": "string" + }, + "DNSSearchDomains": { + "type": "array", + "items": { + "type": "string" + } + }, + "DNSServers": { + "type": "array", + "items": { + "type": "string" + } + }, + "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" }, - "HTTP": { + "ProviderAddressId": { "type": "string" }, - "HTTPS": { + "ProviderId": { "type": "string" }, - "NoProxy": { + "ProviderSpaceId": { + "type": "string" + }, + "ProviderSubnetId": { "type": "string" + }, + "ProviderVLANId": { + "type": "string" + }, + "VLANTag": { + "type": "integer" } }, "additionalProperties": false, "required": [ - "HTTP", - "HTTPS", - "FTP", - "NoProxy" + "DeviceIndex", + "MACAddress", + "CIDR", + "MTU", + "ProviderId", + "ProviderSubnetId", + "ProviderSpaceId", + "ProviderAddressId", + "ProviderVLANId", + "VLANTag", + "InterfaceName", + "ParentInterfaceName", + "InterfaceType", + "Disabled" ] }, - "ProxyConfigResult": { + "NotifyWatchResult": { "type": "object", "properties": { - "APTProxySettings": { - "$ref": "#/definitions/ProxyConfig" - }, "Error": { "$ref": "#/definitions/Error" }, - "ProxySettings": { - "$ref": "#/definitions/ProxyConfig" - } - }, - "additionalProperties": false, - "required": [ - "ProxySettings", - "APTProxySettings" - ] - }, - "ProxyConfigResults": { - "type": "object", - "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/ProxyConfigResult" - } + "NotifyWatcherId": { + "type": "string" } }, "additionalProperties": false, "required": [ - "Results" + "NotifyWatcherId", + "Error" ] }, - "caveat": { + "Number": { "type": "object", "properties": { - "caveatId": { - "$ref": "#/definitions/packet" - }, - "location": { - "$ref": "#/definitions/packet" + "Build": { + "type": "integer" }, - "verificationId": { - "$ref": "#/definitions/packet" - } - }, - "additionalProperties": false, - "required": [ - "location", - "caveatId", - "verificationId" - ] - }, - "packet": { - "type": "object", - "properties": { - "headerLen": { + "Major": { "type": "integer" }, - "start": { + "Minor": { "type": "integer" }, - "totalLen": { + "Patch": { "type": "integer" + }, + "Tag": { + "type": "string" } }, "additionalProperties": false, "required": [ - "start", - "totalLen", - "headerLen" + "Major", + "Minor", + "Tag", + "Patch", + "Build" ] - } - } - } - }, - { - "Name": "Reboot", - "Version": 2, - "Schema": { - "type": "object", - "properties": { - "ClearReboot": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - } }, - "GetRebootAction": { + "ProvisioningInfo": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/Entities" + "Constraints": { + "$ref": "#/definitions/Value" }, - "Result": { - "$ref": "#/definitions/RebootActionResults" - } - } - }, - "RequestReboot": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" + "EndpointBindings": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - } - }, - "WatchForRebootEvent": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/NotifyWatchResult" - } - } - } - }, - "definitions": { - "Entities": { - "type": "object", - "properties": { - "Entities": { + "ImageMetadata": { "type": "array", "items": { - "$ref": "#/definitions/Entity" + "$ref": "#/definitions/CloudImageMetadata" } - } - }, - "additionalProperties": false, - "required": [ - "Entities" - ] - }, - "Entity": { - "type": "object", - "properties": { - "Tag": { + }, + "Jobs": { + "type": "array", + "items": { + "type": "string" + } + }, + "Placement": { "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Tag" - ] - }, - "Error": { - "type": "object", - "properties": { - "Code": { + }, + "Series": { "type": "string" }, - "Info": { - "$ref": "#/definitions/ErrorInfo" + "SubnetsToZones": { + "type": "object", + "patternProperties": { + ".*": { + "type": "array", + "items": { + "type": "string" + } + } + } }, - "Message": { - "type": "string" + "Tags": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "Volumes": { + "type": "array", + "items": { + "$ref": "#/definitions/VolumeParams" + } } }, "additionalProperties": false, "required": [ - "Message", - "Code" + "Constraints", + "Series", + "Placement", + "Jobs", + "Volumes", + "Tags", + "SubnetsToZones", + "ImageMetadata", + "EndpointBindings" ] }, - "ErrorInfo": { - "type": "object", - "properties": { - "Macaroon": { - "$ref": "#/definitions/Macaroon" - }, - "MacaroonPath": { - "type": "string" - } - }, - "additionalProperties": false - }, - "ErrorResult": { + "ProvisioningInfoResult": { "type": "object", "properties": { "Error": { "$ref": "#/definitions/Error" + }, + "Result": { + "$ref": "#/definitions/ProvisioningInfo" } }, "additionalProperties": false, "required": [ - "Error" + "Error", + "Result" ] }, - "ErrorResults": { + "ProvisioningInfoResults": { "type": "object", "properties": { "Results": { "type": "array", "items": { - "$ref": "#/definitions/ErrorResult" + "$ref": "#/definitions/ProvisioningInfoResult" } } }, @@ -15698,537 +16061,465 @@ "Results" ] }, - "Macaroon": { + "SetStatus": { "type": "object", "properties": { - "caveats": { - "type": "array", - "items": { - "$ref": "#/definitions/caveat" - } - }, - "data": { - "type": "array", - "items": { - "type": "integer" - } - }, - "id": { - "$ref": "#/definitions/packet" - }, - "location": { - "$ref": "#/definitions/packet" - }, - "sig": { + "Entities": { "type": "array", "items": { - "type": "integer" + "$ref": "#/definitions/EntityStatusArgs" } } }, "additionalProperties": false, "required": [ - "data", - "location", - "id", - "caveats", - "sig" + "Entities" ] }, - "NotifyWatchResult": { + "Settings": { "type": "object", "properties": { - "Error": { - "$ref": "#/definitions/Error" + "Ftp": { + "type": "string" }, - "NotifyWatcherId": { + "Http": { + "type": "string" + }, + "Https": { + "type": "string" + }, + "NoProxy": { "type": "string" } }, "additionalProperties": false, "required": [ - "NotifyWatcherId", - "Error" + "Http", + "Https", + "Ftp", + "NoProxy" ] }, - "RebootActionResult": { + "StatusResult": { "type": "object", "properties": { - "error": { + "Data": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } + }, + "Error": { "$ref": "#/definitions/Error" }, - "result": { + "Id": { + "type": "string" + }, + "Info": { + "type": "string" + }, + "Life": { + "type": "string" + }, + "Since": { + "type": "string", + "format": "date-time" + }, + "Status": { "type": "string" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "Error", + "Id", + "Life", + "Status", + "Info", + "Data", + "Since" + ] }, - "RebootActionResults": { + "StatusResults": { "type": "object", "properties": { - "results": { + "Results": { "type": "array", "items": { - "$ref": "#/definitions/RebootActionResult" + "$ref": "#/definitions/StatusResult" } } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "Results" + ] }, - "caveat": { + "StringResult": { "type": "object", "properties": { - "caveatId": { - "$ref": "#/definitions/packet" - }, - "location": { - "$ref": "#/definitions/packet" + "Error": { + "$ref": "#/definitions/Error" }, - "verificationId": { - "$ref": "#/definitions/packet" + "Result": { + "type": "string" } }, "additionalProperties": false, "required": [ - "location", - "caveatId", - "verificationId" + "Error", + "Result" ] }, - "packet": { + "StringResults": { "type": "object", "properties": { - "headerLen": { - "type": "integer" - }, - "start": { - "type": "integer" - }, - "totalLen": { - "type": "integer" + "Results": { + "type": "array", + "items": { + "$ref": "#/definitions/StringResult" + } } }, "additionalProperties": false, "required": [ - "start", - "totalLen", - "headerLen" + "Results" ] - } - } - } - }, - { - "Name": "RelationUnitsWatcher", - "Version": 1, - "Schema": { - "type": "object", - "properties": { - "Next": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/RelationUnitsWatchResult" - } - } }, - "Stop": { - "type": "object" - } - }, - "definitions": { - "Error": { + "StringsResult": { "type": "object", "properties": { - "Code": { - "type": "string" - }, - "Info": { - "$ref": "#/definitions/ErrorInfo" + "Error": { + "$ref": "#/definitions/Error" }, - "Message": { - "type": "string" + "Result": { + "type": "array", + "items": { + "type": "string" + } } }, "additionalProperties": false, "required": [ - "Message", - "Code" + "Error", + "Result" ] }, - "ErrorInfo": { + "StringsWatchResult": { "type": "object", "properties": { - "Macaroon": { - "$ref": "#/definitions/Macaroon" + "Changes": { + "type": "array", + "items": { + "type": "string" + } }, - "MacaroonPath": { + "Error": { + "$ref": "#/definitions/Error" + }, + "StringsWatcherId": { "type": "string" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "StringsWatcherId", + "Changes", + "Error" + ] }, - "Macaroon": { + "StringsWatchResults": { "type": "object", "properties": { - "caveats": { - "type": "array", - "items": { - "$ref": "#/definitions/caveat" - } - }, - "data": { - "type": "array", - "items": { - "type": "integer" - } - }, - "id": { - "$ref": "#/definitions/packet" - }, - "location": { - "$ref": "#/definitions/packet" - }, - "sig": { + "Results": { "type": "array", "items": { - "type": "integer" + "$ref": "#/definitions/StringsWatchResult" } } }, "additionalProperties": false, "required": [ - "data", - "location", - "id", - "caveats", - "sig" + "Results" ] }, - "RelationUnitsChange": { + "Tools": { "type": "object", "properties": { - "Changed": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/UnitSettings" - } - } + "sha256": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "url": { + "type": "string" }, - "Departed": { - "type": "array", - "items": { - "type": "string" - } + "version": { + "$ref": "#/definitions/Binary" } }, "additionalProperties": false, "required": [ - "Changed", - "Departed" + "version", + "url", + "size" ] }, - "RelationUnitsWatchResult": { + "ToolsResult": { "type": "object", "properties": { - "Changes": { - "$ref": "#/definitions/RelationUnitsChange" + "DisableSSLHostnameVerification": { + "type": "boolean" }, "Error": { "$ref": "#/definitions/Error" }, - "RelationUnitsWatcherId": { - "type": "string" + "ToolsList": { + "type": "array", + "items": { + "$ref": "#/definitions/Tools" + } } }, "additionalProperties": false, "required": [ - "RelationUnitsWatcherId", - "Changes", + "ToolsList", + "DisableSSLHostnameVerification", "Error" ] }, - "UnitSettings": { + "ToolsResults": { "type": "object", "properties": { - "Version": { - "type": "integer" + "Results": { + "type": "array", + "items": { + "$ref": "#/definitions/ToolsResult" + } } }, "additionalProperties": false, "required": [ - "Version" + "Results" ] }, - "caveat": { + "UpdateBehavior": { "type": "object", "properties": { - "caveatId": { - "$ref": "#/definitions/packet" - }, - "location": { - "$ref": "#/definitions/packet" + "EnableOSRefreshUpdate": { + "type": "boolean" }, - "verificationId": { - "$ref": "#/definitions/packet" + "EnableOSUpgrade": { + "type": "boolean" } }, "additionalProperties": false, "required": [ - "location", - "caveatId", - "verificationId" + "EnableOSRefreshUpdate", + "EnableOSUpgrade" ] }, - "packet": { + "Value": { "type": "object", "properties": { - "headerLen": { + "arch": { + "type": "string" + }, + "container": { + "type": "string" + }, + "cpu-cores": { "type": "integer" }, - "start": { + "cpu-power": { "type": "integer" }, - "totalLen": { + "instance-type": { + "type": "string" + }, + "mem": { "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "start", - "totalLen", - "headerLen" - ] - } - } - } - }, - { - "Name": "Resumer", - "Version": 2, - "Schema": { - "type": "object", - "properties": { - "ResumeTransactions": { - "type": "object" - } - } - } - }, - { - "Name": "RetryStrategy", - "Version": 1, - "Schema": { - "type": "object", - "properties": { - "RetryStrategy": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" }, - "Result": { - "$ref": "#/definitions/RetryStrategyResults" - } - } - }, - "WatchRetryStrategy": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" + "root-disk": { + "type": "integer" }, - "Result": { - "$ref": "#/definitions/NotifyWatchResults" - } - } - } - }, - "definitions": { - "Entities": { - "type": "object", - "properties": { - "Entities": { + "spaces": { "type": "array", "items": { - "$ref": "#/definitions/Entity" + "type": "string" + } + }, + "tags": { + "type": "array", + "items": { + "type": "string" } + }, + "virt-type": { + "type": "string" } }, - "additionalProperties": false, - "required": [ - "Entities" - ] + "additionalProperties": false }, - "Entity": { + "Volume": { "type": "object", "properties": { - "Tag": { + "info": { + "$ref": "#/definitions/VolumeInfo" + }, + "volumetag": { "type": "string" } }, "additionalProperties": false, "required": [ - "Tag" + "volumetag", + "info" ] }, - "Error": { + "VolumeAttachmentInfo": { "type": "object", "properties": { - "Code": { + "busaddress": { "type": "string" }, - "Info": { - "$ref": "#/definitions/ErrorInfo" - }, - "Message": { + "devicelink": { "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Message", - "Code" - ] - }, - "ErrorInfo": { - "type": "object", - "properties": { - "Macaroon": { - "$ref": "#/definitions/Macaroon" }, - "MacaroonPath": { + "devicename": { "type": "string" + }, + "read-only": { + "type": "boolean" } }, "additionalProperties": false }, - "Macaroon": { + "VolumeAttachmentParams": { "type": "object", "properties": { - "caveats": { - "type": "array", - "items": { - "$ref": "#/definitions/caveat" - } + "instanceid": { + "type": "string" }, - "data": { - "type": "array", - "items": { - "type": "integer" - } + "machinetag": { + "type": "string" }, - "id": { - "$ref": "#/definitions/packet" + "provider": { + "type": "string" }, - "location": { - "$ref": "#/definitions/packet" + "read-only": { + "type": "boolean" }, - "sig": { - "type": "array", - "items": { - "type": "integer" - } - } - }, - "additionalProperties": false, - "required": [ - "data", - "location", - "id", - "caveats", - "sig" - ] - }, - "NotifyWatchResult": { - "type": "object", - "properties": { - "Error": { - "$ref": "#/definitions/Error" + "volumeid": { + "type": "string" }, - "NotifyWatcherId": { + "volumetag": { "type": "string" } }, "additionalProperties": false, "required": [ - "NotifyWatcherId", - "Error" + "volumetag", + "machinetag", + "provider" ] }, - "NotifyWatchResults": { + "VolumeInfo": { "type": "object", "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/NotifyWatchResult" - } + "hardwareid": { + "type": "string" + }, + "persistent": { + "type": "boolean" + }, + "size": { + "type": "integer" + }, + "volumeid": { + "type": "string" } }, "additionalProperties": false, "required": [ - "Results" + "volumeid", + "size", + "persistent" ] }, - "RetryStrategy": { + "VolumeParams": { "type": "object", "properties": { - "JitterRetryTime": { - "type": "boolean" + "attachment": { + "$ref": "#/definitions/VolumeAttachmentParams" }, - "MaxRetryTime": { - "type": "integer" + "attributes": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "additionalProperties": true + } + } }, - "MinRetryTime": { - "type": "integer" + "provider": { + "type": "string" }, - "RetryTimeFactor": { + "size": { "type": "integer" }, - "ShouldRetry": { - "type": "boolean" + "tags": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string" + } + } + }, + "volumetag": { + "type": "string" } }, "additionalProperties": false, "required": [ - "ShouldRetry", - "MinRetryTime", - "MaxRetryTime", - "JitterRetryTime", - "RetryTimeFactor" + "volumetag", + "size", + "provider" ] }, - "RetryStrategyResult": { + "WatchContainer": { "type": "object", "properties": { - "Error": { - "$ref": "#/definitions/Error" + "ContainerType": { + "type": "string" }, - "Result": { - "$ref": "#/definitions/RetryStrategy" + "MachineTag": { + "type": "string" } }, "additionalProperties": false, "required": [ - "Error", - "Result" + "MachineTag", + "ContainerType" ] }, - "RetryStrategyResults": { + "WatchContainers": { "type": "object", "properties": { - "Results": { + "Params": { "type": "array", "items": { - "$ref": "#/definitions/RetryStrategyResult" + "$ref": "#/definitions/WatchContainer" } } }, "additionalProperties": false, "required": [ - "Results" + "Params" ] }, "caveat": { @@ -16275,49 +16566,30 @@ } }, { - "Name": "SSHClient", + "Name": "ProxyUpdater", "Version": 1, "Schema": { "type": "object", "properties": { - "PrivateAddress": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/SSHAddressResults" - } - } - }, - "Proxy": { - "type": "object", - "properties": { - "Result": { - "$ref": "#/definitions/SSHProxyResult" - } - } - }, - "PublicAddress": { + "ProxyConfig": { "type": "object", "properties": { "Params": { "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/SSHAddressResults" + "$ref": "#/definitions/ProxyConfigResults" } } }, - "PublicKeys": { + "WatchForProxyConfigAndAPIHostPortChanges": { "type": "object", "properties": { "Params": { "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/SSHPublicKeysResults" + "$ref": "#/definitions/NotifyWatchResults" } } } @@ -16418,73 +16690,93 @@ "sig" ] }, - "SSHAddressResult": { + "NotifyWatchResult": { "type": "object", "properties": { - "address": { - "type": "string" - }, - "error": { + "Error": { "$ref": "#/definitions/Error" + }, + "NotifyWatcherId": { + "type": "string" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "NotifyWatcherId", + "Error" + ] }, - "SSHAddressResults": { + "NotifyWatchResults": { "type": "object", "properties": { - "results": { + "Results": { "type": "array", "items": { - "$ref": "#/definitions/SSHAddressResult" + "$ref": "#/definitions/NotifyWatchResult" } } }, "additionalProperties": false, "required": [ - "results" + "Results" ] }, - "SSHProxyResult": { + "ProxyConfig": { "type": "object", "properties": { - "use-proxy": { - "type": "boolean" + "FTP": { + "type": "string" + }, + "HTTP": { + "type": "string" + }, + "HTTPS": { + "type": "string" + }, + "NoProxy": { + "type": "string" } }, "additionalProperties": false, "required": [ - "use-proxy" + "HTTP", + "HTTPS", + "FTP", + "NoProxy" ] }, - "SSHPublicKeysResult": { + "ProxyConfigResult": { "type": "object", "properties": { - "error": { + "APTProxySettings": { + "$ref": "#/definitions/ProxyConfig" + }, + "Error": { "$ref": "#/definitions/Error" }, - "public-keys": { - "type": "array", - "items": { - "type": "string" - } + "ProxySettings": { + "$ref": "#/definitions/ProxyConfig" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "ProxySettings", + "APTProxySettings" + ] }, - "SSHPublicKeysResults": { + "ProxyConfigResults": { "type": "object", "properties": { - "results": { + "Results": { "type": "array", "items": { - "$ref": "#/definitions/SSHPublicKeysResult" + "$ref": "#/definitions/ProxyConfigResult" } } }, "additionalProperties": false, "required": [ - "results" + "Results" ] }, "caveat": { @@ -16519,313 +16811,290 @@ "totalLen": { "type": "integer" } - }, - "additionalProperties": false, - "required": [ - "start", - "totalLen", - "headerLen" - ] - } - } - } - }, - { - "Name": "Service", - "Version": 3, - "Schema": { - "type": "object", - "properties": { - "AddRelation": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/AddRelation" - }, - "Result": { - "$ref": "#/definitions/AddRelationResults" - } - } - }, - "AddUnits": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/AddServiceUnits" - }, - "Result": { - "$ref": "#/definitions/AddServiceUnitsResults" - } - } - }, - "CharmRelations": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ServiceCharmRelations" - }, - "Result": { - "$ref": "#/definitions/ServiceCharmRelationsResults" - } - } - }, - "Deploy": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ServicesDeploy" - }, - "Result": { - "$ref": "#/definitions/ErrorResults" - } - } - }, - "Destroy": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ServiceDestroy" - } - } - }, - "DestroyRelation": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DestroyRelation" - } - } - }, - "DestroyUnits": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/DestroyServiceUnits" - } - } - }, - "Expose": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ServiceExpose" - } - } - }, - "Get": { + }, + "additionalProperties": false, + "required": [ + "start", + "totalLen", + "headerLen" + ] + } + } + } + }, + { + "Name": "Reboot", + "Version": 2, + "Schema": { + "type": "object", + "properties": { + "ClearReboot": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/ServiceGet" + "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/ServiceGetResults" + "$ref": "#/definitions/ErrorResults" } } }, - "GetCharmURL": { + "GetRebootAction": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/ServiceGet" + "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/StringResult" + "$ref": "#/definitions/RebootActionResults" } } }, - "GetConstraints": { + "RequestReboot": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/GetServiceConstraints" + "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/GetConstraintsResults" + "$ref": "#/definitions/ErrorResults" } } }, - "Set": { + "WatchForRebootEvent": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/ServiceSet" + "Result": { + "$ref": "#/definitions/NotifyWatchResult" } } - }, - "SetCharm": { + } + }, + "definitions": { + "Entities": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/ServiceSetCharm" + "Entities": { + "type": "array", + "items": { + "$ref": "#/definitions/Entity" + } } - } + }, + "additionalProperties": false, + "required": [ + "Entities" + ] }, - "SetConstraints": { + "Entity": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/SetConstraints" + "Tag": { + "type": "string" } - } + }, + "additionalProperties": false, + "required": [ + "Tag" + ] }, - "SetMetricCredentials": { + "Error": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/ServiceMetricCredentials" + "Code": { + "type": "string" }, - "Result": { - "$ref": "#/definitions/ErrorResults" + "Info": { + "$ref": "#/definitions/ErrorInfo" + }, + "Message": { + "type": "string" } - } + }, + "additionalProperties": false, + "required": [ + "Message", + "Code" + ] }, - "Unexpose": { + "ErrorInfo": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/ServiceUnexpose" + "Macaroon": { + "$ref": "#/definitions/Macaroon" + }, + "MacaroonPath": { + "type": "string" } - } + }, + "additionalProperties": false }, - "Unset": { + "ErrorResult": { "type": "object", "properties": { - "Params": { - "$ref": "#/definitions/ServiceUnset" + "Error": { + "$ref": "#/definitions/Error" } - } + }, + "additionalProperties": false, + "required": [ + "Error" + ] }, - "Update": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/ServiceUpdate" - } - } - } - }, - "definitions": { - "AddRelation": { + "ErrorResults": { "type": "object", "properties": { - "Endpoints": { + "Results": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/ErrorResult" } } }, "additionalProperties": false, "required": [ - "Endpoints" + "Results" ] }, - "AddRelationResults": { + "Macaroon": { "type": "object", "properties": { - "Endpoints": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/Relation" - } + "caveats": { + "type": "array", + "items": { + "$ref": "#/definitions/caveat" + } + }, + "data": { + "type": "array", + "items": { + "type": "integer" + } + }, + "id": { + "$ref": "#/definitions/packet" + }, + "location": { + "$ref": "#/definitions/packet" + }, + "sig": { + "type": "array", + "items": { + "type": "integer" } } }, "additionalProperties": false, "required": [ - "Endpoints" + "data", + "location", + "id", + "caveats", + "sig" ] }, - "AddServiceUnits": { + "NotifyWatchResult": { "type": "object", "properties": { - "NumUnits": { - "type": "integer" - }, - "Placement": { - "type": "array", - "items": { - "$ref": "#/definitions/Placement" - } + "Error": { + "$ref": "#/definitions/Error" }, - "ServiceName": { + "NotifyWatcherId": { "type": "string" } }, "additionalProperties": false, "required": [ - "ServiceName", - "NumUnits", - "Placement" + "NotifyWatcherId", + "Error" ] }, - "AddServiceUnitsResults": { + "RebootActionResult": { "type": "object", "properties": { - "Units": { + "error": { + "$ref": "#/definitions/Error" + }, + "result": { + "type": "string" + } + }, + "additionalProperties": false + }, + "RebootActionResults": { + "type": "object", + "properties": { + "results": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/RebootActionResult" } } }, - "additionalProperties": false, - "required": [ - "Units" - ] + "additionalProperties": false }, - "Constraints": { + "caveat": { "type": "object", "properties": { - "Count": { - "type": "integer" + "caveatId": { + "$ref": "#/definitions/packet" }, - "Pool": { - "type": "string" + "location": { + "$ref": "#/definitions/packet" }, - "Size": { - "type": "integer" + "verificationId": { + "$ref": "#/definitions/packet" } }, "additionalProperties": false, "required": [ - "Pool", - "Size", - "Count" + "location", + "caveatId", + "verificationId" ] }, - "DestroyRelation": { + "packet": { "type": "object", "properties": { - "Endpoints": { - "type": "array", - "items": { - "type": "string" - } + "headerLen": { + "type": "integer" + }, + "start": { + "type": "integer" + }, + "totalLen": { + "type": "integer" } }, "additionalProperties": false, "required": [ - "Endpoints" + "start", + "totalLen", + "headerLen" ] - }, - "DestroyServiceUnits": { + } + } + } + }, + { + "Name": "RelationUnitsWatcher", + "Version": 1, + "Schema": { + "type": "object", + "properties": { + "Next": { "type": "object", "properties": { - "UnitNames": { - "type": "array", - "items": { - "type": "string" - } + "Result": { + "$ref": "#/definitions/RelationUnitsWatchResult" } - }, - "additionalProperties": false, - "required": [ - "UnitNames" - ] + } }, + "Stop": { + "type": "object" + } + }, + "definitions": { "Error": { "type": "object", "properties": { @@ -16857,57 +17126,6 @@ }, "additionalProperties": false }, - "ErrorResult": { - "type": "object", - "properties": { - "Error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "Error" - ] - }, - "ErrorResults": { - "type": "object", - "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "Results" - ] - }, - "GetConstraintsResults": { - "type": "object", - "properties": { - "Constraints": { - "$ref": "#/definitions/Value" - } - }, - "additionalProperties": false, - "required": [ - "Constraints" - ] - }, - "GetServiceConstraints": { - "type": "object", - "properties": { - "ServiceName": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "ServiceName" - ] - }, "Macaroon": { "type": "object", "properties": { @@ -16945,70 +17163,18 @@ "sig" ] }, - "Placement": { - "type": "object", - "properties": { - "Directive": { - "type": "string" - }, - "Scope": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Scope", - "Directive" - ] - }, - "Relation": { + "RelationUnitsChange": { "type": "object", "properties": { - "Interface": { - "type": "string" - }, - "Limit": { - "type": "integer" - }, - "Name": { - "type": "string" - }, - "Optional": { - "type": "boolean" - }, - "Role": { - "type": "string" + "Changed": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/UnitSettings" + } + } }, - "Scope": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "Name", - "Role", - "Interface", - "Optional", - "Limit", - "Scope" - ] - }, - "ServiceCharmRelations": { - "type": "object", - "properties": { - "ServiceName": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "ServiceName" - ] - }, - "ServiceCharmRelationsResults": { - "type": "object", - "properties": { - "CharmRelations": { + "Departed": { "type": "array", "items": { "type": "string" @@ -17017,361 +17183,289 @@ }, "additionalProperties": false, "required": [ - "CharmRelations" + "Changed", + "Departed" ] }, - "ServiceDeploy": { + "RelationUnitsWatchResult": { "type": "object", "properties": { - "Channel": { - "type": "string" - }, - "CharmUrl": { - "type": "string" - }, - "Config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "ConfigYAML": { - "type": "string" - }, - "Constraints": { - "$ref": "#/definitions/Value" - }, - "EndpointBindings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "NumUnits": { - "type": "integer" - }, - "Placement": { - "type": "array", - "items": { - "$ref": "#/definitions/Placement" - } - }, - "Resources": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } + "Changes": { + "$ref": "#/definitions/RelationUnitsChange" }, - "Series": { - "type": "string" + "Error": { + "$ref": "#/definitions/Error" }, - "ServiceName": { + "RelationUnitsWatcherId": { "type": "string" - }, - "Storage": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/Constraints" - } - } } }, "additionalProperties": false, "required": [ - "ServiceName", - "Series", - "CharmUrl", - "Channel", - "NumUnits", - "Config", - "ConfigYAML", - "Constraints", - "Placement", - "Storage", - "EndpointBindings", - "Resources" + "RelationUnitsWatcherId", + "Changes", + "Error" ] }, - "ServiceDestroy": { + "UnitSettings": { "type": "object", "properties": { - "ServiceName": { - "type": "string" + "Version": { + "type": "integer" } }, "additionalProperties": false, "required": [ - "ServiceName" + "Version" ] }, - "ServiceExpose": { + "caveat": { "type": "object", "properties": { - "ServiceName": { - "type": "string" + "caveatId": { + "$ref": "#/definitions/packet" + }, + "location": { + "$ref": "#/definitions/packet" + }, + "verificationId": { + "$ref": "#/definitions/packet" } }, "additionalProperties": false, "required": [ - "ServiceName" + "location", + "caveatId", + "verificationId" ] }, - "ServiceGet": { + "packet": { "type": "object", "properties": { - "ServiceName": { - "type": "string" + "headerLen": { + "type": "integer" + }, + "start": { + "type": "integer" + }, + "totalLen": { + "type": "integer" } }, "additionalProperties": false, "required": [ - "ServiceName" + "start", + "totalLen", + "headerLen" ] - }, - "ServiceGetResults": { + } + } + } + }, + { + "Name": "Resumer", + "Version": 2, + "Schema": { + "type": "object", + "properties": { + "ResumeTransactions": { + "type": "object" + } + } + } + }, + { + "Name": "RetryStrategy", + "Version": 1, + "Schema": { + "type": "object", + "properties": { + "RetryStrategy": { "type": "object", "properties": { - "Charm": { - "type": "string" - }, - "Config": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "additionalProperties": true - } - } - }, - "Constraints": { - "$ref": "#/definitions/Value" + "Params": { + "$ref": "#/definitions/Entities" }, - "Service": { - "type": "string" + "Result": { + "$ref": "#/definitions/RetryStrategyResults" } - }, - "additionalProperties": false, - "required": [ - "Service", - "Charm", - "Config", - "Constraints" - ] + } }, - "ServiceMetricCredential": { + "WatchRetryStrategy": { "type": "object", "properties": { - "MetricCredentials": { - "type": "array", - "items": { - "type": "integer" - } + "Params": { + "$ref": "#/definitions/Entities" }, - "ServiceName": { - "type": "string" + "Result": { + "$ref": "#/definitions/NotifyWatchResults" } - }, - "additionalProperties": false, - "required": [ - "ServiceName", - "MetricCredentials" - ] - }, - "ServiceMetricCredentials": { + } + } + }, + "definitions": { + "Entities": { "type": "object", "properties": { - "Creds": { + "Entities": { "type": "array", "items": { - "$ref": "#/definitions/ServiceMetricCredential" + "$ref": "#/definitions/Entity" } } }, "additionalProperties": false, "required": [ - "Creds" + "Entities" ] }, - "ServiceSet": { + "Entity": { "type": "object", "properties": { - "Options": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } - }, - "ServiceName": { + "Tag": { "type": "string" } }, "additionalProperties": false, "required": [ - "ServiceName", - "Options" + "Tag" ] }, - "ServiceSetCharm": { + "Error": { "type": "object", "properties": { - "charmurl": { - "type": "string" - }, - "cs-channel": { + "Code": { "type": "string" }, - "forceseries": { - "type": "boolean" - }, - "forceunits": { - "type": "boolean" - }, - "resourceids": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } + "Info": { + "$ref": "#/definitions/ErrorInfo" }, - "servicename": { + "Message": { "type": "string" } }, "additionalProperties": false, "required": [ - "servicename", - "charmurl", - "cs-channel", - "forceunits", - "forceseries", - "resourceids" + "Message", + "Code" ] }, - "ServiceUnexpose": { + "ErrorInfo": { "type": "object", "properties": { - "ServiceName": { + "Macaroon": { + "$ref": "#/definitions/Macaroon" + }, + "MacaroonPath": { "type": "string" } }, - "additionalProperties": false, - "required": [ - "ServiceName" - ] + "additionalProperties": false }, - "ServiceUnset": { + "Macaroon": { "type": "object", "properties": { - "Options": { + "caveats": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/caveat" } }, - "ServiceName": { - "type": "string" + "data": { + "type": "array", + "items": { + "type": "integer" + } + }, + "id": { + "$ref": "#/definitions/packet" + }, + "location": { + "$ref": "#/definitions/packet" + }, + "sig": { + "type": "array", + "items": { + "type": "integer" + } } }, "additionalProperties": false, "required": [ - "ServiceName", - "Options" + "data", + "location", + "id", + "caveats", + "sig" ] }, - "ServiceUpdate": { + "NotifyWatchResult": { "type": "object", "properties": { - "CharmUrl": { - "type": "string" - }, - "Constraints": { - "$ref": "#/definitions/Value" - }, - "ForceCharmUrl": { - "type": "boolean" - }, - "ForceSeries": { - "type": "boolean" - }, - "MinUnits": { - "type": "integer" - }, - "ServiceName": { - "type": "string" - }, - "SettingsStrings": { - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - } + "Error": { + "$ref": "#/definitions/Error" }, - "SettingsYAML": { + "NotifyWatcherId": { "type": "string" } }, "additionalProperties": false, "required": [ - "ServiceName", - "CharmUrl", - "ForceCharmUrl", - "ForceSeries", - "MinUnits", - "SettingsStrings", - "SettingsYAML", - "Constraints" + "NotifyWatcherId", + "Error" ] }, - "ServicesDeploy": { + "NotifyWatchResults": { "type": "object", "properties": { - "Services": { + "Results": { "type": "array", "items": { - "$ref": "#/definitions/ServiceDeploy" + "$ref": "#/definitions/NotifyWatchResult" } } }, "additionalProperties": false, "required": [ - "Services" + "Results" ] }, - "SetConstraints": { + "RetryStrategy": { "type": "object", "properties": { - "Constraints": { - "$ref": "#/definitions/Value" + "JitterRetryTime": { + "type": "boolean" }, - "ServiceName": { - "type": "string" + "MaxRetryTime": { + "type": "integer" + }, + "MinRetryTime": { + "type": "integer" + }, + "RetryTimeFactor": { + "type": "integer" + }, + "ShouldRetry": { + "type": "boolean" } }, "additionalProperties": false, "required": [ - "ServiceName", - "Constraints" + "ShouldRetry", + "MinRetryTime", + "MaxRetryTime", + "JitterRetryTime", + "RetryTimeFactor" ] }, - "StringResult": { + "RetryStrategyResult": { "type": "object", "properties": { "Error": { "$ref": "#/definitions/Error" }, "Result": { - "type": "string" + "$ref": "#/definitions/RetryStrategy" } }, "additionalProperties": false, @@ -17380,47 +17474,20 @@ "Result" ] }, - "Value": { + "RetryStrategyResults": { "type": "object", "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": { - "type": "array", - "items": { - "type": "string" - } - }, - "tags": { + "Results": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/RetryStrategyResult" } - }, - "virt-type": { - "type": "string" } }, - "additionalProperties": false + "additionalProperties": false, + "required": [ + "Results" + ] }, "caveat": { "type": "object", @@ -17466,27 +17533,49 @@ } }, { - "Name": "ServiceScaler", + "Name": "SSHClient", "Version": 1, "Schema": { "type": "object", "properties": { - "Rescale": { + "PrivateAddress": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/SSHAddressResults" + } + } + }, + "Proxy": { + "type": "object", + "properties": { + "Result": { + "$ref": "#/definitions/SSHProxyResult" + } + } + }, + "PublicAddress": { "type": "object", "properties": { "Params": { "$ref": "#/definitions/Entities" }, "Result": { - "$ref": "#/definitions/ErrorResults" + "$ref": "#/definitions/SSHAddressResults" } } }, - "Watch": { + "PublicKeys": { "type": "object", "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, "Result": { - "$ref": "#/definitions/StringsWatchResult" + "$ref": "#/definitions/SSHPublicKeysResults" } } } @@ -17550,33 +17639,6 @@ }, "additionalProperties": false }, - "ErrorResult": { - "type": "object", - "properties": { - "Error": { - "$ref": "#/definitions/Error" - } - }, - "additionalProperties": false, - "required": [ - "Error" - ] - }, - "ErrorResults": { - "type": "object", - "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/ErrorResult" - } - } - }, - "additionalProperties": false, - "required": [ - "Results" - ] - }, "Macaroon": { "type": "object", "properties": { @@ -17614,27 +17676,73 @@ "sig" ] }, - "StringsWatchResult": { + "SSHAddressResult": { "type": "object", "properties": { - "Changes": { + "address": { + "type": "string" + }, + "error": { + "$ref": "#/definitions/Error" + } + }, + "additionalProperties": false + }, + "SSHAddressResults": { + "type": "object", + "properties": { + "results": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/SSHAddressResult" } - }, - "Error": { + } + }, + "additionalProperties": false, + "required": [ + "results" + ] + }, + "SSHProxyResult": { + "type": "object", + "properties": { + "use-proxy": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "use-proxy" + ] + }, + "SSHPublicKeysResult": { + "type": "object", + "properties": { + "error": { "$ref": "#/definitions/Error" }, - "StringsWatcherId": { - "type": "string" + "public-keys": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "SSHPublicKeysResults": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/SSHPublicKeysResult" + } } }, "additionalProperties": false, "required": [ - "StringsWatcherId", - "Changes", - "Error" + "results" ] }, "caveat": { @@ -18221,13 +18329,17 @@ "StatusHistoryPruneArgs": { "type": "object", "properties": { - "MaxLogsPerEntity": { + "MaxHistoryMB": { + "type": "integer" + }, + "MaxHistoryTime": { "type": "integer" } }, "additionalProperties": false, "required": [ - "MaxLogsPerEntity" + "MaxHistoryTime", + "MaxHistoryMB" ] } } @@ -21529,7 +21641,7 @@ }, { "Name": "Uniter", - "Version": 3, + "Version": 4, "Schema": { "type": "object", "properties": { @@ -21593,6 +21705,28 @@ } } }, + "ApplicationOwner": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringResults" + } + } + }, + "ApplicationStatus": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/ApplicationStatusResults" + } + } + }, "AssignedMachine": { "type": "object", "properties": { @@ -22007,28 +22141,6 @@ } } }, - "ServiceOwner": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringResults" - } - } - }, - "ServiceStatus": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/ServiceStatusResults" - } - } - }, "SetAgentStatus": { "type": "object", "properties": { @@ -22040,22 +22152,22 @@ } } }, - "SetCharmURL": { + "SetApplicationStatus": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/EntitiesCharmURL" + "$ref": "#/definitions/SetStatus" }, "Result": { "$ref": "#/definitions/ErrorResults" } } }, - "SetServiceStatus": { + "SetCharmURL": { "type": "object", "properties": { "Params": { - "$ref": "#/definitions/SetStatus" + "$ref": "#/definitions/EntitiesCharmURL" }, "Result": { "$ref": "#/definitions/ErrorResults" @@ -22169,6 +22281,17 @@ } } }, + "WatchApplicationRelations": { + "type": "object", + "properties": { + "Params": { + "$ref": "#/definitions/Entities" + }, + "Result": { + "$ref": "#/definitions/StringsWatchResults" + } + } + }, "WatchConfigSettings": { "type": "object", "properties": { @@ -22221,17 +22344,6 @@ } } }, - "WatchServiceRelations": { - "type": "object", - "properties": { - "Params": { - "$ref": "#/definitions/Entities" - }, - "Result": { - "$ref": "#/definitions/StringsWatchResults" - } - } - }, "WatchStorageAttachments": { "type": "object", "properties": { @@ -22428,6 +22540,46 @@ "Scope" ] }, + "ApplicationStatusResult": { + "type": "object", + "properties": { + "Application": { + "$ref": "#/definitions/StatusResult" + }, + "Error": { + "$ref": "#/definitions/Error" + }, + "Units": { + "type": "object", + "patternProperties": { + ".*": { + "$ref": "#/definitions/StatusResult" + } + } + } + }, + "additionalProperties": false, + "required": [ + "Application", + "Units", + "Error" + ] + }, + "ApplicationStatusResults": { + "type": "object", + "properties": { + "Results": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationStatusResult" + } + } + }, + "additionalProperties": false, + "required": [ + "Results" + ] + }, "BoolResult": { "type": "object", "properties": { @@ -22541,16 +22693,16 @@ "Endpoint": { "type": "object", "properties": { + "ApplicationName": { + "type": "string" + }, "Relation": { "$ref": "#/definitions/Relation" - }, - "ServiceName": { - "type": "string" } }, "additionalProperties": false, "required": [ - "ServiceName", + "ApplicationName", "Relation" ] }, @@ -22962,7 +23114,7 @@ "MergeLeadershipSettingsParam": { "type": "object", "properties": { - "ServiceTag": { + "ApplicationTag": { "type": "string" }, "Settings": { @@ -22976,7 +23128,7 @@ }, "additionalProperties": false, "required": [ - "ServiceTag", + "ApplicationTag", "Settings" ] }, @@ -23558,46 +23710,6 @@ "Results" ] }, - "ServiceStatusResult": { - "type": "object", - "properties": { - "Error": { - "$ref": "#/definitions/Error" - }, - "Service": { - "$ref": "#/definitions/StatusResult" - }, - "Units": { - "type": "object", - "patternProperties": { - ".*": { - "$ref": "#/definitions/StatusResult" - } - } - } - }, - "additionalProperties": false, - "required": [ - "Service", - "Units", - "Error" - ] - }, - "ServiceStatusResults": { - "type": "object", - "properties": { - "Results": { - "type": "array", - "items": { - "$ref": "#/definitions/ServiceStatusResult" - } - } - }, - "additionalProperties": false, - "required": [ - "Results" - ] - }, "SetStatus": { "type": "object", "properties": { @@ -25191,3 +25303,4 @@ } } ] + diff --git a/juju/client/watcher.py b/juju/client/watcher.py new file mode 100644 index 0000000..346627c --- /dev/null +++ b/juju/client/watcher.py @@ -0,0 +1,15 @@ +from .client import AllWatcher as BaseAllWatcher +from .client import Client + + +class AllWatcher(BaseAllWatcher): + async def rpc(self, msg): + if not hasattr(self, 'Id'): + client = Client() + client.connect(self.connection) + + result = await client.WatchAll() + self.Id = result.allwatcherid + + msg['Id'] = self.Id + return await super(AllWatcher, self).rpc(msg) -- 2.25.1